From: keie Date: Thu, 4 Oct 1984 10:06:12 +0000 (+0000) Subject: A -incorrect- variant that uses EM_DIR/ERR_PATH etc. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=76b352bd38b0b0bad500fc545052669d7a788518;p=ack.git A -incorrect- variant that uses EM_DIR/ERR_PATH etc. --HG-- branch : unlabeled-1.2.1 --- diff --git a/util/ack/pc/em_pc.c b/util/ack/pc/em_pc.c index 8187abed2..bc92383d8 100644 --- a/util/ack/pc/em_pc.c +++ b/util/ack/pc/em_pc.c @@ -33,8 +33,11 @@ #define void int -char *pc_path = PEM_PATH ; -char *err_path = ERR_PATH; +char def_pc_path[200] ; +char def_err_path[200] ; + +char *pc_path = def_pc_path ; +char *err_path = def_err_path ; int toterr; int parent; @@ -340,12 +343,18 @@ donewith(p) char *p; { } init() { - register char *p; + register char *p,*s ; register i,fd; if ((fd = open(tmp_dir,0)) < 0) tmp_dir = "."; close(fd); + p= def_pc_path ; + s= EM_DIR ; while ( *p++ = *s++ ) ; *p='/' ; + s= PEM_PATH ; while ( *p++ = *s++ ) ; + p= def_err_path ; + s= EM_DIR ; while ( *p++ = *s++ ) ; *p='/' ; + s= ERR_PATH ; while ( *p++ = *s++ ) ; p = unique+2; parent = i = getpid(); do