summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/gawk/node.c
diff options
context:
space:
mode:
authorjtc <jtc@NetBSD.org>1994-02-17 01:21:51 +0000
committerjtc <jtc@NetBSD.org>1994-02-17 01:21:51 +0000
commitdff331732125c2c4a230ec219356eeb44760264e (patch)
tree81c7bccc07e0c36859bd28ae134e14c680348c76 /gnu/usr.bin/gawk/node.c
parent652a63ee0655738c2fcb8f6f30d6737d07657377 (diff)
Upgrade to Gawk 2.15.4.
Diffstat (limited to 'gnu/usr.bin/gawk/node.c')
-rw-r--r--gnu/usr.bin/gawk/node.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gnu/usr.bin/gawk/node.c b/gnu/usr.bin/gawk/node.c
index bd60b5d16fa..2cebfcb321b 100644
--- a/gnu/usr.bin/gawk/node.c
+++ b/gnu/usr.bin/gawk/node.c
@@ -3,7 +3,7 @@
*/
/*
- * Copyright (C) 1986, 1988, 1989, 1991, 1992 the Free Software Foundation, Inc.
+ * Copyright (C) 1986, 1988, 1989, 1991, 1992, 1993 the Free Software Foundation, Inc.
*
* This file is part of GAWK, the GNU implementation of the
* AWK Progamming Language.
@@ -24,8 +24,8 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: node.c,v 1.3 1993/11/13 02:27:00 jtc Exp $";
-#endif /* not lint */
+static char rcsid[] = "$Id: node.c,v 1.4 1994/02/17 01:22:27 jtc Exp $";
+#endif
#include "awk.h"
@@ -106,7 +106,7 @@ register NODE *n;
* (more complicated) variations on this theme didn't seem to pay off, but
* systematic testing might be in order at some point
*/
-static char *values[] = {
+static const char *values[] = {
"0",
"1",
"2",
@@ -141,7 +141,7 @@ register NODE *s;
num = (long)s->numbr;
if ((AWKNUM) num == s->numbr) { /* integral value */
if (num < NVAL && num >= 0) {
- sp = values[num];
+ sp = (char *) values[num];
s->stlen = 1;
} else {
(void) sprintf(sp, "%ld", num);
@@ -149,7 +149,7 @@ register NODE *s;
}
s->stfmt = -1;
} else {
- (void) sprintf(sp, CONVFMT, s->numbr);
+ NUMTOSTR(sp, CONVFMT, s->numbr);
s->stlen = strlen(sp);
s->stfmt = (char)CONVFMTidx;
}