Logo Search packages:      
Sourcecode: inkscape version File versions

CRTerm* cr_term_get_from_list ( CRTerm a_this,
int  itemnr 
)

Use an index to get a CRTerm from the expression.

Parameters:
a_this the current instance of CRTerm.
itemnr the index into the expression.
Returns:
CRTerm at position itemnr, if itemnr > number of terms - 1, it will return NULL.

Definition at line 718 of file cr-term.c.

References _CRTerm::next.

{
      CRTerm *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