docs/api-2.1/list_8h.html

Sat, 13 Jan 2024 17:51:42 +0100

author
Mike Becker <universe@uap-core.de>
date
Sat, 13 Jan 2024 17:51:42 +0100
changeset 804
5136f2fc32ec
parent 390
d345541018fa
permissions
-rw-r--r--

add CX_DISABLE_ARRAY_LIST_SWAP_SBO flag

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ucx: /home/mike/workspace/c/ucx/src/ucx/list.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="uaplogo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ucx
   </div>
   <div id="projectbrief">UAP Common Extensions</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_69f4ea29401808fe6229564976cde3ce.html">ucx</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">list.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Doubly linked list implementation.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="ucx_8h_source.html">ucx.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="allocator_8h_source.html">allocator.h</a>&quot;</code><br />
</div>
<p><a href="list_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structUcxList.html">UcxList</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">UCX list structure.  <a href="structUcxList.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a4b143b6526a410aa4d22cb3bb9365d70"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#a4b143b6526a410aa4d22cb3bb9365d70">UCX_FOREACH</a>(elem,  list)&#160;&#160;&#160;for (<a class="el" href="structUcxList.html">UcxList</a>* elem = (<a class="el" href="structUcxList.html">UcxList</a>*) list ; elem != NULL ; elem = elem-&gt;next)</td></tr>
<tr class="memdesc:a4b143b6526a410aa4d22cb3bb9365d70"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loop statement for UCX lists.  <a href="#a4b143b6526a410aa4d22cb3bb9365d70">More...</a><br /></td></tr>
<tr class="separator:a4b143b6526a410aa4d22cb3bb9365d70"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:aa6f89f91c1081c9a7c6866c298f497a2"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structUcxList.html">UcxList</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#aa6f89f91c1081c9a7c6866c298f497a2">UcxList</a></td></tr>
<tr class="memdesc:aa6f89f91c1081c9a7c6866c298f497a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">UCX list type.  <a href="#aa6f89f91c1081c9a7c6866c298f497a2">More...</a><br /></td></tr>
<tr class="separator:aa6f89f91c1081c9a7c6866c298f497a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ae7054a41c289b24e6caf5cb07ac850ed"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#ae7054a41c289b24e6caf5cb07ac850ed">ucx_list_clone</a> (const <a class="el" href="structUcxList.html">UcxList</a> *list, <a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a> cpyfnc, void *data)</td></tr>
<tr class="memdesc:ae7054a41c289b24e6caf5cb07ac850ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an element-wise copy of a list.  <a href="#ae7054a41c289b24e6caf5cb07ac850ed">More...</a><br /></td></tr>
<tr class="separator:ae7054a41c289b24e6caf5cb07ac850ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08ca1ba0d2e82258b0408714c1f4c425"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#a08ca1ba0d2e82258b0408714c1f4c425">ucx_list_clone_a</a> (<a class="el" href="structUcxAllocator.html">UcxAllocator</a> *allocator, const <a class="el" href="structUcxList.html">UcxList</a> *list, <a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a> cpyfnc, void *data)</td></tr>
<tr class="memdesc:a08ca1ba0d2e82258b0408714c1f4c425"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an element-wise copy of a list using a <a class="el" href="structUcxAllocator.html" title="UCX allocator data structure containing memory management functions. ">UcxAllocator</a>.  <a href="#a08ca1ba0d2e82258b0408714c1f4c425">More...</a><br /></td></tr>
<tr class="separator:a08ca1ba0d2e82258b0408714c1f4c425"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc435447cecf885bc63d232191085bbe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#adc435447cecf885bc63d232191085bbe">ucx_list_equals</a> (const <a class="el" href="structUcxList.html">UcxList</a> *list1, const <a class="el" href="structUcxList.html">UcxList</a> *list2, <a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a> cmpfnc, void *data)</td></tr>
<tr class="memdesc:adc435447cecf885bc63d232191085bbe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compares two UCX lists element-wise by using a compare function.  <a href="#adc435447cecf885bc63d232191085bbe">More...</a><br /></td></tr>
<tr class="separator:adc435447cecf885bc63d232191085bbe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a0fa2c5b1e478a96da19b0c3f013668"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#a1a0fa2c5b1e478a96da19b0c3f013668">ucx_list_free</a> (<a class="el" href="structUcxList.html">UcxList</a> *list)</td></tr>
<tr class="memdesc:a1a0fa2c5b1e478a96da19b0c3f013668"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the entire list.  <a href="#a1a0fa2c5b1e478a96da19b0c3f013668">More...</a><br /></td></tr>
<tr class="separator:a1a0fa2c5b1e478a96da19b0c3f013668"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a944e11f76c38767cd1100d72a4e3b25b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#a944e11f76c38767cd1100d72a4e3b25b">ucx_list_free_a</a> (<a class="el" href="structUcxAllocator.html">UcxAllocator</a> *allocator, <a class="el" href="structUcxList.html">UcxList</a> *list)</td></tr>
<tr class="memdesc:a944e11f76c38767cd1100d72a4e3b25b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the entire list using a <a class="el" href="structUcxAllocator.html" title="UCX allocator data structure containing memory management functions. ">UcxAllocator</a>.  <a href="#a944e11f76c38767cd1100d72a4e3b25b">More...</a><br /></td></tr>
<tr class="separator:a944e11f76c38767cd1100d72a4e3b25b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ba6c96642f72ea046cc22627c72979c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#a4ba6c96642f72ea046cc22627c72979c">ucx_list_free_content</a> (<a class="el" href="structUcxList.html">UcxList</a> *list, <a class="el" href="ucx_8h.html#ad2b370c2809914c8b7fedab163c266b3">ucx_destructor</a> destr)</td></tr>
<tr class="memdesc:a4ba6c96642f72ea046cc22627c72979c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the contents of the specified list by calling the specified destructor on each of them.  <a href="#a4ba6c96642f72ea046cc22627c72979c">More...</a><br /></td></tr>
<tr class="separator:a4ba6c96642f72ea046cc22627c72979c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00c122c8a26d35b60676939df4161621"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#a00c122c8a26d35b60676939df4161621">ucx_list_append</a> (<a class="el" href="structUcxList.html">UcxList</a> *list, void *data)</td></tr>
<tr class="memdesc:a00c122c8a26d35b60676939df4161621"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inserts an element at the end of the list.  <a href="#a00c122c8a26d35b60676939df4161621">More...</a><br /></td></tr>
<tr class="separator:a00c122c8a26d35b60676939df4161621"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf3b3e2e0ff977d8928671d6bd82fc60"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#adf3b3e2e0ff977d8928671d6bd82fc60">ucx_list_append_a</a> (<a class="el" href="structUcxAllocator.html">UcxAllocator</a> *allocator, <a class="el" href="structUcxList.html">UcxList</a> *list, void *data)</td></tr>
<tr class="memdesc:adf3b3e2e0ff977d8928671d6bd82fc60"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inserts an element at the end of the list using a <a class="el" href="structUcxAllocator.html" title="UCX allocator data structure containing memory management functions. ">UcxAllocator</a>.  <a href="#adf3b3e2e0ff977d8928671d6bd82fc60">More...</a><br /></td></tr>
<tr class="separator:adf3b3e2e0ff977d8928671d6bd82fc60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8fcb68e4556395b15180eec2d0b77aa4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#a8fcb68e4556395b15180eec2d0b77aa4">ucx_list_prepend</a> (<a class="el" href="structUcxList.html">UcxList</a> *list, void *data)</td></tr>
<tr class="memdesc:a8fcb68e4556395b15180eec2d0b77aa4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inserts an element at the beginning of the list.  <a href="#a8fcb68e4556395b15180eec2d0b77aa4">More...</a><br /></td></tr>
<tr class="separator:a8fcb68e4556395b15180eec2d0b77aa4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a54654e6dc60e1c3de9e886c150e404ec"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#a54654e6dc60e1c3de9e886c150e404ec">ucx_list_prepend_a</a> (<a class="el" href="structUcxAllocator.html">UcxAllocator</a> *allocator, <a class="el" href="structUcxList.html">UcxList</a> *list, void *data)</td></tr>
<tr class="memdesc:a54654e6dc60e1c3de9e886c150e404ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inserts an element at the beginning of the list using a <a class="el" href="structUcxAllocator.html" title="UCX allocator data structure containing memory management functions. ">UcxAllocator</a>.  <a href="#a54654e6dc60e1c3de9e886c150e404ec">More...</a><br /></td></tr>
<tr class="separator:a54654e6dc60e1c3de9e886c150e404ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77163a0cc82fae52bec26c8c0c3674d9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#a77163a0cc82fae52bec26c8c0c3674d9">ucx_list_concat</a> (<a class="el" href="structUcxList.html">UcxList</a> *list1, <a class="el" href="structUcxList.html">UcxList</a> *list2)</td></tr>
<tr class="memdesc:a77163a0cc82fae52bec26c8c0c3674d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Concatenates two lists.  <a href="#a77163a0cc82fae52bec26c8c0c3674d9">More...</a><br /></td></tr>
<tr class="separator:a77163a0cc82fae52bec26c8c0c3674d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6aa0e34ebc5f0dca6f52d0f7626b4bd5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#a6aa0e34ebc5f0dca6f52d0f7626b4bd5">ucx_list_first</a> (const <a class="el" href="structUcxList.html">UcxList</a> *elem)</td></tr>
<tr class="memdesc:a6aa0e34ebc5f0dca6f52d0f7626b4bd5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the first element of a list.  <a href="#a6aa0e34ebc5f0dca6f52d0f7626b4bd5">More...</a><br /></td></tr>
<tr class="separator:a6aa0e34ebc5f0dca6f52d0f7626b4bd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add5ec40c5006e29c629d23c2eb5a6553"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#add5ec40c5006e29c629d23c2eb5a6553">ucx_list_last</a> (const <a class="el" href="structUcxList.html">UcxList</a> *elem)</td></tr>
<tr class="memdesc:add5ec40c5006e29c629d23c2eb5a6553"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the last element of a list.  <a href="#add5ec40c5006e29c629d23c2eb5a6553">More...</a><br /></td></tr>
<tr class="separator:add5ec40c5006e29c629d23c2eb5a6553"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2509ffe19bce6a8708c77f89480c75fb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#a2509ffe19bce6a8708c77f89480c75fb">ucx_list_get</a> (const <a class="el" href="structUcxList.html">UcxList</a> *list, size_t index)</td></tr>
<tr class="memdesc:a2509ffe19bce6a8708c77f89480c75fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the list element at the specified index.  <a href="#a2509ffe19bce6a8708c77f89480c75fb">More...</a><br /></td></tr>
<tr class="separator:a2509ffe19bce6a8708c77f89480c75fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2ff2974812ca185870f80bc4ed9337e"><td class="memItemLeft" align="right" valign="top">ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#ae2ff2974812ca185870f80bc4ed9337e">ucx_list_indexof</a> (const <a class="el" href="structUcxList.html">UcxList</a> *list, const <a class="el" href="structUcxList.html">UcxList</a> *elem)</td></tr>
<tr class="memdesc:ae2ff2974812ca185870f80bc4ed9337e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the index of an element.  <a href="#ae2ff2974812ca185870f80bc4ed9337e">More...</a><br /></td></tr>
<tr class="separator:ae2ff2974812ca185870f80bc4ed9337e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae88001cc8ae40b946560f31434abed8f"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#ae88001cc8ae40b946560f31434abed8f">ucx_list_size</a> (const <a class="el" href="structUcxList.html">UcxList</a> *list)</td></tr>
<tr class="memdesc:ae88001cc8ae40b946560f31434abed8f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the element count of the list.  <a href="#ae88001cc8ae40b946560f31434abed8f">More...</a><br /></td></tr>
<tr class="separator:ae88001cc8ae40b946560f31434abed8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b3b6842d3be572e06a7f519e198cb83"><td class="memItemLeft" align="right" valign="top">ssize_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#a9b3b6842d3be572e06a7f519e198cb83">ucx_list_find</a> (const <a class="el" href="structUcxList.html">UcxList</a> *list, void *elem, <a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a> cmpfnc, void *data)</td></tr>
<tr class="memdesc:a9b3b6842d3be572e06a7f519e198cb83"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the index of an element containing the specified data.  <a href="#a9b3b6842d3be572e06a7f519e198cb83">More...</a><br /></td></tr>
<tr class="separator:a9b3b6842d3be572e06a7f519e198cb83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b0fa051fcfe12e1a82cca1087973852"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#a8b0fa051fcfe12e1a82cca1087973852">ucx_list_contains</a> (const <a class="el" href="structUcxList.html">UcxList</a> *list, void *elem, <a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a> cmpfnc, void *data)</td></tr>
<tr class="memdesc:a8b0fa051fcfe12e1a82cca1087973852"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks, if a list contains a specific element.  <a href="#a8b0fa051fcfe12e1a82cca1087973852">More...</a><br /></td></tr>
<tr class="separator:a8b0fa051fcfe12e1a82cca1087973852"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac74962d9bd7cfc9d3e2e09651469377b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#ac74962d9bd7cfc9d3e2e09651469377b">ucx_list_sort</a> (<a class="el" href="structUcxList.html">UcxList</a> *list, <a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a> cmpfnc, void *data)</td></tr>
<tr class="memdesc:ac74962d9bd7cfc9d3e2e09651469377b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sorts a <a class="el" href="structUcxList.html" title="UCX list structure. ">UcxList</a> with natural merge sort.  <a href="#ac74962d9bd7cfc9d3e2e09651469377b">More...</a><br /></td></tr>
<tr class="separator:ac74962d9bd7cfc9d3e2e09651469377b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a410cb3e8260037ba56c72d14b899b468"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#a410cb3e8260037ba56c72d14b899b468">ucx_list_remove</a> (<a class="el" href="structUcxList.html">UcxList</a> *list, <a class="el" href="structUcxList.html">UcxList</a> *element)</td></tr>
<tr class="memdesc:a410cb3e8260037ba56c72d14b899b468"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes an element from the list.  <a href="#a410cb3e8260037ba56c72d14b899b468">More...</a><br /></td></tr>
<tr class="separator:a410cb3e8260037ba56c72d14b899b468"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca687b7c4e7170175f447e549125aa52"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#aca687b7c4e7170175f447e549125aa52">ucx_list_remove_a</a> (<a class="el" href="structUcxAllocator.html">UcxAllocator</a> *allocator, <a class="el" href="structUcxList.html">UcxList</a> *list, <a class="el" href="structUcxList.html">UcxList</a> *element)</td></tr>
<tr class="memdesc:aca687b7c4e7170175f447e549125aa52"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes an element from the list using a <a class="el" href="structUcxAllocator.html" title="UCX allocator data structure containing memory management functions. ">UcxAllocator</a>.  <a href="#aca687b7c4e7170175f447e549125aa52">More...</a><br /></td></tr>
<tr class="separator:aca687b7c4e7170175f447e549125aa52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94ecdb0cea1633ad7074f027fa8485fa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#a94ecdb0cea1633ad7074f027fa8485fa">ucx_list_union</a> (const <a class="el" href="structUcxList.html">UcxList</a> *left, const <a class="el" href="structUcxList.html">UcxList</a> *right, <a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a> cmpfnc, void *cmpdata, <a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a> cpfnc, void *cpdata)</td></tr>
<tr class="memdesc:a94ecdb0cea1633ad7074f027fa8485fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the union of two lists.  <a href="#a94ecdb0cea1633ad7074f027fa8485fa">More...</a><br /></td></tr>
<tr class="separator:a94ecdb0cea1633ad7074f027fa8485fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65b4355536f4ebc4130211b46469f4c1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#a65b4355536f4ebc4130211b46469f4c1">ucx_list_union_a</a> (<a class="el" href="structUcxAllocator.html">UcxAllocator</a> *allocator, const <a class="el" href="structUcxList.html">UcxList</a> *left, const <a class="el" href="structUcxList.html">UcxList</a> *right, <a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a> cmpfnc, void *cmpdata, <a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a> cpfnc, void *cpdata)</td></tr>
<tr class="memdesc:a65b4355536f4ebc4130211b46469f4c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the union of two lists.  <a href="#a65b4355536f4ebc4130211b46469f4c1">More...</a><br /></td></tr>
<tr class="separator:a65b4355536f4ebc4130211b46469f4c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a259f9b754978aeca23dfabba16e20f39"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#a259f9b754978aeca23dfabba16e20f39">ucx_list_intersection</a> (const <a class="el" href="structUcxList.html">UcxList</a> *left, const <a class="el" href="structUcxList.html">UcxList</a> *right, <a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a> cmpfnc, void *cmpdata, <a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a> cpfnc, void *cpdata)</td></tr>
<tr class="memdesc:a259f9b754978aeca23dfabba16e20f39"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the intersection of two lists.  <a href="#a259f9b754978aeca23dfabba16e20f39">More...</a><br /></td></tr>
<tr class="separator:a259f9b754978aeca23dfabba16e20f39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d0b00514dbb81ba6270b58da0c5b9a8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#a1d0b00514dbb81ba6270b58da0c5b9a8">ucx_list_intersection_a</a> (<a class="el" href="structUcxAllocator.html">UcxAllocator</a> *allocator, const <a class="el" href="structUcxList.html">UcxList</a> *left, const <a class="el" href="structUcxList.html">UcxList</a> *right, <a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a> cmpfnc, void *cmpdata, <a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a> cpfnc, void *cpdata)</td></tr>
<tr class="memdesc:a1d0b00514dbb81ba6270b58da0c5b9a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the intersection of two lists.  <a href="#a1d0b00514dbb81ba6270b58da0c5b9a8">More...</a><br /></td></tr>
<tr class="separator:a1d0b00514dbb81ba6270b58da0c5b9a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c5db5d1d11ad28b6fe1a80ee1c1e449"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#a6c5db5d1d11ad28b6fe1a80ee1c1e449">ucx_list_difference</a> (const <a class="el" href="structUcxList.html">UcxList</a> *left, const <a class="el" href="structUcxList.html">UcxList</a> *right, <a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a> cmpfnc, void *cmpdata, <a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a> cpfnc, void *cpdata)</td></tr>
<tr class="memdesc:a6c5db5d1d11ad28b6fe1a80ee1c1e449"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the difference of two lists.  <a href="#a6c5db5d1d11ad28b6fe1a80ee1c1e449">More...</a><br /></td></tr>
<tr class="separator:a6c5db5d1d11ad28b6fe1a80ee1c1e449"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a2a2fc5cc41073c516db6235bbc51d5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="list_8h.html#a4a2a2fc5cc41073c516db6235bbc51d5">ucx_list_difference_a</a> (<a class="el" href="structUcxAllocator.html">UcxAllocator</a> *allocator, const <a class="el" href="structUcxList.html">UcxList</a> *left, const <a class="el" href="structUcxList.html">UcxList</a> *right, <a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a> cmpfnc, void *cmpdata, <a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a> cpfnc, void *cpdata)</td></tr>
<tr class="memdesc:a4a2a2fc5cc41073c516db6235bbc51d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the difference of two lists.  <a href="#a4a2a2fc5cc41073c516db6235bbc51d5">More...</a><br /></td></tr>
<tr class="separator:a4a2a2fc5cc41073c516db6235bbc51d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Doubly linked list implementation. </p>
<dl class="section author"><dt>Author</dt><dd>Mike Becker </dd>
<dd>
Olaf Wintermann </dd></dl>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a4b143b6526a410aa4d22cb3bb9365d70"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b143b6526a410aa4d22cb3bb9365d70">&#9670;&nbsp;</a></span>UCX_FOREACH</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UCX_FOREACH</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">elem, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">list&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;for (<a class="el" href="structUcxList.html">UcxList</a>* elem = (<a class="el" href="structUcxList.html">UcxList</a>*) list ; elem != NULL ; elem = elem-&gt;next)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Loop statement for UCX lists. </p>
<p>The first argument is the name of the iteration variable. The scope of this variable is limited to the <code>UCX_FOREACH</code> statement.</p>
<p>The second argument is a pointer to the list. In most cases this will be the pointer to the first element of the list, but it may also be an arbitrary element of the list. The iteration will then start with that element.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">list</td><td>The first element of the list </td></tr>
    <tr><td class="paramname">elem</td><td>The variable name of the element </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="aa6f89f91c1081c9a7c6866c298f497a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa6f89f91c1081c9a7c6866c298f497a2">&#9670;&nbsp;</a></span>UcxList</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structUcxList.html">UcxList</a> <a class="el" href="structUcxList.html">UcxList</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>UCX list type. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structUcxList.html" title="UCX list structure. ">UcxList</a> </dd></dl>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a00c122c8a26d35b60676939df4161621"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a00c122c8a26d35b60676939df4161621">&#9670;&nbsp;</a></span>ucx_list_append()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_append </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Inserts an element at the end of the list. </p>
