diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2020-06-26 15:57:40 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2020-06-26 15:57:40 +0000 |
commit | b3610af1740028e865a38b782d3319efea551991 (patch) | |
tree | 6887bdc205b1104009ebbe14fef43b07352c368f /usr.bin/awk | |
parent | 7464fb74f38380683a4bd0265bde980dee8cfebd (diff) |
Update awk to June 25, 2020 version.
Diffstat (limited to 'usr.bin/awk')
-rw-r--r-- | usr.bin/awk/FIXES | 6 | ||||
-rw-r--r-- | usr.bin/awk/awk.h | 7 | ||||
-rw-r--r-- | usr.bin/awk/b.c | 12 | ||||
-rw-r--r-- | usr.bin/awk/lib.c | 30 | ||||
-rw-r--r-- | usr.bin/awk/main.c | 10 | ||||
-rw-r--r-- | usr.bin/awk/parse.c | 4 | ||||
-rw-r--r-- | usr.bin/awk/run.c | 30 | ||||
-rw-r--r-- | usr.bin/awk/tran.c | 36 |
8 files changed, 72 insertions, 63 deletions
diff --git a/usr.bin/awk/FIXES b/usr.bin/awk/FIXES index bd39c55dd4f..16ed45f0bbc 100644 --- a/usr.bin/awk/FIXES +++ b/usr.bin/awk/FIXES @@ -1,4 +1,4 @@ -/* $OpenBSD: FIXES,v 1.34 2020/06/26 15:50:06 millert Exp $ */ +/* $OpenBSD: FIXES,v 1.35 2020/06/26 15:57:39 millert Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved @@ -26,6 +26,10 @@ THIS SOFTWARE. This file lists all bug fixes, changes, etc., made since the AWK book was sent to the printers in August, 1987. +June 25, 2020: + Merge PRs 82 and 84. The latter fixes issue #83. Thanks to + Todd Miller and awkfan77. + June 12, 2020: Clear errno before calling errcheck to avoid any spurious errors left over from previous calls that may have set it. Thanks to diff --git a/usr.bin/awk/awk.h b/usr.bin/awk/awk.h index d9981a4d228..68e03a809c6 100644 --- a/usr.bin/awk/awk.h +++ b/usr.bin/awk/awk.h @@ -1,4 +1,4 @@ -/* $OpenBSD: awk.h,v 1.25 2020/06/13 01:21:01 millert Exp $ */ +/* $OpenBSD: awk.h,v 1.26 2020/06/26 15:57:39 millert Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved @@ -49,10 +49,9 @@ typedef unsigned char uschar; */ #define DEBUG #ifdef DEBUG - /* uses have to be doubly parenthesized */ -# define DPRINTF(x) if (dbg) printf x +# define DPRINTF(...) if (dbg) printf(__VA_ARGS__) #else -# define DPRINTF(x) +# define DPRINTF(...) #endif extern enum compile_states { diff --git a/usr.bin/awk/b.c b/usr.bin/awk/b.c index 687ff5015f8..f961e5ada69 100644 --- a/usr.bin/awk/b.c +++ b/usr.bin/awk/b.c @@ -1,4 +1,4 @@ -/* $OpenBSD: b.c,v 1.31 2020/06/10 21:05:02 millert Exp $ */ +/* $OpenBSD: b.c,v 1.32 2020/06/26 15:57:39 millert Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved @@ -405,7 +405,7 @@ char *cclenter(const char *argp) /* add a character class */ i++; } *bp = 0; - DPRINTF( ("cclenter: in = |%s|, out = |%s|\n", op, buf) ); + DPRINTF("cclenter: in = |%s|, out = |%s|\n", op, buf); xfree(op); return (char *) tostring((char *) buf); } @@ -741,7 +741,7 @@ Node *reparse(const char *p) /* parses regular expression pointed to by p */ { /* uses relex() to scan regular expression */ Node *np; - DPRINTF( ("reparse <%s>\n", p) ); + DPRINTF("reparse <%s>\n", p); lastre = prestr = (const uschar *) p; /* prestr points to string to be parsed */ rtok = relex(); /* GNU compatibility: an empty regexp matches anything */ @@ -1112,6 +1112,12 @@ rescan: if (!adjbuf((char **) &buf, &bufsz, bp-buf+1, 100, (char **) &bp, "relex2")) FATAL("out of space for reg expr %.10s...", lastre); if (cc->cc_func(i)) { + /* escape backslash */ + if (i == '\\') { + *bp++ = '\\'; + n++; + } + *bp++ = i; n++; } diff --git a/usr.bin/awk/lib.c b/usr.bin/awk/lib.c index 8da02dbff6c..0f0b74dc0c8 100644 --- a/usr.bin/awk/lib.c +++ b/usr.bin/awk/lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lib.c,v 1.38 2020/06/26 15:50:06 millert Exp $ */ +/* $OpenBSD: lib.c,v 1.39 2020/06/26 15:57:39 millert Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved @@ -146,8 +146,8 @@ int getrec(char **pbuf, int *pbufsize, bool isrecord) /* get next input record * firsttime = false; initgetrec(); } - DPRINTF( ("RS=<%s>, FS=<%s>, ARGC=%g, FILENAME=%s\n", - *RS, *FS, *ARGC, *FILENAME) ); + DPRINTF("RS=<%s>, FS=<%s>, ARGC=%g, FILENAME=%s\n", + *RS, *FS, *ARGC, *FILENAME); if (isrecord) { donefld = false; donerec = true; @@ -156,7 +156,7 @@ int getrec(char **pbuf, int *pbufsize, bool isrecord) /* get next input record * saveb0 = buf[0]; buf[0] = 0; while (argno < *ARGC || infile == stdin) { - DPRINTF( ("argno=%d, file=|%s|\n", argno, file) ); + DPRINTF("argno=%d, file=|%s|\n", argno, file); if (infile == NULL) { /* have to open a new file */ file = getargv(argno); if (file == NULL || *file == '\0') { /* deleted or zapped */ @@ -169,7 +169,7 @@ int getrec(char **pbuf, int *pbufsize, bool isrecord) /* get next input record * continue; } *FILENAME = file; - DPRINTF( ("opening file %s\n", file) ); + DPRINTF("opening file %s\n", file); if (*file == '-' && *(file+1) == '\0') infile = stdin; else if ((infile = fopen(file, "r")) == NULL) @@ -270,7 +270,7 @@ int readrec(char **pbuf, int *pbufsize, FILE *inf, bool newflag) /* read one rec *pbuf = buf; *pbufsize = bufsize; isrec = *buf || !feof(inf); - DPRINTF( ("readrec saw <%s>, returns %d\n", buf, isrec) ); + DPRINTF("readrec saw <%s>, returns %d\n", buf, isrec); return isrec; } @@ -285,7 +285,7 @@ char *getargv(int n) /* get ARGV[n] */ return NULL; x = setsymtab(temp, "", 0.0, STR, ARGVtab); s = getsval(x); - DPRINTF( ("getargv(%d) returns |%s|\n", n, s) ); + DPRINTF("getargv(%d) returns |%s|\n", n, s); return s; } @@ -304,7 +304,7 @@ void setclvar(char *s) /* set var=value from s */ q->fval = atof(q->sval); q->tval |= NUM; } - DPRINTF( ("command line set %s to |%s|\n", s, p) ); + DPRINTF("command line set %s to |%s|\n", s, p); } @@ -503,7 +503,7 @@ int refldbld(const char *rec, const char *fs) /* build fields from reg expr in F if (*rec == '\0') return 0; pfa = makedfa(fs, 1); - DPRINTF( ("into refldbld, rec = <%s>, pat = <%s>\n", rec, fs) ); + DPRINTF("into refldbld, rec = <%s>, pat = <%s>\n", rec, fs); tempstat = pfa->initstat; for (i = 1; ; i++) { const size_t fss_rem = fields + fieldssize + 1 - fr; @@ -513,11 +513,11 @@ int refldbld(const char *rec, const char *fs) /* build fields from reg expr in F xfree(fldtab[i]->sval); fldtab[i]->tval = FLD | STR | DONTFREE; fldtab[i]->sval = fr; - DPRINTF( ("refldbld: i=%d\n", i) ); + DPRINTF("refldbld: i=%d\n", i); if (nematch(pfa, rec)) { const size_t reclen = patbeg - rec; pfa->initstat = 2; /* horrible coupling to b.c */ - DPRINTF( ("match %s (%d chars)\n", patbeg, patlen) ); + DPRINTF("match %s (%d chars)\n", patbeg, patlen); if (reclen >= fss_rem) FATAL("out of space for fields in refldbld"); memcpy(fr, rec, reclen); @@ -525,7 +525,7 @@ int refldbld(const char *rec, const char *fs) /* build fields from reg expr in F *fr++ = '\0'; rec = patbeg + patlen; } else { - DPRINTF( ("no match %s\n", rec) ); + DPRINTF("no match %s\n", rec); if (strlcpy(fr, rec, fss_rem) >= fss_rem) FATAL("out of space for fields in refldbld"); pfa->initstat = tempstat; @@ -560,15 +560,15 @@ void recbld(void) /* create $0 from $1..$NF if necessary */ if (!adjbuf(&record, &recsize, 2+r-record, recsize, &r, "recbld 3")) FATAL("built giant record `%.30s...'", record); *r = '\0'; - DPRINTF( ("in recbld inputFS=%s, fldtab[0]=%p\n", inputFS, (void*)fldtab[0]) ); + DPRINTF("in recbld inputFS=%s, fldtab[0]=%p\n", inputFS, (void*)fldtab[0]); if (freeable(fldtab[0])) xfree(fldtab[0]->sval); fldtab[0]->tval = REC | STR | DONTFREE; fldtab[0]->sval = record; - DPRINTF( ("in recbld inputFS=%s, fldtab[0]=%p\n", inputFS, (void*)fldtab[0]) ); - DPRINTF( ("recbld = |%s|\n", record) ); + DPRINTF("in recbld inputFS=%s, fldtab[0]=%p\n", inputFS, (void*)fldtab[0]); + DPRINTF("recbld = |%s|\n", record); donerec = true; } diff --git a/usr.bin/awk/main.c b/usr.bin/awk/main.c index 821ce3d5401..0ec21d40ddf 100644 --- a/usr.bin/awk/main.c +++ b/usr.bin/awk/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.41 2020/06/26 15:50:06 millert Exp $ */ +/* $OpenBSD: main.c,v 1.42 2020/06/26 15:57:39 millert Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved @@ -23,7 +23,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************************************************/ -const char *version = "version 20200612"; +const char *version = "version 20200625"; #define DEBUG #include <stdio.h> @@ -233,7 +233,7 @@ int main(int argc, char *argv[]) exit(0); FATAL("no program given"); } - DPRINTF( ("program = |%s|\n", argv[1]) ); + DPRINTF("program = |%s|\n", argv[1]); lexprog = argv[1]; argc--; argv++; @@ -242,7 +242,7 @@ int main(int argc, char *argv[]) syminit(); compile_time = COMPILING; argv[0] = cmdname; /* put prog name at front of arglist */ - DPRINTF( ("argc=%d, argv[0]=%s\n", argc, argv[0]) ); + DPRINTF("argc=%d, argv[0]=%s\n", argc, argv[0]); arginit(argc, argv); if (!safe) envinit(environ); @@ -254,7 +254,7 @@ int main(int argc, char *argv[]) #endif if (fs) *FS = qstring(fs, '\0'); - DPRINTF( ("errorflag=%d\n", errorflag) ); + DPRINTF("errorflag=%d\n", errorflag); if (errorflag == 0) { compile_time = RUNNING; run(winner); diff --git a/usr.bin/awk/parse.c b/usr.bin/awk/parse.c index 01b5b7e1304..b0a25c94e70 100644 --- a/usr.bin/awk/parse.c +++ b/usr.bin/awk/parse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.c,v 1.10 2020/06/13 01:21:01 millert Exp $ */ +/* $OpenBSD: parse.c,v 1.11 2020/06/26 15:57:39 millert Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved @@ -274,7 +274,7 @@ void defn(Cell *v, Node *vl, Node *st) /* turn on FCN bit in definition, */ for (p = vl; p; p = p->nnext) n++; v->fval = n; - DPRINTF( ("defining func %s (%d args)\n", v->nval, n) ); + DPRINTF("defining func %s (%d args)\n", v->nval, n); } int isarg(const char *s) /* is s in argument list for current function? */ diff --git a/usr.bin/awk/run.c b/usr.bin/awk/run.c index 10674135ffc..88fd26f1002 100644 --- a/usr.bin/awk/run.c +++ b/usr.bin/awk/run.c @@ -1,4 +1,4 @@ -/* $OpenBSD: run.c,v 1.59 2020/06/13 01:21:01 millert Exp $ */ +/* $OpenBSD: run.c,v 1.60 2020/06/26 15:57:39 millert Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved @@ -120,7 +120,7 @@ int adjbuf(char **pbuf, int *psiz, int minlen, int quantum, char **pbptr, if (rminlen) minlen += quantum - rminlen; tbuf = realloc(*pbuf, minlen); - DPRINTF( ("adjbuf %s: %d %d (pbuf=%p, tbuf=%p)\n", whatrtn, *psiz, minlen, *pbuf, tbuf) ); + DPRINTF("adjbuf %s: %d %d (pbuf=%p, tbuf=%p)\n", whatrtn, *psiz, minlen, *pbuf, tbuf); if (tbuf == NULL) { if (whatrtn) FATAL("out of memory in %s", whatrtn); @@ -247,18 +247,18 @@ Cell *call(Node **a, int n) /* function call. very kludgy and fragile */ for (ncall = 0, x = a[1]; x != NULL; x = x->nnext) /* args in call */ ncall++; ndef = (int) fcn->fval; /* args in defn */ - DPRINTF( ("calling %s, %d args (%d in defn), frp=%d\n", s, ncall, ndef, (int) (frp-frame)) ); + DPRINTF("calling %s, %d args (%d in defn), frp=%d\n", s, ncall, ndef, (int) (frp-frame)); if (ncall > ndef) WARNING("function %s called with %d args, uses only %d", s, ncall, ndef); if (ncall + ndef > NARGS) FATAL("function %s has %d arguments, limit %d", s, ncall+ndef, NARGS); for (i = 0, x = a[1]; x != NULL; i++, x = x->nnext) { /* get call args */ - DPRINTF( ("evaluate args[%d], frp=%d:\n", i, (int) (frp-frame)) ); + DPRINTF("evaluate args[%d], frp=%d:\n", i, (int) (frp-frame)); y = execute(x); oargs[i] = y; - DPRINTF( ("args[%d]: %s %f <%s>, t=%o\n", - i, NN(y->nval), y->fval, isarr(y) ? "(array)" : NN(y->sval), y->tval) ); + DPRINTF("args[%d]: %s %f <%s>, t=%o\n", + i, NN(y->nval), y->fval, isarr(y) ? "(array)" : NN(y->sval), y->tval); if (isfcn(y)) FATAL("can't use function %s as argument in %s", y->nval, s); if (isarr(y)) @@ -284,9 +284,9 @@ Cell *call(Node **a, int n) /* function call. very kludgy and fragile */ frp->nargs = ndef; /* number defined with (excess are locals) */ frp->retval = gettemp(); - DPRINTF( ("start exec of %s, frp=%d\n", s, (int) (frp-frame)) ); + DPRINTF("start exec of %s, frp=%d\n", s, (int) (frp-frame)); y = execute((Node *)(fcn->sval)); /* execute body */ - DPRINTF( ("finished exec of %s, frp=%d\n", s, (int) (frp-frame)) ); + DPRINTF("finished exec of %s, frp=%d\n", s, (int) (frp-frame)); for (i = 0; i < ndef; i++) { Cell *t = frp->args[i]; @@ -319,7 +319,7 @@ Cell *call(Node **a, int n) /* function call. very kludgy and fragile */ tempfree(y); /* don't free twice! */ } z = frp->retval; /* return value */ - DPRINTF( ("%s returns %g |%s| %o\n", s, getfval(z), getsval(z), z->tval) ); + DPRINTF("%s returns %g |%s| %o\n", s, getfval(z), getsval(z), z->tval); frp--; return(z); } @@ -347,7 +347,7 @@ Cell *arg(Node **a, int n) /* nth argument of a function */ { n = ptoi(a[0]); /* argument number, counting from 0 */ - DPRINTF( ("arg(%d), frp->nargs=%d\n", n, frp->nargs) ); + DPRINTF("arg(%d), frp->nargs=%d\n", n, frp->nargs); if (n+1 > frp->nargs) FATAL("argument #%d of function %s was not supplied", n+1, frp->fcncell->nval); @@ -512,7 +512,7 @@ Cell *array(Node **a, int n) /* a[0] is symtab, a[1] is list of subscripts */ x = execute(a[0]); /* Cell* for symbol table */ buf = makearraystring(a[1], __func__); if (!isarr(x)) { - DPRINTF( ("making %s into an array\n", NN(x->nval)) ); + DPRINTF("making %s into an array\n", NN(x->nval)); if (freeable(x)) xfree(x->sval); x->tval &= ~(STR|NUM|DONTFREE); @@ -558,7 +558,7 @@ Cell *intest(Node **a, int n) /* a[0] is index (list), a[1] is symtab */ ap = execute(a[1]); /* array name */ if (!isarr(ap)) { - DPRINTF( ("making %s into an array\n", ap->nval) ); + DPRINTF("making %s into an array\n", ap->nval); if (freeable(ap)) xfree(ap->sval); ap->tval &= ~(STR|NUM|DONTFREE); @@ -687,7 +687,7 @@ Cell *relop(Node **a, int n) /* a[0 < a[1], etc. */ void tfree(Cell *a) /* free a tempcell */ { if (freeable(a)) { - DPRINTF( ("freeing %s %s %o\n", NN(a->nval), NN(a->sval), a->tval) ); + DPRINTF("freeing %s %s %o\n", NN(a->nval), NN(a->sval), a->tval); xfree(a->sval); } if (a == tmps) @@ -774,7 +774,7 @@ Cell *substr(Node **a, int nnn) /* substr(a[0], a[1], a[2]) */ n = 0; else if (n > k - m) n = k - m; - DPRINTF( ("substr: m=%d, n=%d, s=%s\n", m, n, s) ); + DPRINTF("substr: m=%d, n=%d, s=%s\n", m, n, s); y = gettemp(); temp = s[n+m-1]; /* with thanks to John Linderman */ s[n+m-1] = '\0'; @@ -1281,7 +1281,7 @@ Cell *split(Node **a, int nnn) /* split(a[0], a[1], a[2]); a[3] is type */ sep = *fs; ap = execute(a[1]); /* array name */ freesymtab(ap); - DPRINTF( ("split: s=|%s|, a=%s, sep=|%s|\n", s, NN(ap->nval), fs) ); + DPRINTF("split: s=|%s|, a=%s, sep=|%s|\n", s, NN(ap->nval), fs); ap->tval &= ~STR; ap->tval |= ARR; ap->sval = (char *) makesymtab(NSYMTAB); diff --git a/usr.bin/awk/tran.c b/usr.bin/awk/tran.c index 5e6aea975d2..ccf364e1e4c 100644 --- a/usr.bin/awk/tran.c +++ b/usr.bin/awk/tran.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tran.c,v 1.28 2020/06/16 16:14:22 millert Exp $ */ +/* $OpenBSD: tran.c,v 1.29 2020/06/26 15:57:39 millert Exp $ */ /**************************************************************** Copyright (C) Lucent Technologies 1997 All Rights Reserved @@ -235,8 +235,8 @@ Cell *setsymtab(const char *n, const char *s, Awkfloat f, unsigned t, Array *tp) Cell *p; if (n != NULL && (p = lookup(n, tp)) != NULL) { - DPRINTF( ("setsymtab found %p: n=%s s=\"%s\" f=%g t=%o\n", - (void*)p, NN(p->nval), NN(p->sval), p->fval, p->tval) ); + DPRINTF("setsymtab found %p: n=%s s=\"%s\" f=%g t=%o\n", + (void*)p, NN(p->nval), NN(p->sval), p->fval, p->tval); return(p); } p = malloc(sizeof(*p)); @@ -254,8 +254,8 @@ Cell *setsymtab(const char *n, const char *s, Awkfloat f, unsigned t, Array *tp) h = hash(n, tp->size); p->cnext = tp->tab[h]; tp->tab[h] = p; - DPRINTF( ("setsymtab set %p: n=%s s=\"%s\" f=%g t=%o\n", - (void*)p, p->nval, p->sval, p->fval, p->tval) ); + DPRINTF("setsymtab set %p: n=%s s=\"%s\" f=%g t=%o\n", + (void*)p, p->nval, p->sval, p->fval, p->tval); return(p); } @@ -314,11 +314,11 @@ Awkfloat setfval(Cell *vp, Awkfloat f) /* set float val of a Cell */ fldno = atoi(vp->nval); if (fldno > *NF) newfld(fldno); - DPRINTF( ("setting field %d to %g\n", fldno, f) ); + DPRINTF("setting field %d to %g\n", fldno, f); } else if (&vp->fval == NF) { donerec = false; /* mark $0 invalid */ setlastfld(f); - DPRINTF( ("setting NF to %g\n", f) ); + DPRINTF("setting NF to %g\n", f); } else if (isrec(vp)) { donefld = false; /* mark $1... invalid */ donerec = true; @@ -334,7 +334,7 @@ Awkfloat setfval(Cell *vp, Awkfloat f) /* set float val of a Cell */ vp->tval |= NUM; /* mark number ok */ if (f == -0) /* who would have thought this possible? */ f = 0; - DPRINTF( ("setfval %p: %s = %g, t=%o\n", (void*)vp, NN(vp->nval), f, vp->tval) ); + DPRINTF("setfval %p: %s = %g, t=%o\n", (void*)vp, NN(vp->nval), f, vp->tval); return vp->fval = f; } @@ -354,8 +354,8 @@ char *setsval(Cell *vp, const char *s) /* set string val of a Cell */ int fldno; Awkfloat f; - DPRINTF( ("starting setsval %p: %s = \"%s\", t=%o, r,f=%d,%d\n", - (void*)vp, NN(vp->nval), s, vp->tval, donerec, donefld) ); + DPRINTF("starting setsval %p: %s = \"%s\", t=%o, r,f=%d,%d\n", + (void*)vp, NN(vp->nval), s, vp->tval, donerec, donefld); if ((vp->tval & (NUM | STR)) == 0) funnyvar(vp, "assign to"); if (isfld(vp)) { @@ -363,7 +363,7 @@ char *setsval(Cell *vp, const char *s) /* set string val of a Cell */ fldno = atoi(vp->nval); if (fldno > *NF) newfld(fldno); - DPRINTF( ("setting field %d to %s (%p)\n", fldno, s, s) ); + DPRINTF("setting field %d to %s (%p)\n", fldno, s, s); } else if (isrec(vp)) { donefld = false; /* mark $1... invalid */ donerec = true; @@ -379,14 +379,14 @@ char *setsval(Cell *vp, const char *s) /* set string val of a Cell */ vp->tval |= STR; vp->fmt = NULL; setfree(vp); - DPRINTF( ("setsval %p: %s = \"%s (%p) \", t=%o r,f=%d,%d\n", - (void*)vp, NN(vp->nval), t, t, vp->tval, donerec, donefld) ); + DPRINTF("setsval %p: %s = \"%s (%p) \", t=%o r,f=%d,%d\n", + (void*)vp, NN(vp->nval), t, t, vp->tval, donerec, donefld); vp->sval = t; if (&vp->fval == NF) { donerec = false; /* mark $0 invalid */ f = getfval(vp); setlastfld(f); - DPRINTF( ("setting NF to %g\n", f) ); + DPRINTF("setting NF to %g\n", f); } return(vp->sval); @@ -405,8 +405,8 @@ Awkfloat getfval(Cell *vp) /* get float val of a Cell */ if (is_number(vp->sval) && !(vp->tval&CON)) vp->tval |= NUM; /* make NUM only sparingly */ } - DPRINTF( ("getfval %p: %s = %g, t=%o\n", - (void*)vp, NN(vp->nval), vp->fval, vp->tval) ); + DPRINTF("getfval %p: %s = %g, t=%o\n", + (void*)vp, NN(vp->nval), vp->fval, vp->tval); return(vp->fval); } @@ -494,8 +494,8 @@ static char *get_str_val(Cell *vp, char **fmt) /* get string val of a Cel } } done: - DPRINTF( ("getsval %p: %s = \"%s (%p)\", t=%o\n", - (void*)vp, NN(vp->nval), vp->sval, vp->sval, vp->tval) ); + DPRINTF("getsval %p: %s = \"%s (%p)\", t=%o\n", + (void*)vp, NN(vp->nval), vp->sval, vp->sval, vp->tval); return(vp->sval); } |