From 1ae1abc15aae822e996b23e2dc73612b4d401044 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 4 Jun 2009 20:16:15 +0100 Subject: [PATCH] compatibility version check --- pctb/ocr.c | 3 ++- pctb/show-thing.tcl | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pctb/ocr.c b/pctb/ocr.c index 7f3be26..df4aacf 100644 --- a/pctb/ocr.c +++ b/pctb/ocr.c @@ -110,7 +110,8 @@ static void callout_unknown(int w, int h, Pixcol cols[], /* we know donepipe[1] is >= 4 and we have dealt with all the others * 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",(char*)0); + execlp("./show-thing.tcl", "./show-thing.tcl", + "--automatic","1",(char*)0); eassert(!"execlp failed"); } r= close(jobpipe[0]); eassert(!r); diff --git a/pctb/show-thing.tcl b/pctb/show-thing.tcl index be07d2d..0d2ec0c 100755 --- a/pctb/show-thing.tcl +++ b/pctb/show-thing.tcl @@ -465,9 +465,10 @@ proc done/automatic {} { } switch -exact -- $argv { - {} { set mainkind test } - --automatic { set mainkind automatic } - default { error "huh $argv ?" } + {} { set mainkind test } + {--automatic 1} { set mainkind automatic } + {--automatic*} { error "incompatible versions - install problem" } + default { error "huh $argv ?" } } read_database -- 2.30.2