<p>This is generally an O(n) operation, as the end of the list is retrieved with <a class="el" href="list_8h.html#add5ec40c5006e29c629d23c2eb5a6553" title="Returns the last element of a list. ">ucx_list_last()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">list</td><td>the list where to append the data, or <code>NULL</code> to create a new list </td></tr>
    <tr><td class="paramname">data</td><td>the data to insert </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>list</code>, if it is not <code>NULL</code> or a pointer to the newly created list otherwise </dd></dl>

</div>
</div>
<a id="adf3b3e2e0ff977d8928671d6bd82fc60"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adf3b3e2e0ff977d8928671d6bd82fc60">&#9670;&nbsp;</a></span>ucx_list_append_a()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_append_a </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUcxAllocator.html">UcxAllocator</a> *&#160;</td>
          <td class="paramname"><em>allocator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Inserts an element at the end of the list using a <a class="el" href="structUcxAllocator.html" title="UCX allocator data structure containing memory management functions. ">UcxAllocator</a>. </p>
<p>See <a class="el" href="list_8h.html#a00c122c8a26d35b60676939df4161621" title="Inserts an element at the end of the list. ">ucx_list_append()</a> for details.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">allocator</td><td>the allocator to use </td></tr>
    <tr><td class="paramname">list</td><td>the list where to append the data, or <code>NULL</code> to create a new list </td></tr>
    <tr><td class="paramname">data</td><td>the data to insert </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>list</code>, if it is not <code>NULL</code> or a pointer to the newly created list otherwise </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="list_8h.html#a00c122c8a26d35b60676939df4161621" title="Inserts an element at the end of the list. ">ucx_list_append()</a> </dd></dl>

