From: Adam Dickmeiss Date: Fri, 5 Sep 1997 09:52:31 +0000 (+0000) Subject: Extra argument added to function chr_read_maptab (tab path). X-Git-Tag: ZEBRA.1.0~319 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=de4ada45ce039553f8322e620cc047d8cf4a065e;p=idzebra-moved-to-github.git Extra argument added to function chr_read_maptab (tab path). --- diff --git a/include/charmap.h b/include/charmap.h index eb397f0..a4b08d5 100644 --- a/include/charmap.h +++ b/include/charmap.h @@ -55,7 +55,7 @@ typedef struct chrmaptab int base_uppercase; /* Start of upper-case ordinals */ } chrmaptab, *CHRMAPTAB; -chrmaptab *chr_read_maptab(char *name); +chrmaptab *chr_read_maptab(const char *tabpath, const char *name); int chr_map_chrs(chr_t_entry *t, char **from, int len, int *read, char **to, int max); char **chr_map_input(chr_t_entry *t, char **from, int len); diff --git a/index/kdump.c b/index/kdump.c index 655bf8b..f3f242f 100644 --- a/index/kdump.c +++ b/index/kdump.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: kdump.c,v $ - * Revision 1.11 1996-10-29 14:06:49 adam + * Revision 1.12 1997-09-05 09:52:32 adam + * Extra argument added to function chr_read_maptab (tab path). + * + * Revision 1.11 1996/10/29 14:06:49 adam * Include zebrautl.h instead of alexutil.h. * * Revision 1.10 1996/06/04 14:56:12 quinn @@ -135,7 +138,7 @@ int main (int argc, char **argv) } else if (ret == 'm') { - if (!(map = chr_read_maptab(arg))) + if (!(map = chr_read_maptab (NULL, arg))) { logf(LOG_FATAL, "Failed to open maptab"); exit(1); diff --git a/util/charmap.c b/util/charmap.c index 0f87f60..60bc254 100644 --- a/util/charmap.c +++ b/util/charmap.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: charmap.c,v $ - * Revision 1.10 1997-07-01 13:01:08 adam + * Revision 1.11 1997-09-05 09:52:32 adam + * Extra argument added to function chr_read_maptab (tab path). + * + * Revision 1.10 1997/07/01 13:01:08 adam * Bug fix in routine find_entry: didn't take into account the len arg. * * Revision 1.9 1996/10/29 13:48:14 adam @@ -58,8 +61,6 @@ const char *CHR_UNKNOWN = "\001"; const char *CHR_SPACE = "\002"; const char *CHR_BASE = "\003"; -extern char *data1_tabpath; - /* * Character map trie node. */ @@ -347,14 +348,14 @@ static int scan_string(char *s, void (*fun)(char *c, void *data, int num), return 0; } -chrmaptab *chr_read_maptab(char *name) +chrmaptab *chr_read_maptab(const char *tabpath, const char *name) { FILE *f; char line[512], *argv[50]; chrmaptab *res = xmalloc(sizeof(*res)); int argc, num = (int) *CHR_BASE, i; - if (!(f = yaz_path_fopen(data1_tabpath, name, "r"))) + if (!(f = yaz_path_fopen(tabpath, name, "r"))) { logf(LOG_WARN|LOG_ERRNO, "%s", name); return 0;