X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-test.git;a=blobdiff_plain;f=pctb%2Focr.c;h=78542398abe3edcfdbc2078db667a1d135d01d01;hp=6a91935769ecfc7da0e70681ea80db627c49327e;hb=6e70a6f2ac5765379239252d771f9218a80b9c71;hpb=b74b7faed500074055836296929fb9efa3ad7498 diff --git a/pctb/ocr.c b/pctb/ocr.c index 6a91935..7854239 100644 --- a/pctb/ocr.c +++ b/pctb/ocr.c @@ -228,6 +228,11 @@ static void callout_unknown(OcrReader *rd, int w, Pixcol cols[], const char *p; char cb; Pixcol pv; + + if (!o_resolver) + fatal("OCR failed - unrecognised characters or ligatures.\n" + "Character set database needs to be updated or augmented.\n" + "See README.charset.\n"); if (!resolver) { sysassert(! pipe(jobpipe) ); @@ -241,7 +246,7 @@ static void callout_unknown(OcrReader *rd, int w, Pixcol cols[], /* 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: */ sysassert( dup2(donepipe[1],4) ==4 ); - execlp("./yppsc-ocr-resolver", "yppsc-ocr-resolver", + execlp(o_resolver, o_resolver, DEBUGP(callout) ? "--debug" : "--noop-arg", "--automatic-1", (char*)0);