/*
- * 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.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
*
*/
-#include <ctype.h>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
-#include <log.h>
-#include <d1_attset.h>
-#include <data1.h>
+#include <yaz/log.h>
+#include <yaz/d1_attset.h>
+#include <yaz/data1.h>
data1_att *data1_getattbyname(data1_handle dh, data1_attset *s, char *name)
{
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]);
{
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;
}
}
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"))
{
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;
}
}
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);