/* Returns the list with a_new prepended or NULL in case of error.  */
CRDeclaration* cr_declaration_prepend(CRDeclaration *a_this, CRDeclaration *a_new)
/* Returns the list with a_new prepended or NULL in case of error.  */
CRDeclaration* cr_declaration_prepend(CRDeclaration *a_this, CRDeclaration *a_new)
{
        CRDeclaration *cur = NULL;
        g_return_val_if_fail (a_new, NULL);
        if (!a_this)
                return a_new;
        a_this->prev = a_new;
        a_new->next = a_this;
        for (cur = a_new; cur && cur->prev; cur = cur->prev) ;
        return cur;
}