src/cclqual.c
void ccl_qual_rm(CCL_bibset *b)
{
    struct ccl_qualifier *q, *q1;
    struct ccl_qualifier_special *sp, *sp1;

    if (!*b)
        return;
    for (q = (*b)->list; q; q = q1)
    {
        struct ccl_rpn_attr *attr, *attr1;

        for (attr = q->attr_list; attr; attr = attr1)
        {
            attr1 = attr->next;
            if (attr->set)
                xfree(attr->set);
            if (attr->kind == CCL_RPN_ATTR_STRING)
                xfree(attr->value.str);
            xfree(attr);
        }
        q1 = q->next;
        xfree(q->name);
        if (q->sub)
            xfree(q->sub);
        xfree(q);
    }
    for (sp = (*b)->special; sp; sp = sp1)
    {
        sp1 = sp->next;
        xfree(sp->name);
        if (sp->values)
        {
            int i;
            for (i = 0; sp->values[i]; i++)
                xfree((char*) sp->values[i]);
            xfree((char **)sp->values);
        }
        xfree(sp);
    }
    xfree(*b);
    *b = NULL;
}
/** \brief destroys Bibset
    \param b pointer to Bibset

    *b will be set to NULL.
 */
\brief destroys Bibset
\param b pointer to Bibset

b will be set to NULL.
\ brief destroys Bibset \ param b pointer to Bibset b will be set to NULL .
void ccl_qual_rm(CCL_bibset *b)
{
    struct ccl_qualifier *q, *q1;
    struct ccl_qualifier_special *sp, *sp1;
    if (!*b)
        return;
    for (q = (*b)->list; q; q = q1)
    {
        struct ccl_rpn_attr *attr, *attr1;
        for (attr = q->attr_list; attr; attr = attr1)
        {
            attr1 = attr->next;
            if (attr->set)
                xfree(attr->set);
            if (attr->kind == CCL_RPN_ATTR_STRING)
                xfree(attr->value.str);
            xfree(attr);
        }
        q1 = q->next;
        xfree(q->name);
        if (q->sub)
            xfree(q->sub);
        xfree(q);
    }
    for (sp = (*b)->special; sp; sp = sp1)
    {
        sp1 = sp->next;
        xfree(sp->name);
        if (sp->values)
        {
            int i;
            for (i = 0; sp->values[i]; i++)
                xfree((char*) sp->values[i]);
            xfree((char **)sp->values);
        }
        xfree(sp);
    }
    xfree(*b);
    *b = NULL;
}
void ccl_qual_rm ( CCL_bibset * b ) { struct ccl_qualifier * q , * q1 ; struct ccl_qualifier_special * sp , * sp1 ; if ( ! * b ) return ; for ( q = ( * b ) -> list ; q ; q = q1 ) { struct ccl_rpn_attr * attr , * attr1 ; for ( attr = q -> attr_list ; attr ; attr = attr1 ) { attr1 = attr -> next ; if ( attr -> set ) xfree ( attr -> set ) ; if ( attr -> kind == CCL_RPN_ATTR_STRING ) xfree ( attr -> value . str ) ; xfree ( attr ) ; } q1 = q -> next ; xfree ( q -> name ) ; if ( q -> sub ) xfree ( q -> sub ) ; xfree ( q ) ; } for ( sp = ( * b ) -> special ; sp ; sp = sp1 ) { sp1 = sp -> next ; xfree ( sp -> name ) ; if ( sp -> values ) { int i ; for ( i = 0 ; sp -> values [ i ] ; i ++ ) xfree ( ( char * ) sp -> values [ i ] ) ; xfree ( ( char * * ) sp -> values ) ; } xfree ( sp ) ; } xfree ( * b ) ; * b = NULL ; }
\brief destroys Bibset
\param b pointer to Bibset
\ brief destroys Bibset \ param b pointer to Bibset