</div>
</div>
<a id="ae7054a41c289b24e6caf5cb07ac850ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae7054a41c289b24e6caf5cb07ac850ed">&#9670;&nbsp;</a></span>ucx_list_clone()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_clone </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a>&#160;</td>
          <td class="paramname"><em>cpyfnc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates an element-wise copy of a list. </p>
<p>This function clones the specified list by creating new list elements and copying the data with the specified <a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967" title="Function pointer to a copy function. ">copy_func()</a>. If no <a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967" title="Function pointer to a copy function. ">copy_func()</a> is specified, a shallow copy is created and the new list will reference the same data as the source list.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">list</td><td>the list to copy </td></tr>
    <tr><td class="paramname">cpyfnc</td><td>a pointer to the function that shall copy an element (may be <code>NULL</code>) </td></tr>
    <tr><td class="paramname">data</td><td>additional data for the <a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967" title="Function pointer to a copy function. ">copy_func()</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a pointer to the copy </dd></dl>

</div>
</div>
<a id="a08ca1ba0d2e82258b0408714c1f4c425"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a08ca1ba0d2e82258b0408714c1f4c425">&#9670;&nbsp;</a></span>ucx_list_clone_a()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_clone_a </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUcxAllocator.html">UcxAllocator</a> *&#160;</td>
          <td class="paramname"><em>allocator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a>&#160;</td>
          <td class="paramname"><em>cpyfnc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates an element-wise copy of a list using a <a class="el" href="structUcxAllocator.html" title="UCX allocator data structure containing memory management functions. ">UcxAllocator</a>. </p>
