29 #include <yaz/oid_db.h>
58 for (i = 0; types[i].tname; i++)
69 for (; s; s = s->
next)
89 for (; s; s = s->
next)
129 char *argv[50], line[512];
133 yaz_log(YLOG_WARN|YLOG_ERRNO,
"%s", file);
141 while ((argc = readconf_line(f, &lineno, line, 512, argv, 50)))
144 if (!strcmp(cmd,
"tag"))
147 char *names, *type, *nm;
153 yaz_log(YLOG_WARN,
"%s:%d: Bad # args to tag", file, lineno);
156 value = atoi(argv[1]);
160 rr = *tagp = (
data1_tag *)nmem_malloc(mem,
sizeof(*rr));
171 yaz_log(YLOG_WARN,
"%s:%d: Unknown datatype %s",
184 *npp = (
data1_name *)nmem_malloc(mem,
sizeof(**npp));
185 if ((e = strchr(nm,
'/')))
187 (*npp)->
name = nmem_strdup(mem, nm);
195 else if (!strcmp(cmd,
"name"))
199 yaz_log(YLOG_WARN,
"%s:%d: Bad # args to name", file, lineno);
202 res->
name = nmem_strdup(mem, argv[1]);
204 else if (!strcmp(cmd,
"reference"))
210 yaz_log(YLOG_WARN,
"%s:%d: Bad # args to reference",
215 res->
oid = yaz_string_to_oid_nmem(yaz_oid_std(),
216 CLASS_TAGSET, name, mem);
219 yaz_log(YLOG_WARN,
"%s:%d: Unknown tagset ref '%s'",
224 else if (!strcmp(cmd,
"type"))
228 yaz_log (YLOG_WARN,
"%s:%d: Bad # args to type", file, lineno);
232 res->
type = atoi(argv[1]);
234 else if (!strcmp(cmd,
"include"))
241 yaz_log(YLOG_WARN,
"%s:%d: Bad # args to include",
247 type = atoi(argv[2]);
251 yaz_log(YLOG_WARN,
"%s:%d: Inclusion failed for tagset %s",
255 childp = &(*childp)->
next;
259 yaz_log(YLOG_WARN,
"%s:%d: Unknown directive '%s'",
FILE * data1_path_fopen(data1_handle dh, const char *file, const char *mode)
NMEM data1_nmem_get(data1_handle dh)
#define data1_matchstr(s1, s2)
struct data1_tagset * tagset
union data1_tag::@1 value