Index: list/list.c =================================================================== --- list/list.c (revision 18142) +++ list/list.c (revision 18143) @@ -68,6 +68,17 @@ return list; } +LST(node_t) *LST(find)(LST(node_t) *list, LST_ITEM_T *item) +{ + LST(node_t) *node; + for (node = list; node != NULL; node = node->next) { + if (LST(compare_func)(&node->item, item)) { + return node; + } + } + return NULL; +} + size_t LST(length)(LST(node_t) *list) { size_t len = 0; Index: list/list.h =================================================================== --- list/list.h (revision 18142) +++ list/list.h (revision 18143) @@ -13,5 +13,6 @@ LST(node_t) *LST(remove_front)(LST(node_t) *list); LST(node_t) *LST(remove)(LST(node_t) *list, LST(node_t) *node); LST(node_t) *LST(remove_item)(LST(node_t) *list, LST_ITEM_T *item); +LST(node_t) *LST(find)(LST(node_t) *list, LST_ITEM_T *item); size_t LST(length)(LST(node_t) *list); void LST(free)(LST(node_t) *list);