1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
7 <link rel="home" href="index.html" title="Liboil Reference Manual">
8 <link rel="up" href="ch02.html" title="Liboil Unstable API">
9 <link rel="prev" href="liboil-liboilcpu.html" title="CPU">
10 <link rel="next" href="liboil-liboilclass-unstable.html" title="OilFunctionClass">
11 <meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 <link rel="chapter" href="ch01.html" title="Liboil Stable API">
14 <link rel="chapter" href="ch02.html" title="Liboil Unstable API">
16 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
17 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
19 <td><a accesskey="p" href="liboil-liboilcpu.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
20 <td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
21 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
22 <th width="100%" align="center">Liboil Reference Manual</th>
23 <td><a accesskey="n" href="liboil-liboilclass-unstable.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
25 <tr><td colspan="5" class="shortcuts">
26 <a href="#liboil-liboildebug.synopsis" class="shortcut">Top</a>
28 <a href="#liboil-liboildebug.description" class="shortcut">Description</a>
31 <div class="refentry" title="Debug">
32 <a name="liboil-liboildebug"></a><div class="titlepage"></div>
33 <div class="refnamediv"><table width="100%"><tr>
35 <h2><span class="refentrytitle"><a name="liboil-liboildebug.top_of_page"></a>Debug</span></h2>
36 <p>Debug — Printing and formatting debug information</p>
38 <td valign="top" align="right"></td>
40 <div class="refsynopsisdiv" title="Synopsis">
41 <a name="liboil-liboildebug.synopsis"></a><h2>Synopsis</h2>
42 <pre class="synopsis">
43 void (<a class="link" href="liboil-liboildebug.html#OilDebugPrintFunc" title="OilDebugPrintFunc ()">*OilDebugPrintFunc</a>) (int level,
49 enum <a class="link" href="liboil-liboildebug.html#OilDebugLevel" title="enum OilDebugLevel">OilDebugLevel</a>;
50 void <a class="link" href="liboil-liboildebug.html#oil-debug-set-print-function" title="oil_debug_set_print_function ()">oil_debug_set_print_function</a> (<a class="link" href="liboil-liboildebug.html#OilDebugPrintFunc" title="OilDebugPrintFunc ()">OilDebugPrintFunc</a> func);
51 int <a class="link" href="liboil-liboildebug.html#oil-debug-get-level" title="oil_debug_get_level ()">oil_debug_get_level</a> (void);
52 void <a class="link" href="liboil-liboildebug.html#oil-debug-set-level" title="oil_debug_set_level ()">oil_debug_set_level</a> (int level);
53 #define <a class="link" href="liboil-liboildebug.html#OIL-ERROR--CAPS" title="OIL_ERROR()">OIL_ERROR</a> (...)
54 #define <a class="link" href="liboil-liboildebug.html#OIL-WARNING--CAPS" title="OIL_WARNING()">OIL_WARNING</a> (...)
55 #define <a class="link" href="liboil-liboildebug.html#OIL-INFO--CAPS" title="OIL_INFO()">OIL_INFO</a> (...)
56 #define <a class="link" href="liboil-liboildebug.html#OIL-DEBUG--CAPS" title="OIL_DEBUG()">OIL_DEBUG</a> (...)
57 #define <a class="link" href="liboil-liboildebug.html#OIL-LOG--CAPS" title="OIL_LOG()">OIL_LOG</a> (...)
58 #define <a class="link" href="liboil-liboildebug.html#OIL-FUNCTION--CAPS" title="OIL_FUNCTION">OIL_FUNCTION</a>
59 #define <a class="link" href="liboil-liboildebug.html#OIL-DEBUG-PRINT--CAPS" title="OIL_DEBUG_PRINT()">OIL_DEBUG_PRINT</a> (level, ...)
62 <div class="refsect1" title="Description">
63 <a name="liboil-liboildebug.description"></a><h2>Description</h2>
69 <div class="refsect1" title="Details">
70 <a name="liboil-liboildebug.details"></a><h2>Details</h2>
71 <div class="refsect2" title="OilDebugPrintFunc ()">
72 <a name="OilDebugPrintFunc"></a><h3>OilDebugPrintFunc ()</h3>
73 <pre class="programlisting">void (*OilDebugPrintFunc) (int level,
78 va_list varargs);</pre>
80 Typedef describing functions that can be registered using
81 <a class="link" href="liboil-liboildebug.html#oil-debug-set-print-function" title="oil_debug_set_print_function ()"><code class="function">oil_debug_set_print_function()</code></a> so that it is called to
82 print debugging messages.</p>
85 <div class="variablelist"><table border="0">
86 <col align="left" valign="top">
89 <td><p><span class="term"><em class="parameter"><code>level</code></em> :</span></p></td>
94 <td><p><span class="term"><em class="parameter"><code>file</code></em> :</span></p></td>
95 <td> name of the file where the debug message occurs
99 <td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
100 <td> name of the function where the debug message occurs
104 <td><p><span class="term"><em class="parameter"><code>line</code></em> :</span></p></td>
105 <td> line in the file where the debug message occurs
109 <td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td>
114 <td><p><span class="term"><em class="parameter"><code>varargs</code></em> :</span></p></td>
115 <td> varargs for the printf format
122 <div class="refsect2" title="enum OilDebugLevel">
123 <a name="OilDebugLevel"></a><h3>enum OilDebugLevel</h3>
124 <pre class="programlisting">typedef enum {
134 Enumeration describing debug levels in Liboil.</p>
139 <div class="refsect2" title="oil_debug_set_print_function ()">
140 <a name="oil-debug-set-print-function"></a><h3>oil_debug_set_print_function ()</h3>
141 <pre class="programlisting">void oil_debug_set_print_function (<a class="link" href="liboil-liboildebug.html#OilDebugPrintFunc" title="OilDebugPrintFunc ()">OilDebugPrintFunc</a> func);</pre>
143 Sets the function to call when outputting debugging information.
144 A value of NULL for <em class="parameter"><code>func</code></em> will restore the default handler,
145 which prints debugging information to stderr.</p>
148 <div class="variablelist"><table border="0">
149 <col align="left" valign="top">
151 <td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
158 <div class="refsect2" title="oil_debug_get_level ()">
159 <a name="oil-debug-get-level"></a><h3>oil_debug_get_level ()</h3>
160 <pre class="programlisting">int oil_debug_get_level (void);</pre>
162 Gets the current debug level.</p>
165 <div class="variablelist"><table border="0">
166 <col align="left" valign="top">
168 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
169 <td> the current debug level
175 <div class="refsect2" title="oil_debug_set_level ()">
176 <a name="oil-debug-set-level"></a><h3>oil_debug_set_level ()</h3>
177 <pre class="programlisting">void oil_debug_set_level (int level);</pre>
179 Sets the current debug level.</p>
182 <div class="variablelist"><table border="0">
183 <col align="left" valign="top">
185 <td><p><span class="term"><em class="parameter"><code>level</code></em> :</span></p></td>
186 <td> the new debug level
192 <div class="refsect2" title="OIL_ERROR()">
193 <a name="OIL-ERROR--CAPS"></a><h3>OIL_ERROR()</h3>
194 <pre class="programlisting">#define OIL_ERROR(...) OIL_DEBUG_PRINT(OIL_DEBUG_ERROR, __VA_ARGS__)
197 Macro to call <a class="link" href="liboil-liboildebug.html#OIL-DEBUG-PRINT--CAPS" title="OIL_DEBUG_PRINT()"><code class="function">OIL_DEBUG_PRINT()</code></a> with a level of <span class="type">OIL_DEBUG_ERROR</span>.</p>
200 <div class="variablelist"><table border="0">
201 <col align="left" valign="top">
203 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
210 <div class="refsect2" title="OIL_WARNING()">
211 <a name="OIL-WARNING--CAPS"></a><h3>OIL_WARNING()</h3>
212 <pre class="programlisting">#define OIL_WARNING(...) OIL_DEBUG_PRINT(OIL_DEBUG_WARNING, __VA_ARGS__)
215 Macro to call <a class="link" href="liboil-liboildebug.html#OIL-DEBUG-PRINT--CAPS" title="OIL_DEBUG_PRINT()"><code class="function">OIL_DEBUG_PRINT()</code></a> with a level of <span class="type">OIL_DEBUG_WARNING</span>.</p>
218 <div class="variablelist"><table border="0">
219 <col align="left" valign="top">
221 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
228 <div class="refsect2" title="OIL_INFO()">
229 <a name="OIL-INFO--CAPS"></a><h3>OIL_INFO()</h3>
230 <pre class="programlisting">#define OIL_INFO(...) OIL_DEBUG_PRINT(OIL_DEBUG_INFO, __VA_ARGS__)
233 Macro to call <a class="link" href="liboil-liboildebug.html#OIL-DEBUG-PRINT--CAPS" title="OIL_DEBUG_PRINT()"><code class="function">OIL_DEBUG_PRINT()</code></a> with a level of <span class="type">OIL_DEBUG_INFO</span>.</p>
236 <div class="variablelist"><table border="0">
237 <col align="left" valign="top">
239 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
246 <div class="refsect2" title="OIL_DEBUG()">
247 <a name="OIL-DEBUG--CAPS"></a><h3>OIL_DEBUG()</h3>
248 <pre class="programlisting">#define OIL_DEBUG(...) OIL_DEBUG_PRINT(OIL_DEBUG_DEBUG, __VA_ARGS__)
251 Macro to call <a class="link" href="liboil-liboildebug.html#OIL-DEBUG-PRINT--CAPS" title="OIL_DEBUG_PRINT()"><code class="function">OIL_DEBUG_PRINT()</code></a> with a level of <span class="type">OIL_DEBUG_DEBUG</span>.</p>
254 <div class="variablelist"><table border="0">
255 <col align="left" valign="top">
257 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
264 <div class="refsect2" title="OIL_LOG()">
265 <a name="OIL-LOG--CAPS"></a><h3>OIL_LOG()</h3>
266 <pre class="programlisting">#define OIL_LOG(...) OIL_DEBUG_PRINT(OIL_DEBUG_LOG, __VA_ARGS__)
269 Macro to call <a class="link" href="liboil-liboildebug.html#OIL-DEBUG-PRINT--CAPS" title="OIL_DEBUG_PRINT()"><code class="function">OIL_DEBUG_PRINT()</code></a> with a level of <span class="type">OIL_DEBUG_LOG</span>.</p>
272 <div class="variablelist"><table border="0">
273 <col align="left" valign="top">
275 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
282 <div class="refsect2" title="OIL_FUNCTION">
283 <a name="OIL-FUNCTION--CAPS"></a><h3>OIL_FUNCTION</h3>
284 <pre class="programlisting">#define OIL_FUNCTION</pre>
286 Internal macro that points to __PRETTY_FUNCTION__ or __func__
287 if the former is not available.</p>
292 <div class="refsect2" title="OIL_DEBUG_PRINT()">
293 <a name="OIL-DEBUG-PRINT--CAPS"></a><h3>OIL_DEBUG_PRINT()</h3>
294 <pre class="programlisting">#define OIL_DEBUG_PRINT(level, ...)</pre>
296 Macro to call <code class="function">oil_debug_print()</code> with the correct values for
297 the name of the source file, line of source file, and function.</p>
300 <div class="variablelist"><table border="0">
301 <col align="left" valign="top">
304 <td><p><span class="term"><em class="parameter"><code>level</code></em> :</span></p></td>
309 <td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
320 Generated by GTK-Doc V1.11</div>