chiark / gitweb /
Check we're on the right page
[ypp-sc-tools.main.git] / pctb / convert.c
index 4784c653994e8e4bd0c675389075cca391b23cf4..4fb18f4c2973ff8f7ba8281acb9470a6feb1dd40 100644 (file)
@@ -109,7 +109,9 @@ static void debug_rect(const char *what, int whati, Rect rr) {
     eassert((point).coord != (last)+(increm));         \
   } while(0)
 
-static void find_structure(void) {
+void find_structure(CanonImage *im) {
+  cim= im;
+  
   Rect whole = { {0,0}, {cim->w-1,cim->h-1} };
 
   WALK_UNTIL_MUST(mainr.tl, x,-1, whole.tl.x, '*');
@@ -283,7 +285,7 @@ int main_test(void) {
   int tryrect, colno;
 
   load_image_and_canonify();
-  find_structure();
+  find_structure(cim);
   rd= ocr_init(text_h);
 
   for (tryrect= +cim->h; tryrect >= -cim->h; tryrect--) {