summaryrefslogtreecommitdiff
path: root/parser.c
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2009-10-29 23:09:18 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2009-10-31 20:02:43 +0300
commit917117ff69271fe911e87a6f0e8dfc1f81c3f9b4 (patch)
tree7fa504459cecef908ceed5197bf8bab629dc11e9 /parser.c
parentbafd877d48b25e576a4c905a14f1301502cca69c (diff)
downloadnasm-917117ff69271fe911e87a6f0e8dfc1f81c3f9b4.tar.gz
nasm-917117ff69271fe911e87a6f0e8dfc1f81c3f9b4.tar.bz2
nasm-917117ff69271fe911e87a6f0e8dfc1f81c3f9b4.zip
stdscan: switch to stdscan_get/set routines
Instead of manipulating stdscan buffer pointer directly we switch to a routine interface. This allow us to unify stdscan access: ie caller should "talk" to stdscan via stdscan_get/set routines. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/parser.c b/parser.c
index adf181c..900a27a 100644
--- a/parser.c
+++ b/parser.c
@@ -205,7 +205,7 @@ restart_parse:
result->forw_ref = false;
stdscan_reset();
- stdscan_bufptr = buffer;
+ stdscan_set(buffer);
i = stdscan(NULL, &tokval);
result->label = NULL; /* Assume no label */
@@ -417,12 +417,12 @@ restart_parse:
if (i && i != ',')
i = stdscan(NULL, &tokval);
} else if (i == '-' || i == '+') {
- char *save = stdscan_bufptr;
+ char *save = stdscan_get();
int token = i;
sign = (i == '-') ? -1 : 1;
i = stdscan(NULL, &tokval);
if (i != TOKEN_FLOAT) {
- stdscan_bufptr = save;
+ stdscan_set(save);
i = tokval.t_type = token;
goto is_expression;
} else {
@@ -952,9 +952,9 @@ static int is_comma_next(void)
int i;
struct tokenval tv;
- p = stdscan_bufptr;
+ p = stdscan_get();
i = stdscan(NULL, &tv);
- stdscan_bufptr = p;
+ stdscan_set(p);
return (i == ',' || i == ';' || !i);
}