- if (!resolver) {
- r= pipe(jobpipe); eassert(!r);
- r= pipe(donepipe); eassert(!r);
- resolver_pid= fork();
- eassert(resolver_pid!=-1);
- if (!resolver_pid) {
- r= dup2(jobpipe[0],0); eassert(r==0);
- r= close(jobpipe[1]); eassert(!r);
- r= close(donepipe[0]); eassert(!r);
- /* we know donepipe[1] is >= 4 and we have dealt with all the others
- * so we aren't in any danger of overwriting some other fd 4: */
- r= dup2(donepipe[1],4); eassert(r==4);
- execlp("./show-thing.tcl", "./show-thing.tcl",
- "--automatic","1",(char*)0);
- eassert(!"execlp failed");
- }
- r= close(jobpipe[0]); eassert(!r);
- r= close(donepipe[1]); eassert(!r);
- resolver= fdopen(jobpipe[1],"w"); eassert(resolver);
- resolver_done= donepipe[0];
- }
- fprintf(resolver,"%d %d %d",unk_l,unk_r,unk_ctx);
- for (i=0, s=sofar; i<nsofar; i++, s++) {
- fprintf(resolver," %d %d %d ",s->l,s->r,s->ctx);
+ fprintf(resolver,
+ "char\n"
+ "%d %d ",unk_l,unk_r);
+ cu_pr_ctxmap(resolver,unk_ctxmap);
+ for (i=0, s=rd->results; i<rd->nresults; i++, s++) {
+ if (!strcmp(s->s," ")) continue;
+ fprintf(resolver," %d %d ",s->l,s->r);
+ cu_pr_ctxmap(resolver,s->ctxmap);
+ fprintf(resolver," ");