prg_list_insert_tail_unique()
Abstract
Appends an element to the end of a list, if the element does not already exist in the list.
Syntax
prg_list_insert_tail_unique (list_ptr, elem_ptr, test_func)
| Argument | Type | Description |
|---|---|---|
list_ptr |
PrgT_List * |
List of interest. |
elem_ptr |
VosT_Address |
Element to be added to the list. |
test_func |
PrgT_List_Equal_Proc |
Procedure to use when comparing the prospective element to existing elements. If NIL, element addresses are compared. |
Return Type
PrgT_Compcode
PrgC_Compcode_Success if the element is added successfully; PrgC_Compcode_Failure otherwise.
Header
prg_list_funcs.h
Details
The prototype for test_func is given in PrgT_List_Equal_Proc.