projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bump year. Change Aps->ApS
[idzebra-moved-to-github.git]
/
data1
/
d1_espec.c
diff --git
a/data1/d1_espec.c
b/data1/d1_espec.c
index
fba103f
..
9e6f3b6
100644
(file)
--- a/
data1/d1_espec.c
+++ b/
data1/d1_espec.c
@@
-1,6
+1,6
@@
-/* $Id: d1_espec.c,v 1.2 2002-10-22 13:19:50 adam Exp $
- Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002
- Index Data Aps
+/* $Id: d1_espec.c,v 1.7 2005-01-15 19:38:18 adam Exp $
+ Copyright (C) 1995-2005
+ Index Data ApS
This file is part of the Zebra server.
This file is part of the Zebra server.
@@
-24,10
+24,10
@@
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include <assert.h>
#include <string.h>
#include <assert.h>
#include <string.h>
+#include <yaz/log.h>
#include <yaz/odr.h>
#include <yaz/proto.h>
#include <yaz/odr.h>
#include <yaz/proto.h>
-#include <yaz/log.h>
-#include <data1.h>
+#include <idzebra/data1.h>
static Z_Variant *read_variant(int argc, char **argv, NMEM nmem,
const char *file, int lineno)
static Z_Variant *read_variant(int argc, char **argv, NMEM nmem,
const char *file, int lineno)
@@
-55,7
+55,7
@@
static Z_Variant *read_variant(int argc, char **argv, NMEM nmem,
if (sscanf(argv[i], "(%d,%d,%511[^)])", &zclass, &type, value) < 3)
{
if (sscanf(argv[i], "(%d,%d,%511[^)])", &zclass, &type, value) < 3)
{
- yaz_log(LOG_WARN, "%s:%d: Syntax error in variant component '%s'",
+ yaz_log(YLOG_WARN, "%s:%d: Syntax error in variant component '%s'",
file, lineno, argv[i]);
return 0;
}
file, lineno, argv[i]);
return 0;
}
@@
-123,7
+123,7
@@
static Z_Occurrences *read_occurrences(char *occ, NMEM nmem,
if (!d1_isdigit(*occ))
{
if (!d1_isdigit(*occ))
{
- yaz_log(LOG_WARN, "%s:%d: Bad occurrences-spec %s",
+ yaz_log(YLOG_WARN, "%s:%d: Bad occurrences-spec %s",
file, lineno, occ);
return 0;
}
file, lineno, occ);
return 0;
}
@@
-200,6
+200,10
@@
static Z_ETagUnit *read_tagunit(char *buf, NMEM nmem,
else
t->occurrences = 0;
}
else
t->occurrences = 0;
}
+ else
+ {
+ return 0;
+ }
return u;
}
return u;
}
@@
-218,7
+222,7
@@
Z_Espec1 *data1_read_espec1 (data1_handle dh, const char *file)
if (!(f = data1_path_fopen(dh, file, "r")))
{
if (!(f = data1_path_fopen(dh, file, "r")))
{
- yaz_log(LOG_WARN|LOG_ERRNO, "%s", file);
+ yaz_log(YLOG_WARN|YLOG_ERRNO, "%s", file);
return 0;
}
return 0;
}
@@
-237,7
+241,7
@@
Z_Espec1 *data1_read_espec1 (data1_handle dh, const char *file)
if (!nnames)
{
if (!nnames)
{
- yaz_log(LOG_WARN, "%s:%d: Empty elementsetnames directive",
+ yaz_log(YLOG_WARN, "%s:%d: Empty elementsetnames directive",
file, lineno);
continue;
}
file, lineno);
continue;
}
@@
-256,14
+260,14
@@
Z_Espec1 *data1_read_espec1 (data1_handle dh, const char *file)
{
if (argc != 2)
{
{
if (argc != 2)
{
- yaz_log(LOG_WARN, "%s:%d: Bad # of args for %s",
+ yaz_log(YLOG_WARN, "%s:%d: Bad # of args for %s",
file, lineno, argv[0]);
continue;
}
if (!(res->defaultVariantSetId =
odr_getoidbystr_nmem(nmem, argv[1])))
{
file, lineno, argv[0]);
continue;
}
if (!(res->defaultVariantSetId =
odr_getoidbystr_nmem(nmem, argv[1])))
{
- yaz_log(LOG_WARN, "%s:%d: Bad defaultvariantsetid",
+ yaz_log(YLOG_WARN, "%s:%d: Bad defaultvariantsetid",
file, lineno);
continue;
}
file, lineno);
continue;
}
@@
-272,7
+276,7
@@
Z_Espec1 *data1_read_espec1 (data1_handle dh, const char *file)
{
if (argc != 2)
{
{
if (argc != 2)
{
- yaz_log(LOG_WARN, "%s:%d: Bad # of args for %s",
+ yaz_log(YLOG_WARN, "%s:%d: Bad # of args for %s",
file, lineno, argv[0]);
continue;
}
file, lineno, argv[0]);
continue;
}
@@
-284,7
+288,7
@@
Z_Espec1 *data1_read_espec1 (data1_handle dh, const char *file)
if (!(res->defaultVariantRequest =
read_variant(argc-1, argv+1, nmem, file, lineno)))
{
if (!(res->defaultVariantRequest =
read_variant(argc-1, argv+1, nmem, file, lineno)))
{
- yaz_log(LOG_WARN, "%s:%d: Bad defaultvariantrequest",
+ yaz_log(YLOG_WARN, "%s:%d: Bad defaultvariantrequest",
file, lineno);
continue;
}
file, lineno);
continue;
}
@@
-311,7
+315,7
@@
Z_Espec1 *data1_read_espec1 (data1_handle dh, const char *file)
}
if (argc < 2)
{
}
if (argc < 2)
{
- yaz_log(LOG_WARN, "%s:%d: Bad # of args for %s",
+ yaz_log(YLOG_WARN, "%s:%d: Bad # of args for %s",
file, lineno, argv[0]);
continue;
}
file, lineno, argv[0]);
continue;
}
@@
-343,7
+347,7
@@
Z_Espec1 *data1_read_espec1 (data1_handle dh, const char *file)
tagunit = read_tagunit(path, nmem, file, lineno);
if (!tagunit)
{
tagunit = read_tagunit(path, nmem, file, lineno);
if (!tagunit)
{
- yaz_log (LOG_WARN, "%s%d: Bad tag unit at %s",
+ yaz_log (YLOG_WARN, "%s%d: Bad tag unit at %s",
file, lineno, path);
break;
}
file, lineno, path);
break;
}
@@
-355,7
+359,7
@@
Z_Espec1 *data1_read_espec1 (data1_handle dh, const char *file)
read_variant(argc-3, argv+3, nmem, file, lineno);
}
else
read_variant(argc-3, argv+3, nmem, file, lineno);
}
else
- yaz_log(LOG_WARN, "%s:%d: Unknown directive '%s'",
+ yaz_log(YLOG_WARN, "%s:%d: Unknown directive '%s'",
file, lineno, argv[0]);
fclose (f);
return res;
file, lineno, argv[0]);
fclose (f);
return res;