<p>See <a class="el" href="list_8h.html#ae7054a41c289b24e6caf5cb07ac850ed" title="Creates an element-wise copy of a list. ">ucx_list_clone()</a> for details.</p>
<p>You might want to pass the allocator via the <code>data</code> parameter, to access it within the copy function for making deep copies.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">allocator</td><td>the allocator to use </td></tr>
    <tr><td class="paramname">list</td><td>the list to copy </td></tr>
    <tr><td class="paramname">cpyfnc</td><td>a pointer to the function that shall copy an element (may be <code>NULL</code>) </td></tr>
    <tr><td class="paramname">data</td><td>additional data for the <a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967" title="Function pointer to a copy function. ">copy_func()</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a pointer to the copy </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="list_8h.html#ae7054a41c289b24e6caf5cb07ac850ed" title="Creates an element-wise copy of a list. ">ucx_list_clone()</a> </dd></dl>

</div>
</div>
<a id="a77163a0cc82fae52bec26c8c0c3674d9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a77163a0cc82fae52bec26c8c0c3674d9">&#9670;&nbsp;</a></span>ucx_list_concat()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_concat </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>list1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>list2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Concatenates two lists. </p>
<p>Either of the two arguments may be <code>NULL</code>.</p>
<p>This function modifies the references to the next/previous element of the last/first element of <code>list1</code>/<code> list2</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">list1</td><td>first list </td></tr>
    <tr><td class="paramname">list2</td><td>second list </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>if <code>list1</code> is <code>NULL</code>, <code>list2</code> is returned, otherwise <code>list1</code> is returned </dd></dl>

