Important: The information in this document is obsolete and should not be used for new development.
OTFindLink
Finds a link in a FIFO list and returns a pointer to it.C INTERFACE
OTLink* OTFindLink (OTList* list, OTListSearchProcPtr proc, const void* refPtr)C++ INTERFACE
None. C++ applications use the C interface to this function.PARAMETERS
list
- A pointer to the FIFO list to be searched.
proc
- A pointer to the user-defined procedure to be used in searching for the link. See
MyListSearchFunction
for information on defining your own list search function.refPtr
- A pointer to a value that is passed to the user-defined search procedure and that is useful to that procedure in finding a link. This value might be the address of a field, the value of a field, or any other kind of data that would help identify the link being sought.
- function result
- A pointer to the link being sought. The value of this pointer is
NULL
if no link matching your search criteria is found.DISCUSSION
This function walks the list (from head to tail) specified by thelist
parameter, repeatedly calling the search procedure specified by theproc
parameter. Each time it calls the search procedure, it passes it the value specified in therefPtr
parameter. TheOTFindLink
function returns a pointer to the firstOTLink
value for the yourproc
procedure returnedtrue
. ANULL
is returned if yourproc
procedure never returnedtrue
.Use the
OTIsInList
function to determine whether a link is in a FIFO list.Use the
OTRemoveLink
function to remove a link from a FIFO list.Use the
OTFindAndRemoveLink
function to find and remove a link in a FIFO list.Use the
OTGetIndexedLink
function to find a link in a FIFO list based on its index in the list.