diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-02-29 10:06:16 -0500 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-02-29 10:09:17 -0500 |
commit | d3530271f8c0296170d306be276231cb9ebc51e8 (patch) | |
tree | 88df80b68d6b7b09b92204e368b803d814335352 /lisc | |
parent | addd42ceaecf1e2b7dfa142f397fbbdce26b93ef (diff) | |
download | roux-d3530271f8c0296170d306be276231cb9ebc51e8.tar.gz |
cosmetics
Diffstat (limited to 'lisc')
-rw-r--r-- | lisc/emit.c | 2 | ||||
-rw-r--r-- | lisc/parse.c | 10 |
2 files changed, 5 insertions, 7 deletions
diff --git a/lisc/emit.c b/lisc/emit.c index f99cbdb..a29f178 100644 --- a/lisc/emit.c +++ b/lisc/emit.c @@ -562,7 +562,7 @@ emitdat(Dat *d, FILE *f) if (d->isstr) err("strings only supported for 'b' currently"); if (d->isref) - fprintf(f, "%s %s+%"PRId64"\n", dtoa[d->type], d->u.ref.nam, d->u.ref.off); + fprintf(f, "%s %s%+"PRId64"\n", dtoa[d->type], d->u.ref.nam, d->u.ref.off); else fprintf(f, "%s %"PRId64"\n", dtoa[d->type], d->u.num); break; diff --git a/lisc/parse.c b/lisc/parse.c index 4ed1dc1..69ed66a 100644 --- a/lisc/parse.c +++ b/lisc/parse.c @@ -135,14 +135,12 @@ static int rcls; static int ntyp; - void err(char *s, ...) { char buf[100], *p, *end; va_list ap; - p = buf; end = buf + sizeof(buf); @@ -769,7 +767,7 @@ parsetyp() } static void -parsedataref(Dat *d) +parsedatref(Dat *d) { int t; @@ -786,7 +784,7 @@ parsedataref(Dat *d) } static void -parsedatastr(Dat *d) +parsedatstr(Dat *d) { d->isstr = 1; d->u.str = tokval.str; @@ -843,9 +841,9 @@ parsedat(void cb(Dat *)) else if (t == TInt) d.u.num = tokval.num; else if (t == TGlo) - parsedataref(&d); + parsedatref(&d); else if (t == TStr) - parsedatastr(&d); + parsedatstr(&d); else err("constant literal expected"); cb(&d); |