NAME
rlist_nth - get the nth entry in the list
SYNOPSIS
#include <roy.h>
void * rlist_nth (RList * list, unsigned int nth);
DESCRIPTION
This call indexes into list as if it were an array of entries. Entry 1 is accessed with nth of 0, and the last entry is accessed with nth of last - 1.
RETURN VALUE
The return type of void * is used so the compiler will upgrade the return value to your entry type. As long as the value isn't NULL the value should be compatable with an RListEntry pointer. See rlist(3) on how to create RListEntry compatible entry structs.
This call returns the nth entry in list or NULL if list has nth or fewer entries.
ERRORS
A call to rlist_nth(3) will never fail, but will return NULL if nth is out of range.
FUNCTION
The rlist_nth(3) api is implemented using a function.
SEE ALSO
rlist(3), rlist_append(3), rlist_compare(3), rlist_first(3), rlist_free(3), rlist_last(3), rlist_new(3), rlist_next(3), rlist_prepend(3), rlist_prev(3), rlist_remove(3), roy(3)