X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=pctb%2Focr.c;h=f7cb4504224583c48f4796a11991b48b81366e22;hb=817c4b56d7b72dbb9dcce70d0e22f57d8f687ba0;hp=4b9fa505b156afa3a001f3635ad0efeca5de2c84;hpb=c7280e7f26a6fd3685fe96d94c1d76ec77812e57;p=ypp-sc-tools.main.git diff --git a/pctb/ocr.c b/pctb/ocr.c index 4b9fa50..f7cb450 100644 --- a/pctb/ocr.c +++ b/pctb/ocr.c @@ -122,7 +122,7 @@ static void readdb1(OcrReader *rd, const char *which, int local) { int h, endsword; char lbuf[100]; - char *dbfname= masprintf("%s/#%s-char%d#.txt", + char *dbfname= masprintf("%s/_%s-char%d.txt", get_vardir(), which, rd->h); if (!dbfile_open(dbfname)) @@ -132,7 +132,7 @@ static void readdb1(OcrReader *rd, const char *which, int local) { o_flags |= ff_charset_havelocal; FGETSLINE; - dbassert(!strcmp(lbuf,"# ypp-sc-tools pctb font v2")); + dbassert(!strcmp(lbuf,"# ypp-sc-tools pctb font v3 depth=" STRING(AADEPTH))); dbassert( dbfile_scanf("%d", &h) == 1); dbassert(h==rd->h); @@ -238,7 +238,7 @@ Rejection *rejections; static void load_rejections(const char *which) { char lbuf[1000]; - char *fname= masprintf("%s/#%s-reject#.txt", get_vardir(), which); + char *fname= masprintf("%s/_%s-reject.txt", get_vardir(), which); int c, lno=0; Rejection *rej; @@ -597,7 +597,6 @@ OcrReader *ocr_init(int h) { if (o_flags & ff_dict_fetch) { char *fetchfile= masprintf("char%d",h); - progress("Updating %s...",fetchfile); fetch_with_rsync(fetchfile); free(fetchfile); } @@ -649,7 +648,7 @@ void ocr_showcharsets(void) { memset(found,0,sizeof(found)); - fnpat= pcre_compile("\\#(?:master|local)\\-char([1-9]\\d{0,2})\\#\\.txt$", + fnpat= pcre_compile("_(?:master|local)\\-char([1-9]\\d{0,2})\\.txt$", PCRE_ANCHORED|PCRE_DOLLAR_ENDONLY, &pcre_err,&pcre_erroffset, 0); debugf("pcre_compile %p %s\n",fnpat,pcre_err);