@@ -102,7 +102,7 @@ llist llist_create ( comperator compare_func, equal equal_func, unsigned flags )
102102 * @param[in] destructor alternative destructor, if the previous param is true,
103103 * if NULL is provided standard library c free() will be used
104104 */
105- void llist_destroy ( llist list , bool destroy_nodes , node_func destructor );
105+ void llist_destroy ( llist list , bool destroy_nodes , node_func destructor );
106106
107107
108108/**
@@ -129,23 +129,21 @@ int llist_insert_node ( llist list, llist_node new_node, llist_node pos_node, i
129129 * @brief Delete a node from a list
130130 * @param[in] list the list to operator upon
131131 * @param[in] node the node to delete
132- * @param[in] alternative an alternative equality function
133132 * @param[in] destroy_node Should we run a destructor
134133 * @param[in] destructor function, if NULL is provided, free() will be used
135134 * @return int LLIST_SUCCESS if success
136135 */
137- int llist_delete_node ( llist list , llist_node node , equal alternative , bool destroy_node , node_func destructor );
136+ int llist_delete_node ( llist list , llist_node node , bool destroy_node , node_func destructor );
138137
139138/**
140139 * @brief Finds a node in a list
141140 * @param[in] list the list to operator upon
142141 * @param[in] data the data to find
143142 * @param[out] found a pointer for found node.
144143 * this pointer can be used only if llist_find_node returned LLIST_SUCCESS
145- * @param[in] alternative an alternative equality function
146144 * @return LLIST_SUCCESS if success
147145 */
148- int llist_find_node ( llist list , void * data , llist_node * found , equal alternative );
146+ int llist_find_node ( llist list , void * data , llist_node * found );
149147
150148/**
151149 * @brief operate on each element of the list
@@ -162,29 +160,28 @@ int llist_for_each ( llist list, node_func func );
162160 * @param[in] arg passed to func
163161 * @return int LLIST_SUCCESS if success
164162 */
165- int llist_for_each_arg ( llist list , node_func_arg func , void * arg );
163+ int llist_for_each_arg ( llist list , node_func_arg func , void * arg );
166164/**
167165 * @brief sort a lists
168166 * @param[in] list the list to operator upon
169- * @param[in] alternative if unless an alternative comparator function is provided the default will be used
170167 * @param[in] flags
171168 * @return int LLIST_SUCCESS if success
172169 */
173- int llist_sort ( llist list , comperator alternative , int flags );
170+ int llist_sort ( llist list , int flags );
174171
175172/**
176173 * @brief Returns the head node of the list
177174 * @param[in] list the list to operate on
178175 * @return the head node, NULL on error
179176 */
180- llist_node llist_get_head (llist list );
177+ llist_node llist_get_head ( llist list );
181178
182179/**
183180 * @brief Returns the tail node of the list
184181 * @param[in] list the list to operate on
185182 * @return the tail node, NULL on error
186183 */
187- llist_node llist_get_tail (llist list );
184+ llist_node llist_get_tail ( llist list );
188185
189186
190187/**
@@ -193,28 +190,28 @@ llist_node llist_get_tail (llist list);
193190 * @param[in] node the node to push
194191 * @return int LLIST_SUCCESS if success
195192 */
196- int llist_push (llist list , llist_node node );
193+ int llist_push ( llist list , llist_node node );
197194
198195/**
199196 * @brief peek at the head of the list
200197 * @param[in] list the list to operate on
201198 * @return llist_node the head node
202199 */
203- llist_node llist_peek (llist list );
200+ llist_node llist_peek ( llist list );
204201
205202/**
206203 * @brief pop the head of the list
207204 * @param[in] list the list to operate on
208205 * @return llist_node the head node
209206 */
210- llist_node llist_pop (llist list );
207+ llist_node llist_pop ( llist list );
211208
212209/**
213210 * @brief return the number of elements in the list
214211 * @param[in] list the list to operate on
215212 * @return int number of elements in the list or -1 if error
216213 */
217- int llist_size (llist list );
214+ int llist_size ( llist list );
218215
219216/**
220217 * @brief concatenate the second list to the first list
@@ -224,50 +221,45 @@ int llist_size(llist list);
224221 * Remember to call llist_destroy() on the second list (if it was created by llist_create())
225222 * @return int LLIST_SUCCESS if success
226223 */
227- int llist_concat (llist first , llist second );
224+ int llist_concat ( llist first , llist second );
228225
229226/**
230227 * @brief merge the second list to the first list
231228 * @param[in] first the list to operate on
232229 * @param[in] second the list to operate on
233- * @param[in] alternative Alternative comparator function, if NULL is provided, the default comparator of the first list will be used
234230 * @warning The nodes from the second list will be deleted and merged to the first list
235231 * Remember to call llist_destroy() on the second list (if it was created by llist_create())
236232 * @return int LLIST_SUCCESS if success
237233 */
238- int llist_merge (llist first , llist second , comperator alternative );
234+ int llist_merge ( llist first , llist second );
239235
240236
241237/**
242238 * @brief get the maximum node in a given list
243239 * @param[in] list the list to operate upon
244- * @param[in] alternative an alternative comparator function
245- * if NULL is provided, the default comparator will be used
246240 * @return the maximum node
247241 */
248- llist_node llist_get_max (llist list , comperator alternative );
242+ llist_node llist_get_max ( llist list );
249243
250244/**
251245 * @brief get the minimum node in a given list
252246 * @param[in] list the list to operate upon
253- * @param[in] alternative an alternative comparator function
254- * if NULL is provided, the default comparator will be used
255247 * @return the minimum node
256248 */
257- llist_node llist_get_min (llist list , comperator alternative );
249+ llist_node llist_get_min ( llist list );
258250
259251/**
260252 * @brief Reverse a list
261253 * @param[in] list the list to operate upon
262254 * @return int LLIST_SUCCESS if success
263255 */
264- int llist_reverse (llist list );
256+ int llist_reverse ( llist list );
265257
266258/**
267259 * @brief check if list is empty
268260 * @param[in] list the list to operate upon
269261 * @return bool True if list is empty
270262 */
271- bool llist_is_empty (llist list );
263+ bool llist_is_empty ( llist list );
272264
273265#endif /* LLIST_H_ */
0 commit comments