modperl bootstrap
[www.jankratochvil.net.git] / project / captive / apiref / captive-apiref-macros.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>macros</title><meta name="generator" content="DocBook XSL Stylesheets V1.58.1"><meta name="generator" content="GTK-Doc V1.1 (XML mode)"><style type="text/css">
3         .synopsis, .classsynopsis {
4             background: #eeeeee;
5             border: solid 1px #aaaaaa;
6             padding: 0.5em;
7         }
8         .programlisting {
9             background: #eeeeff;
10             border: solid 1px #aaaaff;
11             padding: 0.5em;
12         }
13         .variablelist {
14             padding: 4px;
15             margin-left: 3em;
16         }
17         .navigation {
18             background: #ffeeee;
19             border: solid 1px #ffaaaa;
20             margin-top: 0.5em;
21             margin-bottom: 0.5em;
22         }
23         .navigation a {
24             color: #770000;
25         }
26         .navigation a:visited {
27             color: #550000;
28         }
29         .navigation .title {
30             font-size: 200%;
31         }
32       </style><link rel="home" href="index.html" title="Operation Captive Reference Manual"><link rel="up" href="ch01.html" title="Operation Captive"><link rel="previous" href="captive-apiref-ldr.html" title="ldr"><link rel="next" href="captive-apiref-mm.html" title="mm"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="captive-apiref-ldr.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">Operation Captive Reference Manual</th><td><a accesskey="n" href="captive-apiref-mm.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry" lang="en"><a name="captive-apiref-macros"></a><div class="titlepage"></div><div class="refnamediv"><h2>macros</h2><p>macros &#8212; </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
33
34
35
36 #define     <a href="captive-apiref-macros.html#CAPTIVE-FAKEUSE-CAPS">CAPTIVE_FAKEUSE</a>
37 #define     <a href="captive-apiref-macros.html#captive-newn">captive_newn</a>                    (objp,n)
38 #define     <a href="captive-apiref-macros.html#captive-new0n">captive_new0n</a>                   (objp,n)
39 #define     <a href="captive-apiref-macros.html#captive-renewn">captive_renewn</a>                  (objp,n)
40 #define     <a href="captive-apiref-macros.html#captive-new">captive_new</a>                     (objp)
41 #define     <a href="captive-apiref-macros.html#captive-new0">captive_new0</a>                    (objp)
42 #define     <a href="captive-apiref-macros.html#captive-newn-alloca">captive_newn_alloca</a>             (objp,n)
43 #define     <a href="captive-apiref-macros.html#captive-new0n-alloca">captive_new0n_alloca</a>            (objp,n)
44 #define     <a href="captive-apiref-macros.html#captive-new-alloca">captive_new_alloca</a>              (objp)
45 #define     <a href="captive-apiref-macros.html#captive-new0-alloca">captive_new0_alloca</a>             (objp)
46 #define     <a href="captive-apiref-macros.html#captive-memdup">captive_memdup</a>                  (destp,srcp)
47 #define     <a href="captive-apiref-macros.html#captive-va-arg">captive_va_arg</a>                  (objp,ap)
48 #define     <a href="captive-apiref-macros.html#CAPTIVE-MEMZERO-CAPS">CAPTIVE_MEMZERO</a>                 (objp)
49 #define     <a href="captive-apiref-macros.html#captive-printf-alloca">captive_printf_alloca</a>           (format,args...)
50 #define     <a href="captive-apiref-macros.html#captive-strdup-alloca">captive_strdup_alloca</a>           (string)
51 #define     <a href="captive-apiref-macros.html#CAPTIVE-ROUND-DOWN-CAPS">CAPTIVE_ROUND_DOWN</a>              (pointer,fragment)
52 #define     <a href="captive-apiref-macros.html#CAPTIVE-ROUND-DOWN64-CAPS">CAPTIVE_ROUND_DOWN64</a>            (pointer,fragment)
53 #define     <a href="captive-apiref-macros.html#CAPTIVE-ROUND-DOWN-EXCEEDING-CAPS">CAPTIVE_ROUND_DOWN_EXCEEDING</a>    (pointer,fragment)
54 #define     <a href="captive-apiref-macros.html#CAPTIVE-ROUND-DOWN-EXCEEDING64-CAPS">CAPTIVE_ROUND_DOWN_EXCEEDING64</a>  (pointer,fragment)
55 #define     <a href="captive-apiref-macros.html#CAPTIVE-ROUND-UP-CAPS">CAPTIVE_ROUND_UP</a>                (pointer,fragment)
56 #define     <a href="captive-apiref-macros.html#CAPTIVE-ROUND-UP64-CAPS">CAPTIVE_ROUND_UP64</a>              (pointer,fragment)
57 </pre></div><div class="refsect1" lang="en"><h2>Description</h2><p>
58
59 </p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="CAPTIVE-FAKEUSE-CAPS"></a>CAPTIVE_FAKEUSE</h3><pre class="programlisting">#define CAPTIVE_FAKEUSE =0
60 </pre><p>
61 Prevent 'might be used uninitialized' warning.
62 Macro will fakes the use of the variable as sometimes GCC can't code flow
63 analyse C correctly.
64 </p><p>
65 </p><div class="informalexample"><pre class="programlisting">
66 g_some_type some_variable CAPTIVE_FAKEUSE;
67 </pre></div><p>
68
69 </p></div><hr><div class="refsect2" lang="en"><h3><a name="captive-newn"></a>captive_newn()</h3><pre class="programlisting">#define captive_newn(objp,n) ((objp)=g_new(typeof(*(objp)),(n)))
70 </pre><p>
71 Macro to allocate <i><tt>n</tt></i> objects of type *<i><tt>objp</tt></i> and to assign the resulting pointer to <i><tt>objp</tt></i>.
72 Allocated memory may contain garbage.
73 </p><p>
74 <i><tt>Returns</tt></i>: Initialized <i><tt>objp</tt></i> value as the memory of size sizeof(typeof(*objp))*n.
75 Value <tt>NULL</tt> is returned iff <i><tt>n</tt></i>==<tt>0</tt>;</p><p>
76
77 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>objp</tt></i> :</span></td><td> Variable with the pointer to the objects wished to be allocated.
78 Original value is discarded.
79 </td></tr><tr><td><span class="term"><i><tt>n</tt></i> :</span></td><td> Numbers of objects to be allocated. Value <tt>0</tt> is permitted (<tt>NULL</tt> assignment effect).
80 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="captive-new0n"></a>captive_new0n()</h3><pre class="programlisting">#define captive_new0n(objp,n) ((objp)=g_new0(typeof(*(objp)),(n)))
81 </pre><p>
82 Macro to allocate <i><tt>n</tt></i> objects of type *<i><tt>objp</tt></i> and to assign the resulting pointer to <i><tt>objp</tt></i>.
83 Allocated memory is precleared.
84 </p><p>
85 <i><tt>Returns</tt></i>: Initialized <i><tt>objp</tt></i> value as the cleared memory of size sizeof(typeof(*objp))*n.
86 Value <tt>NULL</tt> is returned iff <i><tt>n</tt></i>==<tt>0</tt>;</p><p>
87
88 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>objp</tt></i> :</span></td><td> Variable with the pointer to the objects wished to be allocated and precleared.
89 Original value is discarded.
90 </td></tr><tr><td><span class="term"><i><tt>n</tt></i> :</span></td><td> Numbers of objects to be allocated. Value <tt>0</tt> is permitted (<tt>NULL</tt> assignment effect).
91 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="captive-renewn"></a>captive_renewn()</h3><pre class="programlisting">#define     captive_renewn(objp,n)</pre><p>
92 Macro to reallocate the original memory stored in <i><tt>objp</tt></i>
93 to the size <i><tt>n</tt></i> objects of type *<i><tt>objp</tt></i> and to assign the resulting pointer to <i><tt>objp</tt></i>.
94 New allocated space may contain garbage. Both <i><tt>objp</tt></i> and <i><tt>n</tt></i> can be nonexclusively
95 passed as zero.
96 </p><p>
97 <i><tt>Returns</tt></i>: Initialized <i><tt>objp</tt></i> value as the memory of size sizeof(typeof(*objp))*n.
98 Value <tt>NULL</tt> is returned iff <i><tt>n</tt></i>==<tt>0</tt>;</p><p>
99
100 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>objp</tt></i> :</span></td><td> Variable with the pointer to the objects wished to be reallocated. 
101 Value <tt>NULL</tt> is permitted (g_malloc() effect).
102 </td></tr><tr><td><span class="term"><i><tt>n</tt></i> :</span></td><td> Numbers of objects to be allocated. Value <tt>0</tt> is permitted (g_free() effect).
103 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="captive-new"></a>captive_new()</h3><pre class="programlisting">#define captive_new(objp) (captive_newn((objp),1))
104 </pre><p>
105 Macro to allocate one object of type *<i><tt>objp</tt></i> and to assign the resulting pointer to <i><tt>objp</tt></i>.
106 Allocated memory may contain garbage. Equivalent to captive_newn(objp,1) call.
107 </p><p>
108 <i><tt>Returns</tt></i>: Initialized <i><tt>objp</tt></i> value as the memory of size sizeof(typeof(*objp)).
109 Value <tt>NULL</tt> is never returned.</p><p>
110
111 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>objp</tt></i> :</span></td><td> Variable with the pointer to the object wished to be allocated.
112 Original value is discarded.
113 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="captive-new0"></a>captive_new0()</h3><pre class="programlisting">#define captive_new0(objp) (captive_new0n((objp),1))
114 </pre><p>
115 Macro to allocate one object of type *<i><tt>objp</tt></i> and to assign the resulting pointer to <i><tt>objp</tt></i>.
116 Allocated memory is precleared. Equivalent to captive_new0n(objp,1) call.
117 </p><p>
118 <i><tt>Returns</tt></i>: Initialized <i><tt>objp</tt></i> value as the cleared memory of size sizeof(typeof(*objp)).
119 Value <tt>NULL</tt> is never returned.</p><p>
120
121 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>objp</tt></i> :</span></td><td> Variable with the pointer to the object wished to be allocated and precleared.
122 Original value is discarded.
123 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="captive-newn-alloca"></a>captive_newn_alloca()</h3><pre class="programlisting">#define     captive_newn_alloca(objp,n)</pre><p>
124 Macro to allocate <i><tt>n</tt></i> objects of type *<i><tt>objp</tt></i> and to assign the resulting pointer to <i><tt>objp</tt></i>.
125 Allocated memory may contain garbage.
126 </p><p>
127 Memory is allocated on the stack frame by g_alloca() and it will be automatically deallocated
128 during exit of current function (or current block if variable sized variables present there).
129 You cannot deallocate or reallocate such memory in any other way.
130 </p><p>
131 <i><tt>Returns</tt></i>: Initialized <i><tt>objp</tt></i> value as the memory of size sizeof(typeof(*objp))*n.
132 Value <tt>NULL</tt> is returned iff <i><tt>n</tt></i>==<tt>0</tt>;</p><p>
133
134 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>objp</tt></i> :</span></td><td> Variable with the pointer to the objects wished to be allocated.
135 Original value is discarded.
136 </td></tr><tr><td><span class="term"><i><tt>n</tt></i> :</span></td><td> Numbers of objects to be allocated. Value <tt>0</tt> is permitted (<tt>NULL</tt> assignment effect).
137 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="captive-new0n-alloca"></a>captive_new0n_alloca()</h3><pre class="programlisting">#define     captive_new0n_alloca(objp,n)</pre><p>
138 Macro to allocate <i><tt>n</tt></i> objects of type *<i><tt>objp</tt></i> and to assign the resulting pointer to <i><tt>objp</tt></i>.
139 Allocated memory is precleared.
140 </p><p>
141 Memory is allocated on the stack frame by g_alloca() and it will be automatically deallocated
142 during exit of current function (or current block if variable sized variables present there).
143 You cannot deallocate or reallocate such memory in any other way.
144 </p><p>
145 <i><tt>Returns</tt></i>: Initialized <i><tt>objp</tt></i> value as the cleared memory of size sizeof(typeof(*objp))*n.
146 Value <tt>NULL</tt> is returned iff <i><tt>n</tt></i>==<tt>0</tt>;</p><p>
147
148 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>objp</tt></i> :</span></td><td> Variable with the pointer to the objects wished to be allocated and precleared.
149 Original value is discarded.
150 </td></tr><tr><td><span class="term"><i><tt>n</tt></i> :</span></td><td> Numbers of objects to be allocated. Value <tt>0</tt> is permitted (<tt>NULL</tt> assignment effect).
151 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="captive-new-alloca"></a>captive_new_alloca()</h3><pre class="programlisting">#define captive_new_alloca(objp) (captive_newn_alloca((objp),1))
152 </pre><p>
153 Macro to allocate one object of type *<i><tt>objp</tt></i> and to assign the resulting pointer to <i><tt>objp</tt></i>.
154 Allocated memory may contain garbage. Equivalent to captive_newn_alloca(objp,1) call.
155 </p><p>
156 Memory is allocated on the stack frame by g_alloca() and it will be automatically deallocated
157 during exit of current function (or current block if variable sized variables present there).
158 You cannot deallocate or reallocate such memory in any other way.
159 </p><p>
160 <i><tt>Returns</tt></i>: Initialized <i><tt>objp</tt></i> value as the memory of size sizeof(typeof(*objp)).
161 Value <tt>NULL</tt> is never returned.</p><p>
162
163 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>objp</tt></i> :</span></td><td> Variable with the pointer to the object wished to be allocated.
164 Original value is discarded.
165 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="captive-new0-alloca"></a>captive_new0_alloca()</h3><pre class="programlisting">#define captive_new0_alloca(objp) (captive_new0n_alloca((objp),1))
166 </pre><p>
167 Macro to allocate one object of type *<i><tt>objp</tt></i> and to assign the resulting pointer to <i><tt>objp</tt></i>.
168 Allocated memory is precleared. Equivalent to captive_new0n_alloca(objp,1) call.
169 </p><p>
170 <i><tt>Returns</tt></i>: Initialized <i><tt>objp</tt></i> value as the cleared memory of size sizeof(typeof(*objp)).</p><p>
171
172 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>objp</tt></i> :</span></td><td> Variable with the pointer to the object wished to be allocated and precleared.
173 Original value is discarded.
174 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="captive-memdup"></a>captive_memdup()</h3><pre class="programlisting">#define     captive_memdup(destp,srcp)</pre><p>
175 Macro to similiar to g_memdup() but the object size is detected automatically.
176 Size of <i><tt>destp</tt></i> object and <i><tt>srcp</tt></i> object must be the same.
177 </p><p>
178 You must free the allocated memory of <i><tt>destp</tt></i> by g_free().
179 </p><p>
180 <i><tt>Returns</tt></i>: Initialized <i><tt>destp</tt></i> value as the copied memory of size sizeof(typeof(*srcp)).</p><p>
181
182 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>destp</tt></i> :</span></td><td> Variable with the pointer to the target object wished to be allocated.
183 Original value is discarded.
184 </td></tr><tr><td><span class="term"><i><tt>srcp</tt></i> :</span></td><td> Pointer to the source object to be copied to <i><tt>destp</tt></i>.
185 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="captive-va-arg"></a>captive_va_arg()</h3><pre class="programlisting">#define captive_va_arg(objp,ap) ((objp)=va_arg((ap),typeof(objp)))
186 </pre><p>
187 Automatically determines the size of <i><tt>objp</tt></i>.
188 Equivalent to objp=va_arg(ap,typeof(objp)) call.
189 </p><p>
190 <i><tt>Returns</tt></i>: Initialized <i><tt>objp</tt></i> value.</p><p>
191
192 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>objp</tt></i> :</span></td><td> Variable to be filled from the next argument of <i><tt>ap</tt></i>.
193 </td></tr><tr><td><span class="term"><i><tt>ap</tt></i> :</span></td><td> Initialized va_list type.
194 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="CAPTIVE-MEMZERO-CAPS"></a>CAPTIVE_MEMZERO()</h3><pre class="programlisting">#define CAPTIVE_MEMZERO(objp) (memset((objp),0,sizeof(*(objp))))
195 </pre><p>
196 Clears the sizeof(*<i><tt>objp</tt></i>) bytes of the given pointer with memset().
197 Pass _pointer_ to the object to be cleared.</p><p>
198
199 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>objp</tt></i> :</span></td><td> Pointer to the variable to be cleared.
200 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="captive-printf-alloca"></a>captive_printf_alloca()</h3><pre class="programlisting">#define     captive_printf_alloca(format,args...)</pre><p>
201 Format the given format string <i><tt>format</tt></i> as in sprintf().
202 Output buffer is allocated automatically and it does not need to be deallocated
203 manually as it is managed by g_alloca().
204 </p><p>
205 <i><tt>Returns</tt></i>: Formatted output string located in g_alloca() memory.</p><p>
206
207 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>format</tt></i> :</span></td><td> Format string. See the sprintf() documentation.
208 </td></tr><tr><td><span class="term"><i><tt>args...</tt></i> :</span></td><td> Arguments for <i><tt>format</tt></i>. See the sprintf() documentation.
209 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="captive-strdup-alloca"></a>captive_strdup_alloca()</h3><pre class="programlisting">#define     captive_strdup_alloca(string)</pre><p>
210 Macro to do g_strdup() equivalent in g_alloca() style.
211 </p><p>
212 Memory is allocated on the stack frame by g_alloca() and it will be automatically deallocated
213 during exit of current function (or current block if variable sized variables present there).
214 You cannot deallocate or reallocate such memory in any other way.
215 </p><p>
216 <i><tt>Returns</tt></i>: Duplicated <i><tt>string</tt></i>. You may modify its items if the length is not changed.</p><p>
217
218 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>string</tt></i> :</span></td><td> const gchar * string to duplicate.
219 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="CAPTIVE-ROUND-DOWN-CAPS"></a>CAPTIVE_ROUND_DOWN()</h3><pre class="programlisting">#define     CAPTIVE_ROUND_DOWN(pointer,fragment)</pre><p>
220 General pointer down-rounding macro. Already aligned pointer is left as is.
221 </p><p>
222 glib NOTE: YOU MAY NOT STORE POINTERS IN INTEGERS.
223 </p><p>
224 <i><tt>Returns</tt></i>: Down-rounded <i><tt>pointer</tt></i> to the integer multiple of <i><tt>fragment</tt></i>.
225 Resulting pointer has the same type as <i><tt>pointer</tt></i>.</p><p>
226
227 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>pointer</tt></i> :</span></td><td> Arbitrary pointer type.
228 </td></tr><tr><td><span class="term"><i><tt>fragment</tt></i> :</span></td><td> Amount of 'sizeof(char)' to align <i><tt>pointer</tt></i> down to.
229 This size will be typically a power of 2.
230 Value less or equal to <tt>0</tt> is forbidden.
231 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="CAPTIVE-ROUND-DOWN64-CAPS"></a>CAPTIVE_ROUND_DOWN64()</h3><pre class="programlisting">#define     CAPTIVE_ROUND_DOWN64(pointer,fragment)</pre><p>
232
233 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>pointer</tt></i> :</span></td><td>
234 </td></tr><tr><td><span class="term"><i><tt>fragment</tt></i> :</span></td><td>
235
236
237 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="CAPTIVE-ROUND-DOWN-EXCEEDING-CAPS"></a>CAPTIVE_ROUND_DOWN_EXCEEDING()</h3><pre class="programlisting">#define     CAPTIVE_ROUND_DOWN_EXCEEDING(pointer,fragment)</pre><p>
238 Detects current non-aligned amount of data exceeding over integer multiple of <i><tt>fragment</tt></i>.
239 It will return value <tt>0</tt> for an aligned pointer.
240 </p><p>
241 glib NOTE: YOU MAY NOT STORE POINTERS IN INTEGERS.
242 </p><p>
243 <i><tt>Returns</tt></i>: gsize typed number of bytes exceeding over integer multiple of <i><tt>fragment</tt></i>.</p><p>
244
245 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>pointer</tt></i> :</span></td><td> Arbitrary pointer type.
246 </td></tr><tr><td><span class="term"><i><tt>fragment</tt></i> :</span></td><td> Amount of 'sizeof(char)' to detect down-alignment amount of <i><tt>pointer</tt></i> for.
247 This size will be typically a power of 2.
248 Value less or equal to <tt>0</tt> is forbidden.
249 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="CAPTIVE-ROUND-DOWN-EXCEEDING64-CAPS"></a>CAPTIVE_ROUND_DOWN_EXCEEDING64()</h3><pre class="programlisting">#define     CAPTIVE_ROUND_DOWN_EXCEEDING64(pointer,fragment)</pre><p>
250
251 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>pointer</tt></i> :</span></td><td>
252 </td></tr><tr><td><span class="term"><i><tt>fragment</tt></i> :</span></td><td>
253
254
255 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="CAPTIVE-ROUND-UP-CAPS"></a>CAPTIVE_ROUND_UP()</h3><pre class="programlisting">#define     CAPTIVE_ROUND_UP(pointer,fragment)</pre><p>
256 General pointer up-rounding macro. Already aligned pointer is left as is.
257 </p><p>
258 glib NOTE: YOU MAY NOT STORE POINTERS IN INTEGERS.
259 </p><p>
260 <i><tt>Returns</tt></i>: Up-rounded <i><tt>pointer</tt></i> to the integer multiple of <i><tt>fragment</tt></i>.
261 Resulting pointer has the same type as <i><tt>pointer</tt></i>.</p><p>
262
263 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>pointer</tt></i> :</span></td><td> Arbitrary pointer type.
264 </td></tr><tr><td><span class="term"><i><tt>fragment</tt></i> :</span></td><td> Amount of 'sizeof(char)' to align <i><tt>pointer</tt></i> up to.
265 This size will be typically a power of 2.
266 Value less or equal to <tt>0</tt> is forbidden.
267 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="CAPTIVE-ROUND-UP64-CAPS"></a>CAPTIVE_ROUND_UP64()</h3><pre class="programlisting">#define     CAPTIVE_ROUND_UP64(pointer,fragment)</pre><p>
268
269 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i><tt>pointer</tt></i> :</span></td><td>
270 </td></tr><tr><td><span class="term"><i><tt>fragment</tt></i> :</span></td><td>
271
272
273 </td></tr></tbody></table></div></div></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="captive-apiref-ldr.html"><b>&lt;&lt; ldr</b></a></td><td align="right"><a accesskey="n" href="captive-apiref-mm.html"><b>mm &gt;&gt;</b></a></td></tr></table></body></html>