</div>
</div>
<a id="a8b0fa051fcfe12e1a82cca1087973852"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8b0fa051fcfe12e1a82cca1087973852">&#9670;&nbsp;</a></span>ucx_list_contains()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ucx_list_contains </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>elem</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a>&#160;</td>
          <td class="paramname"><em>cmpfnc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Checks, if a list contains a specific element. </p>
<p>An element is found, if <a class="el" href="list_8h.html#a9b3b6842d3be572e06a7f519e198cb83" title="Returns the index of an element containing the specified data. ">ucx_list_find()</a> returns a value greater than -1.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">list</td><td>the list where to search for the data </td></tr>
    <tr><td class="paramname">elem</td><td>the element data </td></tr>
    <tr><td class="paramname">cmpfnc</td><td>the compare function </td></tr>
    <tr><td class="paramname">data</td><td>additional data for the compare function </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1, if and only if the list contains the specified element data </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="list_8h.html#a9b3b6842d3be572e06a7f519e198cb83" title="Returns the index of an element containing the specified data. ">ucx_list_find()</a> </dd></dl>

</div>
</div>
<a id="a6c5db5d1d11ad28b6fe1a80ee1c1e449"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c5db5d1d11ad28b6fe1a80ee1c1e449">&#9670;&nbsp;</a></span>ucx_list_difference()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_difference </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>left</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>right</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a>&#160;</td>
          <td class="paramname"><em>cmpfnc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>cmpdata</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a>&#160;</td>
          <td class="paramname"><em>cpfnc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>cpdata</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the difference of two lists. </p>
<p>The difference contains all elements of the left list (including duplicates) that are not equal to any element of the right list.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">left</td><td>the left source list </td></tr>
    <tr><td class="paramname">right</td><td>the right source list </td></tr>
    <tr><td class="paramname">cmpfnc</td><td>a function to compare elements </td></tr>
    <tr><td class="paramname">cmpdata</td><td>additional data for the compare function </td></tr>
    <tr><td class="paramname">cpfnc</td><td>a function to copy the elements </td></tr>
    <tr><td class="paramname">cpdata</td><td>additional data for the copy function </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a new list containing the difference </dd></dl>

</div>
</div>
<a id="a4a2a2fc5cc41073c516db6235bbc51d5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4a2a2fc5cc41073c516db6235bbc51d5">&#9670;&nbsp;</a></span>ucx_list_difference_a()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_difference_a </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUcxAllocator.html">UcxAllocator</a> *&#160;</td>
          <td class="paramname"><em>allocator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>left</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>right</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a>&#160;</td>
          <td class="paramname"><em>cmpfnc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>cmpdata</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a>&#160;</td>
          <td class="paramname"><em>cpfnc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>cpdata</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the difference of two lists. </p>
