"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "nasmlib/ver.c" between
nasm-2.15.04.tar.xz and nasm-2.15.05.tar.xz

About: NASM (Netwide Assembler) is an 80x86 and x86-64 assembler designed for portability and modularity. It supports a range of object file formats including Linux and *BSD a.out, ELF, COFF, Mach-O, Microsoft 16-bit OBJ, Win32 and Win64. It supports all currently known x86 architectural extensions, and has strong support for macros.

ver.c  (nasm-2.15.04.tar.xz):ver.c  (nasm-2.15.05.tar.xz)
/* ----------------------------------------------------------------------- * /* ----------------------------------------------------------------------- *
* *
* Copyright 1996-2016 The NASM Authors - All Rights Reserved * Copyright 1996-2020 The NASM Authors - All Rights Reserved
* See the file AUTHORS included with the NASM distribution for * See the file AUTHORS included with the NASM distribution for
* the specific copyright holders. * the specific copyright holders.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following * modification, are permitted provided that the following
* conditions are met: * conditions are met:
* *
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above * * Redistributions in binary form must reproduce the above
skipping to change at line 46 skipping to change at line 46
/* This is printed when entering nasm -v */ /* This is printed when entering nasm -v */
const char nasm_version[] = NASM_VER; const char nasm_version[] = NASM_VER;
const char nasm_date[] = __DATE__; const char nasm_date[] = __DATE__;
const char nasm_compile_options[] = "" const char nasm_compile_options[] = ""
#ifdef DEBUG #ifdef DEBUG
" with -DDEBUG" " with -DDEBUG"
#endif #endif
; ;
/* These are used by some backends. */ bool reproducible; /* Reproducible output */
static const char __nasm_comment[] =
"The Netwide Assembler " NASM_VER;
static const char __nasm_signature[] =
"NASM " NASM_VER;
/* These are constant so we could pass regression tests */
static const char __nasm_comment_const[] ="The Netwide Assembler CONST";
static const char __nasm_signature_const[] = "NASM CONST";
int nasm_test_run(void) /* These are used by some backends. For a reproducible build,
* these cannot contain version numbers.
*/
static const char * const _nasm_comment[2] =
{ {
return getenv("NASM_TEST_RUN") ? 1 : 0; "The Netwide Assembler " NASM_VER,
} "The Netwide Assembler"
};
static const char * const _nasm_signature[2] = {
"NASM " NASM_VER,
"NASM"
};
const char *nasm_comment(void) const char *nasm_comment(void)
{ {
if (!nasm_test_run()) return _nasm_comment[reproducible];
return __nasm_comment;
return __nasm_comment_const;
} }
size_t nasm_comment_len(void) size_t nasm_comment_len(void)
{ {
if (!nasm_test_run()) return strlen(nasm_comment());
return strlen(__nasm_comment);
return strlen(__nasm_comment_const);
} }
const char *nasm_signature(void) const char *nasm_signature(void)
{ {
if (!nasm_test_run()) return _nasm_signature[reproducible];
return __nasm_signature;
return __nasm_signature_const;
} }
size_t nasm_signature_len(void) size_t nasm_signature_len(void)
{ {
if (!nasm_test_run()) return strlen(nasm_signature());
return strlen(__nasm_signature);
return strlen(__nasm_signature_const);
} }
 End of changes. 8 change blocks. 
26 lines changed or deleted 18 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)