X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=util%2Fcharmap.c;h=a9ddf7258c9cecb38c191b41350fe0ca0603f649;hb=a20e59c5087fb92c419f2330c786367f9ce8ccd2;hp=fdbf0bf926adc1c9d1253a65da28345b5200addb;hpb=a9059af90b4153d3abd91c9a795b1159ef77fa93;p=idzebra-moved-to-github.git diff --git a/util/charmap.c b/util/charmap.c index fdbf0bf..a9ddf72 100644 --- a/util/charmap.c +++ b/util/charmap.c @@ -3,7 +3,7 @@ * All rights reserved. * Sebastian Hammer, Adam Dickmeiss * - * $Id: charmap.c,v 1.19 2002-02-18 11:47:23 adam Exp $ + * $Id: charmap.c,v 1.22 2002-05-03 13:46:05 adam Exp $ * */ @@ -185,7 +185,7 @@ const char *chr_map_output(chrmaptab maptab, const char **from, int len) unsigned char zebra_prim(char **s) { unsigned char c; - unsigned int i; + unsigned int i = 0; yaz_log (LOG_DEBUG, "prim %.3s", *s); if (**s == '\\') @@ -357,7 +357,8 @@ static int scan_string(char *s, return 0; } -chrmaptab chrmaptab_create(const char *tabpath, const char *name, int map_only) +chrmaptab chrmaptab_create(const char *tabpath, const char *name, int map_only, + const char *tabroot) { FILE *f; char line[512], *argv[50]; @@ -368,7 +369,7 @@ chrmaptab chrmaptab_create(const char *tabpath, const char *name, int map_only) NMEM nmem; logf (LOG_DEBUG, "maptab %s open", name); - if (!(f = yaz_path_fopen(tabpath, name, "r"))) + if (!(f = yaz_fopen(tabpath, name, "r", tabroot))) { logf(LOG_WARN|LOG_ERRNO, "%s", name); return 0; @@ -510,7 +511,7 @@ chrmaptab chrmaptab_create(const char *tabpath, const char *name, int map_only) logf(LOG_WARN, "Syntax error at '%s' in %s", line, name); } - fclose(f); + yaz_fclose(f); if (errors) { chrmaptab_destroy(res);