summaryrefslogtreecommitdiff
path: root/nasm.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2010-04-06 17:00:12 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2010-04-06 17:00:12 -0700
commit888964a880dbeead14ce316c4cae5b819aa877e3 (patch)
tree7ef62bbd7a518d8d690569351a05c08ff3b9f07f /nasm.c
parentcdcd1f7ac4ac9b60f8a6dd7327435997e478ebdd (diff)
downloadnasm-888964a880dbeead14ce316c4cae5b819aa877e3.tar.gz
nasm-888964a880dbeead14ce316c4cae5b819aa877e3.tar.bz2
nasm-888964a880dbeead14ce316c4cae5b819aa877e3.zip
Distinguish no directive present from unknown directive
Distinguish the case of no directive present (D_none) from the case of an unknown specified directive (D_unknown). This is reflected in different error messages. Furthermore, change the special case symbols to lower case in case we ever have a directive called [none] or [unknown]. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'nasm.c')
-rw-r--r--nasm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nasm.c b/nasm.c
index d8f64c5..70f8c9e 100644
--- a/nasm.c
+++ b/nasm.c
@@ -1750,16 +1750,16 @@ static enum directives getkw(char **directive, char **value)
/* it should be enclosed in [ ] */
if (*buf != '[')
- return D_NONE;
+ return D_none;
q = strchr(buf, ']');
if (!q)
- return D_NONE;
+ return D_none;
/* stip off the comments */
p = strchr(buf, ';');
if (p) {
if (p < q) /* ouch! somwhere inside */
- return D_NONE;
+ return D_none;
*p = '\0';
}
@@ -1771,7 +1771,7 @@ static enum directives getkw(char **directive, char **value)
p = nasm_skip_spaces(++buf);
q = nasm_skip_word(p);
if (!q)
- return D_NONE; /* sigh... no value there */
+ return D_none; /* sigh... no value there */
*q = '\0';
*directive = p;