src/cclqual.c
void ccl_qual_add_combi(CCL_bibset b, const char *n, const char **names)
{
    int i;
    struct ccl_qualifier *q;
    for (q = b->list; q && strcmp(q->name, n); q = q->next)
        ;
    if (q)
        return ;
    q = (struct ccl_qualifier *) xmalloc(sizeof(*q));
    q->name = xstrdup(n);
    q->attr_list = 0;
    q->next = b->list;
    b->list = q;

    for (i = 0; names[i]; i++)
        ;
    q->no_sub = i;
    q->sub = (struct ccl_qualifier **)
        xmalloc(sizeof(*q->sub) * (1+q->no_sub));
    for (i = 0; names[i]; i++)
    {
        q->sub[i] = ccl_qual_lookup(b, names[i], strlen(names[i]));
        if (!q->sub[i])
            q->sub[i] = ccl_qual_new(b, names[i]);
    }
}
/** \brief adds specifies qualifier aliases

    \param b bibset
    \param n qualifier name
    \param names list of qualifier aliases
*/
\brief adds specifies qualifier aliases
\param b bibset
\param n qualifier name
\param names list of qualifier aliases
\ brief adds specifies qualifier aliases \ param b bibset \ param n qualifier name \ param names list of qualifier aliases
void ccl_qual_add_combi(CCL_bibset b, const char *n, const char **names)
{
    int i;
    struct ccl_qualifier *q;
    for (q = b->list; q && strcmp(q->name, n); q = q->next)
        ;
    if (q)
        return ;
    q = (struct ccl_qualifier *) xmalloc(sizeof(*q));
    q->name = xstrdup(n);
    q->attr_list = 0;
    q->next = b->list;
    b->list = q;
    for (i = 0; names[i]; i++)
        ;
    q->no_sub = i;
    q->sub = (struct ccl_qualifier **)
        xmalloc(sizeof(*q->sub) * (1+q->no_sub));
    for (i = 0; names[i]; i++)
    {
        q->sub[i] = ccl_qual_lookup(b, names[i], strlen(names[i]));
        if (!q->sub[i])
            q->sub[i] = ccl_qual_new(b, names[i]);
    }
}
void ccl_qual_add_combi ( CCL_bibset b , const char * n , const char * * names ) { int i ; struct ccl_qualifier * q ; for ( q = b -> list ; q && strcmp ( q -> name , n ) ; q = q -> next ) ; if ( q ) return ; q = ( struct ccl_qualifier * ) xmalloc ( sizeof ( * q ) ) ; q -> name = xstrdup ( n ) ; q -> attr_list = 0 ; q -> next = b -> list ; b -> list = q ; for ( i = 0 ; names [ i ] ; i ++ ) ; q -> no_sub = i ; q -> sub = ( struct ccl_qualifier * * ) xmalloc ( sizeof ( * q -> sub ) * ( 1 + q -> no_sub ) ) ; for ( i = 0 ; names [ i ] ; i ++ ) { q -> sub [ i ] = ccl_qual_lookup ( b , names [ i ] , strlen ( names [ i ] ) ) ; if ( ! q -> sub [ i ] ) q -> sub [ i ] = ccl_qual_new ( b , names [ i ] ) ; } }
\brief adds specifies qualifier aliases
\param b bibset
\param n qualifier name
\param names list of qualifier aliases
\ brief adds specifies qualifier aliases \ param b bibset \ param n qualifier name \ param names list of qualifier aliases