static int o_single_page, o_quiet;
static const char *o_outputmode= "upload";
+const char *o_resolver;
FILE *screenshot_file;
progress("running recognition...");
analyse(tf);
+ if (o_single_page && !strcmp(o_outputmode,"upload"))
+ fatal("Recognition successful, but refusing to upload partial data\n"
+ " (--single-page specified). Specify an output mode?");
+
sysassert( fseek(tf,0,SEEK_SET) == 0);
progress_log("processing results (--%s)...", o_outputmode);
o_single_page= 1;
else if (!strcmp(arg,"--quiet"))
o_quiet= 1;
+ else if (!strcmp(arg,"--edit-charset"))
+ o_resolver= "./yppsc-ocr-resolver";
else if (!strcmp(arg,"--raw-tsv"))
o_outputmode= 0;
else if (!strcmp(arg,"--upload") ||
else read_screenshots();
}
if (o_mode & mf_analyse) {
+ find_islandname();
if (o_outputmode)
run_analysis();
else
_exit(16);
}
-void *mmalloc(size_t sz) {
- void *r;
- if (!sz) return 0;
- sysassert( r= malloc(sz) );
- return r;
-}
-void *mrealloc(void *p, size_t sz) {
- assert(sz);
- void *r;
- sysassert( r= realloc(p,sz) );
- return r;
-}
-
void waitpid_check_exitstatus(pid_t pid, const char *what) {
pid_t got;
int st;