diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-10-10 14:58:45 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-10-10 14:58:45 -0700 |
commit | 6867acc18ee541e361a5fa1e5a1bac3a478a3856 (patch) | |
tree | b13b49a2e8227469c3eb7cb983e4b2bb27868466 /listing.c | |
parent | be1b83d24aee03d29913957fdba40cf7a268e660 (diff) | |
download | nasm-6867acc18ee541e361a5fa1e5a1bac3a478a3856.tar.gz nasm-6867acc18ee541e361a5fa1e5a1bac3a478a3856.tar.bz2 nasm-6867acc18ee541e361a5fa1e5a1bac3a478a3856.zip |
Use the compiler-provided booleans if available, otherwise emulate
Both C and C++ have "bool", "true" and "false" in lower case; C
requires <stdbool.h> for this, in C++ it is an inherent type built
into the compiler. Use those instead of the old macros; emulate with
a simple typedef enum if unavailable.
Diffstat (limited to 'listing.c')
-rw-r--r-- | listing.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -76,7 +76,7 @@ static void list_emit(void) fprintf(listfp, " %s", listline); fputc('\n', listfp); - listlinep = FALSE; + listlinep = false; listdata[0] = '\0'; } @@ -90,13 +90,13 @@ static void list_init(char *fname, efunc error) *listline = '\0'; listlineno = 0; - listp = TRUE; + listp = true; listlevel = 0; suppress = 0; mistack = nasm_malloc(sizeof(MacroInhibit)); mistack->next = NULL; mistack->level = 0; - mistack->inhibiting = TRUE; + mistack->inhibiting = true; } static void list_cleanup(void) @@ -232,7 +232,7 @@ static void list_line(int type, char *line) } } list_emit(); - listlinep = TRUE; + listlinep = true; strncpy(listline, line, LIST_MAX_LEN - 1); listline[LIST_MAX_LEN - 1] = '\0'; listlevel_e = listlevel; @@ -254,13 +254,13 @@ static void list_uplevel(int type) MacroInhibit *temp = nasm_malloc(sizeof(MacroInhibit)); temp->next = mistack; temp->level = listlevel; - temp->inhibiting = FALSE; + temp->inhibiting = false; mistack = temp; } else if (type == LIST_MACRO_NOLIST) { MacroInhibit *temp = nasm_malloc(sizeof(MacroInhibit)); temp->next = mistack; temp->level = listlevel; - temp->inhibiting = TRUE; + temp->inhibiting = true; mistack = temp; } } |