chiark / gitweb /
much fixes for new arrangements
[ypp-sc-tools.db-test.git] / pctb / ocr.c
index 7eb871a68844acc1d802747e67346aed760b3729..436aa8dc16078ae830b54de0e1e7468c71bcb4fd 100644 (file)
@@ -24,7 +24,7 @@ static const char *context_names[]= {
 
 #define NCONTEXTS (sizeof(context_names)/sizeof(context_names[0]))
 
-#define SPACE_SPACES 3
+#define SPACE_SPACES 4
 
 struct OcrReader {
   int h;
@@ -185,7 +185,9 @@ static void callout_unknown(OcrReader *rd, int w, Pixcol cols[],
        * 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);
@@ -287,9 +289,8 @@ const struct OcrCellTypeInfo ocr_celltype_text= {
 };
 
 static void vdebugf(const char *fmt, va_list al) {
-#ifdef DEBUG_OCR
-  vfprintf(debug,fmt,al);
-#endif
+  if (DEBUGP(ocr))
+    vfprintf(debug,fmt,al);
 }
 static void debugf(const char *fmt, ...) {
   va_list al;  va_start(al,fmt);  vdebugf(fmt,al);  va_end(al);