Logo Search packages:      
Sourcecode: inkscape version File versions

CRDeclaration* cr_declaration_get_from_list ( CRDeclaration a_this,
int  itemnr 
)

Use an index to get a CRDeclaration from the declaration list.

Parameters:
a_this the current instance of CRDeclaration.
itemnr the index into the declaration list.
Returns:
CRDeclaration at position itemnr, if itemnr > number of declarations - 1, it will return NULL.

Definition at line 633 of file cr-declaration.c.

{
        CRDeclaration *cur = NULL;
        int nr = 0;

        g_return_val_if_fail (a_this, NULL);

        for (cur = a_this; cur; cur = cur->next)
                if (nr++ == itemnr)
                        return cur;
        return NULL;
}


Generated by  Doxygen 1.6.0   Back to index