docs/api-2.1/list_8h.html

changeset 390
d345541018fa
equal deleted inserted replaced
389:92e482410453 390:d345541018fa
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
6 <meta name="generator" content="Doxygen 1.8.13"/>
7 <meta name="viewport" content="width=device-width, initial-scale=1"/>
8 <title>ucx: /home/mike/workspace/c/ucx/src/ucx/list.h File Reference</title>
9 <link href="tabs.css" rel="stylesheet" type="text/css"/>
10 <script type="text/javascript" src="jquery.js"></script>
11 <script type="text/javascript" src="dynsections.js"></script>
12 <link href="search/search.css" rel="stylesheet" type="text/css"/>
13 <script type="text/javascript" src="search/searchdata.js"></script>
14 <script type="text/javascript" src="search/search.js"></script>
15 <link href="doxygen.css" rel="stylesheet" type="text/css" />
16 </head>
17 <body>
18 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
19 <div id="titlearea">
20 <table cellspacing="0" cellpadding="0">
21 <tbody>
22 <tr style="height: 56px;">
23 <td id="projectlogo"><img alt="Logo" src="uaplogo.png"/></td>
24 <td id="projectalign" style="padding-left: 0.5em;">
25 <div id="projectname">ucx
26 </div>
27 <div id="projectbrief">UAP Common Extensions</div>
28 </td>
29 </tr>
30 </tbody>
31 </table>
32 </div>
33 <!-- end header part -->
34 <!-- Generated by Doxygen 1.8.13 -->
35 <script type="text/javascript">
36 var searchBox = new SearchBox("searchBox", "search",false,'Search');
37 </script>
38 <script type="text/javascript" src="menudata.js"></script>
39 <script type="text/javascript" src="menu.js"></script>
40 <script type="text/javascript">
41 $(function() {
42 initMenu('',true,false,'search.php','Search');
43 $(document).ready(function() { init_search(); });
44 });
45 </script>
46 <div id="main-nav"></div>
47 <!-- window showing the filter options -->
48 <div id="MSearchSelectWindow"
49 onmouseover="return searchBox.OnSearchSelectShow()"
50 onmouseout="return searchBox.OnSearchSelectHide()"
51 onkeydown="return searchBox.OnSearchSelectKey(event)">
52 </div>
53
54 <!-- iframe showing the search results (closed by default) -->
55 <div id="MSearchResultsWindow">
56 <iframe src="javascript:void(0)" frameborder="0"
57 name="MSearchResults" id="MSearchResults">
58 </iframe>
59 </div>
60
61 <div id="nav-path" class="navpath">
62 <ul>
63 <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>
64 </div>
65 </div><!-- top -->
66 <div class="header">
67 <div class="summary">
68 <a href="#nested-classes">Data Structures</a> &#124;
69 <a href="#define-members">Macros</a> &#124;
70 <a href="#typedef-members">Typedefs</a> &#124;
71 <a href="#func-members">Functions</a> </div>
72 <div class="headertitle">
73 <div class="title">list.h File Reference</div> </div>
74 </div><!--header-->
75 <div class="contents">
76
77 <p>Doubly linked list implementation.
78 <a href="#details">More...</a></p>
79 <div class="textblock"><code>#include &quot;<a class="el" href="ucx_8h_source.html">ucx.h</a>&quot;</code><br />
80 <code>#include &quot;<a class="el" href="allocator_8h_source.html">allocator.h</a>&quot;</code><br />
81 </div>
82 <p><a href="list_8h_source.html">Go to the source code of this file.</a></p>
83 <table class="memberdecls">
84 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
85 Data Structures</h2></td></tr>
86 <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>
87 <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">UCX list structure. <a href="structUcxList.html#details">More...</a><br /></td></tr>
88 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
89 </table><table class="memberdecls">
90 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
91 Macros</h2></td></tr>
92 <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>
93 <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>
94 <tr class="separator:a4b143b6526a410aa4d22cb3bb9365d70"><td class="memSeparator" colspan="2">&#160;</td></tr>
95 </table><table class="memberdecls">
96 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
97 Typedefs</h2></td></tr>
98 <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>
99 <tr class="memdesc:aa6f89f91c1081c9a7c6866c298f497a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">UCX list type. <a href="#aa6f89f91c1081c9a7c6866c298f497a2">More...</a><br /></td></tr>
100 <tr class="separator:aa6f89f91c1081c9a7c6866c298f497a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
101 </table><table class="memberdecls">
102 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
103 Functions</h2></td></tr>
104 <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>
105 <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>
106 <tr class="separator:ae7054a41c289b24e6caf5cb07ac850ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
107 <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>
108 <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>
109 <tr class="separator:a08ca1ba0d2e82258b0408714c1f4c425"><td class="memSeparator" colspan="2">&#160;</td></tr>
110 <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>
111 <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>
112 <tr class="separator:adc435447cecf885bc63d232191085bbe"><td class="memSeparator" colspan="2">&#160;</td></tr>
113 <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>
114 <tr class="memdesc:a1a0fa2c5b1e478a96da19b0c3f013668"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the entire list. <a href="#a1a0fa2c5b1e478a96da19b0c3f013668">More...</a><br /></td></tr>
115 <tr class="separator:a1a0fa2c5b1e478a96da19b0c3f013668"><td class="memSeparator" colspan="2">&#160;</td></tr>
116 <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>
117 <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>
118 <tr class="separator:a944e11f76c38767cd1100d72a4e3b25b"><td class="memSeparator" colspan="2">&#160;</td></tr>
119 <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>
120 <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>
121 <tr class="separator:a4ba6c96642f72ea046cc22627c72979c"><td class="memSeparator" colspan="2">&#160;</td></tr>
122 <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>
123 <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>
124 <tr class="separator:a00c122c8a26d35b60676939df4161621"><td class="memSeparator" colspan="2">&#160;</td></tr>
125 <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>
126 <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>
127 <tr class="separator:adf3b3e2e0ff977d8928671d6bd82fc60"><td class="memSeparator" colspan="2">&#160;</td></tr>
128 <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>
129 <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>
130 <tr class="separator:a8fcb68e4556395b15180eec2d0b77aa4"><td class="memSeparator" colspan="2">&#160;</td></tr>
131 <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>
132 <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>
133 <tr class="separator:a54654e6dc60e1c3de9e886c150e404ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
134 <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>
135 <tr class="memdesc:a77163a0cc82fae52bec26c8c0c3674d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Concatenates two lists. <a href="#a77163a0cc82fae52bec26c8c0c3674d9">More...</a><br /></td></tr>
136 <tr class="separator:a77163a0cc82fae52bec26c8c0c3674d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
137 <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>
138 <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>
139 <tr class="separator:a6aa0e34ebc5f0dca6f52d0f7626b4bd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
140 <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>
141 <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>
142 <tr class="separator:add5ec40c5006e29c629d23c2eb5a6553"><td class="memSeparator" colspan="2">&#160;</td></tr>
143 <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>
144 <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>
145 <tr class="separator:a2509ffe19bce6a8708c77f89480c75fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
146 <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>
147 <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>
148 <tr class="separator:ae2ff2974812ca185870f80bc4ed9337e"><td class="memSeparator" colspan="2">&#160;</td></tr>
149 <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>
150 <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>
151 <tr class="separator:ae88001cc8ae40b946560f31434abed8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
152 <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>
153 <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>
154 <tr class="separator:a9b3b6842d3be572e06a7f519e198cb83"><td class="memSeparator" colspan="2">&#160;</td></tr>
155 <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>
156 <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>
157 <tr class="separator:a8b0fa051fcfe12e1a82cca1087973852"><td class="memSeparator" colspan="2">&#160;</td></tr>
158 <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>
159 <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>
160 <tr class="separator:ac74962d9bd7cfc9d3e2e09651469377b"><td class="memSeparator" colspan="2">&#160;</td></tr>
161 <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>
162 <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>
163 <tr class="separator:a410cb3e8260037ba56c72d14b899b468"><td class="memSeparator" colspan="2">&#160;</td></tr>
164 <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>
165 <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>
166 <tr class="separator:aca687b7c4e7170175f447e549125aa52"><td class="memSeparator" colspan="2">&#160;</td></tr>
167 <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>
168 <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>
169 <tr class="separator:a94ecdb0cea1633ad7074f027fa8485fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
170 <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>
171 <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>
172 <tr class="separator:a65b4355536f4ebc4130211b46469f4c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
173 <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>
174 <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>
175 <tr class="separator:a259f9b754978aeca23dfabba16e20f39"><td class="memSeparator" colspan="2">&#160;</td></tr>
176 <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>
177 <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>
178 <tr class="separator:a1d0b00514dbb81ba6270b58da0c5b9a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
179 <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>
180 <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>
181 <tr class="separator:a6c5db5d1d11ad28b6fe1a80ee1c1e449"><td class="memSeparator" colspan="2">&#160;</td></tr>
182 <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>
183 <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>
184 <tr class="separator:a4a2a2fc5cc41073c516db6235bbc51d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
185 </table>
186 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
187 <div class="textblock"><p>Doubly linked list implementation. </p>
188 <dl class="section author"><dt>Author</dt><dd>Mike Becker </dd>
189 <dd>
190 Olaf Wintermann </dd></dl>
191 </div><h2 class="groupheader">Macro Definition Documentation</h2>
192 <a id="a4b143b6526a410aa4d22cb3bb9365d70"></a>
193 <h2 class="memtitle"><span class="permalink"><a href="#a4b143b6526a410aa4d22cb3bb9365d70">&#9670;&nbsp;</a></span>UCX_FOREACH</h2>
194
195 <div class="memitem">
196 <div class="memproto">
197 <table class="memname">
198 <tr>
199 <td class="memname">#define UCX_FOREACH</td>
200 <td>(</td>
201 <td class="paramtype">&#160;</td>
202 <td class="paramname">elem, </td>
203 </tr>
204 <tr>
205 <td class="paramkey"></td>
206 <td></td>
207 <td class="paramtype">&#160;</td>
208 <td class="paramname">list&#160;</td>
209 </tr>
210 <tr>
211 <td></td>
212 <td>)</td>
213 <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>
214 </tr>
215 </table>
216 </div><div class="memdoc">
217
218 <p>Loop statement for UCX lists. </p>
219 <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>
220 <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>
221 <dl class="params"><dt>Parameters</dt><dd>
222 <table class="params">
223 <tr><td class="paramname">list</td><td>The first element of the list </td></tr>
224 <tr><td class="paramname">elem</td><td>The variable name of the element </td></tr>
225 </table>
226 </dd>
227 </dl>
228
229 </div>
230 </div>
231 <h2 class="groupheader">Typedef Documentation</h2>
232 <a id="aa6f89f91c1081c9a7c6866c298f497a2"></a>
233 <h2 class="memtitle"><span class="permalink"><a href="#aa6f89f91c1081c9a7c6866c298f497a2">&#9670;&nbsp;</a></span>UcxList</h2>
234
235 <div class="memitem">
236 <div class="memproto">
237 <table class="memname">
238 <tr>
239 <td class="memname">typedef struct <a class="el" href="structUcxList.html">UcxList</a> <a class="el" href="structUcxList.html">UcxList</a></td>
240 </tr>
241 </table>
242 </div><div class="memdoc">
243
244 <p>UCX list type. </p>
245 <dl class="section see"><dt>See also</dt><dd><a class="el" href="structUcxList.html" title="UCX list structure. ">UcxList</a> </dd></dl>
246
247 </div>
248 </div>
249 <h2 class="groupheader">Function Documentation</h2>
250 <a id="a00c122c8a26d35b60676939df4161621"></a>
251 <h2 class="memtitle"><span class="permalink"><a href="#a00c122c8a26d35b60676939df4161621">&#9670;&nbsp;</a></span>ucx_list_append()</h2>
252
253 <div class="memitem">
254 <div class="memproto">
255 <table class="memname">
256 <tr>
257 <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_append </td>
258 <td>(</td>
259 <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
260 <td class="paramname"><em>list</em>, </td>
261 </tr>
262 <tr>
263 <td class="paramkey"></td>
264 <td></td>
265 <td class="paramtype">void *&#160;</td>
266 <td class="paramname"><em>data</em>&#160;</td>
267 </tr>
268 <tr>
269 <td></td>
270 <td>)</td>
271 <td></td><td></td>
272 </tr>
273 </table>
274 </div><div class="memdoc">
275
276 <p>Inserts an element at the end of the list. </p>
277 <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>
278 <dl class="params"><dt>Parameters</dt><dd>
279 <table class="params">
280 <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>
281 <tr><td class="paramname">data</td><td>the data to insert </td></tr>
282 </table>
283 </dd>
284 </dl>
285 <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>
286
287 </div>
288 </div>
289 <a id="adf3b3e2e0ff977d8928671d6bd82fc60"></a>
290 <h2 class="memtitle"><span class="permalink"><a href="#adf3b3e2e0ff977d8928671d6bd82fc60">&#9670;&nbsp;</a></span>ucx_list_append_a()</h2>
291
292 <div class="memitem">
293 <div class="memproto">
294 <table class="memname">
295 <tr>
296 <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_append_a </td>
297 <td>(</td>
298 <td class="paramtype"><a class="el" href="structUcxAllocator.html">UcxAllocator</a> *&#160;</td>
299 <td class="paramname"><em>allocator</em>, </td>
300 </tr>
301 <tr>
302 <td class="paramkey"></td>
303 <td></td>
304 <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
305 <td class="paramname"><em>list</em>, </td>
306 </tr>
307 <tr>
308 <td class="paramkey"></td>
309 <td></td>
310 <td class="paramtype">void *&#160;</td>
311 <td class="paramname"><em>data</em>&#160;</td>
312 </tr>
313 <tr>
314 <td></td>
315 <td>)</td>
316 <td></td><td></td>
317 </tr>
318 </table>
319 </div><div class="memdoc">
320
321 <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>
322 <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>
323 <dl class="params"><dt>Parameters</dt><dd>
324 <table class="params">
325 <tr><td class="paramname">allocator</td><td>the allocator to use </td></tr>
326 <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>
327 <tr><td class="paramname">data</td><td>the data to insert </td></tr>
328 </table>
329 </dd>
330 </dl>
331 <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>
332 <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>
333
334 </div>
335 </div>
336 <a id="ae7054a41c289b24e6caf5cb07ac850ed"></a>
337 <h2 class="memtitle"><span class="permalink"><a href="#ae7054a41c289b24e6caf5cb07ac850ed">&#9670;&nbsp;</a></span>ucx_list_clone()</h2>
338
339 <div class="memitem">
340 <div class="memproto">
341 <table class="memname">
342 <tr>
343 <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_clone </td>
344 <td>(</td>
345 <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
346 <td class="paramname"><em>list</em>, </td>
347 </tr>
348 <tr>
349 <td class="paramkey"></td>
350 <td></td>
351 <td class="paramtype"><a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a>&#160;</td>
352 <td class="paramname"><em>cpyfnc</em>, </td>
353 </tr>
354 <tr>
355 <td class="paramkey"></td>
356 <td></td>
357 <td class="paramtype">void *&#160;</td>
358 <td class="paramname"><em>data</em>&#160;</td>
359 </tr>
360 <tr>
361 <td></td>
362 <td>)</td>
363 <td></td><td></td>
364 </tr>
365 </table>
366 </div><div class="memdoc">
367
368 <p>Creates an element-wise copy of a list. </p>
369 <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>
370 <dl class="params"><dt>Parameters</dt><dd>
371 <table class="params">
372 <tr><td class="paramname">list</td><td>the list to copy </td></tr>
373 <tr><td class="paramname">cpyfnc</td><td>a pointer to the function that shall copy an element (may be <code>NULL</code>) </td></tr>
374 <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>
375 </table>
376 </dd>
377 </dl>
378 <dl class="section return"><dt>Returns</dt><dd>a pointer to the copy </dd></dl>
379
380 </div>
381 </div>
382 <a id="a08ca1ba0d2e82258b0408714c1f4c425"></a>
383 <h2 class="memtitle"><span class="permalink"><a href="#a08ca1ba0d2e82258b0408714c1f4c425">&#9670;&nbsp;</a></span>ucx_list_clone_a()</h2>
384
385 <div class="memitem">
386 <div class="memproto">
387 <table class="memname">
388 <tr>
389 <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_clone_a </td>
390 <td>(</td>
391 <td class="paramtype"><a class="el" href="structUcxAllocator.html">UcxAllocator</a> *&#160;</td>
392 <td class="paramname"><em>allocator</em>, </td>
393 </tr>
394 <tr>
395 <td class="paramkey"></td>
396 <td></td>
397 <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
398 <td class="paramname"><em>list</em>, </td>
399 </tr>
400 <tr>
401 <td class="paramkey"></td>
402 <td></td>
403 <td class="paramtype"><a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a>&#160;</td>
404 <td class="paramname"><em>cpyfnc</em>, </td>
405 </tr>
406 <tr>
407 <td class="paramkey"></td>
408 <td></td>
409 <td class="paramtype">void *&#160;</td>
410 <td class="paramname"><em>data</em>&#160;</td>
411 </tr>
412 <tr>
413 <td></td>
414 <td>)</td>
415 <td></td><td></td>
416 </tr>
417 </table>
418 </div><div class="memdoc">
419
420 <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>
421 <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>
422 <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>
423 <dl class="params"><dt>Parameters</dt><dd>
424 <table class="params">
425 <tr><td class="paramname">allocator</td><td>the allocator to use </td></tr>
426 <tr><td class="paramname">list</td><td>the list to copy </td></tr>
427 <tr><td class="paramname">cpyfnc</td><td>a pointer to the function that shall copy an element (may be <code>NULL</code>) </td></tr>
428 <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>
429 </table>
430 </dd>
431 </dl>
432 <dl class="section return"><dt>Returns</dt><dd>a pointer to the copy </dd></dl>
433 <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>
434
435 </div>
436 </div>
437 <a id="a77163a0cc82fae52bec26c8c0c3674d9"></a>
438 <h2 class="memtitle"><span class="permalink"><a href="#a77163a0cc82fae52bec26c8c0c3674d9">&#9670;&nbsp;</a></span>ucx_list_concat()</h2>
439
440 <div class="memitem">
441 <div class="memproto">
442 <table class="memname">
443 <tr>
444 <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_concat </td>
445 <td>(</td>
446 <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
447 <td class="paramname"><em>list1</em>, </td>
448 </tr>
449 <tr>
450 <td class="paramkey"></td>
451 <td></td>
452 <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
453 <td class="paramname"><em>list2</em>&#160;</td>
454 </tr>
455 <tr>
456 <td></td>
457 <td>)</td>
458 <td></td><td></td>
459 </tr>
460 </table>
461 </div><div class="memdoc">
462
463 <p>Concatenates two lists. </p>
464 <p>Either of the two arguments may be <code>NULL</code>.</p>
465 <p>This function modifies the references to the next/previous element of the last/first element of <code>list1</code>/<code> list2</code>.</p>
466 <dl class="params"><dt>Parameters</dt><dd>
467 <table class="params">
468 <tr><td class="paramname">list1</td><td>first list </td></tr>
469 <tr><td class="paramname">list2</td><td>second list </td></tr>
470 </table>
471 </dd>
472 </dl>
473 <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>
474
475 </div>
476 </div>
477 <a id="a8b0fa051fcfe12e1a82cca1087973852"></a>
478 <h2 class="memtitle"><span class="permalink"><a href="#a8b0fa051fcfe12e1a82cca1087973852">&#9670;&nbsp;</a></span>ucx_list_contains()</h2>
479
480 <div class="memitem">
481 <div class="memproto">
482 <table class="memname">
483 <tr>
484 <td class="memname">int ucx_list_contains </td>
485 <td>(</td>
486 <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
487 <td class="paramname"><em>list</em>, </td>
488 </tr>
489 <tr>
490 <td class="paramkey"></td>
491 <td></td>
492 <td class="paramtype">void *&#160;</td>
493 <td class="paramname"><em>elem</em>, </td>
494 </tr>
495 <tr>
496 <td class="paramkey"></td>
497 <td></td>
498 <td class="paramtype"><a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a>&#160;</td>
499 <td class="paramname"><em>cmpfnc</em>, </td>
500 </tr>
501 <tr>
502 <td class="paramkey"></td>
503 <td></td>
504 <td class="paramtype">void *&#160;</td>
505 <td class="paramname"><em>data</em>&#160;</td>
506 </tr>
507 <tr>
508 <td></td>
509 <td>)</td>
510 <td></td><td></td>
511 </tr>
512 </table>
513 </div><div class="memdoc">
514
515 <p>Checks, if a list contains a specific element. </p>
516 <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>
517 <dl class="params"><dt>Parameters</dt><dd>
518 <table class="params">
519 <tr><td class="paramname">list</td><td>the list where to search for the data </td></tr>
520 <tr><td class="paramname">elem</td><td>the element data </td></tr>
521 <tr><td class="paramname">cmpfnc</td><td>the compare function </td></tr>
522 <tr><td class="paramname">data</td><td>additional data for the compare function </td></tr>
523 </table>
524 </dd>
525 </dl>
526 <dl class="section return"><dt>Returns</dt><dd>1, if and only if the list contains the specified element data </dd></dl>
527 <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>
528
529 </div>
530 </div>
531 <a id="a6c5db5d1d11ad28b6fe1a80ee1c1e449"></a>
532 <h2 class="memtitle"><span class="permalink"><a href="#a6c5db5d1d11ad28b6fe1a80ee1c1e449">&#9670;&nbsp;</a></span>ucx_list_difference()</h2>
533
534 <div class="memitem">
535 <div class="memproto">
536 <table class="memname">
537 <tr>
538 <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_difference </td>
539 <td>(</td>
540 <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
541 <td class="paramname"><em>left</em>, </td>
542 </tr>
543 <tr>
544 <td class="paramkey"></td>
545 <td></td>
546 <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
547 <td class="paramname"><em>right</em>, </td>
548 </tr>
549 <tr>
550 <td class="paramkey"></td>
551 <td></td>
552 <td class="paramtype"><a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a>&#160;</td>
553 <td class="paramname"><em>cmpfnc</em>, </td>
554 </tr>
555 <tr>
556 <td class="paramkey"></td>
557 <td></td>
558 <td class="paramtype">void *&#160;</td>
559 <td class="paramname"><em>cmpdata</em>, </td>
560 </tr>
561 <tr>
562 <td class="paramkey"></td>
563 <td></td>
564 <td class="paramtype"><a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a>&#160;</td>
565 <td class="paramname"><em>cpfnc</em>, </td>
566 </tr>
567 <tr>
568 <td class="paramkey"></td>
569 <td></td>
570 <td class="paramtype">void *&#160;</td>
571 <td class="paramname"><em>cpdata</em>&#160;</td>
572 </tr>
573 <tr>
574 <td></td>
575 <td>)</td>
576 <td></td><td></td>
577 </tr>
578 </table>
579 </div><div class="memdoc">
580
581 <p>Returns the difference of two lists. </p>
582 <p>The difference contains all elements of the left list (including duplicates) that are not equal to any element of the right list.</p>
583 <dl class="params"><dt>Parameters</dt><dd>
584 <table class="params">
585 <tr><td class="paramname">left</td><td>the left source list </td></tr>
586 <tr><td class="paramname">right</td><td>the right source list </td></tr>
587 <tr><td class="paramname">cmpfnc</td><td>a function to compare elements </td></tr>
588 <tr><td class="paramname">cmpdata</td><td>additional data for the compare function </td></tr>
589 <tr><td class="paramname">cpfnc</td><td>a function to copy the elements </td></tr>
590 <tr><td class="paramname">cpdata</td><td>additional data for the copy function </td></tr>
591 </table>
592 </dd>
593 </dl>
594 <dl class="section return"><dt>Returns</dt><dd>a new list containing the difference </dd></dl>
595
596 </div>
597 </div>
598 <a id="a4a2a2fc5cc41073c516db6235bbc51d5"></a>
599 <h2 class="memtitle"><span class="permalink"><a href="#a4a2a2fc5cc41073c516db6235bbc51d5">&#9670;&nbsp;</a></span>ucx_list_difference_a()</h2>
600
601 <div class="memitem">
602 <div class="memproto">
603 <table class="memname">
604 <tr>
605 <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_difference_a </td>
606 <td>(</td>
607 <td class="paramtype"><a class="el" href="structUcxAllocator.html">UcxAllocator</a> *&#160;</td>
608 <td class="paramname"><em>allocator</em>, </td>
609 </tr>
610 <tr>
611 <td class="paramkey"></td>
612 <td></td>
613 <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
614 <td class="paramname"><em>left</em>, </td>
615 </tr>
616 <tr>
617 <td class="paramkey"></td>
618 <td></td>
619 <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
620 <td class="paramname"><em>right</em>, </td>
621 </tr>
622 <tr>
623 <td class="paramkey"></td>
624 <td></td>
625 <td class="paramtype"><a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a>&#160;</td>
626 <td class="paramname"><em>cmpfnc</em>, </td>
627 </tr>
628 <tr>
629 <td class="paramkey"></td>
630 <td></td>
631 <td class="paramtype">void *&#160;</td>
632 <td class="paramname"><em>cmpdata</em>, </td>
633 </tr>
634 <tr>
635 <td class="paramkey"></td>
636 <td></td>
637 <td class="paramtype"><a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a>&#160;</td>
638 <td class="paramname"><em>cpfnc</em>, </td>
639 </tr>
640 <tr>
641 <td class="paramkey"></td>
642 <td></td>
643 <td class="paramtype">void *&#160;</td>
644 <td class="paramname"><em>cpdata</em>&#160;</td>
645 </tr>
646 <tr>
647 <td></td>
648 <td>)</td>
649 <td></td><td></td>
650 </tr>
651 </table>
652 </div><div class="memdoc">
653
654 <p>Returns the difference of two lists. </p>
655 <p>The difference contains all elements of the left list (including duplicates) that are not equal to any element of the right list.</p>
656 <dl class="params"><dt>Parameters</dt><dd>
657 <table class="params">
658 <tr><td class="paramname">allocator</td><td>allocates the new list elements </td></tr>
659 <tr><td class="paramname">left</td><td>the left source list </td></tr>
660 <tr><td class="paramname">right</td><td>the right source list </td></tr>
661 <tr><td class="paramname">cmpfnc</td><td>a function to compare elements </td></tr>
662 <tr><td class="paramname">cmpdata</td><td>additional data for the compare function </td></tr>
663 <tr><td class="paramname">cpfnc</td><td>a function to copy the elements </td></tr>
664 <tr><td class="paramname">cpdata</td><td>additional data for the copy function </td></tr>
665 </table>
666 </dd>
667 </dl>
668 <dl class="section return"><dt>Returns</dt><dd>a new list containing the difference </dd></dl>
669
670 </div>
671 </div>
672 <a id="adc435447cecf885bc63d232191085bbe"></a>
673 <h2 class="memtitle"><span class="permalink"><a href="#adc435447cecf885bc63d232191085bbe">&#9670;&nbsp;</a></span>ucx_list_equals()</h2>
674
675 <div class="memitem">
676 <div class="memproto">
677 <table class="memname">
678 <tr>
679 <td class="memname">int ucx_list_equals </td>
680 <td>(</td>
681 <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
682 <td class="paramname"><em>list1</em>, </td>
683 </tr>
684 <tr>
685 <td class="paramkey"></td>
686 <td></td>
687 <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
688 <td class="paramname"><em>list2</em>, </td>
689 </tr>
690 <tr>
691 <td class="paramkey"></td>
692 <td></td>
693 <td class="paramtype"><a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a>&#160;</td>
694 <td class="paramname"><em>cmpfnc</em>, </td>
695 </tr>
696 <tr>
697 <td class="paramkey"></td>
698 <td></td>
699 <td class="paramtype">void *&#160;</td>
700 <td class="paramname"><em>data</em>&#160;</td>
701 </tr>
702 <tr>
703 <td></td>
704 <td>)</td>
705 <td></td><td></td>
706 </tr>
707 </table>
708 </div><div class="memdoc">
709
710 <p>Compares two UCX lists element-wise by using a compare function. </p>
711 <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>
712 <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>
713 <dl class="params"><dt>Parameters</dt><dd>
714 <table class="params">
715 <tr><td class="paramname">list1</td><td>the first list </td></tr>
716 <tr><td class="paramname">list2</td><td>the second list </td></tr>
717 <tr><td class="paramname">cmpfnc</td><td>the compare function </td></tr>
718 <tr><td class="paramname">data</td><td>additional data for the compare function </td></tr>
719 </table>
720 </dd>
721 </dl>
722 <dl class="section return"><dt>Returns</dt><dd>1, if and only if the two lists equal element-wise, 0 otherwise </dd></dl>
723
724 </div>
725 </div>
726 <a id="a9b3b6842d3be572e06a7f519e198cb83"></a>
727 <h2 class="memtitle"><span class="permalink"><a href="#a9b3b6842d3be572e06a7f519e198cb83">&#9670;&nbsp;</a></span>ucx_list_find()</h2>
728
729 <div class="memitem">
730 <div class="memproto">
731 <table class="memname">
732 <tr>
733 <td class="memname">ssize_t ucx_list_find </td>
734 <td>(</td>
735 <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
736 <td class="paramname"><em>list</em>, </td>
737 </tr>
738 <tr>
739 <td class="paramkey"></td>
740 <td></td>
741 <td class="paramtype">void *&#160;</td>
742 <td class="paramname"><em>elem</em>, </td>
743 </tr>
744 <tr>
745 <td class="paramkey"></td>
746 <td></td>
747 <td class="paramtype"><a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a>&#160;</td>
748 <td class="paramname"><em>cmpfnc</em>, </td>
749 </tr>
750 <tr>
751 <td class="paramkey"></td>
752 <td></td>
753 <td class="paramtype">void *&#160;</td>
754 <td class="paramname"><em>data</em>&#160;</td>
755 </tr>
756 <tr>
757 <td></td>
758 <td>)</td>
759 <td></td><td></td>
760 </tr>
761 </table>
762 </div><div class="memdoc">
763
764 <p>Returns the index of an element containing the specified data. </p>
765 <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>
766 <p>If the list contains the data more than once, the index of the first occurrence is returned.</p>
767 <dl class="params"><dt>Parameters</dt><dd>
768 <table class="params">
769 <tr><td class="paramname">list</td><td>the list where to search for the data </td></tr>
770 <tr><td class="paramname">elem</td><td>the element data </td></tr>
771 <tr><td class="paramname">cmpfnc</td><td>the compare function </td></tr>
772 <tr><td class="paramname">data</td><td>additional data for the compare function </td></tr>
773 </table>
774 </dd>
775 </dl>
776 <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>
777
778 </div>
779 </div>
780 <a id="a6aa0e34ebc5f0dca6f52d0f7626b4bd5"></a>
781 <h2 class="memtitle"><span class="permalink"><a href="#a6aa0e34ebc5f0dca6f52d0f7626b4bd5">&#9670;&nbsp;</a></span>ucx_list_first()</h2>
782
783 <div class="memitem">
784 <div class="memproto">
785 <table class="memname">
786 <tr>
787 <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_first </td>
788 <td>(</td>
789 <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
790 <td class="paramname"><em>elem</em></td><td>)</td>
791 <td></td>
792 </tr>
793 </table>
794 </div><div class="memdoc">
795
796 <p>Returns the first element of a list. </p>
797 <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>
798 <dl class="params"><dt>Parameters</dt><dd>
799 <table class="params">
800 <tr><td class="paramname">elem</td><td>one element of the list </td></tr>
801 </table>
802 </dd>
803 </dl>
804 <dl class="section return"><dt>Returns</dt><dd>the first element of the list, the specified element is a member of </dd></dl>
805
806 </div>
807 </div>
808 <a id="a1a0fa2c5b1e478a96da19b0c3f013668"></a>
809 <h2 class="memtitle"><span class="permalink"><a href="#a1a0fa2c5b1e478a96da19b0c3f013668">&#9670;&nbsp;</a></span>ucx_list_free()</h2>
810
811 <div class="memitem">
812 <div class="memproto">
813 <table class="memname">
814 <tr>
815 <td class="memname">void ucx_list_free </td>
816 <td>(</td>
817 <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
818 <td class="paramname"><em>list</em></td><td>)</td>
819 <td></td>
820 </tr>
821 </table>
822 </div><div class="memdoc">
823
824 <p>Destroys the entire list. </p>
825 <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>
826 <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>
827 <dl class="params"><dt>Parameters</dt><dd>
828 <table class="params">
829 <tr><td class="paramname">list</td><td>the list to free </td></tr>
830 </table>
831 </dd>
832 </dl>
833 <dl class="section see"><dt>See also</dt><dd>ucx_list_free_contents() </dd></dl>
834
835 </div>
836 </div>
837 <a id="a944e11f76c38767cd1100d72a4e3b25b"></a>
838 <h2 class="memtitle"><span class="permalink"><a href="#a944e11f76c38767cd1100d72a4e3b25b">&#9670;&nbsp;</a></span>ucx_list_free_a()</h2>
839
840 <div class="memitem">
841 <div class="memproto">
842 <table class="memname">
843 <tr>
844 <td class="memname">void ucx_list_free_a </td>
845 <td>(</td>
846 <td class="paramtype"><a class="el" href="structUcxAllocator.html">UcxAllocator</a> *&#160;</td>
847 <td class="paramname"><em>allocator</em>, </td>
848 </tr>
849 <tr>
850 <td class="paramkey"></td>
851 <td></td>
852 <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
853 <td class="paramname"><em>list</em>&#160;</td>
854 </tr>
855 <tr>
856 <td></td>
857 <td>)</td>
858 <td></td><td></td>
859 </tr>
860 </table>
861 </div><div class="memdoc">
862
863 <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>
864 <p>See <a class="el" href="list_8h.html#a1a0fa2c5b1e478a96da19b0c3f013668" title="Destroys the entire list. ">ucx_list_free()</a> for details.</p>
865 <dl class="params"><dt>Parameters</dt><dd>
866 <table class="params">
867 <tr><td class="paramname">allocator</td><td>the allocator to use </td></tr>
868 <tr><td class="paramname">list</td><td>the list to free </td></tr>
869 </table>
870 </dd>
871 </dl>
872 <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>
873
874 </div>
875 </div>
876 <a id="a4ba6c96642f72ea046cc22627c72979c"></a>
877 <h2 class="memtitle"><span class="permalink"><a href="#a4ba6c96642f72ea046cc22627c72979c">&#9670;&nbsp;</a></span>ucx_list_free_content()</h2>
878
879 <div class="memitem">
880 <div class="memproto">
881 <table class="memname">
882 <tr>
883 <td class="memname">void ucx_list_free_content </td>
884 <td>(</td>
885 <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
886 <td class="paramname"><em>list</em>, </td>
887 </tr>
888 <tr>
889 <td class="paramkey"></td>
890 <td></td>
891 <td class="paramtype"><a class="el" href="ucx_8h.html#ad2b370c2809914c8b7fedab163c266b3">ucx_destructor</a>&#160;</td>
892 <td class="paramname"><em>destr</em>&#160;</td>
893 </tr>
894 <tr>
895 <td></td>
896 <td>)</td>
897 <td></td><td></td>
898 </tr>
899 </table>
900 </div><div class="memdoc">
901
902 <p>Destroys the contents of the specified list by calling the specified destructor on each of them. </p>
903 <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>
904 <p>If no destructor is specified (<code>NULL</code>), stdlib's free() is used.</p>
905 <dl class="params"><dt>Parameters</dt><dd>
906 <table class="params">
907 <tr><td class="paramname">list</td><td>the list for which the contents shall be freed </td></tr>
908 <tr><td class="paramname">destr</td><td>optional destructor function </td></tr>
909 </table>
910 </dd>
911 </dl>
912 <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>
913
914 </div>
915 </div>
916 <a id="a2509ffe19bce6a8708c77f89480c75fb"></a>
917 <h2 class="memtitle"><span class="permalink"><a href="#a2509ffe19bce6a8708c77f89480c75fb">&#9670;&nbsp;</a></span>ucx_list_get()</h2>
918
919 <div class="memitem">
920 <div class="memproto">
921 <table class="memname">
922 <tr>
923 <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_get </td>
924 <td>(</td>
925 <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
926 <td class="paramname"><em>list</em>, </td>
927 </tr>
928 <tr>
929 <td class="paramkey"></td>
930 <td></td>
931 <td class="paramtype">size_t&#160;</td>
932 <td class="paramname"><em>index</em>&#160;</td>
933 </tr>
934 <tr>
935 <td></td>
936 <td>)</td>
937 <td></td><td></td>
938 </tr>
939 </table>
940 </div><div class="memdoc">
941
942 <p>Returns the list element at the specified index. </p>
943 <dl class="params"><dt>Parameters</dt><dd>
944 <table class="params">
945 <tr><td class="paramname">list</td><td>the list to retrieve the element from </td></tr>
946 <tr><td class="paramname">index</td><td>index of the element to return </td></tr>
947 </table>
948 </dd>
949 </dl>
950 <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>
951
952 </div>
953 </div>
954 <a id="ae2ff2974812ca185870f80bc4ed9337e"></a>
955 <h2 class="memtitle"><span class="permalink"><a href="#ae2ff2974812ca185870f80bc4ed9337e">&#9670;&nbsp;</a></span>ucx_list_indexof()</h2>
956
957 <div class="memitem">
958 <div class="memproto">
959 <table class="memname">
960 <tr>
961 <td class="memname">ssize_t ucx_list_indexof </td>
962 <td>(</td>
963 <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
964 <td class="paramname"><em>list</em>, </td>
965 </tr>
966 <tr>
967 <td class="paramkey"></td>
968 <td></td>
969 <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
970 <td class="paramname"><em>elem</em>&#160;</td>
971 </tr>
972 <tr>
973 <td></td>
974 <td>)</td>
975 <td></td><td></td>
976 </tr>
977 </table>
978 </div><div class="memdoc">
979
980 <p>Returns the index of an element. </p>
981 <dl class="params"><dt>Parameters</dt><dd>
982 <table class="params">
983 <tr><td class="paramname">list</td><td>the list where to search for the element </td></tr>
984 <tr><td class="paramname">elem</td><td>the element to find </td></tr>
985 </table>
986 </dd>
987 </dl>
988 <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>
989
990 </div>
991 </div>
992 <a id="a259f9b754978aeca23dfabba16e20f39"></a>
993 <h2 class="memtitle"><span class="permalink"><a href="#a259f9b754978aeca23dfabba16e20f39">&#9670;&nbsp;</a></span>ucx_list_intersection()</h2>
994
995 <div class="memitem">
996 <div class="memproto">
997 <table class="memname">
998 <tr>
999 <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_intersection </td>
1000 <td>(</td>
1001 <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
1002 <td class="paramname"><em>left</em>, </td>
1003 </tr>
1004 <tr>
1005 <td class="paramkey"></td>
1006 <td></td>
1007 <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
1008 <td class="paramname"><em>right</em>, </td>
1009 </tr>
1010 <tr>
1011 <td class="paramkey"></td>
1012 <td></td>
1013 <td class="paramtype"><a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a>&#160;</td>
1014 <td class="paramname"><em>cmpfnc</em>, </td>
1015 </tr>
1016 <tr>
1017 <td class="paramkey"></td>
1018 <td></td>
1019 <td class="paramtype">void *&#160;</td>
1020 <td class="paramname"><em>cmpdata</em>, </td>
1021 </tr>
1022 <tr>
1023 <td class="paramkey"></td>
1024 <td></td>
1025 <td class="paramtype"><a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a>&#160;</td>
1026 <td class="paramname"><em>cpfnc</em>, </td>
1027 </tr>
1028 <tr>
1029 <td class="paramkey"></td>
1030 <td></td>
1031 <td class="paramtype">void *&#160;</td>
1032 <td class="paramname"><em>cpdata</em>&#160;</td>
1033 </tr>
1034 <tr>
1035 <td></td>
1036 <td>)</td>
1037 <td></td><td></td>
1038 </tr>
1039 </table>
1040 </div><div class="memdoc">
1041
1042 <p>Returns the intersection of two lists. </p>
1043 <p>The intersection contains all elements of the left list (including duplicates) that can be found in the right list.</p>
1044 <dl class="params"><dt>Parameters</dt><dd>
1045 <table class="params">
1046 <tr><td class="paramname">left</td><td>the left source list </td></tr>
1047 <tr><td class="paramname">right</td><td>the right source list </td></tr>
1048 <tr><td class="paramname">cmpfnc</td><td>a function to compare elements </td></tr>
1049 <tr><td class="paramname">cmpdata</td><td>additional data for the compare function </td></tr>
1050 <tr><td class="paramname">cpfnc</td><td>a function to copy the elements </td></tr>
1051 <tr><td class="paramname">cpdata</td><td>additional data for the copy function </td></tr>
1052 </table>
1053 </dd>
1054 </dl>
1055 <dl class="section return"><dt>Returns</dt><dd>a new list containing the intersection </dd></dl>
1056
1057 </div>
1058 </div>
1059 <a id="a1d0b00514dbb81ba6270b58da0c5b9a8"></a>
1060 <h2 class="memtitle"><span class="permalink"><a href="#a1d0b00514dbb81ba6270b58da0c5b9a8">&#9670;&nbsp;</a></span>ucx_list_intersection_a()</h2>
1061
1062 <div class="memitem">
1063 <div class="memproto">
1064 <table class="memname">
1065 <tr>
1066 <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_intersection_a </td>
1067 <td>(</td>
1068 <td class="paramtype"><a class="el" href="structUcxAllocator.html">UcxAllocator</a> *&#160;</td>
1069 <td class="paramname"><em>allocator</em>, </td>
1070 </tr>
1071 <tr>
1072 <td class="paramkey"></td>
1073 <td></td>
1074 <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
1075 <td class="paramname"><em>left</em>, </td>
1076 </tr>
1077 <tr>
1078 <td class="paramkey"></td>
1079 <td></td>
1080 <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
1081 <td class="paramname"><em>right</em>, </td>
1082 </tr>
1083 <tr>
1084 <td class="paramkey"></td>
1085 <td></td>
1086 <td class="paramtype"><a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a>&#160;</td>
1087 <td class="paramname"><em>cmpfnc</em>, </td>
1088 </tr>
1089 <tr>
1090 <td class="paramkey"></td>
1091 <td></td>
1092 <td class="paramtype">void *&#160;</td>
1093 <td class="paramname"><em>cmpdata</em>, </td>
1094 </tr>
1095 <tr>
1096 <td class="paramkey"></td>
1097 <td></td>
1098 <td class="paramtype"><a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a>&#160;</td>
1099 <td class="paramname"><em>cpfnc</em>, </td>
1100 </tr>
1101 <tr>
1102 <td class="paramkey"></td>
1103 <td></td>
1104 <td class="paramtype">void *&#160;</td>
1105 <td class="paramname"><em>cpdata</em>&#160;</td>
1106 </tr>
1107 <tr>
1108 <td></td>
1109 <td>)</td>
1110 <td></td><td></td>
1111 </tr>
1112 </table>
1113 </div><div class="memdoc">
1114
1115 <p>Returns the intersection of two lists. </p>
1116 <p>The intersection contains all elements of the left list (including duplicates) that can be found in the right list.</p>
1117 <dl class="params"><dt>Parameters</dt><dd>
1118 <table class="params">
1119 <tr><td class="paramname">allocator</td><td>allocates the new list elements </td></tr>
1120 <tr><td class="paramname">left</td><td>the left source list </td></tr>
1121 <tr><td class="paramname">right</td><td>the right source list </td></tr>
1122 <tr><td class="paramname">cmpfnc</td><td>a function to compare elements </td></tr>
1123 <tr><td class="paramname">cmpdata</td><td>additional data for the compare function </td></tr>
1124 <tr><td class="paramname">cpfnc</td><td>a function to copy the elements </td></tr>
1125 <tr><td class="paramname">cpdata</td><td>additional data for the copy function </td></tr>
1126 </table>
1127 </dd>
1128 </dl>
1129 <dl class="section return"><dt>Returns</dt><dd>a new list containing the intersection </dd></dl>
1130
1131 </div>
1132 </div>
1133 <a id="add5ec40c5006e29c629d23c2eb5a6553"></a>
1134 <h2 class="memtitle"><span class="permalink"><a href="#add5ec40c5006e29c629d23c2eb5a6553">&#9670;&nbsp;</a></span>ucx_list_last()</h2>
1135
1136 <div class="memitem">
1137 <div class="memproto">
1138 <table class="memname">
1139 <tr>
1140 <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_last </td>
1141 <td>(</td>
1142 <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
1143 <td class="paramname"><em>elem</em></td><td>)</td>
1144 <td></td>
1145 </tr>
1146 </table>
1147 </div><div class="memdoc">
1148
1149 <p>Returns the last element of a list. </p>
1150 <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>
1151 <dl class="params"><dt>Parameters</dt><dd>
1152 <table class="params">
1153 <tr><td class="paramname">elem</td><td>one element of the list </td></tr>
1154 </table>
1155 </dd>
1156 </dl>
1157 <dl class="section return"><dt>Returns</dt><dd>the last element of the list, the specified element is a member of </dd></dl>
1158
1159 </div>
1160 </div>
1161 <a id="a8fcb68e4556395b15180eec2d0b77aa4"></a>
1162 <h2 class="memtitle"><span class="permalink"><a href="#a8fcb68e4556395b15180eec2d0b77aa4">&#9670;&nbsp;</a></span>ucx_list_prepend()</h2>
1163
1164 <div class="memitem">
1165 <div class="memproto">
1166 <table class="memname">
1167 <tr>
1168 <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_prepend </td>
1169 <td>(</td>
1170 <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
1171 <td class="paramname"><em>list</em>, </td>
1172 </tr>
1173 <tr>
1174 <td class="paramkey"></td>
1175 <td></td>
1176 <td class="paramtype">void *&#160;</td>
1177 <td class="paramname"><em>data</em>&#160;</td>
1178 </tr>
1179 <tr>
1180 <td></td>
1181 <td>)</td>
1182 <td></td><td></td>
1183 </tr>
1184 </table>
1185 </div><div class="memdoc">
1186
1187 <p>Inserts an element at the beginning of the list. </p>
1188 <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>
1189 <dl class="params"><dt>Parameters</dt><dd>
1190 <table class="params">
1191 <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>
1192 <tr><td class="paramname">data</td><td>the data to insert </td></tr>
1193 </table>
1194 </dd>
1195 </dl>
1196 <dl class="section return"><dt>Returns</dt><dd>a pointer to the new list head </dd></dl>
1197
1198 </div>
1199 </div>
1200 <a id="a54654e6dc60e1c3de9e886c150e404ec"></a>
1201 <h2 class="memtitle"><span class="permalink"><a href="#a54654e6dc60e1c3de9e886c150e404ec">&#9670;&nbsp;</a></span>ucx_list_prepend_a()</h2>
1202
1203 <div class="memitem">
1204 <div class="memproto">
1205 <table class="memname">
1206 <tr>
1207 <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_prepend_a </td>
1208 <td>(</td>
1209 <td class="paramtype"><a class="el" href="structUcxAllocator.html">UcxAllocator</a> *&#160;</td>
1210 <td class="paramname"><em>allocator</em>, </td>
1211 </tr>
1212 <tr>
1213 <td class="paramkey"></td>
1214 <td></td>
1215 <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
1216 <td class="paramname"><em>list</em>, </td>
1217 </tr>
1218 <tr>
1219 <td class="paramkey"></td>
1220 <td></td>
1221 <td class="paramtype">void *&#160;</td>
1222 <td class="paramname"><em>data</em>&#160;</td>
1223 </tr>
1224 <tr>
1225 <td></td>
1226 <td>)</td>
1227 <td></td><td></td>
1228 </tr>
1229 </table>
1230 </div><div class="memdoc">
1231
1232 <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>
1233 <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>
1234 <dl class="params"><dt>Parameters</dt><dd>
1235 <table class="params">
1236 <tr><td class="paramname">allocator</td><td>the allocator to use </td></tr>
1237 <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>
1238 <tr><td class="paramname">data</td><td>the data to insert </td></tr>
1239 </table>
1240 </dd>
1241 </dl>
1242 <dl class="section return"><dt>Returns</dt><dd>a pointer to the new list head </dd></dl>
1243 <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>
1244
1245 </div>
1246 </div>
1247 <a id="a410cb3e8260037ba56c72d14b899b468"></a>
1248 <h2 class="memtitle"><span class="permalink"><a href="#a410cb3e8260037ba56c72d14b899b468">&#9670;&nbsp;</a></span>ucx_list_remove()</h2>
1249
1250 <div class="memitem">
1251 <div class="memproto">
1252 <table class="memname">
1253 <tr>
1254 <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_remove </td>
1255 <td>(</td>
1256 <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
1257 <td class="paramname"><em>list</em>, </td>
1258 </tr>
1259 <tr>
1260 <td class="paramkey"></td>
1261 <td></td>
1262 <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
1263 <td class="paramname"><em>element</em>&#160;</td>
1264 </tr>
1265 <tr>
1266 <td></td>
1267 <td>)</td>
1268 <td></td><td></td>
1269 </tr>
1270 </table>
1271 </div><div class="memdoc">
1272
1273 <p>Removes an element from the list. </p>
1274 <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>
1275 <dl class="params"><dt>Parameters</dt><dd>
1276 <table class="params">
1277 <tr><td class="paramname">list</td><td>the list from which the element shall be removed </td></tr>
1278 <tr><td class="paramname">element</td><td>the element to remove </td></tr>
1279 </table>
1280 </dd>
1281 </dl>
1282 <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>
1283
1284 </div>
1285 </div>
1286 <a id="aca687b7c4e7170175f447e549125aa52"></a>
1287 <h2 class="memtitle"><span class="permalink"><a href="#aca687b7c4e7170175f447e549125aa52">&#9670;&nbsp;</a></span>ucx_list_remove_a()</h2>
1288
1289 <div class="memitem">
1290 <div class="memproto">
1291 <table class="memname">
1292 <tr>
1293 <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_remove_a </td>
1294 <td>(</td>
1295 <td class="paramtype"><a class="el" href="structUcxAllocator.html">UcxAllocator</a> *&#160;</td>
1296 <td class="paramname"><em>allocator</em>, </td>
1297 </tr>
1298 <tr>
1299 <td class="paramkey"></td>
1300 <td></td>
1301 <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
1302 <td class="paramname"><em>list</em>, </td>
1303 </tr>
1304 <tr>
1305 <td class="paramkey"></td>
1306 <td></td>
1307 <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
1308 <td class="paramname"><em>element</em>&#160;</td>
1309 </tr>
1310 <tr>
1311 <td></td>
1312 <td>)</td>
1313 <td></td><td></td>
1314 </tr>
1315 </table>
1316 </div><div class="memdoc">
1317
1318 <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>
1319 <p>See <a class="el" href="list_8h.html#a410cb3e8260037ba56c72d14b899b468" title="Removes an element from the list. ">ucx_list_remove()</a> for details.</p>
1320 <dl class="params"><dt>Parameters</dt><dd>
1321 <table class="params">
1322 <tr><td class="paramname">allocator</td><td>the allocator to use </td></tr>
1323 <tr><td class="paramname">list</td><td>the list from which the element shall be removed </td></tr>
1324 <tr><td class="paramname">element</td><td>the element to remove </td></tr>
1325 </table>
1326 </dd>
1327 </dl>
1328 <dl class="section return"><dt>Returns</dt><dd>returns the updated list pointer or <code>NULL</code>, if the list </dd></dl>
1329 <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>
1330
1331 </div>
1332 </div>
1333 <a id="ae88001cc8ae40b946560f31434abed8f"></a>
1334 <h2 class="memtitle"><span class="permalink"><a href="#ae88001cc8ae40b946560f31434abed8f">&#9670;&nbsp;</a></span>ucx_list_size()</h2>
1335
1336 <div class="memitem">
1337 <div class="memproto">
1338 <table class="memname">
1339 <tr>
1340 <td class="memname">size_t ucx_list_size </td>
1341 <td>(</td>
1342 <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
1343 <td class="paramname"><em>list</em></td><td>)</td>
1344 <td></td>
1345 </tr>
1346 </table>
1347 </div><div class="memdoc">
1348
1349 <p>Returns the element count of the list. </p>
1350 <dl class="params"><dt>Parameters</dt><dd>
1351 <table class="params">
1352 <tr><td class="paramname">list</td><td>the list whose elements are counted </td></tr>
1353 </table>
1354 </dd>
1355 </dl>
1356 <dl class="section return"><dt>Returns</dt><dd>the element count </dd></dl>
1357
1358 </div>
1359 </div>
1360 <a id="ac74962d9bd7cfc9d3e2e09651469377b"></a>
1361 <h2 class="memtitle"><span class="permalink"><a href="#ac74962d9bd7cfc9d3e2e09651469377b">&#9670;&nbsp;</a></span>ucx_list_sort()</h2>
1362
1363 <div class="memitem">
1364 <div class="memproto">
1365 <table class="memname">
1366 <tr>
1367 <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_sort </td>
1368 <td>(</td>
1369 <td class="paramtype"><a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
1370 <td class="paramname"><em>list</em>, </td>
1371 </tr>
1372 <tr>
1373 <td class="paramkey"></td>
1374 <td></td>
1375 <td class="paramtype"><a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a>&#160;</td>
1376 <td class="paramname"><em>cmpfnc</em>, </td>
1377 </tr>
1378 <tr>
1379 <td class="paramkey"></td>
1380 <td></td>
1381 <td class="paramtype">void *&#160;</td>
1382 <td class="paramname"><em>data</em>&#160;</td>
1383 </tr>
1384 <tr>
1385 <td></td>
1386 <td>)</td>
1387 <td></td><td></td>
1388 </tr>
1389 </table>
1390 </div><div class="memdoc">
1391
1392 <p>Sorts a <a class="el" href="structUcxList.html" title="UCX list structure. ">UcxList</a> with natural merge sort. </p>
1393 <p>This function uses O(n) additional temporary memory for merge operations that is automatically freed after each merge.</p>
1394 <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>
1395 <dl class="params"><dt>Parameters</dt><dd>
1396 <table class="params">
1397 <tr><td class="paramname">list</td><td>the list to sort </td></tr>
1398 <tr><td class="paramname">cmpfnc</td><td>the function that shall be used to compare the element data </td></tr>
1399 <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>
1400 </table>
1401 </dd>
1402 </dl>
1403 <dl class="section return"><dt>Returns</dt><dd>the sorted list </dd></dl>
1404
1405 </div>
1406 </div>
1407 <a id="a94ecdb0cea1633ad7074f027fa8485fa"></a>
1408 <h2 class="memtitle"><span class="permalink"><a href="#a94ecdb0cea1633ad7074f027fa8485fa">&#9670;&nbsp;</a></span>ucx_list_union()</h2>
1409
1410 <div class="memitem">
1411 <div class="memproto">
1412 <table class="memname">
1413 <tr>
1414 <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_union </td>
1415 <td>(</td>
1416 <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
1417 <td class="paramname"><em>left</em>, </td>
1418 </tr>
1419 <tr>
1420 <td class="paramkey"></td>
1421 <td></td>
1422 <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
1423 <td class="paramname"><em>right</em>, </td>
1424 </tr>
1425 <tr>
1426 <td class="paramkey"></td>
1427 <td></td>
1428 <td class="paramtype"><a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a>&#160;</td>
1429 <td class="paramname"><em>cmpfnc</em>, </td>
1430 </tr>
1431 <tr>
1432 <td class="paramkey"></td>
1433 <td></td>
1434 <td class="paramtype">void *&#160;</td>
1435 <td class="paramname"><em>cmpdata</em>, </td>
1436 </tr>
1437 <tr>
1438 <td class="paramkey"></td>
1439 <td></td>
1440 <td class="paramtype"><a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a>&#160;</td>
1441 <td class="paramname"><em>cpfnc</em>, </td>
1442 </tr>
1443 <tr>
1444 <td class="paramkey"></td>
1445 <td></td>
1446 <td class="paramtype">void *&#160;</td>
1447 <td class="paramname"><em>cpdata</em>&#160;</td>
1448 </tr>
1449 <tr>
1450 <td></td>
1451 <td>)</td>
1452 <td></td><td></td>
1453 </tr>
1454 </table>
1455 </div><div class="memdoc">
1456
1457 <p>Returns the union of two lists. </p>
1458 <p>The union is a list of unique elements regarding cmpfnc obtained from both source lists.</p>
1459 <dl class="params"><dt>Parameters</dt><dd>
1460 <table class="params">
1461 <tr><td class="paramname">left</td><td>the left source list </td></tr>
1462 <tr><td class="paramname">right</td><td>the right source list </td></tr>
1463 <tr><td class="paramname">cmpfnc</td><td>a function to compare elements </td></tr>
1464 <tr><td class="paramname">cmpdata</td><td>additional data for the compare function </td></tr>
1465 <tr><td class="paramname">cpfnc</td><td>a function to copy the elements </td></tr>
1466 <tr><td class="paramname">cpdata</td><td>additional data for the copy function </td></tr>
1467 </table>
1468 </dd>
1469 </dl>
1470 <dl class="section return"><dt>Returns</dt><dd>a new list containing the union </dd></dl>
1471
1472 </div>
1473 </div>
1474 <a id="a65b4355536f4ebc4130211b46469f4c1"></a>
1475 <h2 class="memtitle"><span class="permalink"><a href="#a65b4355536f4ebc4130211b46469f4c1">&#9670;&nbsp;</a></span>ucx_list_union_a()</h2>
1476
1477 <div class="memitem">
1478 <div class="memproto">
1479 <table class="memname">
1480 <tr>
1481 <td class="memname"><a class="el" href="structUcxList.html">UcxList</a>* ucx_list_union_a </td>
1482 <td>(</td>
1483 <td class="paramtype"><a class="el" href="structUcxAllocator.html">UcxAllocator</a> *&#160;</td>
1484 <td class="paramname"><em>allocator</em>, </td>
1485 </tr>
1486 <tr>
1487 <td class="paramkey"></td>
1488 <td></td>
1489 <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
1490 <td class="paramname"><em>left</em>, </td>
1491 </tr>
1492 <tr>
1493 <td class="paramkey"></td>
1494 <td></td>
1495 <td class="paramtype">const <a class="el" href="structUcxList.html">UcxList</a> *&#160;</td>
1496 <td class="paramname"><em>right</em>, </td>
1497 </tr>
1498 <tr>
1499 <td class="paramkey"></td>
1500 <td></td>
1501 <td class="paramtype"><a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a>&#160;</td>
1502 <td class="paramname"><em>cmpfnc</em>, </td>
1503 </tr>
1504 <tr>
1505 <td class="paramkey"></td>
1506 <td></td>
1507 <td class="paramtype">void *&#160;</td>
1508 <td class="paramname"><em>cmpdata</em>, </td>
1509 </tr>
1510 <tr>
1511 <td class="paramkey"></td>
1512 <td></td>
1513 <td class="paramtype"><a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a>&#160;</td>
1514 <td class="paramname"><em>cpfnc</em>, </td>
1515 </tr>
1516 <tr>
1517 <td class="paramkey"></td>
1518 <td></td>
1519 <td class="paramtype">void *&#160;</td>
1520 <td class="paramname"><em>cpdata</em>&#160;</td>
1521 </tr>
1522 <tr>
1523 <td></td>
1524 <td>)</td>
1525 <td></td><td></td>
1526 </tr>
1527 </table>
1528 </div><div class="memdoc">
1529
1530 <p>Returns the union of two lists. </p>
1531 <p>The union is a list of unique elements regarding cmpfnc obtained from both source lists.</p>
1532 <dl class="params"><dt>Parameters</dt><dd>
1533 <table class="params">
1534 <tr><td class="paramname">allocator</td><td>allocates the new list elements </td></tr>
1535 <tr><td class="paramname">left</td><td>the left source list </td></tr>
1536 <tr><td class="paramname">right</td><td>the right source list </td></tr>
1537 <tr><td class="paramname">cmpfnc</td><td>a function to compare elements </td></tr>
1538 <tr><td class="paramname">cmpdata</td><td>additional data for the compare function </td></tr>
1539 <tr><td class="paramname">cpfnc</td><td>a function to copy the elements </td></tr>
1540 <tr><td class="paramname">cpdata</td><td>additional data for the copy function </td></tr>
1541 </table>
1542 </dd>
1543 </dl>
1544 <dl class="section return"><dt>Returns</dt><dd>a new list containing the union </dd></dl>
1545
1546 </div>
1547 </div>
1548 </div><!-- contents -->
1549 <!-- start footer part -->
1550 <hr class="footer"/><address class="footer"><small>
1551 Generated on Thu Dec 19 2019 19:58:24 for ucx by &#160;<a href="http://www.doxygen.org/index.html">
1552 <img class="footer" src="doxygen.png" alt="doxygen"/>
1553 </a> 1.8.13
1554 </small></address>
1555 </body>
1556 </html>

mercurial