#define NCONTEXTS (sizeof(context_names)/sizeof(context_names[0]))
-#define SPACE_SPACES 3
+#define SPACE_SPACES 4
struct OcrReader {
int h;
static pid_t resolver_pid;
static int resolver_done;
+DEBUG_DEFINE_DEBUGF(ocr)
+
static void fgetsline(FILE *f, char *lbuf, size_t lbufsz) {
char *s= fgets(lbuf,lbufsz,f);
eassert(s);
* 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);
+ DEBUGP(callout) ? "--debug" : "--noop-arg",
+ "--automatic-1",
+ (char*)0);
eassert(!"execlp failed");
}
r= close(jobpipe[0]); eassert(!r);
.midword=1 /* Lower only */
};
-static void vdebugf(const char *fmt, va_list al) {
-#ifdef DEBUG_OCR
- vfprintf(debug,fmt,al);
-#endif
-}
-static void debugf(const char *fmt, ...) {
- va_list al; va_start(al,fmt); vdebugf(fmt,al); va_end(al);
-}
-
OcrResultGlyph *ocr(OcrReader *rd, OcrCellType ct, int w, Pixcol cols[]) {
int nspaces;
unsigned ctxmap;