<p>The difference contains all elements of the left list (including duplicates) that are not equal to any element of the right list.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">allocator</td><td>allocates the new list elements </td></tr>
    <tr><td class="paramname">left</td><td>the left source list </td></tr>
    <tr><td class="paramname">right</td><td>the right source list </td></tr>
    <tr><td class="paramname">cmpfnc</td><td>a function to compare elements </td></tr>
    <tr><td class="paramname">cmpdata</td><td>additional data for the compare function </td></tr>
    <tr><td class="paramname">cpfnc</td><td>a function to copy the elements </td></tr>
    <tr><td class="paramname">cpdata</td><td>additional data for the copy function </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a new list containing the difference </dd></dl>

</div>
</div>
<a id="adc435447cecf885bc63d232191085bbe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc435447cecf885bc63d232191085bbe">&#9670;&nbsp;</a></span>ucx_list_equals()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ucx_list_equals </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>list1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>list2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a>&#160;</td>
          <td class="paramname"><em>cmpfnc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Compares two UCX lists element-wise by using a compare function. </p>
<p>Each element of the two specified lists are compared by using the specified compare function and the additional data. The type and content of this additional data depends on the <a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791" title="Function pointer to a compare function. ">cmp_func()</a> used.</p>
<p>If the list pointers denote elements within a list, the lists are compared starting with the denoted elements. Thus any previous elements are not taken into account. This might be useful to check, if certain list tails match each other.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">list1</td><td>the first list </td></tr>
    <tr><td class="paramname">list2</td><td>the second list </td></tr>
    <tr><td class="paramname">cmpfnc</td><td>the compare function </td></tr>
    <tr><td class="paramname">data</td><td>additional data for the compare function </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1, if and only if the two lists equal element-wise, 0 otherwise </dd></dl>

</div>
</div>
<a id="a9b3b6842d3be572e06a7f519e198cb83"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9b3b6842d3be572e06a7f519e198cb83">&#9670;&nbsp;</a></span>ucx_list_find()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ssize_t ucx_list_find </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>elem</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a>&#160;</td>
          <td class="paramname"><em>cmpfnc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the index of an element containing the specified data. </p>
<p>This function uses a <a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791" title="Function pointer to a compare function. ">cmp_func()</a> to compare the data of each list element with the specified data. If no cmp_func is provided, the pointers are compared.</p>
<p>If the list contains the data more than once, the index of the first occurrence is returned.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">list</td><td>the list where to search for the data </td></tr>
    <tr><td class="paramname">elem</td><td>the element data </td></tr>
    <tr><td class="paramname">cmpfnc</td><td>the compare function </td></tr>
    <tr><td class="paramname">data</td><td>additional data for the compare function </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the index of the element containing the specified data or -1 if the data is not found in this list </dd></dl>

</div>
</div>
<a id="a6aa0e34ebc5f0dca6f52d0f7626b4bd5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6aa0e34ebc5f0dca6f52d0f7626b4bd5">&#9670;&nbsp;</a></span>ucx_list_first()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_first </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>elem</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the first element of a list. </p>
<p>If the argument is the list pointer, it is directly returned. Otherwise this function traverses to the first element of the list and returns the list pointer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">elem</td><td>one element of the list </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the first element of the list, the specified element is a member of </dd></dl>

</div>
</div>
<a id="a1a0fa2c5b1e478a96da19b0c3f013668"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1a0fa2c5b1e478a96da19b0c3f013668">&#9670;&nbsp;</a></span>ucx_list_free()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ucx_list_free </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>list</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Destroys the entire list. </p>
<p>The members of the list are not automatically freed, so ensure they are otherwise referenced or destroyed by ucx_list_free_contents(). Otherwise, a memory leak is likely to occur.</p>
<p><b>Caution:</b> the argument <b>MUST</b> denote an entire list (i.e. a call to <a class="el" href="list_8h.html#a6aa0e34ebc5f0dca6f52d0f7626b4bd5" title="Returns the first element of a list. ">ucx_list_first()</a> on the argument must return the argument itself)</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">list</td><td>the list to free </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd>ucx_list_free_contents() </dd></dl>

</div>
</div>
<a id="a944e11f76c38767cd1100d72a4e3b25b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a944e11f76c38767cd1100d72a4e3b25b">&#9670;&nbsp;</a></span>ucx_list_free_a()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ucx_list_free_a </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUcxAllocator.html">UcxAllocator</a> *&#160;</td>
          <td class="paramname"><em>allocator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>list</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Destroys the entire list using a <a class="el" href="structUcxAllocator.html" title="UCX allocator data structure containing memory management functions. ">UcxAllocator</a>. </p>
<p>See <a class="el" href="list_8h.html#a1a0fa2c5b1e478a96da19b0c3f013668" title="Destroys the entire list. ">ucx_list_free()</a> for details.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">allocator</td><td>the allocator to use </td></tr>
    <tr><td class="paramname">list</td><td>the list to free </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="list_8h.html#a1a0fa2c5b1e478a96da19b0c3f013668" title="Destroys the entire list. ">ucx_list_free()</a> </dd></dl>

</div>
</div>
<a id="a4ba6c96642f72ea046cc22627c72979c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4ba6c96642f72ea046cc22627c72979c">&#9670;&nbsp;</a></span>ucx_list_free_content()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ucx_list_free_content </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ucx_8h.html#ad2b370c2809914c8b7fedab163c266b3">ucx_destructor</a>&#160;</td>
          <td class="paramname"><em>destr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Destroys the contents of the specified list by calling the specified destructor on each of them. </p>
<p>Note, that the contents are not usable afterwards and the list should be destroyed with <a class="el" href="list_8h.html#a1a0fa2c5b1e478a96da19b0c3f013668" title="Destroys the entire list. ">ucx_list_free()</a>.</p>
<p>If no destructor is specified (<code>NULL</code>), stdlib's free() is used.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">list</td><td>the list for which the contents shall be freed </td></tr>
    <tr><td class="paramname">destr</td><td>optional destructor function </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="list_8h.html#a1a0fa2c5b1e478a96da19b0c3f013668" title="Destroys the entire list. ">ucx_list_free()</a> </dd></dl>

