X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=util%2Fcharmap.c;h=c242b3a7cd6df4b71ff8b92167f116d0862a6c5a;hb=e42ae39f438cad849a0cea2cca2f9f67e1225dfd;hp=782f475992113c86373b1ddf7fdcff34c6aa048f;hpb=a030c87bc444608639905eca95e29f84a4f1d991;p=idzebra-moved-to-github.git diff --git a/util/charmap.c b/util/charmap.c index 782f475..c242b3a 100644 --- a/util/charmap.c +++ b/util/charmap.c @@ -26,6 +26,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * Zebra dictionary. */ +#if HAVE_CONFIG_H +#include +#endif #include #include #include @@ -239,7 +242,6 @@ ucs4_t zebra_prim_w(ucs4_t **s) ucs4_t i = 0; char fmtstr[8]; - yaz_log(YLOG_DEBUG, "prim_w %.3s", (char *) *s); if (**s == '\\' && 1[*s]) { (*s)++; @@ -484,7 +486,14 @@ static int scan_string(char *s_native, ++s; s0 = s; i = 0; while (*s != ')' || s[-1] == '\\') + { + if (*s == '\0') + { + yaz_log(YLOG_FATAL, "Missing ) in charmap"); + return -1; + } arg_prim[i++] = zebra_prim_w(&s); + } arg_prim[i] = 0; if (scan_to_utf8(t_utf8, arg_prim, zebra_ucs4_strlen(arg_prim), str, sizeof(str)-1)) return -1; @@ -728,7 +737,7 @@ chrmaptab chrmaptab_create(const char *tabpath, const char *name, chrmaptab_destroy(res); res = 0; } - yaz_log(YLOG_DEBUG, "maptab %s close %d errors", name, errors); + yaz_log(YLOG_DEBUG, "maptab %s num=%d close %d errors", name, num, errors); if (t_utf8 != 0) yaz_iconv_close(t_utf8); if (t_unicode != 0)