diff options
author | nakanon <none@none> | 2005-08-04 10:12:53 -0700 |
---|---|---|
committer | nakanon <none@none> | 2005-08-04 10:12:53 -0700 |
commit | 1ee2e5fa222f6d33d1ff1c48f155973a5e146434 (patch) | |
tree | df2019314d77e36d1f0d8766510ba1d19d470b2a /usr/src/cmd/awk/maketab.c | |
parent | ea841a36325080fa70fe84dbaff3b3e8c8ce458e (diff) | |
download | illumos-joyent-1ee2e5fa222f6d33d1ff1c48f155973a5e146434.tar.gz |
5004023 *nawk* nawk fails when called from buildpatch with long path names
5040318 nawk is limited to 500 fields.
5090114 nawk core dumps
6268954 cmd/awk and gcc don't get along
Diffstat (limited to 'usr/src/cmd/awk/maketab.c')
-rw-r--r-- | usr/src/cmd/awk/maketab.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/usr/src/cmd/awk/maketab.c b/usr/src/cmd/awk/maketab.c index 314b8a22a2..7b34e4edfe 100644 --- a/usr/src/cmd/awk/maketab.c +++ b/usr/src/cmd/awk/maketab.c @@ -20,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 2002 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -123,12 +123,6 @@ main() printf("#include \"awk.h\"\n"); printf("#include \"y.tab.h\"\n\n"); - printf("Cell *nullproc();\n"); - for (i = SIZE; --i >= 0; ) - names[i] = ""; - for (p = proc; p->token != 0; p++) - if (p == proc || strcmp(p->name, (p-1)->name)) - printf("extern Cell *%s();\n", p->name); if ((fp = fopen("y.tab.h", "r")) == NULL) { fprintf(stderr, gettext("maketab can't open y.tab.h!\n")); @@ -163,12 +157,12 @@ main() printf("\t%s,\t/* %s */\n", table[i], names[i]); printf("};\n\n"); - printf("uchar *tokname(n)\n"); /* print a tokname() function */ + printf("uchar *\ntokname(int n)\n"); /* print a tokname() function */ printf("{\n"); - printf(" static uchar buf[100];\n\n"); + printf(" static char buf[100];\n\n"); printf(" if (n < FIRSTTOKEN || n > LASTTOKEN) {\n"); - printf(" sprintf(buf, \"token %%d\", n);\n"); - printf(" return buf;\n"); + printf(" (void) sprintf(buf, \"token %%d\", n);\n"); + printf(" return ((uchar *)buf);\n"); printf(" }\n"); printf(" return printname[n-257];\n"); printf("}\n"); |