Reference

rlist_prepend(3)

add an entry to the beginning of an rlist

NAME

rlist_prepend - add an entry to the beginning of an rlist

SYNOPSIS

#include <roy.h>

void rlist_prepend (RList * list, RListEntry * entry);

DESCRIPTION

Add entry at the beginning of list. The rlist_prepend(3) api is implmented using a macro so using the RListEntry * as the entry is only advisorial. See rlist(3) on how to create RListEntry compatible entry structs.

The programmer is responsible for contructing/allocating the entry prior to calling rlist_prepend(3).

Because rlists have both head and tail pointers, there is no proformance reason to use the function instead of rlist_append(3)

RETURN VALUE

This call doesn't return any value.

ERRORS

A call to rlist_prepend(3) will never fail.

MACRO

The rlist_prepend(3) api is implemented using a macro.

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_nth(3), rlist_prev(3), rlist_remove(3), roy(3)

History