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/dict/dict.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/cmd/dict/dict.c') diff --git a/src/cmd/dict/dict.c b/src/cmd/dict/dict.c index dccd3037..8cbf6aac 100644 --- a/src/cmd/dict/dict.c +++ b/src/cmd/dict/dict.c @@ -59,18 +59,13 @@ void main(int argc, char **argv) { int i, cmd, kflag; - char *line, *p, *root; + char *line, *p; Binit(&binbuf, 0, OREAD); Binit(&boutbuf, 1, OWRITE); kflag = 0; line = 0; dict = 0; - root = getenv("PLAN9"); - if(root == nil) - root = "/usr/local/plan9"; - if(chdir(root) < 0) - sysfatal("chdir %s: %r", root); for(i=0; dicts[i].name; i++){ if(access(dicts[i].path, 0)>=0 && access(dicts[i].indexpath, 0)>=0){ @@ -126,12 +121,12 @@ main(int argc, char **argv) } bdict = Bopen(dict->path, OREAD); if(!bdict) { - err("can't open dictionary %s/%s", root, dict->path); + err("can't open dictionary %s", dict->path); exits("nodict"); } bindex = Bopen(dict->indexpath, OREAD); if(!bindex) { - err("can't open index %s/%s", root, dict->indexpath); + err("can't open index %s", dict->indexpath); exits("noindex"); } indextop = Bseek(bindex, 0L, 2); -- cgit v1.2.3