aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/yacc.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-01-14 17:40:02 +0000
committerrsc <devnull@localhost>2005-01-14 17:40:02 +0000
commit459eae0c7098afbf9b572df241669209a37728eb (patch)
treeb2b697a14c5e75a56ae153407094d5fd770c2edf /src/cmd/yacc.c
parentadc93f6097615f16d57e8a24a256302f2144ec4e (diff)
downloadplan9port-459eae0c7098afbf9b572df241669209a37728eb.tar.gz
plan9port-459eae0c7098afbf9b572df241669209a37728eb.tar.bz2
plan9port-459eae0c7098afbf9b572df241669209a37728eb.zip
fix unsharp
Diffstat (limited to 'src/cmd/yacc.c')
-rw-r--r--src/cmd/yacc.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/cmd/yacc.c b/src/cmd/yacc.c
index 3db6768f..31b11ce8 100644
--- a/src/cmd/yacc.c
+++ b/src/cmd/yacc.c
@@ -13,8 +13,8 @@
#define SETBIT(a,i) ((a)[(i)>>5] |= (1<<((i)&037)))
#define NWORDS(n) (((n)+32)/32)
-#define PARSER "#9/lib/yaccpar"
-#define PARSERS "#9/lib/yaccpars"
+char *PARSER = "#9/lib/yaccpar";
+char *PARSERS = "#9/lib/yaccpars";
#define TEMPNAME "y.tmp.XXXXXX"
#define ACTNAME "y.acts.XXXXXX"
#define OFILE "tab.c"
@@ -183,7 +183,7 @@ char* tempname;
char* actname;
char ttempname[] = TEMPNAME;
char tactname[] = ACTNAME;
-char* parser = PARSER;
+char* parser;
char* yydebug;
/* storage of types */
@@ -375,6 +375,9 @@ int gtnm(void);
void
main(int argc, char *argv[])
{
+ PARSER = unsharp(PARSER);
+ PARSERS = unsharp(PARSERS);
+ parser = PARSER;
setup(argc, argv); /* initialize and read productions */
tbitset = NWORDS(ntokens);
@@ -399,7 +402,7 @@ others(void)
{
int c, i, j;
- finput = Bopen(unsharp(parser), OREAD);
+ finput = Bopen(parser, OREAD);
if(finput == 0)
error("cannot open parser %s: %r", parser);
warray("yyr1", levprd, nprod);