</div>
</div>
<a id="a2509ffe19bce6a8708c77f89480c75fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2509ffe19bce6a8708c77f89480c75fb">&#9670;&nbsp;</a></span>ucx_list_get()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_get </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the list element at the specified index. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">list</td><td>the list to retrieve the element from </td></tr>
    <tr><td class="paramname">index</td><td>index of the element to return </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the element at the specified index or <code>NULL</code>, if the index is greater than the list size </dd></dl>

</div>
</div>
<a id="ae2ff2974812ca185870f80bc4ed9337e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae2ff2974812ca185870f80bc4ed9337e">&#9670;&nbsp;</a></span>ucx_list_indexof()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ssize_t ucx_list_indexof </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>elem</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the index of an element. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">list</td><td>the list where to search for the element </td></tr>
    <tr><td class="paramname">elem</td><td>the element to find </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the index of the element or -1 if the list does not contain the element </dd></dl>

</div>
</div>
<a id="a259f9b754978aeca23dfabba16e20f39"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a259f9b754978aeca23dfabba16e20f39">&#9670;&nbsp;</a></span>ucx_list_intersection()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_intersection </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>left</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>right</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a>&#160;</td>
          <td class="paramname"><em>cmpfnc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>cmpdata</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a>&#160;</td>
          <td class="paramname"><em>cpfnc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>cpdata</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the intersection of two lists. </p>
<p>The intersection contains all elements of the left list (including duplicates) that can be found in the right list.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">left</td><td>the left source list </td></tr>
    <tr><td class="paramname">right</td><td>the right source list </td></tr>
    <tr><td class="paramname">cmpfnc</td><td>a function to compare elements </td></tr>
    <tr><td class="paramname">cmpdata</td><td>additional data for the compare function </td></tr>
    <tr><td class="paramname">cpfnc</td><td>a function to copy the elements </td></tr>
    <tr><td class="paramname">cpdata</td><td>additional data for the copy function </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a new list containing the intersection </dd></dl>

</div>
</div>
<a id="a1d0b00514dbb81ba6270b58da0c5b9a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1d0b00514dbb81ba6270b58da0c5b9a8">&#9670;&nbsp;</a></span>ucx_list_intersection_a()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_intersection_a </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUcxAllocator.html">UcxAllocator</a> *&#160;</td>
          <td class="paramname"><em>allocator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>left</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>right</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a>&#160;</td>
          <td class="paramname"><em>cmpfnc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>cmpdata</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a>&#160;</td>
          <td class="paramname"><em>cpfnc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>cpdata</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the intersection of two lists. </p>
<p>The intersection contains all elements of the left list (including duplicates) that can be found in the right list.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">allocator</td><td>allocates the new list elements </td></tr>
    <tr><td class="paramname">left</td><td>the left source list </td></tr>
    <tr><td class="paramname">right</td><td>the right source list </td></tr>
    <tr><td class="paramname">cmpfnc</td><td>a function to compare elements </td></tr>
    <tr><td class="paramname">cmpdata</td><td>additional data for the compare function </td></tr>
    <tr><td class="paramname">cpfnc</td><td>a function to copy the elements </td></tr>
    <tr><td class="paramname">cpdata</td><td>additional data for the copy function </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a new list containing the intersection </dd></dl>

</div>
</div>
<a id="add5ec40c5006e29c629d23c2eb5a6553"></a>
<h2 class="memtitle"><span class="permalink"><a href="#add5ec40c5006e29c629d23c2eb5a6553">&#9670;&nbsp;</a></span>ucx_list_last()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_last </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>elem</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the last element of a list. </p>
<p>If the argument has no successor, it is the last element and therefore directly returned. Otherwise this function traverses to the last element of the list and returns it.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">elem</td><td>one element of the list </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the last element of the list, the specified element is a member of </dd></dl>

</div>
</div>
<a id="a8fcb68e4556395b15180eec2d0b77aa4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8fcb68e4556395b15180eec2d0b77aa4">&#9670;&nbsp;</a></span>ucx_list_prepend()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_prepend </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Inserts an element at the beginning of the list. </p>
<p>You <em>should</em> overwrite the old list pointer by calling <code>mylist = ucx_list_prepend(mylist, mydata);</code>. However, you may also perform successive calls of <a class="el" href="list_8h.html#a8fcb68e4556395b15180eec2d0b77aa4" title="Inserts an element at the beginning of the list. ">ucx_list_prepend()</a> on the same list pointer, as this function always searchs for the head of the list with <a class="el" href="list_8h.html#a6aa0e34ebc5f0dca6f52d0f7626b4bd5" title="Returns the first element of a list. ">ucx_list_first()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">list</td><td>the list where to insert the data or <code>NULL</code> to create a new list </td></tr>
    <tr><td class="paramname">data</td><td>the data to insert </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a pointer to the new list head </dd></dl>

</div>
</div>
<a id="a54654e6dc60e1c3de9e886c150e404ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a54654e6dc60e1c3de9e886c150e404ec">&#9670;&nbsp;</a></span>ucx_list_prepend_a()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_prepend_a </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUcxAllocator.html">UcxAllocator</a> *&#160;</td>
          <td class="paramname"><em>allocator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Inserts an element at the beginning of the list using a <a class="el" href="structUcxAllocator.html" title="UCX allocator data structure containing memory management functions. ">UcxAllocator</a>. </p>
