X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=retrieval%2Fd1_attset.c;h=72d271c303b0d00d1a34642ce090df7653f85b81;hb=98f0cc2d7eeed27912edb88bf16512bb622b19ee;hp=8ee20adebebef0c8ba15e9d2e8780be9455bcd8b;hpb=45bfcdc6cfcb7af8b930fe49c43aeadfe5624f20;p=yaz-moved-to-github.git diff --git a/retrieval/d1_attset.c b/retrieval/d1_attset.c index 8ee20ad..72d271c 100644 --- a/retrieval/d1_attset.c +++ b/retrieval/d1_attset.c @@ -1,10 +1,22 @@ /* - * Copyright (c) 1995-1998, Index Data. + * Copyright (c) 1995-1999, Index Data. * See the file LICENSE for details. * Sebastian Hammer, Adam Dickmeiss * * $Log: d1_attset.c,v $ - * Revision 1.11 1998-10-14 13:31:56 adam + * Revision 1.15 2002-04-04 20:49:46 adam + * New functions yaz_is_abspath, yaz_path_fopen_base + * + * Revision 1.14 1999/11/30 13:47:12 adam + * Improved installation. Moved header files to include/yaz. + * + * Revision 1.13 1999/10/21 12:06:29 adam + * Retrieval module no longer uses ctype.h - functions. + * + * Revision 1.12 1999/08/27 09:40:32 adam + * Renamed logf function to yaz_log. Removed VC++ project files. + * + * Revision 1.11 1998/10/14 13:31:56 adam * Bug fix. Bug introduced by previous commit. * * Revision 1.10 1998/10/13 16:09:48 adam @@ -48,14 +60,13 @@ * */ -#include #include #include #include -#include -#include -#include +#include +#include +#include data1_att *data1_getattbyname(data1_handle dh, data1_attset *s, char *name) { @@ -100,7 +111,7 @@ data1_attset *data1_read_attset(data1_handle dh, const char *file) int argc; char *argv[50], line[512]; - if (!(f = yaz_path_fopen(data1_get_tabpath(dh), file, "r"))) + if (!(f = data1_path_fopen(dh, file, "r"))) return NULL; res = data1_empty_attset (dh); @@ -119,7 +130,7 @@ data1_attset *data1_read_attset(data1_handle dh, const char *file) if (argc < 3) { - logf(LOG_WARN, "%s:%d: Bad # of args to att", file, lineno); + yaz_log(LOG_WARN, "%s:%d: Bad # of args to att", file, lineno); continue; } num = atoi (argv[1]); @@ -158,7 +169,7 @@ data1_attset *data1_read_attset(data1_handle dh, const char *file) { if (argc != 2) { - logf(LOG_WARN, "%s:%d: Bad # of args to name", file, lineno); + yaz_log(LOG_WARN, "%s:%d: Bad # of args to name", file, lineno); continue; } } @@ -168,23 +179,23 @@ data1_attset *data1_read_attset(data1_handle dh, const char *file) if (argc != 2) { - logf(LOG_WARN, "%s:%d: Bad # of args to reference", - file, lineno); + yaz_log(LOG_WARN, "%s:%d: Bad # of args to reference", + file, lineno); continue; } name = argv[1]; if ((res->reference = oid_getvalbyname(name)) == VAL_NONE) { - logf(LOG_WARN, "%s:%d: Unknown reference oid '%s'", - file, lineno, name); + yaz_log(LOG_WARN, "%s:%d: Unknown reference oid '%s'", + file, lineno, name); fclose(f); return 0; } } else if (!strcmp(cmd, "ordinal")) { - logf (LOG_WARN, "%s:%d: Directive ordinal ignored", - file, lineno); + yaz_log (LOG_WARN, "%s:%d: Directive ordinal ignored", + file, lineno); } else if (!strcmp(cmd, "include")) { @@ -193,16 +204,16 @@ data1_attset *data1_read_attset(data1_handle dh, const char *file) if (argc != 2) { - logf(LOG_WARN, "%s:%d: Bad # of args to include", - file, lineno); + yaz_log(LOG_WARN, "%s:%d: Bad # of args to include", + file, lineno); continue; } name = argv[1]; if (!(attset = data1_get_attset (dh, name))) { - logf(LOG_WARN, "%s:%d: Include of attset %s failed", - file, lineno, name); + yaz_log(LOG_WARN, "%s:%d: Include of attset %s failed", + file, lineno, name); continue; } @@ -214,8 +225,8 @@ data1_attset *data1_read_attset(data1_handle dh, const char *file) } else { - logf(LOG_WARN, "%s:%d: Unknown directive '%s'", - file, lineno, cmd); + yaz_log(LOG_WARN, "%s:%d: Unknown directive '%s'", + file, lineno, cmd); } } fclose(f);