46 const char *n,
size_t len)
50 if (len == strlen(q->
name) && !memcmp(q->
name, n, len))
66 for (i = 0; p->
values[i]; i++)
84 char **vlist = (
char **)
xmalloc(no *
sizeof(*vlist));
97 vlist = (
char **)
xrealloc(vlist, (no = no * 2) *
sizeof(*vlist));
141 for (i = 0; names[i]; i++)
146 for (i = 0; names[i]; i++)
166 int *type_ar,
int *value_ar,
char **svalue_ar,
180 attrp = &(*attrp)->
next;
187 attr->
set = *attsets++;
188 attr->
type = *type_ar++;
231 for (q = (*b)->list; q; q = q1)
235 for (attr = q->
attr_list; attr; attr = attr1)
250 for (sp = (*b)->special; sp; sp = sp1)
257 for (i = 0; sp->
values[i]; i++)
279 (*qp)->attr_list = 0;
282 attrp = &(*qp)->attr_list;
285 *attrp =
xmalloc(
sizeof(**attrp));
288 (*attrp)->type = attr->
type;
289 (*attrp)->kind = attr->
kind;
295 attrp = &(*attrp)->
next;
297 (*qp)->no_sub = q->
no_sub;
305 for (i = 0; i < q->
no_sub; i++)
311 for (q1 = b->
list; q1 && q2; q1 = q1->
next, q2 = q2->
next)
324 for (i = 0; s->
values[i]; i++)
329 (*sp)->values =
xmalloc(
sizeof(*(*sp)->values) * (i+1));
330 for (i = 0; s->
values[i]; i++)
332 (*sp)->values[i] = 0;
339 size_t name_len,
int seq)
342 const char **aliases;
351 case_sensitive = atoi(aliases[0]);
354 if (strlen(q->
name) == name_len)
358 if (!memcmp(
name, q->
name, name_len))
414 const char *src_str,
size_t src_len)
416 const char **slist = 0;
429 for (i = 0; slist[i]; i++)
430 if (src_len == strlen(slist[i])
#define CCL_RPN_ATTR_STRING
#define CCL_RPN_ATTR_NUMERIC
struct ccl_qualifiers * CCL_bibset
CCL bibset, AKA profile.
CCL header with private definitions.
struct ccl_rpn_attr * ccl_parser_qual_search(CCL_parser cclp, const char *name, size_t name_len)
CCL_bibset ccl_qual_mk(void)
creates Bibset
ccl_qualifier_t ccl_qual_search(CCL_parser cclp, const char *name, size_t name_len, int seq)
const char * ccl_qual_get_name(ccl_qualifier_t q)
void ccl_qual_add_set(CCL_bibset b, const char *name, int no, int *type_ar, int *value_ar, char **svalue_ar, char **attsets)
adds specifies attributes for qualifier
void ccl_qual_add_combi(CCL_bibset b, const char *n, const char **names)
adds specifies qualifier aliases
struct ccl_rpn_attr * ccl_qual_get_attr(ccl_qualifier_t q)
void ccl_qual_rm(CCL_bibset *b)
destroys Bibset
int ccl_search_stop(CCL_bibset bibset, const char *qname, const char *src_str, size_t src_len)
const char ** ccl_qual_search_special(CCL_bibset b, const char *name)
static struct ccl_qualifier * ccl_qual_new(CCL_bibset b, const char *name)
CCL_bibset ccl_qual_dup(CCL_bibset b)
void ccl_qual_add_special_ar(CCL_bibset bibset, const char *n, const char **values)
void ccl_qual_add_special(CCL_bibset bibset, const char *n, const char *cp)
static struct ccl_qualifier * ccl_qual_lookup(CCL_bibset b, const char *n, size_t len)
int ccl_memicmp(const char *s1, const char *s2, size_t n)
void yaz_snprintf(char *buf, size_t size, const char *fmt,...)
Header for config file reading utilities.
struct ccl_qualifier_special * next
struct ccl_qualifier * next
struct ccl_rpn_attr * attr_list
struct ccl_qualifier ** sub
struct ccl_qualifier_special * special
struct ccl_qualifier * list
attribute node (type, value) pair as used in RPN
char * str
string attribute value
int kind
attribute value type (numeric or string)
int numeric
numeric attribute value
int type
attribute type, Bib-1: 1=use, 2=relation, 3=position, etc
union ccl_rpn_attr::@7 value
struct ccl_rpn_attr * next
next attribute
yaz_tok_parse_t yaz_tok_parse_buf(yaz_tok_cfg_t t, const char *buf)
yaz_tok_cfg_t yaz_tok_cfg_create(void)
const char * yaz_tok_parse_string(yaz_tok_parse_t tp)
void yaz_tok_parse_destroy(yaz_tok_parse_t tp)
void yaz_tok_cfg_destroy(yaz_tok_cfg_t t)
int yaz_tok_move(yaz_tok_parse_t tp)
Header with public definitions about YAZ' tokenizer.
#define xstrdup(s)
utility macro which calls xstrdup_f
#define xfree(x)
utility macro which calls xfree_f
#define xrealloc(o, x)
utility macro which calls xrealloc_f
#define xmalloc(x)
utility macro which calls malloc_f