X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=ccl%2Fcclqual.c;h=c19dede86d15964b6dc07201aef3b9aa680dee91;hp=c8be663601bd2d28ad6a789b4a872e03808d9843;hb=448e7f2a48f6485a8d452c75420524fb37453bc1;hpb=4b89c0a02975f8140f079e5883692a7de30126be diff --git a/ccl/cclqual.c b/ccl/cclqual.c index c8be663..c19dede 100644 --- a/ccl/cclqual.c +++ b/ccl/cclqual.c @@ -45,7 +45,10 @@ * Europagate, 1995 * * $Log: cclqual.c,v $ - * Revision 1.13 2000-01-31 13:15:21 adam + * Revision 1.14 2000-11-16 09:58:02 adam + * Implemented local AttributeSet setting for CCL field maps. + * + * Revision 1.13 2000/01/31 13:15:21 adam * Removed uses of assert(3). Cleanup of ODR. CCL parser update so * that some characters are not surrounded by spaces in resulting term. * ILL-code updates. @@ -127,7 +130,8 @@ struct ccl_qualifiers { * pairs: Attributes. pairs[0] first type, pair[1] first value, * ... pair[2*no-2] last type, pair[2*no-1] last value. */ -void ccl_qual_add (CCL_bibset b, const char *name, int no, int *pairs) +void ccl_qual_add_set (CCL_bibset b, const char *name, int no, int *pairs, + char **attsets) { struct ccl_qualifier *q; struct ccl_rpn_attr **attrp; @@ -162,6 +166,7 @@ void ccl_qual_add (CCL_bibset b, const char *name, int no, int *pairs) attr = (struct ccl_rpn_attr *)malloc (sizeof(*attr)); ccl_assert (attr); + attr->set = *attsets++; attr->type = *pairs++; attr->value = *pairs++; *attrp = attr; @@ -199,6 +204,8 @@ void ccl_qual_rm (CCL_bibset *b) for (attr = q->attr_list; attr; attr = attr1) { attr1 = attr->next; + if (attr->set) + free (attr->set); free (attr); } q1 = q->next;