230 |
230 |
231 /** |
231 /** |
232 * Inserts an element at the end of the list, if it is not present in the list, |
232 * Inserts an element at the end of the list, if it is not present in the list, |
233 * using a UcxAllocator. |
233 * using a UcxAllocator. |
234 * |
234 * |
235 * See ucx_list_append() for details. |
|
236 * |
|
237 * @param allocator the allocator to use |
235 * @param allocator the allocator to use |
238 * @param list the list where to append the data, or <code>NULL</code> to |
236 * @param list the list where to append the data, or <code>NULL</code> to |
239 * create a new list |
237 * create a new list |
240 * @param data the data to insert |
238 * @param data the data to insert |
241 * @param cmpfnc the compare function |
239 * @param cmpfnc the compare function |
243 * @return <code>list</code>, if it is not <code>NULL</code> or a pointer to |
241 * @return <code>list</code>, if it is not <code>NULL</code> or a pointer to |
244 * the newly created list otherwise |
242 * the newly created list otherwise |
245 * @see ucx_list_append_a() |
243 * @see ucx_list_append_a() |
246 */ |
244 */ |
247 UcxList *ucx_list_append_once_a(UcxAllocator *allocator, |
245 UcxList *ucx_list_append_once_a(UcxAllocator *allocator, |
|
246 UcxList *list, void *data, cmp_func cmpfnc, void *cmpdata); |
|
247 |
|
248 /** |
|
249 * Inserts an element at the beginning of the list, if it is not present |
|
250 * in the list. |
|
251 * |
|
252 * |
|
253 * @param list the list where to prepend the data, or <code>NULL</code> to |
|
254 * create a new list |
|
255 * @param data the data to insert |
|
256 * @param cmpfnc the compare function |
|
257 * @param cmpdata additional data for the compare function |
|
258 * @return a pointer to the new list head |
|
259 * @see ucx_list_prepend() |
|
260 */ |
|
261 UcxList *ucx_list_prepend_once(UcxList *list, void *data, |
|
262 cmp_func cmpfnc, void *cmpdata); |
|
263 |
|
264 /** |
|
265 * Inserts an element at the beginning of the list, if it is not present in |
|
266 * the list, using a UcxAllocator. |
|
267 * |
|
268 * @param allocator the allocator to use |
|
269 * @param list the list where to prepend the data, or <code>NULL</code> to |
|
270 * create a new list |
|
271 * @param data the data to insert |
|
272 * @param cmpfnc the compare function |
|
273 * @param cmpdata additional data for the compare function |
|
274 * @return a pointer to the new list head |
|
275 * @see ucx_list_prepend_a() |
|
276 */ |
|
277 UcxList *ucx_list_prepend_once_a(UcxAllocator *allocator, |
248 UcxList *list, void *data, cmp_func cmpfnc, void *cmpdata); |
278 UcxList *list, void *data, cmp_func cmpfnc, void *cmpdata); |
249 |
279 |
250 /** |
280 /** |
251 * Inserts an element at the beginning of the list. |
281 * Inserts an element at the beginning of the list. |
252 * |
282 * |