From 9527520d6b18b7c74d74ff4ad42fbf7eab73d203 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Sun, 6 Nov 2005 01:55:06 +0000 Subject: [PATCH] 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). --- src/charconv.tcl | 3 +-- src/siconv.c | 9 ++++++++- 2 files changed, 9 insertions(+), 3 deletions(-) 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; -- 1.7.10.4