aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/yacc.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2003-12-11 17:48:38 +0000
committerrsc <devnull@localhost>2003-12-11 17:48:38 +0000
commit32f69c36e0eec1227934bbd34854bfebd88686f2 (patch)
tree1587e9de84816b77168afa81c1594cc686809910 /src/cmd/yacc.c
parentac244f8d287a6119155ea672c8fd13c487c5e4c7 (diff)
downloadplan9port-32f69c36e0eec1227934bbd34854bfebd88686f2.tar.gz
plan9port-32f69c36e0eec1227934bbd34854bfebd88686f2.tar.bz2
plan9port-32f69c36e0eec1227934bbd34854bfebd88686f2.zip
Add support for user-level 9P servers/clients and various bug fixes to go with them.
Diffstat (limited to 'src/cmd/yacc.c')
-rw-r--r--src/cmd/yacc.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/cmd/yacc.c b/src/cmd/yacc.c
index 05e9d589..d9e30761 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 "lib/yaccpar"
-#define PARSERS "lib/yaccpars"
+#define PARSER "#9/lib/yaccpar"
+#define PARSERS "#9/lib/yaccpars"
#define TEMPNAME "y.tmp.XXXXXX"
#define ACTNAME "y.acts.XXXXXX"
#define OFILE "tab.c"
@@ -398,19 +398,10 @@ void
others(void)
{
int c, i, j;
- char *s, *root;
-
- root = getenv("PLAN9");
- if(root == nil)
- root = "/usr/local/plan9";
- s = malloc(strlen(root)+1+strlen(parser)+1);
- strcpy(s, root);
- strcat(s, "/");
- strcat(s, parser);
- finput = Bopen(s, OREAD);
+
+ finput = Bopen(parser, OREAD);
if(finput == 0)
- error("cannot find parser %s", s);
- free(s);
+ error("cannot find parser %s", parser);
warray("yyr1", levprd, nprod);
aryfil(temp1, nprod, 0);
PLOOP(1, i)