src/cx/linked_list.h

changeset 486
d7ca126eab7f
parent 485
6a86ad3d8c03
child 487
4bd19279778c
equal deleted inserted replaced
485:6a86ad3d8c03 486:d7ca126eab7f
380 ptrdiff_t loc_data, 380 ptrdiff_t loc_data,
381 int follow_ptr, 381 int follow_ptr,
382 CxListComparator cmp_func 382 CxListComparator cmp_func
383 ) __attribute__((__nonnull__(1, 7))); 383 ) __attribute__((__nonnull__(1, 7)));
384 384
385
386 /**
387 * Compares two lists element wise.
388 *
389 * @param begin_left the begin of the left list (\c NULL denotes an empty list)
390 * @param begin_right the begin of the right list (\c NULL denotes an empty list)
391 * @param loc_advance the location of the pointer to advance
392 * @param loc_data the location of the \c data pointer within your node struct
393 * @param follow_ptr \c false if the pointer denoted by \p loc_data shall be passed to the \p cmp_func.
394 * If \c true, the data at \p loc_data is assumed to be a pointer, dereferenced, and then passed to \p cmp_func.
395 * @param cmp_func the function to compare the elements
396 * @return
397 */
398 int cx_linked_list_compare(
399 void *begin_left,
400 void *begin_right,
401 ptrdiff_t loc_advance,
402 ptrdiff_t loc_data,
403 int follow_ptr,
404 CxListComparator cmp_func
405 ) __attribute__((__nonnull__(6)));
406
385 /** 407 /**
386 * Reverses the order of the nodes in a linked list. 408 * Reverses the order of the nodes in a linked list.
387 * 409 *
388 * @param begin a pointer to the begin node pointer (required) 410 * @param begin a pointer to the begin node pointer (required)
389 * @param end a pointer to the end node pointer (optional) 411 * @param end a pointer to the end node pointer (optional)

mercurial