diff options
author | 1999-12-08 23:09:45 +0000 | |
---|---|---|
committer | 1999-12-08 23:09:45 +0000 | |
commit | 7b11b857a54dde575bbf2a55c66d26dd413bb82d (patch) | |
tree | f3ecf6692867617647280528b34b29e9659c2a83 /usr.bin/awk/parse.c | |
parent | sync (diff) | |
download | wireguard-openbsd-7b11b857a54dde575bbf2a55c66d26dd413bb82d.tar.xz wireguard-openbsd-7b11b857a54dde575bbf2a55c66d26dd413bb82d.zip |
June 6, 1999 version of the "one true awk"
Most of the changes are to avoid using a static buffer for error messages.
Diffstat (limited to 'usr.bin/awk/parse.c')
-rw-r--r-- | usr.bin/awk/parse.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/awk/parse.c b/usr.bin/awk/parse.c index 429fdcaba7f..95eb5051c65 100644 --- a/usr.bin/awk/parse.c +++ b/usr.bin/awk/parse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.c,v 1.3 1999/04/20 17:31:30 millert Exp $ */ +/* $OpenBSD: parse.c,v 1.4 1999/12/08 23:09:46 millert Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved @@ -36,7 +36,7 @@ Node *nodealloc(int n) x = (Node *) malloc(sizeof(Node) + (n-1)*sizeof(Node *)); if (x == NULL) - ERROR "out of space in nodealloc" FATAL; + FATAL("out of space in nodealloc"); x->nnext = NULL; x->lineno = lineno; return(x); @@ -190,7 +190,7 @@ Node *makearr(Node *p) if (isvalue(p)) { cp = (Cell *) (p->narg[0]); if (isfcn(cp)) - ERROR "%s is a function, not an array", cp->nval SYNTAX; + SYNTAX( "%s is a function, not an array", cp->nval ); else if (!isarr(cp)) { xfree(cp->sval); cp->sval = (char *) makesymtab(NSYMTAB); @@ -210,7 +210,7 @@ Node *pa2stat(Node *a, Node *b, Node *c) /* pat, pat {...} */ x = node4(PASTAT2, a, b, c, itonp(paircnt)); if (paircnt++ >= PA2NUM) - ERROR "limited to %d pat,pat statements", PA2NUM SYNTAX; + SYNTAX( "limited to %d pat,pat statements", PA2NUM ); x->ntype = NSTAT; return(x); } @@ -237,7 +237,7 @@ void defn(Cell *v, Node *vl, Node *st) /* turn on FCN bit in definition, */ int n; if (isarr(v)) { - ERROR "`%s' is an array name and a function name", v->nval SYNTAX; + SYNTAX( "`%s' is an array name and a function name", v->nval ); return; } v->tval = FCN; |