Revert erroneous macro added and modify __OUTPUT_FORMAT__ to a string const

This commit is contained in:
Stanislav Karchebny 2003-09-25 11:43:28 +00:00
parent 5e8f36611f
commit d52236c00e
11 changed files with 4 additions and 15 deletions

View File

@ -3,10 +3,7 @@
* "make spotless" no longer deletes config.h.in.
* Unterminated string auto termination.
* %(el)if(n)idn insensitivity to string quotes difference (#809300).
* __NASM_FORMAT__ now gives output format chosen for compiling.
See test/nasmformat.asm for details and output/out*.c for actual values
for this macro.
!!NEEDS DOCUMENTING!!
* (nasm.c) __OUTPUT_FORMAT__ changed to string value instead of symbol.
0.98.38
-------

2
nasm.c
View File

@ -185,7 +185,7 @@ int main(int argc, char **argv)
/* define some macros dependent of command-line */
{
char temp [64];
sprintf (temp, "__OUTPUT_FORMAT__=%s\n", ofmt->shortname);
sprintf (temp, "__OUTPUT_FORMAT__='%s'\n", ofmt->shortname);
pp_pre_define (temp);
}

View File

@ -877,7 +877,6 @@ static void aout_filename (char *inname, char *outname, efunc error)
static const char *aout_stdmac[] = {
"%define __SECT__ [section .text]",
"%define __NASM_FORMAT__ 'aout'",
"%macro __NASM_CDecl__ 1",
"%endmacro",
NULL

View File

@ -555,7 +555,6 @@ static void as86_filename (char *inname, char *outname, efunc error)
static const char *as86_stdmac[] = {
"%define __SECT__ [section .text]",
"%define __NASM_FORMAT__ 'as86'",
"%macro __NASM_CDecl__ 1",
"%endmacro",
NULL

View File

@ -137,7 +137,6 @@ static char *infile, *outfile;
static const char *bin_stdmac[] = {
"%define __SECT__ [section .text]",
"%define __NASM_FORMAT__ 'bin'",
"%imacro org 1+.nolist",
"[org %1]",
"%endmacro",

View File

@ -820,7 +820,6 @@ static void coff_win32_filename (char *inname, char *outname, efunc error)
static const char *coff_stdmac[] = {
"%define __SECT__ [section .text]",
"%define __NASM_FORMAT__ 'coff'",
"%macro __NASM_CDecl__ 1",
"%endmacro",
"%imacro export 1+.nolist",

View File

@ -1225,7 +1225,6 @@ static void elf_filename (char *inname, char *outname, efunc error)
static const char *elf_stdmac[] = {
"%define __SECT__ [section .text]",
"%define __NASM_FORMAT__ 'elf'",
"%macro __NASM_CDecl__ 1",
"%define $_%1 $%1",
"%endmacro",

View File

@ -2285,7 +2285,6 @@ void obj_fwrite(ObjRecord *orp)
static const char *obj_stdmac[] = {
"%define __SECT__ [section .text]",
"%define __NASM_FORMAT__ 'obj'",
"%imacro group 1+.nolist",
"[group %1]",
"%endmacro",

View File

@ -501,7 +501,6 @@ static void rdf_filename (char *inname, char *outname, efunc error) {
static char *rdf_stdmac[] = {
"%define __SECT__ [section .text]",
"%define __NASM_FORMAT__ 'oldrdf'", /* Its always oldrdf for consistency with rdf version 2 */
"%imacro library 1+.nolist",
"[library %1]",
"%endmacro",

View File

@ -753,7 +753,6 @@ static void rdf2_filename (char *inname, char *outname, efunc error) {
static const char *rdf2_stdmac[] = {
"%define __SECT__ [section .text]",
"%define __NASM_FORMAT__ 'rdf'",
"%imacro library 1+.nolist",
"[library %1]",
"%endmacro",

View File

@ -1,9 +1,9 @@
%if __NASM_FORMAT__ == 'bin'
%if __OUTPUT_FORMAT__ == 'bin'
db 'This is binary format file'
%elif __NASM_FORMAT__ == 'obj'
%elif __OUTPUT_FORMAT__ == 'obj'
db 'This is object format file'