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 /labels.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 'labels.c')
-rw-r--r-- | labels.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -88,7 +88,7 @@ static char *perm_copy(const char *string); static char *prevlabel; -static int initialized = FALSE; +static int initialized = false; char lprefix[PREFIX_MAX] = { 0 }; char lpostfix[PREFIX_MAX] = { 0 }; @@ -96,7 +96,7 @@ char lpostfix[PREFIX_MAX] = { 0 }; /* * Internal routine: finds the `union label' corresponding to the * given label name. Creates a new one, if it isn't found, and if - * `create' is TRUE. + * `create' is true. */ static union label *find_label(char *label, int create) { @@ -386,7 +386,7 @@ int init_labels(void) prevlabel = ""; - initialized = TRUE; + initialized = true; return 0; } @@ -395,7 +395,7 @@ void cleanup_labels(void) { union label *lptr, *lhold; - initialized = FALSE; + initialized = false; hash_free(ltab); |