diff options
author | Ori Bernstein <ori@eigenstate.org> | 2016-02-28 23:39:43 -0800 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2016-02-28 23:39:43 -0800 |
commit | 032c3eafdddac6d8d74836b817860ff51e683330 (patch) | |
tree | 1a89f2a52e1c11750c4db22a72ca1e259c4431c4 /lisc | |
parent | b65a6892ddf9256e963df1f0818f22ca09f6b75b (diff) | |
download | roux-032c3eafdddac6d8d74836b817860ff51e683330.tar.gz |
Make err nonstatic.
Diffstat (limited to 'lisc')
-rw-r--r-- | lisc/lisc.h | 1 | ||||
-rw-r--r-- | lisc/parse.c | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lisc/lisc.h b/lisc/lisc.h index 8a65887..edac623 100644 --- a/lisc/lisc.h +++ b/lisc/lisc.h @@ -491,6 +491,7 @@ extern OpDesc opdesc[NOp]; void parse(FILE *, char *, void (Dat *), void (Fn *)); void printfn(Fn *, FILE *); void printref(Ref, Fn *, FILE *); +void err(char *, ...); /* mem.c */ void memopt(Fn *); diff --git a/lisc/parse.c b/lisc/parse.c index be93ca3..8143ef6 100644 --- a/lisc/parse.c +++ b/lisc/parse.c @@ -136,7 +136,7 @@ static int ntyp; -static void +void err(char *s, ...) { char buf[100], *p, *end; @@ -266,8 +266,8 @@ Alpha: c = fgetc(inf); } while (isalpha(c) || c == '$' || c == '.' || c == '_' || isdigit(c)); tok[i] = 0; ungetc(c, inf); + tokval.str = tok; if (t != TXXX) { - tokval.str = tok; return t; } for (i=0; i<NPubOp; i++) @@ -277,7 +277,7 @@ Alpha: c = fgetc(inf); for (i=0; tmap[i].str; i++) if (strcmp(tok, tmap[i].str) == 0) return tmap[i].tok; - err("unknown keyword"); + err("unknown keyword %s", tokval.str); return TXXX; } |