Next: , Previous: rangel_new, Up: Ranges


3.11 rangel_next

get the next element in the range list

Synopsis

     #include <suplib/range.h>
     
     
     
int rangel_next( RangeLList *rl, long *elem );

Parameters

RangeLList *rl
the range to iterate over
long *elem
the returned element

Description

rangel_next serves as an iterator over the passed list of ranges, returning the next element in the list. To reset the iterator, rangel_reset. The element is returned via the elem argument.

Returns

It returns ‘1’ if there is an element left, ‘0’ if it has reached the end of the range list.

Author

Diab Jerius