X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=retrieval%2Fd1_attset.c;h=20096474620283afb3df160dcc7e29b3486e2f91;hb=548d8ab9b0b5930db27643b47fc55afce5511219;hp=7b580bcbad30d99dedc2069d0080f8f5f0e0f331;hpb=db9513f9eca4ef13d3cea779a695bb822fd973a9;p=yaz-moved-to-github.git diff --git a/retrieval/d1_attset.c b/retrieval/d1_attset.c index 7b580bc..2009647 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.10 1998-10-13 16:09:48 adam + * 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 * Added support for arbitrary OID's for tagsets, schemas and attribute sets. * Added support for multiple attribute set references and tagset references * from an abstract syntax file. @@ -45,14 +57,13 @@ * */ -#include #include #include #include -#include -#include -#include +#include +#include +#include data1_att *data1_getattbyname(data1_handle dh, data1_attset *s, char *name) { @@ -116,7 +127,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]); @@ -131,7 +142,7 @@ data1_attset *data1_read_attset(data1_handle dh, const char *file) } else /* parse the string "local{,local}" */ { - char *p = argv[4]; + char *p = argv[3]; data1_local_attribute **ap = &locals; do { @@ -155,7 +166,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; } } @@ -165,23 +176,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")) { @@ -190,16 +201,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; } @@ -211,8 +222,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);