Previous: Fixed Size Data Sequence Library, Up: Fixed Size Data Sequence Interface [Index]
The ordered library functions perform operations on assumed sorted sequences. They take a comparison method as one of their arguments, one they use to determine how the data operated compares to the sequence keys. The method is expected to return a negative number if the data (as indicated by the method first argument) is less than the sequence element (second argument), 0 if the element is fine and a positive number if the data is greater than the sequence element.
int x1f4_find_??rate (void *, void *, int (*)(void *, void *), void **)
looks for some $1 sorted sequence item matching the $2 key according to the $3 comparison criterion, which when called is passed the $2 key and the start address of the data of the element being examined as arguments, in this order. Upon success, the start address of the found sequence element data is stored at $4.
returns 0 if no match was found, non zero otherwise
int x1f4_land_??rate (void *, void *, int (*)(void *, void *), void **)
insert a new element in the $1 sorted sequence, just after any element less or matching the $2 key according to the $3 comparison criterion, which when called is passed the $2 key and the start address of the data of the element being examined as arguments, in this order. Address of data for the new element will be stored at $4.
returns 0 for success, one of the defined errors for failure
int x1f4_seek_??rate (void *, void *, int (*)(void *, void *), unsigned *, void **)
looks for some $1 sorted sequence item matching the $2 key according to the $3 comparison criterion, which when called is passed the $2 key and the start address of the data of the element being examined as arguments, in this order. Upon success, the index of the found sequence element data is stored at $4 and the start address of the found sequence element data is stored at $5.
returns 0 if no match was found, non zero otherwise
Previous: Fixed Size Data Sequence Library, Up: Fixed Size Data Sequence Interface [Index]