1 |
2596
|
stephane
|
<!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 |
|
|
<title>gBase: macros.h File Reference</title>
|
6 |
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
7 |
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
|
8 |
|
|
</head>
|
9 |
|
|
<body>
|
10 |
|
|
<!-- Generated by Doxygen 1.6.3 -->
|
11 |
|
|
<div class="navigation" id="top">
|
12 |
|
|
<div class="tabs">
|
13 |
|
|
<ul>
|
14 |
|
|
<li><a href="main.html"><span>Main Page</span></a></li>
|
15 |
|
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
16 |
|
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
17 |
|
|
</ul>
|
18 |
|
|
</div>
|
19 |
|
|
<div class="tabs">
|
20 |
|
|
<ul>
|
21 |
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
22 |
|
|
<li><a href="globals.html"><span>Globals</span></a></li>
|
23 |
|
|
</ul>
|
24 |
|
|
</div>
|
25 |
|
|
</div>
|
26 |
|
|
<div class="contents">
|
27 |
|
|
<h1>macros.h File Reference</h1>
|
28 |
|
|
<p>usefull Scol macros
|
29 |
|
|
<a href="#_details">More...</a></p>
|
30 |
|
|
|
31 |
|
|
<p><a href="macros_8h_source.html">Go to the source code of this file.</a></p>
|
32 |
|
|
<table border="0" cellpadding="0" cellspacing="0">
|
33 |
|
|
<tr><td colspan="2"><h2>Defines</h2></td></tr>
|
34 |
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aef4636c89c5618830b95fafc242b764d"></a><!-- doxytag: member="macros.h::SAFEdelete" ref="aef4636c89c5618830b95fafc242b764d" args="(p)" -->
|
35 |
|
|
#define </td><td class="memItemRight" valign="bottom"><b>SAFEdelete</b>(p) { if (p) { free (p); (p) = NULL; } }</td></tr>
|
36 |
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afcf361826c68da9462e4a3145e2d5963"></a><!-- doxytag: member="macros.h::_SEPTRBIT" ref="afcf361826c68da9462e4a3145e2d5963" args="" -->
|
37 |
|
|
#define </td><td class="memItemRight" valign="bottom"><b>_SEPTRBIT</b> 0x00000001</td></tr>
|
38 |
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6bb7f4a5ecbaa2f01e9de5fbb4ab386c"></a><!-- doxytag: member="macros.h::SEW2I" ref="a6bb7f4a5ecbaa2f01e9de5fbb4ab386c" args="(w)" -->
|
39 |
|
|
#define </td><td class="memItemRight" valign="bottom"><b>SEW2I</b>(w) ((w)>>1)</td></tr>
|
40 |
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3428b1f701e14774d518acc14e6e3ce1"></a><!-- doxytag: member="macros.h::SEW2P" ref="a3428b1f701e14774d518acc14e6e3ce1" args="(w)" -->
|
41 |
|
|
#define </td><td class="memItemRight" valign="bottom"><b>SEW2P</b>(w) ((w)>>1)</td></tr>
|
42 |
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad019a6837bcb094bf74e812ceed59430"></a><!-- doxytag: member="macros.h::SEI2W" ref="ad019a6837bcb094bf74e812ceed59430" args="(n)" -->
|
43 |
|
|
#define </td><td class="memItemRight" valign="bottom"><b>SEI2W</b>(n) ((n)<<1)</td></tr>
|
44 |
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac6b75e0db064027515be00c7b4e0c8d5"></a><!-- doxytag: member="macros.h::SEP2W" ref="ac6b75e0db064027515be00c7b4e0c8d5" args="(p)" -->
|
45 |
|
|
#define </td><td class="memItemRight" valign="bottom"><b>SEP2W</b>(p) ((p)<<1 | _SEPTRBIT)</td></tr>
|
46 |
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad15a32f5c85fcffb8411032a14e8bb6d"></a><!-- doxytag: member="macros.h::MTOI" ref="ad15a32f5c85fcffb8411032a14e8bb6d" args="(mot)" -->
|
47 |
|
|
#define </td><td class="memItemRight" valign="bottom"><b>MTOI</b>(mot) ((mot)>>1)</td></tr>
|
48 |
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2e53dfb6d852d701032f0cf4583a266f"></a><!-- doxytag: member="macros.h::MTOP" ref="a2e53dfb6d852d701032f0cf4583a266f" args="(mot)" -->
|
49 |
|
|
#define </td><td class="memItemRight" valign="bottom"><b>MTOP</b>(mot) ((mot)>>1)</td></tr>
|
50 |
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a299a57c8e54be503350efe243ac08515"></a><!-- doxytag: member="macros.h::ITOM" ref="a299a57c8e54be503350efe243ac08515" args="(mot)" -->
|
51 |
|
|
#define </td><td class="memItemRight" valign="bottom"><b>ITOM</b>(mot) ((mot)<<1)</td></tr>
|
52 |
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a324c24f1e9adac1061d094dbfd6ddd4b"></a><!-- doxytag: member="macros.h::PTOM" ref="a324c24f1e9adac1061d094dbfd6ddd4b" args="(mot)" -->
|
53 |
|
|
#define </td><td class="memItemRight" valign="bottom"><b>PTOM</b>(mot) (((mot)<<1)+1)</td></tr>
|
54 |
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2d0c0bd93fb87252c696b1ae1f87592f"></a><!-- doxytag: member="macros.h::INVERT" ref="a2d0c0bd93fb87252c696b1ae1f87592f" args="(m, a, b)" -->
|
55 |
|
|
#define </td><td class="memItemRight" valign="bottom"><b>INVERT</b>(m, a, b) {tmp_res=MMget(m,a);MMset(m,a,MMget(m,b));MMset(m,b,tmp_res);}</td></tr>
|
56 |
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeea6cfed5ac6a405e8b3c40bf14784d2"></a><!-- doxytag: member="macros.h::SEDROP" ref="aeea6cfed5ac6a405e8b3c40bf14784d2" args="(m, n)" -->
|
57 |
|
|
#define </td><td class="memItemRight" valign="bottom"><b>SEDROP</b>(m, n) ((m)->pp += (n))</td></tr>
|
58 |
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae6c44381e754a26d341915adffac5069"></a><!-- doxytag: member="macros.h::SEPUSHSTR" ref="ae6c44381e754a26d341915adffac5069" args="(m, s)" -->
|
59 |
|
|
#define </td><td class="memItemRight" valign="bottom"><b>SEPUSHSTR</b>(m, s) (Mpushstrbloc((m), (s)))</td></tr>
|
60 |
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a992e023ab2b1a1a5f7b9b17a09cc0ce7"></a><!-- doxytag: member="macros.h::CHECK" ref="a992e023ab2b1a1a5f7b9b17a09cc0ce7" args="(m)" -->
|
61 |
|
|
#define </td><td class="memItemRight" valign="bottom"><b>CHECK</b>(m) if ((tmp_res=m)) return tmp_res</td></tr>
|
62 |
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a176e70b7b27493cb9439efab7e1106d6"></a><!-- doxytag: member="macros.h::SCOLUTF8" ref="a176e70b7b27493cb9439efab7e1106d6" args="(string, len)" -->
|
63 |
|
|
#define </td><td class="memItemRight" valign="bottom"><b>SCOLUTF8</b>(string, len) g_locale_to_utf8 (string, len, NULL, NULL, NULL)</td></tr>
|
64 |
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1c41e89e6caabcae375a9efc7b1935aa"></a><!-- doxytag: member="macros.h::UTF8SCOL" ref="a1c41e89e6caabcae375a9efc7b1935aa" args="(string, len)" -->
|
65 |
|
|
#define </td><td class="memItemRight" valign="bottom"><b>UTF8SCOL</b>(string, len) g_locale_from_utf8 (string, len, NULL, NULL, NULL)</td></tr>
|
66 |
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa45d7fbe0ff7d03baf556fedfdc49b32"></a><!-- doxytag: member="macros.h::SIZEINT" ref="aa45d7fbe0ff7d03baf556fedfdc49b32" args="(x)" -->
|
67 |
|
|
#define </td><td class="memItemRight" valign="bottom"><b>SIZEINT</b>(x) floor (log10 (x)) + 1</td></tr>
|
68 |
|
|
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><b>FSET</b>(val, f)</td></tr>
|
69 |
|
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5d88531a1a242878fe4e423219aab5c6"></a><!-- doxytag: member="macros.h::FGET" ref="a5d88531a1a242878fe4e423219aab5c6" args="(val)" -->
|
70 |
|
|
#define </td><td class="memItemRight" valign="bottom"><b>FGET</b>(val) (*(float*)&(val))</td></tr>
|
71 |
|
|
</table>
|
72 |
|
|
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
73 |
|
|
<p>usefull Scol macros </p>
|
74 |
|
|
<dl class="author"><dt><b>Author:</b></dt><dd>Sylvain HUET, Stephane Bisaro </dd></dl>
|
75 |
|
|
<hr/><h2>Define Documentation</h2>
|
76 |
|
|
<a class="anchor" id="a8eab2b9b6cd86246ecd6445ddb15442b"></a><!-- doxytag: member="macros.h::FSET" ref="a8eab2b9b6cd86246ecd6445ddb15442b" args="(val, f)" -->
|
77 |
|
|
<div class="memitem">
|
78 |
|
|
<div class="memproto">
|
79 |
|
|
<table class="memname">
|
80 |
|
|
<tr>
|
81 |
|
|
<td class="memname">#define FSET</td>
|
82 |
|
|
<td>(</td>
|
83 |
|
|
<td class="paramtype">val, </td>
|
84 |
|
|
</tr>
|
85 |
|
|
<tr>
|
86 |
|
|
<td class="paramkey"></td>
|
87 |
|
|
<td></td>
|
88 |
|
|
<td class="paramtype">f </td>
|
89 |
|
|
<td class="paramname"></td>
|
90 |
|
|
<td> ) </td>
|
91 |
|
|
<td></td>
|
92 |
|
|
</tr>
|
93 |
|
|
</table>
|
94 |
|
|
</div>
|
95 |
|
|
<div class="memdoc">
|
96 |
|
|
<b>Value:</b><div class="fragment"><pre class="fragment">{ \
|
97 |
|
|
<span class="keywordtype">float</span> g = (f); \
|
98 |
|
|
(val) = (*(<span class="keywordtype">int</span>*)&g) & 0xfffffffe; \
|
99 |
|
|
}
|
100 |
|
|
</pre></div>
|
101 |
|
|
</div>
|
102 |
|
|
</div>
|
103 |
|
|
</div>
|
104 |
|
|
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Mar 11 15:06:43 2011 for gBase by
|
105 |
|
|
<a href="http://www.doxygen.org/index.html">
|
106 |
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
|
107 |
|
|
</body>
|
108 |
|
|
</html>
|