summaryrefslogtreecommitdiff
path: root/exprlib.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-10-10 14:58:45 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-10-10 14:58:45 -0700
commit6867acc18ee541e361a5fa1e5a1bac3a478a3856 (patch)
treeb13b49a2e8227469c3eb7cb983e4b2bb27868466 /exprlib.c
parentbe1b83d24aee03d29913957fdba40cf7a268e660 (diff)
downloadnasm-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 'exprlib.c')
-rw-r--r--exprlib.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/exprlib.c b/exprlib.c
index 2f03ff0..d116ee5 100644
--- a/exprlib.c
+++ b/exprlib.c
@@ -7,7 +7,7 @@
#include "nasm.h"
/*
- * Return TRUE if the argument is a simple scalar. (Or a far-
+ * Return true if the argument is a simple scalar. (Or a far-
* absolute, which counts.)
*/
int is_simple(expr * vect)
@@ -27,7 +27,7 @@ int is_simple(expr * vect)
}
/*
- * Return TRUE if the argument is a simple scalar, _NOT_ a far-
+ * Return true if the argument is a simple scalar, _NOT_ a far-
* absolute.
*/
int is_really_simple(expr * vect)
@@ -47,29 +47,29 @@ int is_really_simple(expr * vect)
}
/*
- * Return TRUE if the argument is relocatable (i.e. a simple
+ * Return true if the argument is relocatable (i.e. a simple
* scalar, plus at most one segment-base, plus possibly a WRT).
*/
int is_reloc(expr * vect)
{
while (vect->type && !vect->value) /* skip initial value-0 terms */
vect++;
- if (!vect->type) /* trivially return TRUE if nothing */
+ if (!vect->type) /* trivially return true if nothing */
return 1; /* is present apart from value-0s */
- if (vect->type < EXPR_SIMPLE) /* FALSE if a register is present */
+ if (vect->type < EXPR_SIMPLE) /* false if a register is present */
return 0;
if (vect->type == EXPR_SIMPLE) { /* skip over a pure number term... */
do {
vect++;
} while (vect->type && !vect->value);
- if (!vect->type) /* ...returning TRUE if that's all */
+ if (!vect->type) /* ...returning true if that's all */
return 1;
}
if (vect->type == EXPR_WRT) { /* skip over a WRT term... */
do {
vect++;
} while (vect->type && !vect->value);
- if (!vect->type) /* ...returning TRUE if that's all */
+ if (!vect->type) /* ...returning true if that's all */
return 1;
}
if (vect->value != 0 && vect->value != 1)
@@ -77,13 +77,13 @@ int is_reloc(expr * vect)
do { /* skip over _one_ seg-base term... */
vect++;
} while (vect->type && !vect->value);
- if (!vect->type) /* ...returning TRUE if that's all */
+ if (!vect->type) /* ...returning true if that's all */
return 1;
- return 0; /* And return FALSE if there's more */
+ return 0; /* And return false if there's more */
}
/*
- * Return TRUE if the argument contains an `unknown' part.
+ * Return true if the argument contains an `unknown' part.
*/
int is_unknown(expr * vect)
{
@@ -93,7 +93,7 @@ int is_unknown(expr * vect)
}
/*
- * Return TRUE if the argument contains nothing but an `unknown'
+ * Return true if the argument contains nothing but an `unknown'
* part.
*/
int is_just_unknown(expr * vect)