ucx/list.h

changeset 229
9db71925eaa8
parent 228
9f385abc72fb
child 250
b7d1317b138e
equal deleted inserted replaced
228:9f385abc72fb 229:9db71925eaa8
274 * @see ucx_list_prepend() 274 * @see ucx_list_prepend()
275 */ 275 */
276 UcxList *ucx_list_prepend_a(UcxAllocator *allocator, UcxList *list, void *data); 276 UcxList *ucx_list_prepend_a(UcxAllocator *allocator, UcxList *list, void *data);
277 277
278 /** 278 /**
279 * Inserts an element at the beginning of the list, if it is not present
280 * in the list.
281 *
282 * @param list the list where to insert the data or <code>NULL</code> to create
283 * a new list
284 * @param data the data to insert
285 * @param cmpfnc the compare function
286 * @param cmpdata additional data for the compare function
287 * @return a pointer to the new list head
288 * @see ucx_list_prepend()
289 */
290 UcxList *ucx_list_prepend_once(UcxList *list, void *data,
291 cmp_func cmpfnc, void *cmpdata);
292
293 /**
294 * Inserts an element at the beginning of the list, if it is not present in
295 * the list, using a UcxAllocator.
296 *
297 * @param allocator the allocator to use
298 * @param list the list where to insert the data or <code>NULL</code> to create
299 * a new list
300 * @param data the data to insert
301 * @param cmpfnc the compare function
302 * @param cmpdata additional data for the compare function
303 * @return a pointer to the new list head
304 * @see ucx_list_prepend_a()
305 */
306 UcxList *ucx_list_prepend_once_a(UcxAllocator *allocator,
307 UcxList *list, void *data, cmp_func cmpfnc, void *cmpdata);
308
309 /**
310 * Concatenates two lists. 279 * Concatenates two lists.
311 * 280 *
312 * Either of the two arguments may be <code>NULL</code>. 281 * Either of the two arguments may be <code>NULL</code>.
313 * 282 *
314 * This function modifies the references to the next/previous element of 283 * This function modifies the references to the next/previous element of

mercurial