Update to compile again. [rsc] --rw-rw-r-- M 1146153 glenda sys 10915 Dec 30 11:34 acme/bin/source/adict/adict.c /n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/adict.c:5,10 - /n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/adict.c:5,15 #include "win.h" #include "adict.h" + enum + { + STACK = 8192, + }; + char *prog = "adict"; char *lprog = "/bin/adict"; char *xprog = "/bin/dict"; /n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/adict.c:22,31 - /n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/adict.c:27,38 void usage(void) { - threadprint(2, "usage: %s [-d dictname] [pattern]\n", argv0); + fprint(2, "usage: %s [-d dictname] [pattern]\n", argv0); threadexitsall(nil); } + int mainstacksize = STACK; + void threadmain(int argc, char** argv) { /n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/adict.c:46,52 - /n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/adict.c:53,59 pattern = pbuffer; strcpy(pattern,argv[0]); if(dict == nil) - dict = "oed"; + dict = "pgw"; break; case 0: break; /n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/adict.c:89,95 - /n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/adict.c:96,102 rexarg[2] = fpipe; rexarg[3] = c; - proccreate(rexec, rexarg, 8192); + proccreate(rexec, rexarg, STACK); recvul(c); chanfree(c); close(fpipe[1]); /n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/adict.c:130,136 - /n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/adict.c:137,143 } curaddr[i] = nil; if (i == MAXMATCH) - threadprint(2, "Too many matches!\n"); + fprint(2, "Too many matches!\n"); Bterm(&inbuf); close(fd); /n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/adict.c:149,155 - /n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/adict.c:156,162 sprint(buffer,"%sh", addr); fd = procrexec(xprog, "-d", dict, "-c", buffer, nil); if (read(fd, pbuffer, 80) > 80) - threadprint(2, "Error in getting addres from dict.\n"); + fprint(2, "Error in getting addres from dict.\n"); else { t = pbuffer; /* remove trailing whitespace, newline */ /n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/adict.c:182,188 - /n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/adict.c:189,195 sprint(buffer,"%s+a", curone); fd = procrexec(xprog, "-d", dict, "-c", buffer, nil); if (read(fd, abuffer, 80) > 80) - threadprint(2, "Error in getting addres from dict.\n"); + fprint(2, "Error in getting addres from dict.\n"); else { res = abuffer; while (*res != '#') res++; /n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/adict.c:352,358 - /n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/adict.c:359,365 arg[2] = twin; arg[3] = (void*)wintype; arg[4] = c; - proccreate(vopenwin, arg, 8192); + proccreate(vopenwin, arg, STACK); recvul(c); chanfree(c); } /n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/adict.c:377,383 - /n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/adict.c:384,390 close(fd[1]); close(fd[0]); procexec(c, prog, args); - threadprint(2, "Remote pipe execution failed: %s %r\n", prog); + fprint(2, "Remote pipe execution failed: %s %r\n", prog); abort(); threadexits(nil); } /n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/adict.c:396,402 - /n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/adict.c:403,409 c = arg[2]; procexec(c, prog, args); - threadprint(2, "Remote execution failed: %s %r\n", prog); + fprint(2, "Remote execution failed: %s %r\n", prog); abort(); threadexits(nil); } /n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/adict.c:412,418 - /n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/adict.c:419,425 rexarg[1] = args; rexarg[2] = c; - proccreate(pexec, rexarg, 8192); + proccreate(pexec, rexarg, STACK); recvul(c); chanfree(c); } /n/sourcesdump/2005/1230/plan9/acme/bin/source/adict/adict.c:503,521 - /n/sourcesdump/2005/1231/plan9/acme/bin/source/adict/adict.c:510,528 wevent(w, &e); switch(e.c2){ default: - /* threadprint(2,"unknown message %c%c\n", e.c1, e.c2); */ + /* fprint(2,"unknown message %c%c\n", e.c1, e.c2); */ break; case 'i': - /* threadprint(2,"'%s' inserted in tag at %d\n", e.b, e.q0);*/ + /* fprint(2,"'%s' inserted in tag at %d\n", e.b, e.q0);*/ break; case 'I': - /* threadprint(2,"'%s' inserted in body at %d\n", e.b, e.q0);*/ + /* fprint(2,"'%s' inserted in body at %d\n", e.b, e.q0);*/ break; case 'd': - /* threadprint(2, "'%s' deleted in tag at %d\n", e.b, e.q0);*/ + /* fprint(2, "'%s' deleted in tag at %d\n", e.b, e.q0);*/ break; case 'D': - /* threadprint(2, "'%s' deleted in body at %d\n", e.b, e.q0);*/ + /* fprint(2, "'%s' deleted in body at %d\n", e.b, e.q0);*/ break; case 'x': case 'X': /* Execute command. */