-OcrResultGlyph *ocr(OcrReader *rd, int w, Pixcol cols[]) {
- int nspaces=-w;
- unsigned ctxmap=2; /* uppercase */
+struct OcrCellTypeInfo {
+ unsigned initial, nextword, midword;
+};
+const struct OcrCellTypeInfo ocr_celltype_number= {
+ 4,4,4
+};
+const struct OcrCellTypeInfo ocr_celltype_text= {
+ .initial=2 /* Uppercase */,
+ .nextword=3 /* Either */,
+ .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;