123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.17"/>
- <meta name="viewport" content="width=device-width, initial-scale=1"/>
- <title>MQTT C Client Libraries Internals: LinkedList.c 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="pahologo.png"/></td>
- <td id="projectalign" style="padding-left: 0.5em;">
- <div id="projectname">MQTT C Client Libraries Internals
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.8.17 -->
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- var searchBox = new SearchBox("searchBox", "search",false,'Search');
- /* @license-end */
- </script>
- <script type="text/javascript" src="menudata.js"></script>
- <script type="text/javascript" src="menu.js"></script>
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- $(function() {
- initMenu('',true,false,'search.php','Search');
- $(document).ready(function() { init_search(); });
- });
- /* @license-end */</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><!-- top -->
- <div class="header">
- <div class="summary">
- <a href="#func-members">Functions</a> </div>
- <div class="headertitle">
- <div class="title">LinkedList.c File Reference</div> </div>
- </div><!--header-->
- <div class="contents">
- <p>functions which apply to linked list structures.
- <a href="#details">More...</a></p>
- <div class="textblock"><code>#include "LinkedList.h"</code><br />
- <code>#include <stdlib.h></code><br />
- <code>#include <string.h></code><br />
- <code>#include "Heap.h"</code><br />
- </div><div class="textblock"><div class="dynheader">
- Include dependency graph for LinkedList.c:</div>
- <div class="dyncontent">
- <div class="center"><img src="LinkedList_8c__incl.png" border="0" usemap="#LinkedList_8c" alt=""/></div>
- <map name="LinkedList_8c" id="LinkedList_8c">
- <area shape="rect" title="functions which apply to linked list structures." alt="" coords="34,5,127,32"/>
- <area shape="rect" title=" " alt="" coords="5,80,68,107"/>
- <area shape="rect" title=" " alt="" coords="93,80,157,107"/>
- </map>
- </div>
- </div><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
- Functions</h2></td></tr>
- <tr class="memitem:ab82181e0c1d96954f82dee67cee41296"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#ab82181e0c1d96954f82dee67cee41296">ListUnlink</a> (<a class="el" href="structList.html">List</a> *aList, void *content, int(*callback)(void *, void *), int freeContent)</td></tr>
- <tr class="memdesc:ab82181e0c1d96954f82dee67cee41296"><td class="mdescLeft"> </td><td class="mdescRight">Removes and optionally frees an element in a list by comparing the content. <a href="LinkedList_8c.html#ab82181e0c1d96954f82dee67cee41296">More...</a><br /></td></tr>
- <tr class="separator:ab82181e0c1d96954f82dee67cee41296"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aa254fb1eab8e30d0e03859b333dc22ed"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#aa254fb1eab8e30d0e03859b333dc22ed">ListZero</a> (<a class="el" href="structList.html">List</a> *newl)</td></tr>
- <tr class="memdesc:aa254fb1eab8e30d0e03859b333dc22ed"><td class="mdescLeft"> </td><td class="mdescRight">Sets a list structure to empty - all null values. <a href="LinkedList_8c.html#aa254fb1eab8e30d0e03859b333dc22ed">More...</a><br /></td></tr>
- <tr class="separator:aa254fb1eab8e30d0e03859b333dc22ed"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a27e2cccab9752618ead91eafbe2a9a46"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structList.html">List</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a27e2cccab9752618ead91eafbe2a9a46">ListInitialize</a> (void)</td></tr>
- <tr class="memdesc:a27e2cccab9752618ead91eafbe2a9a46"><td class="mdescLeft"> </td><td class="mdescRight">Allocates and initializes a new list structure. <a href="LinkedList_8c.html#a27e2cccab9752618ead91eafbe2a9a46">More...</a><br /></td></tr>
- <tr class="separator:a27e2cccab9752618ead91eafbe2a9a46"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a321a3598d6979c7af3f995b77ea2cec3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a321a3598d6979c7af3f995b77ea2cec3">ListAppendNoMalloc</a> (<a class="el" href="structList.html">List</a> *aList, void *content, <a class="el" href="structListElementStruct.html">ListElement</a> *newel, size_t size)</td></tr>
- <tr class="memdesc:a321a3598d6979c7af3f995b77ea2cec3"><td class="mdescLeft"> </td><td class="mdescRight">Append an already allocated ListElement and content to a list. <a href="LinkedList_8c.html#a321a3598d6979c7af3f995b77ea2cec3">More...</a><br /></td></tr>
- <tr class="separator:a321a3598d6979c7af3f995b77ea2cec3"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:abc7a28449893dfa775c2f709349968b4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structListElementStruct.html">ListElement</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#abc7a28449893dfa775c2f709349968b4">ListAppend</a> (<a class="el" href="structList.html">List</a> *aList, void *content, size_t size)</td></tr>
- <tr class="memdesc:abc7a28449893dfa775c2f709349968b4"><td class="mdescLeft"> </td><td class="mdescRight">Append an item to a list. <a href="LinkedList_8c.html#abc7a28449893dfa775c2f709349968b4">More...</a><br /></td></tr>
- <tr class="separator:abc7a28449893dfa775c2f709349968b4"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aabca387fa4b86475bc9e4da40c3977fc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structListElementStruct.html">ListElement</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#aabca387fa4b86475bc9e4da40c3977fc">ListInsert</a> (<a class="el" href="structList.html">List</a> *aList, void *content, size_t size, <a class="el" href="structListElementStruct.html">ListElement</a> *index)</td></tr>
- <tr class="memdesc:aabca387fa4b86475bc9e4da40c3977fc"><td class="mdescLeft"> </td><td class="mdescRight">Insert an item to a list at a specific position. <a href="LinkedList_8c.html#aabca387fa4b86475bc9e4da40c3977fc">More...</a><br /></td></tr>
- <tr class="separator:aabca387fa4b86475bc9e4da40c3977fc"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ad2879a10b723fb7c1f95c0ad0abdbc50"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structListElementStruct.html">ListElement</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#ad2879a10b723fb7c1f95c0ad0abdbc50">ListFind</a> (<a class="el" href="structList.html">List</a> *aList, void *content)</td></tr>
- <tr class="memdesc:ad2879a10b723fb7c1f95c0ad0abdbc50"><td class="mdescLeft"> </td><td class="mdescRight">Finds an element in a list by comparing the content pointers, rather than the contents. <a href="LinkedList_8c.html#ad2879a10b723fb7c1f95c0ad0abdbc50">More...</a><br /></td></tr>
- <tr class="separator:ad2879a10b723fb7c1f95c0ad0abdbc50"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:acad319e9ce896ff1fff30ddbeb06d22d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structListElementStruct.html">ListElement</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#acad319e9ce896ff1fff30ddbeb06d22d">ListFindItem</a> (<a class="el" href="structList.html">List</a> *aList, void *content, int(*callback)(void *, void *))</td></tr>
- <tr class="memdesc:acad319e9ce896ff1fff30ddbeb06d22d"><td class="mdescLeft"> </td><td class="mdescRight">Finds an element in a list by comparing the content or pointer to the content. <a href="LinkedList_8c.html#acad319e9ce896ff1fff30ddbeb06d22d">More...</a><br /></td></tr>
- <tr class="separator:acad319e9ce896ff1fff30ddbeb06d22d"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ab2bcc1897abf1d98490ea81c474dba52"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#ab2bcc1897abf1d98490ea81c474dba52">ListDetach</a> (<a class="el" href="structList.html">List</a> *aList, void *content)</td></tr>
- <tr class="memdesc:ab2bcc1897abf1d98490ea81c474dba52"><td class="mdescLeft"> </td><td class="mdescRight">Removes but does not free an item in a list by comparing the pointer to the content. <a href="LinkedList_8c.html#ab2bcc1897abf1d98490ea81c474dba52">More...</a><br /></td></tr>
- <tr class="separator:ab2bcc1897abf1d98490ea81c474dba52"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a8430370b2b15c56ec95bb8e7e36753a5"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a8430370b2b15c56ec95bb8e7e36753a5">ListRemove</a> (<a class="el" href="structList.html">List</a> *aList, void *content)</td></tr>
- <tr class="memdesc:a8430370b2b15c56ec95bb8e7e36753a5"><td class="mdescLeft"> </td><td class="mdescRight">Removes and frees an item in a list by comparing the pointer to the content. <a href="LinkedList_8c.html#a8430370b2b15c56ec95bb8e7e36753a5">More...</a><br /></td></tr>
- <tr class="separator:a8430370b2b15c56ec95bb8e7e36753a5"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ab0f3597d344e09ad6636c8bc72029337"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#ab0f3597d344e09ad6636c8bc72029337">ListDetachHead</a> (<a class="el" href="structList.html">List</a> *aList)</td></tr>
- <tr class="memdesc:ab0f3597d344e09ad6636c8bc72029337"><td class="mdescLeft"> </td><td class="mdescRight">Removes and frees an the first item in a list. <a href="LinkedList_8c.html#ab0f3597d344e09ad6636c8bc72029337">More...</a><br /></td></tr>
- <tr class="separator:ab0f3597d344e09ad6636c8bc72029337"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a5ee7cd1d29fd9299231d40c011174fcd"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a5ee7cd1d29fd9299231d40c011174fcd">ListRemoveHead</a> (<a class="el" href="structList.html">List</a> *aList)</td></tr>
- <tr class="memdesc:a5ee7cd1d29fd9299231d40c011174fcd"><td class="mdescLeft"> </td><td class="mdescRight">Removes and frees an the first item in a list. <a href="LinkedList_8c.html#a5ee7cd1d29fd9299231d40c011174fcd">More...</a><br /></td></tr>
- <tr class="separator:a5ee7cd1d29fd9299231d40c011174fcd"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a84b0ad14e7cebcd7b9ebab89a8d48321"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a84b0ad14e7cebcd7b9ebab89a8d48321">ListPopTail</a> (<a class="el" href="structList.html">List</a> *aList)</td></tr>
- <tr class="memdesc:a84b0ad14e7cebcd7b9ebab89a8d48321"><td class="mdescLeft"> </td><td class="mdescRight">Removes but does not free the last item in a list. <a href="LinkedList_8c.html#a84b0ad14e7cebcd7b9ebab89a8d48321">More...</a><br /></td></tr>
- <tr class="separator:a84b0ad14e7cebcd7b9ebab89a8d48321"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a9ed745f7ba486d16d009e86433fece7b"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a9ed745f7ba486d16d009e86433fece7b">ListDetachItem</a> (<a class="el" href="structList.html">List</a> *aList, void *content, int(*callback)(void *, void *))</td></tr>
- <tr class="memdesc:a9ed745f7ba486d16d009e86433fece7b"><td class="mdescLeft"> </td><td class="mdescRight">Removes but does not free an element in a list by comparing the content. <a href="LinkedList_8c.html#a9ed745f7ba486d16d009e86433fece7b">More...</a><br /></td></tr>
- <tr class="separator:a9ed745f7ba486d16d009e86433fece7b"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a4bb7c34fe9a5832d65f530091e0fad0d"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a4bb7c34fe9a5832d65f530091e0fad0d">ListRemoveItem</a> (<a class="el" href="structList.html">List</a> *aList, void *content, int(*callback)(void *, void *))</td></tr>
- <tr class="memdesc:a4bb7c34fe9a5832d65f530091e0fad0d"><td class="mdescLeft"> </td><td class="mdescRight">Removes and frees an element in a list by comparing the content. <a href="LinkedList_8c.html#a4bb7c34fe9a5832d65f530091e0fad0d">More...</a><br /></td></tr>
- <tr class="separator:a4bb7c34fe9a5832d65f530091e0fad0d"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a3cf8578dba23f97dd0411e85fe3b7ff2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a3cf8578dba23f97dd0411e85fe3b7ff2">ListEmpty</a> (<a class="el" href="structList.html">List</a> *aList)</td></tr>
- <tr class="memdesc:a3cf8578dba23f97dd0411e85fe3b7ff2"><td class="mdescLeft"> </td><td class="mdescRight">Removes and frees all items in a list, leaving the list ready for new items. <a href="LinkedList_8c.html#a3cf8578dba23f97dd0411e85fe3b7ff2">More...</a><br /></td></tr>
- <tr class="separator:a3cf8578dba23f97dd0411e85fe3b7ff2"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a276950531b3f54e0dda27d597572c192"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a276950531b3f54e0dda27d597572c192">ListFree</a> (<a class="el" href="structList.html">List</a> *aList)</td></tr>
- <tr class="memdesc:a276950531b3f54e0dda27d597572c192"><td class="mdescLeft"> </td><td class="mdescRight">Removes and frees all items in a list, and frees the list itself. <a href="LinkedList_8c.html#a276950531b3f54e0dda27d597572c192">More...</a><br /></td></tr>
- <tr class="separator:a276950531b3f54e0dda27d597572c192"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a8b3e61bc873a90ad2ea43a15e6c001f4"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a8b3e61bc873a90ad2ea43a15e6c001f4">ListFreeNoContent</a> (<a class="el" href="structList.html">List</a> *aList)</td></tr>
- <tr class="memdesc:a8b3e61bc873a90ad2ea43a15e6c001f4"><td class="mdescLeft"> </td><td class="mdescRight">Removes and but does not free all items in a list, and frees the list itself. <a href="LinkedList_8c.html#a8b3e61bc873a90ad2ea43a15e6c001f4">More...</a><br /></td></tr>
- <tr class="separator:a8b3e61bc873a90ad2ea43a15e6c001f4"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a7c6fba7f4b569c69829676bed2852ee9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structListElementStruct.html">ListElement</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9">ListNextElement</a> (<a class="el" href="structList.html">List</a> *aList, <a class="el" href="structListElementStruct.html">ListElement</a> **pos)</td></tr>
- <tr class="memdesc:a7c6fba7f4b569c69829676bed2852ee9"><td class="mdescLeft"> </td><td class="mdescRight">Forward iteration through a list. <a href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9">More...</a><br /></td></tr>
- <tr class="separator:a7c6fba7f4b569c69829676bed2852ee9"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a371f4a5021e6aa639bab6ab1457fc1d2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structListElementStruct.html">ListElement</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a371f4a5021e6aa639bab6ab1457fc1d2">ListPrevElement</a> (<a class="el" href="structList.html">List</a> *aList, <a class="el" href="structListElementStruct.html">ListElement</a> **pos)</td></tr>
- <tr class="memdesc:a371f4a5021e6aa639bab6ab1457fc1d2"><td class="mdescLeft"> </td><td class="mdescRight">Backward iteration through a list. <a href="LinkedList_8c.html#a371f4a5021e6aa639bab6ab1457fc1d2">More...</a><br /></td></tr>
- <tr class="separator:a371f4a5021e6aa639bab6ab1457fc1d2"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a1738915a6d6f10022e9ee1481c0ae452"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a1738915a6d6f10022e9ee1481c0ae452">intcompare</a> (void *a, void *b)</td></tr>
- <tr class="memdesc:a1738915a6d6f10022e9ee1481c0ae452"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="structList.html" title="Structure to hold all data for one list.">List</a> callback function for comparing integers. <a href="LinkedList_8c.html#a1738915a6d6f10022e9ee1481c0ae452">More...</a><br /></td></tr>
- <tr class="separator:a1738915a6d6f10022e9ee1481c0ae452"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a936806c4b6f6c10d91cc128b63ab110c"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="LinkedList_8c.html#a936806c4b6f6c10d91cc128b63ab110c">stringcompare</a> (void *a, void *b)</td></tr>
- <tr class="memdesc:a936806c4b6f6c10d91cc128b63ab110c"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="structList.html" title="Structure to hold all data for one list.">List</a> callback function for comparing C strings. <a href="LinkedList_8c.html#a936806c4b6f6c10d91cc128b63ab110c">More...</a><br /></td></tr>
- <tr class="separator:a936806c4b6f6c10d91cc128b63ab110c"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
- <div class="textblock"><p>functions which apply to linked list structures. </p>
- <p>These linked lists can hold data of any sort, pointed to by the content pointer of the ListElement structure. ListElements hold the points to the next and previous items in the list. </p>
- </div><h2 class="groupheader">Function Documentation</h2>
- <a id="a1738915a6d6f10022e9ee1481c0ae452"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a1738915a6d6f10022e9ee1481c0ae452">◆ </a></span>intcompare()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int intcompare </td>
- <td>(</td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>a</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>b</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p><a class="el" href="structList.html" title="Structure to hold all data for one list.">List</a> callback function for comparing integers. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">a</td><td>first integer value </td></tr>
- <tr><td class="paramname">b</td><td>second integer value </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>boolean indicating whether a and b are equal </dd></dl>
- </div>
- </div>
- <a id="abc7a28449893dfa775c2f709349968b4"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#abc7a28449893dfa775c2f709349968b4">◆ </a></span>ListAppend()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="structListElementStruct.html">ListElement</a>* ListAppend </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structList.html">List</a> * </td>
- <td class="paramname"><em>aList</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>content</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">size_t </td>
- <td class="paramname"><em>size</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Append an item to a list. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">aList</td><td>the list to which the item is to be added </td></tr>
- <tr><td class="paramname">content</td><td>the list item content itself </td></tr>
- <tr><td class="paramname">size</td><td>the size of the element </td></tr>
- </table>
- </dd>
- </dl>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="LinkedList_8c_abc7a28449893dfa775c2f709349968b4_cgraph.png" border="0" usemap="#LinkedList_8c_abc7a28449893dfa775c2f709349968b4_cgraph" alt=""/></div>
- <map name="LinkedList_8c_abc7a28449893dfa775c2f709349968b4_cgraph" id="LinkedList_8c_abc7a28449893dfa775c2f709349968b4_cgraph">
- <area shape="rect" title="Append an item to a list." alt="" coords="5,5,93,32"/>
- <area shape="rect" href="LinkedList_8c.html#a321a3598d6979c7af3f995b77ea2cec3" title="Append an already allocated ListElement and content to a list." alt="" coords="141,5,284,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="a321a3598d6979c7af3f995b77ea2cec3"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a321a3598d6979c7af3f995b77ea2cec3">◆ </a></span>ListAppendNoMalloc()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void ListAppendNoMalloc </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structList.html">List</a> * </td>
- <td class="paramname"><em>aList</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>content</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="structListElementStruct.html">ListElement</a> * </td>
- <td class="paramname"><em>newel</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">size_t </td>
- <td class="paramname"><em>size</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Append an already allocated ListElement and content to a list. </p>
- <p>Can be used to move an item from one list to another. </p><dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">aList</td><td>the list to which the item is to be added </td></tr>
- <tr><td class="paramname">content</td><td>the list item content itself </td></tr>
- <tr><td class="paramname">newel</td><td>the ListElement to be used in adding the new item </td></tr>
- <tr><td class="paramname">size</td><td>the size of the element </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a id="ab2bcc1897abf1d98490ea81c474dba52"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#ab2bcc1897abf1d98490ea81c474dba52">◆ </a></span>ListDetach()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int ListDetach </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structList.html">List</a> * </td>
- <td class="paramname"><em>aList</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>content</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Removes but does not free an item in a list by comparing the pointer to the content. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">aList</td><td>the list in which the search is to be conducted </td></tr>
- <tr><td class="paramname">content</td><td>pointer to the content to look for </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>1=item removed, 0=item not removed </dd></dl>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="LinkedList_8c_ab2bcc1897abf1d98490ea81c474dba52_cgraph.png" border="0" usemap="#LinkedList_8c_ab2bcc1897abf1d98490ea81c474dba52_cgraph" alt=""/></div>
- <map name="LinkedList_8c_ab2bcc1897abf1d98490ea81c474dba52_cgraph" id="LinkedList_8c_ab2bcc1897abf1d98490ea81c474dba52_cgraph">
- <area shape="rect" title="Removes but does not free an item in a list by comparing the pointer to the content." alt="" coords="5,5,91,32"/>
- <area shape="rect" href="LinkedList_8c.html#ab82181e0c1d96954f82dee67cee41296" title="Removes and optionally frees an element in a list by comparing the content." alt="" coords="139,5,220,32"/>
- <area shape="rect" href="LinkedList_8c.html#acad319e9ce896ff1fff30ddbeb06d22d" title="Finds an element in a list by comparing the content or pointer to the content." alt="" coords="268,5,363,32"/>
- <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="411,5,529,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="ab0f3597d344e09ad6636c8bc72029337"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#ab0f3597d344e09ad6636c8bc72029337">◆ </a></span>ListDetachHead()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void* ListDetachHead </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structList.html">List</a> * </td>
- <td class="paramname"><em>aList</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Removes and frees an the first item in a list. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">aList</td><td>the list from which the item is to be removed </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>1=item removed, 0=item not removed </dd></dl>
- </div>
- </div>
- <a id="a9ed745f7ba486d16d009e86433fece7b"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a9ed745f7ba486d16d009e86433fece7b">◆ </a></span>ListDetachItem()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int ListDetachItem </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structList.html">List</a> * </td>
- <td class="paramname"><em>aList</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>content</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int(*)(void *, void *) </td>
- <td class="paramname"><em>callback</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Removes but does not free an element in a list by comparing the content. </p>
- <p>A callback function is used to define the method of comparison for each element. </p><dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">aList</td><td>the list in which the search is to be conducted </td></tr>
- <tr><td class="paramname">content</td><td>pointer to the content to look for </td></tr>
- <tr><td class="paramname">callback</td><td>pointer to a function which compares each element </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>1=item removed, 0=item not removed </dd></dl>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="LinkedList_8c_a9ed745f7ba486d16d009e86433fece7b_cgraph.png" border="0" usemap="#LinkedList_8c_a9ed745f7ba486d16d009e86433fece7b_cgraph" alt=""/></div>
- <map name="LinkedList_8c_a9ed745f7ba486d16d009e86433fece7b_cgraph" id="LinkedList_8c_a9ed745f7ba486d16d009e86433fece7b_cgraph">
- <area shape="rect" title="Removes but does not free an element in a list by comparing the content." alt="" coords="5,5,116,32"/>
- <area shape="rect" href="LinkedList_8c.html#ab82181e0c1d96954f82dee67cee41296" title="Removes and optionally frees an element in a list by comparing the content." alt="" coords="164,5,245,32"/>
- <area shape="rect" href="LinkedList_8c.html#acad319e9ce896ff1fff30ddbeb06d22d" title="Finds an element in a list by comparing the content or pointer to the content." alt="" coords="293,5,388,32"/>
- <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="436,5,555,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="a3cf8578dba23f97dd0411e85fe3b7ff2"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a3cf8578dba23f97dd0411e85fe3b7ff2">◆ </a></span>ListEmpty()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void ListEmpty </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structList.html">List</a> * </td>
- <td class="paramname"><em>aList</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Removes and frees all items in a list, leaving the list ready for new items. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">aList</td><td>the list to which the operation is to be applied </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a id="ad2879a10b723fb7c1f95c0ad0abdbc50"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#ad2879a10b723fb7c1f95c0ad0abdbc50">◆ </a></span>ListFind()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="structListElementStruct.html">ListElement</a>* ListFind </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structList.html">List</a> * </td>
- <td class="paramname"><em>aList</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>content</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Finds an element in a list by comparing the content pointers, rather than the contents. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">aList</td><td>the list in which the search is to be conducted </td></tr>
- <tr><td class="paramname">content</td><td>pointer to the list item content itself </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>the list item found, or NULL </dd></dl>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="LinkedList_8c_ad2879a10b723fb7c1f95c0ad0abdbc50_cgraph.png" border="0" usemap="#LinkedList_8c_ad2879a10b723fb7c1f95c0ad0abdbc50_cgraph" alt=""/></div>
- <map name="LinkedList_8c_ad2879a10b723fb7c1f95c0ad0abdbc50_cgraph" id="LinkedList_8c_ad2879a10b723fb7c1f95c0ad0abdbc50_cgraph">
- <area shape="rect" title="Finds an element in a list by comparing the content pointers, rather than the contents." alt="" coords="5,5,75,32"/>
- <area shape="rect" href="LinkedList_8c.html#acad319e9ce896ff1fff30ddbeb06d22d" title="Finds an element in a list by comparing the content or pointer to the content." alt="" coords="123,5,217,32"/>
- <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="265,5,384,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="acad319e9ce896ff1fff30ddbeb06d22d"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#acad319e9ce896ff1fff30ddbeb06d22d">◆ </a></span>ListFindItem()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="structListElementStruct.html">ListElement</a>* ListFindItem </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structList.html">List</a> * </td>
- <td class="paramname"><em>aList</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>content</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int(*)(void *, void *) </td>
- <td class="paramname"><em>callback</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Finds an element in a list by comparing the content or pointer to the content. </p>
- <p>A callback function is used to define the method of comparison for each element. </p><dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">aList</td><td>the list in which the search is to be conducted </td></tr>
- <tr><td class="paramname">content</td><td>pointer to the content to look for </td></tr>
- <tr><td class="paramname">callback</td><td>pointer to a function which compares each element (NULL means compare by content pointer) </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>the list element found, or NULL </dd></dl>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="LinkedList_8c_acad319e9ce896ff1fff30ddbeb06d22d_cgraph.png" border="0" usemap="#LinkedList_8c_acad319e9ce896ff1fff30ddbeb06d22d_cgraph" alt=""/></div>
- <map name="LinkedList_8c_acad319e9ce896ff1fff30ddbeb06d22d_cgraph" id="LinkedList_8c_acad319e9ce896ff1fff30ddbeb06d22d_cgraph">
- <area shape="rect" title="Finds an element in a list by comparing the content or pointer to the content." alt="" coords="5,5,100,32"/>
- <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="148,5,267,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="a276950531b3f54e0dda27d597572c192"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a276950531b3f54e0dda27d597572c192">◆ </a></span>ListFree()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void ListFree </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structList.html">List</a> * </td>
- <td class="paramname"><em>aList</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Removes and frees all items in a list, and frees the list itself. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">aList</td><td>the list to which the operation is to be applied </td></tr>
- </table>
- </dd>
- </dl>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="LinkedList_8c_a276950531b3f54e0dda27d597572c192_cgraph.png" border="0" usemap="#LinkedList_8c_a276950531b3f54e0dda27d597572c192_cgraph" alt=""/></div>
- <map name="LinkedList_8c_a276950531b3f54e0dda27d597572c192_cgraph" id="LinkedList_8c_a276950531b3f54e0dda27d597572c192_cgraph">
- <area shape="rect" title="Removes and frees all items in a list, and frees the list itself." alt="" coords="5,5,76,32"/>
- <area shape="rect" href="LinkedList_8c.html#a3cf8578dba23f97dd0411e85fe3b7ff2" title="Removes and frees all items in a list, leaving the list ready for new items." alt="" coords="124,5,204,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="a8b3e61bc873a90ad2ea43a15e6c001f4"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a8b3e61bc873a90ad2ea43a15e6c001f4">◆ </a></span>ListFreeNoContent()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void ListFreeNoContent </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structList.html">List</a> * </td>
- <td class="paramname"><em>aList</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Removes and but does not free all items in a list, and frees the list itself. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">aList</td><td>the list to which the operation is to be applied </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a id="a27e2cccab9752618ead91eafbe2a9a46"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a27e2cccab9752618ead91eafbe2a9a46">◆ </a></span>ListInitialize()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="structList.html">List</a>* ListInitialize </td>
- <td>(</td>
- <td class="paramtype">void </td>
- <td class="paramname"></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Allocates and initializes a new list structure. </p>
- <dl class="section return"><dt>Returns</dt><dd>a pointer to the new list structure </dd></dl>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="LinkedList_8c_a27e2cccab9752618ead91eafbe2a9a46_cgraph.png" border="0" usemap="#LinkedList_8c_a27e2cccab9752618ead91eafbe2a9a46_cgraph" alt=""/></div>
- <map name="LinkedList_8c_a27e2cccab9752618ead91eafbe2a9a46_cgraph" id="LinkedList_8c_a27e2cccab9752618ead91eafbe2a9a46_cgraph">
- <area shape="rect" title="Allocates and initializes a new list structure." alt="" coords="5,5,96,32"/>
- <area shape="rect" href="LinkedList_8c.html#aa254fb1eab8e30d0e03859b333dc22ed" title="Sets a list structure to empty - all null values." alt="" coords="144,5,215,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="aabca387fa4b86475bc9e4da40c3977fc"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#aabca387fa4b86475bc9e4da40c3977fc">◆ </a></span>ListInsert()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="structListElementStruct.html">ListElement</a>* ListInsert </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structList.html">List</a> * </td>
- <td class="paramname"><em>aList</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>content</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">size_t </td>
- <td class="paramname"><em>size</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="structListElementStruct.html">ListElement</a> * </td>
- <td class="paramname"><em>index</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Insert an item to a list at a specific position. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">aList</td><td>the list to which the item is to be added </td></tr>
- <tr><td class="paramname">content</td><td>the list item content itself </td></tr>
- <tr><td class="paramname">size</td><td>the size of the element </td></tr>
- <tr><td class="paramname">index</td><td>the position in the list. If NULL, this function is equivalent to ListAppend. </td></tr>
- </table>
- </dd>
- </dl>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="LinkedList_8c_aabca387fa4b86475bc9e4da40c3977fc_cgraph.png" border="0" usemap="#LinkedList_8c_aabca387fa4b86475bc9e4da40c3977fc_cgraph" alt=""/></div>
- <map name="LinkedList_8c_aabca387fa4b86475bc9e4da40c3977fc_cgraph" id="LinkedList_8c_aabca387fa4b86475bc9e4da40c3977fc_cgraph">
- <area shape="rect" title="Insert an item to a list at a specific position." alt="" coords="5,5,83,32"/>
- <area shape="rect" href="LinkedList_8c.html#a321a3598d6979c7af3f995b77ea2cec3" title="Append an already allocated ListElement and content to a list." alt="" coords="131,5,273,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="a7c6fba7f4b569c69829676bed2852ee9"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a7c6fba7f4b569c69829676bed2852ee9">◆ </a></span>ListNextElement()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="structListElementStruct.html">ListElement</a>* ListNextElement </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structList.html">List</a> * </td>
- <td class="paramname"><em>aList</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="structListElementStruct.html">ListElement</a> ** </td>
- <td class="paramname"><em>pos</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Forward iteration through a list. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">aList</td><td>the list to which the operation is to be applied </td></tr>
- <tr><td class="paramname">pos</td><td>pointer to the current position in the list. NULL means start from the beginning of the list This is updated on return to the same value as that returned from this function </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>pointer to the current list element </dd></dl>
- </div>
- </div>
- <a id="a84b0ad14e7cebcd7b9ebab89a8d48321"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a84b0ad14e7cebcd7b9ebab89a8d48321">◆ </a></span>ListPopTail()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void* ListPopTail </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structList.html">List</a> * </td>
- <td class="paramname"><em>aList</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Removes but does not free the last item in a list. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">aList</td><td>the list from which the item is to be removed </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>the last item removed (or NULL if none was) </dd></dl>
- </div>
- </div>
- <a id="a371f4a5021e6aa639bab6ab1457fc1d2"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a371f4a5021e6aa639bab6ab1457fc1d2">◆ </a></span>ListPrevElement()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname"><a class="el" href="structListElementStruct.html">ListElement</a>* ListPrevElement </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structList.html">List</a> * </td>
- <td class="paramname"><em>aList</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"><a class="el" href="structListElementStruct.html">ListElement</a> ** </td>
- <td class="paramname"><em>pos</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Backward iteration through a list. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">aList</td><td>the list to which the operation is to be applied </td></tr>
- <tr><td class="paramname">pos</td><td>pointer to the current position in the list. NULL means start from the end of the list This is updated on return to the same value as that returned from this function </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>pointer to the current list element </dd></dl>
- </div>
- </div>
- <a id="a8430370b2b15c56ec95bb8e7e36753a5"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a8430370b2b15c56ec95bb8e7e36753a5">◆ </a></span>ListRemove()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int ListRemove </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structList.html">List</a> * </td>
- <td class="paramname"><em>aList</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>content</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Removes and frees an item in a list by comparing the pointer to the content. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">aList</td><td>the list from which the item is to be removed </td></tr>
- <tr><td class="paramname">content</td><td>pointer to the content to look for </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>1=item removed, 0=item not removed </dd></dl>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="LinkedList_8c_a8430370b2b15c56ec95bb8e7e36753a5_cgraph.png" border="0" usemap="#LinkedList_8c_a8430370b2b15c56ec95bb8e7e36753a5_cgraph" alt=""/></div>
- <map name="LinkedList_8c_a8430370b2b15c56ec95bb8e7e36753a5_cgraph" id="LinkedList_8c_a8430370b2b15c56ec95bb8e7e36753a5_cgraph">
- <area shape="rect" title="Removes and frees an item in a list by comparing the pointer to the content." alt="" coords="5,5,97,32"/>
- <area shape="rect" href="LinkedList_8c.html#ab82181e0c1d96954f82dee67cee41296" title="Removes and optionally frees an element in a list by comparing the content." alt="" coords="145,5,227,32"/>
- <area shape="rect" href="LinkedList_8c.html#acad319e9ce896ff1fff30ddbeb06d22d" title="Finds an element in a list by comparing the content or pointer to the content." alt="" coords="275,5,369,32"/>
- <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="417,5,536,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="a5ee7cd1d29fd9299231d40c011174fcd"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a5ee7cd1d29fd9299231d40c011174fcd">◆ </a></span>ListRemoveHead()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int ListRemoveHead </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structList.html">List</a> * </td>
- <td class="paramname"><em>aList</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Removes and frees an the first item in a list. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">aList</td><td>the list from which the item is to be removed </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>1=item removed, 0=item not removed </dd></dl>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="LinkedList_8c_a5ee7cd1d29fd9299231d40c011174fcd_cgraph.png" border="0" usemap="#LinkedList_8c_a5ee7cd1d29fd9299231d40c011174fcd_cgraph" alt=""/></div>
- <map name="LinkedList_8c_a5ee7cd1d29fd9299231d40c011174fcd_cgraph" id="LinkedList_8c_a5ee7cd1d29fd9299231d40c011174fcd_cgraph">
- <area shape="rect" title="Removes and frees an the first item in a list." alt="" coords="5,5,128,32"/>
- <area shape="rect" href="LinkedList_8c.html#ab0f3597d344e09ad6636c8bc72029337" title="Removes and frees an the first item in a list." alt="" coords="176,5,292,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="a4bb7c34fe9a5832d65f530091e0fad0d"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a4bb7c34fe9a5832d65f530091e0fad0d">◆ </a></span>ListRemoveItem()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int ListRemoveItem </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structList.html">List</a> * </td>
- <td class="paramname"><em>aList</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>content</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int(*)(void *, void *) </td>
- <td class="paramname"><em>callback</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Removes and frees an element in a list by comparing the content. </p>
- <p>A callback function is used to define the method of comparison for each element </p><dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">aList</td><td>the list in which the search is to be conducted </td></tr>
- <tr><td class="paramname">content</td><td>pointer to the content to look for </td></tr>
- <tr><td class="paramname">callback</td><td>pointer to a function which compares each element </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>1=item removed, 0=item not removed </dd></dl>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="LinkedList_8c_a4bb7c34fe9a5832d65f530091e0fad0d_cgraph.png" border="0" usemap="#LinkedList_8c_a4bb7c34fe9a5832d65f530091e0fad0d_cgraph" alt=""/></div>
- <map name="LinkedList_8c_a4bb7c34fe9a5832d65f530091e0fad0d_cgraph" id="LinkedList_8c_a4bb7c34fe9a5832d65f530091e0fad0d_cgraph">
- <area shape="rect" title="Removes and frees an element in a list by comparing the content." alt="" coords="5,5,124,32"/>
- <area shape="rect" href="LinkedList_8c.html#ab82181e0c1d96954f82dee67cee41296" title="Removes and optionally frees an element in a list by comparing the content." alt="" coords="172,5,253,32"/>
- <area shape="rect" href="LinkedList_8c.html#acad319e9ce896ff1fff30ddbeb06d22d" title="Finds an element in a list by comparing the content or pointer to the content." alt="" coords="301,5,396,32"/>
- <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="444,5,563,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="ab82181e0c1d96954f82dee67cee41296"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#ab82181e0c1d96954f82dee67cee41296">◆ </a></span>ListUnlink()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">static int ListUnlink </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structList.html">List</a> * </td>
- <td class="paramname"><em>aList</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>content</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int(*)(void *, void *) </td>
- <td class="paramname"><em>callback</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>freeContent</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">static</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Removes and optionally frees an element in a list by comparing the content. </p>
- <p>A callback function is used to define the method of comparison for each element. </p><dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">aList</td><td>the list in which the search is to be conducted </td></tr>
- <tr><td class="paramname">content</td><td>pointer to the content to look for </td></tr>
- <tr><td class="paramname">callback</td><td>pointer to a function which compares each element </td></tr>
- <tr><td class="paramname">freeContent</td><td>boolean value to indicate whether the item found is to be freed </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>1=item removed, 0=item not removed </dd></dl>
- <div class="dynheader">
- Here is the call graph for this function:</div>
- <div class="dyncontent">
- <div class="center"><img src="LinkedList_8c_ab82181e0c1d96954f82dee67cee41296_cgraph.png" border="0" usemap="#LinkedList_8c_ab82181e0c1d96954f82dee67cee41296_cgraph" alt=""/></div>
- <map name="LinkedList_8c_ab82181e0c1d96954f82dee67cee41296_cgraph" id="LinkedList_8c_ab82181e0c1d96954f82dee67cee41296_cgraph">
- <area shape="rect" title="Removes and optionally frees an element in a list by comparing the content." alt="" coords="5,5,87,32"/>
- <area shape="rect" href="LinkedList_8c.html#acad319e9ce896ff1fff30ddbeb06d22d" title="Finds an element in a list by comparing the content or pointer to the content." alt="" coords="135,5,229,32"/>
- <area shape="rect" href="LinkedList_8c.html#a7c6fba7f4b569c69829676bed2852ee9" title="Forward iteration through a list." alt="" coords="277,5,396,32"/>
- </map>
- </div>
- </div>
- </div>
- <a id="aa254fb1eab8e30d0e03859b333dc22ed"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#aa254fb1eab8e30d0e03859b333dc22ed">◆ </a></span>ListZero()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void ListZero </td>
- <td>(</td>
- <td class="paramtype"><a class="el" href="structList.html">List</a> * </td>
- <td class="paramname"><em>newl</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Sets a list structure to empty - all null values. </p>
- <p>Does not remove any items from the list. </p><dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">newl</td><td>a pointer to the list structure to be initialized </td></tr>
- </table>
- </dd>
- </dl>
- </div>
- </div>
- <a id="a936806c4b6f6c10d91cc128b63ab110c"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a936806c4b6f6c10d91cc128b63ab110c">◆ </a></span>stringcompare()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int stringcompare </td>
- <td>(</td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>a</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">void * </td>
- <td class="paramname"><em>b</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p><a class="el" href="structList.html" title="Structure to hold all data for one list.">List</a> callback function for comparing C strings. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">a</td><td>first integer value </td></tr>
- <tr><td class="paramname">b</td><td>second integer value </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>boolean indicating whether a and b are equal </dd></dl>
- </div>
- </div>
- </div><!-- contents -->
- <!-- start footer part -->
- <hr class="footer"/><address class="footer"><small>
- Generated on Thu Sep 29 2022 11:34:46 for MQTT C Client Libraries Internals by  <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/>
- </a> 1.8.17
- </small></address>
- </body>
- </html>
|