From: Adam Dickmeiss Date: Sun, 6 Nov 2005 01:55:06 +0000 (+0000) Subject: Fix bug #416 in a different way. Our handlers code in yaz_marc8_?_conv X-Git-Tag: YAZ.2.1.10~21 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=9527520d6b18b7c74d74ff4ad42fbf7eab73d203;p=yaz-moved-to-github.git Fix bug #416 in a different way. Our handlers code in yaz_marc8_?_conv (generated by charconv.tcl) now returns 0 and no_read=1 when a sequence does not match the input. The SECOND HALFs in codetables.xml produces a non-existant entry in the conversion trie.. Hence when met, the input byte is skipped as it should (in yaz_iconv). --- diff --git a/src/charconv.tcl b/src/charconv.tcl index 2d946d0..6ffdd65 100755 --- a/src/charconv.tcl +++ b/src/charconv.tcl @@ -2,7 +2,7 @@ # the next line restats using tclsh \ exec tclsh "$0" "$@" # -# $Id: charconv.tcl,v 1.8 2005-03-16 21:26:37 adam Exp $ +# $Id: charconv.tcl,v 1.9 2005-11-06 01:55:06 adam Exp $ proc usage {} { puts {charconv.tcl: [-p prefix] [-s split] [-o ofile] file ... } @@ -249,7 +249,6 @@ proc dump_trie {ofilehandle} { if (!code) { *no_read = 1; - code = *inp; } return code; } diff --git a/src/siconv.c b/src/siconv.c index 9e5393b..9caf28c 100644 --- a/src/siconv.c +++ b/src/siconv.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: siconv.c,v 1.15 2005-11-06 01:28:09 adam Exp $ + * $Id: siconv.c,v 1.16 2005-11-06 01:55:06 adam Exp $ */ /** * \file siconv.c @@ -265,6 +265,13 @@ static unsigned long yaz_read_marc8 (yaz_iconv_t cd, unsigned char *inp, We'll increment the no_read counter by 1, since we want to skip over the processing of the closing ligature character */ + /* this code is no longer necessary.. our handlers code in + yaz_marc8_?_conv (generated by charconv.tcl) now returns + 0 and no_read=1 when a sequence does not match the input. + The SECOND HALFs in codetables.xml produces a non-existant + entry in the conversion trie.. Hence when met, the input byte is + skipped as it should (in yaz_iconv) + */ #if 0 if (x == 0x0361 || x == 0x0360) *no_read += 1;