/* 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",(char*)0);
+ execlp("./show-thing.tcl", "./show-thing.tcl",
+ "--automatic","1",(char*)0);
eassert(!"execlp failed");
}
r= close(jobpipe[0]); eassert(!r);
}
fprintf(resolver,"%d %d %d",unk_l,unk_r,unk_ctx);
for (i=0, s=sofar; i<nsofar; i++, s++) {
+ if (!strcmp(s->s," ")) continue;
fprintf(resolver," %d %d %d ",s->l,s->r,s->ctx);
for (p=s->s; (c= *p); p++) {
if (c=='\\') fprintf(resolver,"\\%c",c);
}
OcrResultGlyph *ocr(int w, int h, Pixcol cols[]) {
- int nspaces=0;
+ int nspaces=-w;
int ctx=1,i, x;
nresults=0;
if (!cols[x]) {
nspaces++;
x++;
- if (nspaces>3) ctx=1;
+ if (nspaces==3) {
+ fprintf(debug,"OCR x=%x nspaces=%d space\n",x,nspaces);
+ add_result(" ",x-nspaces,x+1,0);
+ ctx=1;
+ }
continue;
}
+ nspaces=0;
/* find character */
OCRDatabaseNode *current=0, *bestmatch=0;