28 #include <yaz/oid_db.h>
72 char *argv[50], line[512];
81 while ((argc = readconf_line(f, &lineno, line, 512, argv, 50)))
84 if (!strcmp(cmd,
"att"))
93 yaz_log(YLOG_WARN,
"%s:%d: Bad # of args to att", file, lineno);
98 yaz_log(YLOG_WARN,
"%s:%d: Local attributes not supported",
101 num = strtol(argv[1], &endptr, 10);
104 yaz_log(YLOG_WARN,
"%s:%d: Bad attribute integer %s",
105 file, lineno, argv[1]);
110 t = *attp = (
data1_att *)nmem_malloc(mem,
sizeof(*t));
112 t->
name = nmem_strdup(mem, name);
117 else if (!strcmp(cmd,
"name"))
121 yaz_log(YLOG_WARN,
"%s:%d: Bad # of args to name", file, lineno);
125 else if (!strcmp(cmd,
"reference"))
131 yaz_log(YLOG_WARN,
"%s:%d: Bad # of args to reference",
137 res->
oid = yaz_string_to_oid_nmem(yaz_oid_std(),
138 CLASS_ATTSET, name, mem);
141 yaz_log(YLOG_WARN,
"%s:%d: Unknown reference oid '%s'",
147 else if (!strcmp(cmd,
"ordinal"))
149 yaz_log (YLOG_WARN,
"%s:%d: Directive ordinal ignored",
152 else if (!strcmp(cmd,
"include"))
159 yaz_log(YLOG_WARN,
"%s:%d: Bad # of args to include",
167 yaz_log(YLOG_WARN,
"%s:%d: Include of attset %s failed",
173 nmem_malloc(mem,
sizeof(**childp));
174 (*childp)->
child = attset;
176 childp = &(*childp)->
next;
180 yaz_log(YLOG_WARN,
"%s:%d: Unknown directive '%s'",
data1_attset * data1_empty_attset(data1_handle dh)
data1_attset * data1_read_attset(data1_handle dh, const char *file)
data1_att * data1_getattbyname(data1_handle dh, data1_attset *s, const char *name)
FILE * data1_path_fopen(data1_handle dh, const char *file, const char *mode)
data1_attset * data1_get_attset(data1_handle dh, const char *name)
NMEM data1_nmem_get(data1_handle dh)
#define data1_matchstr(s1, s2)
data1_attset_child * next
data1_attset_child * children