mirror of
https://github.com/ChronosX88/netsukuku.git
synced 2024-11-22 18:22:18 +00:00
244 lines
29 KiB
HTML
244 lines
29 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||
|
<meta name="generator" content="Doxygen 1.8.6"/>
|
||
|
<title>The Netsukuku Project: src/misc.h Source File</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="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="../../resize.js"></script>
|
||
|
<script type="text/javascript" src="../../navtree.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(initResizable);
|
||
|
$(window).load(resizeHeight);
|
||
|
</script>
|
||
|
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="../../search/search.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||
|
</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 style="padding-left: 0.5em;">
|
||
|
<div id="projectname">The Netsukuku Project
|
||
|
 <span id="projectnumber">0.0.9</span>
|
||
|
</div>
|
||
|
<div id="projectbrief">An Alternative routing method</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
<!-- end header part -->
|
||
|
<!-- Generated by Doxygen 1.8.6 -->
|
||
|
<script type="text/javascript">
|
||
|
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
|
||
|
</script>
|
||
|
<div id="navrow1" class="tabs">
|
||
|
<ul class="tablist">
|
||
|
<li><a href="../../index.html"><span>Main Page</span></a></li>
|
||
|
<li><a href="../../annotated.html"><span>Data Structures</span></a></li>
|
||
|
<li class="current"><a href="../../files.html"><span>Files</span></a></li>
|
||
|
<li>
|
||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||
|
<span class="left">
|
||
|
<img id="MSearchSelect" src="../../search/mag_sel.png"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
alt=""/>
|
||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||
|
</span><span class="right">
|
||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
|
||
|
</span>
|
||
|
</div>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div id="navrow2" class="tabs2">
|
||
|
<ul class="tablist">
|
||
|
<li><a href="../../files.html"><span>File List</span></a></li>
|
||
|
<li><a href="../../globals.html"><span>Globals</span></a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div><!-- top -->
|
||
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||
|
<div id="nav-tree">
|
||
|
<div id="nav-tree-contents">
|
||
|
<div id="nav-sync" class="sync"></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div id="splitbar" style="-moz-user-select:none;"
|
||
|
class="ui-resizable-handle">
|
||
|
</div>
|
||
|
</div>
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(function(){initNavTree('d4/d08/misc_8h_source.html','../../');});
|
||
|
</script>
|
||
|
<div id="doc-content">
|
||
|
<!-- window showing the filter options -->
|
||
|
<div id="MSearchSelectWindow"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Macros</a></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 class="header">
|
||
|
<div class="headertitle">
|
||
|
<div class="title">misc.h</div> </div>
|
||
|
</div><!--header-->
|
||
|
<div class="contents">
|
||
|
<a href="../../d4/d08/misc_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/* This file is part of Netsukuku</span></div>
|
||
|
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * (c) Copyright 2004 Andrea Lo Pumo aka AlpT <alpt@freaknet.org></span></div>
|
||
|
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *</span></div>
|
||
|
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * This source code is free software; you can redistribute it and/or</span></div>
|
||
|
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * modify it under the terms of the GNU General Public License as published </span></div>
|
||
|
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * by the Free Software Foundation; either version 2 of the License,</span></div>
|
||
|
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * or (at your option) any later version.</span></div>
|
||
|
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> *</span></div>
|
||
|
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * This source code is distributed in the hope that it will be useful,</span></div>
|
||
|
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
|
||
|
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</span></div>
|
||
|
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * Please refer to the GNU Public License for more details.</span></div>
|
||
|
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> *</span></div>
|
||
|
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * You should have received a copy of the GNU Public License along with</span></div>
|
||
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> * this source code; if not, write to:</span></div>
|
||
|
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span></div>
|
||
|
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> */</span></div>
|
||
|
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> </div>
|
||
|
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#ifndef MISC_H</span></div>
|
||
|
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#define MISC_H</span></div>
|
||
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div>
|
||
|
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment">/*</span></div>
|
||
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> * NMEMB: returns the number of members of the `x' array</span></div>
|
||
|
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"> */</span></div>
|
||
|
<div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="../../d4/d08/misc_8h.html#a1aaef027c2540c4b3848ab5603c97adf"> 25</a></span> <span class="preprocessor">#define NMEMB(x) (sizeof((x))/sizeof(typeof((x)[0])))</span></div>
|
||
|
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> </div>
|
||
|
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment">/* </span></div>
|
||
|
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="comment"> * MILLISEC: converts a timeval struct to a int. The time will be returned in</span></div>
|
||
|
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="comment"> * milliseconds.</span></div>
|
||
|
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment"> */</span></div>
|
||
|
<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="../../d4/d08/misc_8h.html#a196a8d532345b158a150af01f196c242"> 31</a></span> <span class="preprocessor">#define MILLISEC(x) (((x).tv_sec*1000)+((x).tv_usec/1000))</span></div>
|
||
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> </div>
|
||
|
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="comment">/*</span></div>
|
||
|
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="comment"> * MILLISEC_TO_TV: Converts `x', which is an int into `t', a timeval struct</span></div>
|
||
|
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="comment"> */</span></div>
|
||
|
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="../../d4/d08/misc_8h.html#aa911c93eee2bd5b1312317ba2d75af35"> 36</a></span> <span class="preprocessor">#define MILLISEC_TO_TV(x,t) \</span></div>
|
||
|
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="preprocessor">do{ \</span></div>
|
||
|
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="preprocessor"> (t).tv_sec=(x)/1000; \</span></div>
|
||
|
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="preprocessor"> (t).tv_usec=((x) - ((x)/1000)*1000)*1000; \</span></div>
|
||
|
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="preprocessor">}while(0)</span></div>
|
||
|
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> </div>
|
||
|
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="comment">/* </span></div>
|
||
|
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="comment"> * Bit map related macros. </span></div>
|
||
|
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="comment"> */</span></div>
|
||
|
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="../../d4/d08/misc_8h.html#a57ad79bbf1da2778f9352732771339b9"> 45</a></span> <span class="preprocessor">#define SET_BIT(a,i) ((a)[(i)/CHAR_BIT] |= 1<<((i)%CHAR_BIT))</span></div>
|
||
|
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="../../d4/d08/misc_8h.html#a3dddc03c8e6df49ea7615405cc1faf4f"> 46</a></span> <span class="preprocessor">#define CLR_BIT(a,i) ((a)[(i)/CHAR_BIT] &= ~(1<<((i)%CHAR_BIT)))</span></div>
|
||
|
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="../../d4/d08/misc_8h.html#a5339af2eb805f73f3c78db430e03d719"> 47</a></span> <span class="preprocessor">#define TEST_BIT(a,i) (((a)[(i)/CHAR_BIT] & (1<<((i)%CHAR_BIT))) ? 1 : 0)</span></div>
|
||
|
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> </div>
|
||
|
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="comment">/*</span></div>
|
||
|
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="comment"> * FIND_PTR</span></div>
|
||
|
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="comment"> *</span></div>
|
||
|
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="comment"> * Given an array of pointers `a' of `n' members, it searches for a member</span></div>
|
||
|
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="comment"> * equal to the pointer `p'. If it is found its position is returned,</span></div>
|
||
|
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="comment"> * otherwise -1 is the value returned.</span></div>
|
||
|
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="comment"> */</span></div>
|
||
|
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="../../d4/d08/misc_8h.html#aaf9df6e3c9d68033ee6162c4738e3ee1"> 56</a></span> <span class="preprocessor">#define FIND_PTR(p, a, n) \</span></div>
|
||
|
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <span class="preprocessor">({ \</span></div>
|
||
|
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span> <span class="preprocessor"> int _i, _ret; \</span></div>
|
||
|
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span> <span class="preprocessor"> \</span></div>
|
||
|
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span> <span class="preprocessor"> for(_i=0, _ret=-1; _i<(n); _i++) \</span></div>
|
||
|
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span> <span class="preprocessor"> if((a)[_i] == (p)) { \</span></div>
|
||
|
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span> <span class="preprocessor"> _ret=_i; \</span></div>
|
||
|
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span> <span class="preprocessor"> break; \</span></div>
|
||
|
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="preprocessor"> } \</span></div>
|
||
|
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> <span class="preprocessor"> _ret; \</span></div>
|
||
|
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="preprocessor">})</span></div>
|
||
|
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span> </div>
|
||
|
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <span class="comment">/*</span></div>
|
||
|
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="comment"> * _return</span></div>
|
||
|
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="comment"> *</span></div>
|
||
|
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="comment"> * It is used in this case:</span></div>
|
||
|
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <span class="comment"> * condition && _return (ret);</span></div>
|
||
|
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <span class="comment"> * Since it is not possible to use the standard return in that case, we trick</span></div>
|
||
|
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span> <span class="comment"> * gcc.</span></div>
|
||
|
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span> <span class="comment"> */</span></div>
|
||
|
<div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="../../d4/d08/misc_8h.html#a8449f7a49a9aac590496ca70bfc11e55"> 76</a></span> <span class="preprocessor">#define _return(x) ({return (x); (x);})</span></div>
|
||
|
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span> </div>
|
||
|
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span> </div>
|
||
|
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span> <span class="comment">/*\</span></div>
|
||
|
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> <span class="comment"> * * * Functions declaration * *</span></div>
|
||
|
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span> <span class="comment">\*/</span></div>
|
||
|
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="keywordtype">char</span> <a class="code" href="../../d4/d08/misc_8h.html#ad1aea1bae314b44e08b53a5b5bf30394">xor_int</a>(<span class="keywordtype">int</span> i);</div>
|
||
|
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> </div>
|
||
|
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="keywordtype">void</span> <a class="code" href="../../d4/d08/misc_8h.html#acb6548d316f7cd3f28e77c2bd4eb3e33">swap_array</a>(<span class="keywordtype">int</span> nmemb, <span class="keywordtype">size_t</span> nmemb_sz, <span class="keywordtype">void</span> *src, <span class="keywordtype">void</span> *dst);</div>
|
||
|
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="keywordtype">void</span> <a class="code" href="../../d4/d08/misc_8h.html#a7b5a2df1e2b36c954653fd3e786a5405">swap_ints</a>(<span class="keywordtype">int</span> nmemb, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *x, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *y) ;</div>
|
||
|
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="keywordtype">void</span> <a class="code" href="../../d4/d08/misc_8h.html#a98da58b707cfc9acf75f8105a3508b89">swap_shorts</a>(<span class="keywordtype">int</span> nmemb, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> *x, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> *y);</div>
|
||
|
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> </div>
|
||
|
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="../../d4/d08/misc_8h.html#af7f747ea1b353be8609df593dc0a629a">rand_range</a>(<span class="keywordtype">int</span> _min, <span class="keywordtype">int</span> _max);</div>
|
||
|
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="keywordtype">void</span> <a class="code" href="../../d4/d08/misc_8h.html#a22bf64b8d655a21a09fc4a5bca7ddd2b">xsrand</a>(<span class="keywordtype">void</span>);</div>
|
||
|
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> </div>
|
||
|
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="keywordtype">char</span> *<a class="code" href="../../d4/d08/misc_8h.html#ae13480d8227e14c4ea764297d170d39c">last_token</a>(<span class="keywordtype">char</span> *<span class="keywordtype">string</span>, <span class="keywordtype">char</span> tok);</div>
|
||
|
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="keywordtype">void</span> <a class="code" href="../../d4/d08/misc_8h.html#a1b81740c73bef5d3a6c69149d2c66378">strip_char</a>(<span class="keywordtype">char</span> *<span class="keywordtype">string</span>, <span class="keywordtype">char</span> char_to_strip);</div>
|
||
|
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="keywordtype">char</span> **<a class="code" href="../../d4/d08/misc_8h.html#afa3287a0852a49ffaeb854b3a43efeeb">split_string</a>(<span class="keywordtype">char</span> *str, <span class="keyword">const</span> <span class="keywordtype">char</span> *div_str, <span class="keywordtype">int</span> *substrings,</div>
|
||
|
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="keywordtype">int</span> max_substrings, <span class="keywordtype">int</span> max_substring_sz);</div>
|
||
|
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span> </div>
|
||
|
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  </div>
|
||
|
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="keywordtype">int</span> <a class="code" href="../../d4/d08/misc_8h.html#aec37f76b7523c94cbf893daa3011d561">find_int</a>(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> *ia, <span class="keywordtype">int</span> nmemb);</div>
|
||
|
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span> </div>
|
||
|
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <span class="keywordtype">void</span> <a class="code" href="../../d4/d08/misc_8h.html#acb47fac99a597857da46e5527954ed11">xtimer</a>(u_int secs, u_int steps, <span class="keywordtype">int</span> *counter);</div>
|
||
|
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span> </div>
|
||
|
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span> <span class="keywordtype">int</span> <a class="code" href="../../d4/d08/misc_8h.html#a00e04a1d03772af465554e244ab28870">check_and_create_dir</a>(<span class="keywordtype">char</span> *dir);</div>
|
||
|
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span> <span class="keywordtype">int</span> <a class="code" href="../../d4/d08/misc_8h.html#a928b1da945af8413e422d1749058d33a">file_exist</a>(<span class="keywordtype">char</span> *filename);</div>
|
||
|
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span> <span class="keywordtype">int</span> <a class="code" href="../../d4/d08/misc_8h.html#a8acb91fe62e69e1e7be98dd06b2410a2">exec_root_script</a>(<span class="keywordtype">char</span> *script, <span class="keywordtype">char</span> *argv);</div>
|
||
|
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span> </div>
|
||
|
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span> <span class="keywordtype">void</span> <a class="code" href="../../d4/d08/misc_8h.html#ad3dd98cde966bc68b438e72af3c68527">do_nothing</a>(<span class="keywordtype">void</span>);</div>
|
||
|
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span> </div>
|
||
|
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> <span class="preprocessor">#endif </span><span class="comment">/*MISC_H*/</span><span class="preprocessor"></span></div>
|
||
|
<div class="ttc" id="misc_8h_html_a8acb91fe62e69e1e7be98dd06b2410a2"><div class="ttname"><a href="../../d4/d08/misc_8h.html#a8acb91fe62e69e1e7be98dd06b2410a2">exec_root_script</a></div><div class="ttdeci">int exec_root_script(char *script, char *argv)</div><div class="ttdef"><b>Definition:</b> misc.c:346</div></div>
|
||
|
<div class="ttc" id="misc_8h_html_af7f747ea1b353be8609df593dc0a629a"><div class="ttname"><a href="../../d4/d08/misc_8h.html#af7f747ea1b353be8609df593dc0a629a">rand_range</a></div><div class="ttdeci">int rand_range(int _min, int _max)</div><div class="ttdef"><b>Definition:</b> misc.c:101</div></div>
|
||
|
<div class="ttc" id="misc_8h_html_ad3dd98cde966bc68b438e72af3c68527"><div class="ttname"><a href="../../d4/d08/misc_8h.html#ad3dd98cde966bc68b438e72af3c68527">do_nothing</a></div><div class="ttdeci">void do_nothing(void)</div><div class="ttdef"><b>Definition:</b> misc.c:388</div></div>
|
||
|
<div class="ttc" id="misc_8h_html_a1b81740c73bef5d3a6c69149d2c66378"><div class="ttname"><a href="../../d4/d08/misc_8h.html#a1b81740c73bef5d3a6c69149d2c66378">strip_char</a></div><div class="ttdeci">void strip_char(char *string, char char_to_strip)</div><div class="ttdef"><b>Definition:</b> misc.c:141</div></div>
|
||
|
<div class="ttc" id="misc_8h_html_aec37f76b7523c94cbf893daa3011d561"><div class="ttname"><a href="../../d4/d08/misc_8h.html#aec37f76b7523c94cbf893daa3011d561">find_int</a></div><div class="ttdeci">int find_int(int x, int *ia, int nmemb)</div><div class="ttdef"><b>Definition:</b> misc.c:222</div></div>
|
||
|
<div class="ttc" id="misc_8h_html_acb6548d316f7cd3f28e77c2bd4eb3e33"><div class="ttname"><a href="../../d4/d08/misc_8h.html#acb6548d316f7cd3f28e77c2bd4eb3e33">swap_array</a></div><div class="ttdeci">void swap_array(int nmemb, size_t nmemb_sz, void *src, void *dst)</div><div class="ttdef"><b>Definition:</b> misc.c:56</div></div>
|
||
|
<div class="ttc" id="misc_8h_html_ae13480d8227e14c4ea764297d170d39c"><div class="ttname"><a href="../../d4/d08/misc_8h.html#ae13480d8227e14c4ea764297d170d39c">last_token</a></div><div class="ttdeci">char * last_token(char *string, char tok)</div><div class="ttdef"><b>Definition:</b> misc.c:130</div></div>
|
||
|
<div class="ttc" id="misc_8h_html_acb47fac99a597857da46e5527954ed11"><div class="ttname"><a href="../../d4/d08/misc_8h.html#acb47fac99a597857da46e5527954ed11">xtimer</a></div><div class="ttdeci">void xtimer(u_int secs, u_int steps, int *counter)</div><div class="ttdef"><b>Definition:</b> misc.c:244</div></div>
|
||
|
<div class="ttc" id="misc_8h_html_afa3287a0852a49ffaeb854b3a43efeeb"><div class="ttname"><a href="../../d4/d08/misc_8h.html#afa3287a0852a49ffaeb854b3a43efeeb">split_string</a></div><div class="ttdeci">char ** split_string(char *str, const char *div_str, int *substrings, int max_substrings, int max_substring_sz)</div><div class="ttdef"><b>Definition:</b> misc.c:167</div></div>
|
||
|
<div class="ttc" id="misc_8h_html_a22bf64b8d655a21a09fc4a5bca7ddd2b"><div class="ttname"><a href="../../d4/d08/misc_8h.html#a22bf64b8d655a21a09fc4a5bca7ddd2b">xsrand</a></div><div class="ttdeci">void xsrand(void)</div><div class="ttdef"><b>Definition:</b> misc.c:111</div></div>
|
||
|
<div class="ttc" id="misc_8h_html_ad1aea1bae314b44e08b53a5b5bf30394"><div class="ttname"><a href="../../d4/d08/misc_8h.html#ad1aea1bae314b44e08b53a5b5bf30394">xor_int</a></div><div class="ttdeci">char xor_int(int i)</div><div class="ttdef"><b>Definition:</b> misc.c:34</div></div>
|
||
|
<div class="ttc" id="misc_8h_html_a00e04a1d03772af465554e244ab28870"><div class="ttname"><a href="../../d4/d08/misc_8h.html#a00e04a1d03772af465554e244ab28870">check_and_create_dir</a></div><div class="ttdeci">int check_and_create_dir(char *dir)</div><div class="ttdef"><b>Definition:</b> misc.c:295</div></div>
|
||
|
<div class="ttc" id="misc_8h_html_a98da58b707cfc9acf75f8105a3508b89"><div class="ttname"><a href="../../d4/d08/misc_8h.html#a98da58b707cfc9acf75f8105a3508b89">swap_shorts</a></div><div class="ttdeci">void swap_shorts(int nmemb, unsigned short *x, unsigned short *y)</div><div class="ttdef"><b>Definition:</b> misc.c:87</div></div>
|
||
|
<div class="ttc" id="misc_8h_html_a7b5a2df1e2b36c954653fd3e786a5405"><div class="ttname"><a href="../../d4/d08/misc_8h.html#a7b5a2df1e2b36c954653fd3e786a5405">swap_ints</a></div><div class="ttdeci">void swap_ints(int nmemb, unsigned int *x, unsigned int *y)</div><div class="ttdef"><b>Definition:</b> misc.c:82</div></div>
|
||
|
<div class="ttc" id="misc_8h_html_a928b1da945af8413e422d1749058d33a"><div class="ttname"><a href="../../d4/d08/misc_8h.html#a928b1da945af8413e422d1749058d33a">file_exist</a></div><div class="ttdeci">int file_exist(char *filename)</div><div class="ttdef"><b>Definition:</b> misc.c:326</div></div>
|
||
|
</div><!-- fragment --></div><!-- contents -->
|
||
|
</div><!-- doc-content -->
|
||
|
<!-- start footer part -->
|
||
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||
|
<ul>
|
||
|
<li class="navelem"><a class="el" href="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="../../d4/d08/misc_8h.html">misc.h</a></li>
|
||
|
<li class="footer">Generated on Wed Feb 19 2014 14:19:08 for The Netsukuku Project by
|
||
|
<a href="http://www.doxygen.org/index.html">
|
||
|
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|