<p>See <a class="el" href="list_8h.html#a8fcb68e4556395b15180eec2d0b77aa4" title="Inserts an element at the beginning of the list. ">ucx_list_prepend()</a> for details.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">allocator</td><td>the allocator to use </td></tr>
    <tr><td class="paramname">list</td><td>the list where to insert the data or <code>NULL</code> to create a new list </td></tr>
    <tr><td class="paramname">data</td><td>the data to insert </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a pointer to the new list head </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="list_8h.html#a8fcb68e4556395b15180eec2d0b77aa4" title="Inserts an element at the beginning of the list. ">ucx_list_prepend()</a> </dd></dl>

</div>
</div>
<a id="a410cb3e8260037ba56c72d14b899b468"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a410cb3e8260037ba56c72d14b899b468">&#9670;&nbsp;</a></span>ucx_list_remove()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_remove </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>element</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes an element from the list. </p>
<p>If the first element is removed, the list pointer changes. So it is <em>highly recommended</em> to <em>always</em> update the pointer by calling <code>mylist = ucx_list_remove(mylist, myelem);</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">list</td><td>the list from which the element shall be removed </td></tr>
    <tr><td class="paramname">element</td><td>the element to remove </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>returns the updated list pointer or <code>NULL</code>, if the list is now empty </dd></dl>

</div>
</div>
<a id="aca687b7c4e7170175f447e549125aa52"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aca687b7c4e7170175f447e549125aa52">&#9670;&nbsp;</a></span>ucx_list_remove_a()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_remove_a </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUcxAllocator.html">UcxAllocator</a> *&#160;</td>
          <td class="paramname"><em>allocator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>element</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes an element from the list using a <a class="el" href="structUcxAllocator.html" title="UCX allocator data structure containing memory management functions. ">UcxAllocator</a>. </p>
<p>See <a class="el" href="list_8h.html#a410cb3e8260037ba56c72d14b899b468" title="Removes an element from the list. ">ucx_list_remove()</a> for details.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">allocator</td><td>the allocator to use </td></tr>
    <tr><td class="paramname">list</td><td>the list from which the element shall be removed </td></tr>
    <tr><td class="paramname">element</td><td>the element to remove </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>returns the updated list pointer or <code>NULL</code>, if the list </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="list_8h.html#a410cb3e8260037ba56c72d14b899b468" title="Removes an element from the list. ">ucx_list_remove()</a> </dd></dl>

</div>
</div>
<a id="ae88001cc8ae40b946560f31434abed8f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae88001cc8ae40b946560f31434abed8f">&#9670;&nbsp;</a></span>ucx_list_size()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t ucx_list_size </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>list</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the element count of the list. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">list</td><td>the list whose elements are counted </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the element count </dd></dl>

</div>
</div>
<a id="ac74962d9bd7cfc9d3e2e09651469377b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac74962d9bd7cfc9d3e2e09651469377b">&#9670;&nbsp;</a></span>ucx_list_sort()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_sort </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a>&#160;</td>
          <td class="paramname"><em>cmpfnc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sorts a <a class="el" href="structUcxList.html" title="UCX list structure. ">UcxList</a> with natural merge sort. </p>
<p>This function uses O(n) additional temporary memory for merge operations that is automatically freed after each merge.</p>
<p>As the head of the list might change, you <b>MUST</b> call this function as follows: <code>mylist = ucx_list_sort(mylist, mycmpfnc, mydata);</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">list</td><td>the list to sort </td></tr>
    <tr><td class="paramname">cmpfnc</td><td>the function that shall be used to compare the element data </td></tr>
    <tr><td class="paramname">data</td><td>additional data for the <a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791" title="Function pointer to a compare function. ">cmp_func()</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the sorted list </dd></dl>

</div>
</div>
<a id="a94ecdb0cea1633ad7074f027fa8485fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a94ecdb0cea1633ad7074f027fa8485fa">&#9670;&nbsp;</a></span>ucx_list_union()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_union </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>left</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>right</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a>&#160;</td>
          <td class="paramname"><em>cmpfnc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>cmpdata</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a>&#160;</td>
          <td class="paramname"><em>cpfnc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>cpdata</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the union of two lists. </p>
<p>The union is a list of unique elements regarding cmpfnc obtained from both source lists.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">left</td><td>the left source list </td></tr>
    <tr><td class="paramname">right</td><td>the right source list </td></tr>
    <tr><td class="paramname">cmpfnc</td><td>a function to compare elements </td></tr>
    <tr><td class="paramname">cmpdata</td><td>additional data for the compare function </td></tr>
    <tr><td class="paramname">cpfnc</td><td>a function to copy the elements </td></tr>
    <tr><td class="paramname">cpdata</td><td>additional data for the copy function </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a new list containing the union </dd></dl>

</div>
</div>
<a id="a65b4355536f4ebc4130211b46469f4c1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a65b4355536f4ebc4130211b46469f4c1">&#9670;&nbsp;</a></span>ucx_list_union_a()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_union_a </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structUcxAllocator.html">UcxAllocator</a> *&#160;</td>
          <td class="paramname"><em>allocator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>left</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
          <td class="paramname"><em>right</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a>&#160;</td>
          <td class="paramname"><em>cmpfnc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>cmpdata</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a>&#160;</td>
          <td class="paramname"><em>cpfnc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>cpdata</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the union of two lists. </p>
<p>The union is a list of unique elements regarding cmpfnc obtained from both source lists.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">allocator</td><td>allocates the new list elements </td></tr>
    <tr><td class="paramname">left</td><td>the left source list </td></tr>
    <tr><td class="paramname">right</td><td>the right source list </td></tr>
    <tr><td class="paramname">cmpfnc</td><td>a function to compare elements </td></tr>
    <tr><td class="paramname">cmpdata</td><td>additional data for the compare function </td></tr>
    <tr><td class="paramname">cpfnc</td><td>a function to copy the elements </td></tr>
    <tr><td class="paramname">cpdata</td><td>additional data for the copy function </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a new list containing the union </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Dec 19 2019 19:58:24 for ucx by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>

mercurial