From 32f69c36e0eec1227934bbd34854bfebd88686f2 Mon Sep 17 00:00:00 2001 From: rsc Date: Thu, 11 Dec 2003 17:48:38 +0000 Subject: Add support for user-level 9P servers/clients and various bug fixes to go with them. --- src/cmd/yacc.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'src/cmd/yacc.c') 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) -- cgit v1.2.3