Your IP : 216.73.216.48
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>OrcDebug: Orc Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Orc Reference Manual">
<link rel="up" href="ch03.html" title="Extension API">
<link rel="prev" href="ch03.html" title="Extension API">
<link rel="next" href="orc-OrcOpcode.html" title="OrcOpcode">
<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#orc-OrcDebug.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch03.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="ch03.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="orc-OrcOpcode.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="orc-OrcDebug"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="orc-OrcDebug.top_of_page"></a>OrcDebug</span></h2>
<p>OrcDebug — Printing and formatting debug information</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="orc-OrcDebug.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="orc-OrcDebug.html#OrcDebugPrintFunc" title="OrcDebugPrintFunc ()">*OrcDebugPrintFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="orc-OrcDebug.html#ORC-DEBUG-PRINT:CAPS" title="ORC_DEBUG_PRINT()">ORC_DEBUG_PRINT</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="orc-OrcDebug.html#ORC-ERROR:CAPS" title="ORC_ERROR()">ORC_ERROR</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="orc-OrcDebug.html#ORC-WARNING:CAPS" title="ORC_WARNING()">ORC_WARNING</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="orc-OrcDebug.html#ORC-INFO:CAPS" title="ORC_INFO()">ORC_INFO</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="orc-OrcDebug.html#ORC-DEBUG:CAPS" title="ORC_DEBUG()">ORC_DEBUG</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="orc-OrcDebug.html#ORC-LOG:CAPS" title="ORC_LOG()">ORC_LOG</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="orc-OrcDebug.html#orc-debug-get-level" title="orc_debug_get_level ()">orc_debug_get_level</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="orc-OrcDebug.html#orc-debug-print" title="orc_debug_print ()">orc_debug_print</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="orc-OrcDebug.html#orc-debug-set-level" title="orc_debug_set_level ()">orc_debug_set_level</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="orc-OrcDebug.html#orc-debug-set-print-function" title="orc_debug_set_print_function ()">orc_debug_set_print_function</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="orc-OrcDebug.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="orc-OrcDebug.html#OrcDebugLevel" title="enum OrcDebugLevel">OrcDebugLevel</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="orc-OrcDebug.html#ORC-FUNCTION:CAPS" title="ORC_FUNCTION">ORC_FUNCTION</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="orc-OrcDebug.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="orc-OrcDebug.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="OrcDebugPrintFunc"></a><h3>OrcDebugPrintFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
<span class="c_punctuation">(</span>*OrcDebugPrintFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><span class="type">int</span> level</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *file</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *func</code></em>,
<em class="parameter"><code><span class="type">int</span> line</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *format</code></em>,
<em class="parameter"><code><span class="type">va_list</span> varargs</code></em>);</pre>
<p>Typedef describing functions that can be registered using
<a class="link" href="orc-OrcDebug.html#orc-debug-set-print-function" title="orc_debug_set_print_function ()"><code class="function">orc_debug_set_print_function()</code></a> so that it is called to
print debugging messages.</p>
<div class="refsect3">
<a name="id-1.4.2.6.2.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>level</p></td>
<td class="parameter_description"><p>the debug level</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>file</p></td>
<td class="parameter_description"><p>name of the file where the debug message occurs</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p>name of the function where the debug message occurs</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>line</p></td>
<td class="parameter_description"><p>line in the file where the debug message occurs</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>format</p></td>
<td class="parameter_description"><p>a printf format</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>varargs</p></td>
<td class="parameter_description"><p>varargs for the printf format</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="ORC-DEBUG-PRINT:CAPS"></a><h3>ORC_DEBUG_PRINT()</h3>
<pre class="programlisting">#define ORC_DEBUG_PRINT(level, ...)</pre>
<p>Macro to call <a class="link" href="orc-OrcDebug.html#orc-debug-print" title="orc_debug_print ()"><code class="function">orc_debug_print()</code></a> with the correct values for
the name of the source file, line of source file, and function.</p>
<div class="refsect3">
<a name="id-1.4.2.6.3.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>level</p></td>
<td class="parameter_description"><p>debug level of message</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="ORC-ERROR:CAPS"></a><h3>ORC_ERROR()</h3>
<pre class="programlisting">#define ORC_ERROR(...) ORC_DEBUG_PRINT(ORC_DEBUG_ERROR, __VA_ARGS__)
</pre>
<p>Macro to call <a class="link" href="orc-OrcDebug.html#ORC-DEBUG-PRINT:CAPS" title="ORC_DEBUG_PRINT()"><code class="function">ORC_DEBUG_PRINT()</code></a> with a level of <a class="link" href="orc-OrcDebug.html#ORC-DEBUG-ERROR:CAPS"><span class="type">ORC_DEBUG_ERROR</span></a>.</p>
<div class="refsect3">
<a name="id-1.4.2.6.4.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>printf-style format and arguments</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="ORC-WARNING:CAPS"></a><h3>ORC_WARNING()</h3>
<pre class="programlisting">#define ORC_WARNING(...) ORC_DEBUG_PRINT(ORC_DEBUG_WARNING, __VA_ARGS__)
</pre>
<p>Macro to call <a class="link" href="orc-OrcDebug.html#ORC-DEBUG-PRINT:CAPS" title="ORC_DEBUG_PRINT()"><code class="function">ORC_DEBUG_PRINT()</code></a> with a level of <a class="link" href="orc-OrcDebug.html#ORC-DEBUG-WARNING:CAPS"><span class="type">ORC_DEBUG_WARNING</span></a>.</p>
<div class="refsect3">
<a name="id-1.4.2.6.5.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>printf-style format and arguments</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="ORC-INFO:CAPS"></a><h3>ORC_INFO()</h3>
<pre class="programlisting">#define ORC_INFO(...) ORC_DEBUG_PRINT(ORC_DEBUG_INFO, __VA_ARGS__)
</pre>
<p>Macro to call <a class="link" href="orc-OrcDebug.html#ORC-DEBUG-PRINT:CAPS" title="ORC_DEBUG_PRINT()"><code class="function">ORC_DEBUG_PRINT()</code></a> with a level of <a class="link" href="orc-OrcDebug.html#ORC-DEBUG-INFO:CAPS"><span class="type">ORC_DEBUG_INFO</span></a>.</p>
<div class="refsect3">
<a name="id-1.4.2.6.6.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>printf-style format and arguments</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="ORC-DEBUG:CAPS"></a><h3>ORC_DEBUG()</h3>
<pre class="programlisting">#define ORC_DEBUG(...) ORC_DEBUG_PRINT(ORC_DEBUG_DEBUG, __VA_ARGS__)
</pre>
<p>Macro to call <a class="link" href="orc-OrcDebug.html#ORC-DEBUG-PRINT:CAPS" title="ORC_DEBUG_PRINT()"><code class="function">ORC_DEBUG_PRINT()</code></a> with a level of <a class="link" href="orc-OrcDebug.html#ORC-DEBUG-DEBUG:CAPS"><span class="type">ORC_DEBUG_DEBUG</span></a>.</p>
<div class="refsect3">
<a name="id-1.4.2.6.7.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>printf-style format and arguments</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="ORC-LOG:CAPS"></a><h3>ORC_LOG()</h3>
<pre class="programlisting">#define ORC_LOG(...) ORC_DEBUG_PRINT(ORC_DEBUG_LOG, __VA_ARGS__)
</pre>
<p>Macro to call <a class="link" href="orc-OrcDebug.html#ORC-DEBUG-PRINT:CAPS" title="ORC_DEBUG_PRINT()"><code class="function">ORC_DEBUG_PRINT()</code></a> with a level of <a class="link" href="orc-OrcDebug.html#ORC-DEBUG-LOG:CAPS"><span class="type">ORC_DEBUG_LOG</span></a>.</p>
<div class="refsect3">
<a name="id-1.4.2.6.8.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>printf-style format and arguments</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="orc-debug-get-level"></a><h3>orc_debug_get_level ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
orc_debug_get_level (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Gets the current debug level.</p>
<div class="refsect3">
<a name="id-1.4.2.6.9.5"></a><h4>Returns</h4>
<p> the current debug level</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="orc-debug-print"></a><h3>orc_debug_print ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
orc_debug_print (<em class="parameter"><code><span class="type">int</span> level</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *file</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *func</code></em>,
<em class="parameter"><code><span class="type">int</span> line</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *format</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="orc-debug-set-level"></a><h3>orc_debug_set_level ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
orc_debug_set_level (<em class="parameter"><code><span class="type">int</span> level</code></em>);</pre>
<p>Sets the current debug level.</p>
<div class="refsect3">
<a name="id-1.4.2.6.11.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>level</p></td>
<td class="parameter_description"><p>the new debug level</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="orc-debug-set-print-function"></a><h3>orc_debug_set_print_function ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
orc_debug_set_print_function (<em class="parameter"><code><a class="link" href="orc-OrcDebug.html#OrcDebugPrintFunc" title="OrcDebugPrintFunc ()"><span class="type">OrcDebugPrintFunc</span></a> func</code></em>);</pre>
<p>Sets the function to call when outputting debugging information.
A value of NULL for <em class="parameter"><code>func</code></em>
will restore the default handler,
which prints debugging information to stderr.</p>
<div class="refsect3">
<a name="id-1.4.2.6.12.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p>the function to call</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="orc-OrcDebug.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="OrcDebugLevel"></a><h3>enum OrcDebugLevel</h3>
<p>Enumeration describing debug levels in Orc.</p>
<div class="refsect3">
<a name="id-1.4.2.7.2.4"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="ORC-DEBUG-NONE:CAPS"></a>ORC_DEBUG_NONE</p></td>
<td class="enum_member_description">
<p>No debugging. Used to disable debugging output.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="ORC-DEBUG-ERROR:CAPS"></a>ORC_DEBUG_ERROR</p></td>
<td class="enum_member_description">
<p>The level for messages indicating that an error
has occurred that causes Orc to produce incorrect results. Also
used temporarily by developers for testing code.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="ORC-DEBUG-WARNING:CAPS"></a>ORC_DEBUG_WARNING</p></td>
<td class="enum_member_description">
<p>Messages at this level indicate something has
occurred that a developer looking into an application problem may
want to know.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="ORC-DEBUG-INFO:CAPS"></a>ORC_DEBUG_INFO</p></td>
<td class="enum_member_description">
<p>Messages at this level provide high-level
information about Orc internals.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="ORC-DEBUG-DEBUG:CAPS"></a>ORC_DEBUG_DEBUG</p></td>
<td class="enum_member_description">
<p>The default level for logging messages.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="ORC-DEBUG-LOG:CAPS"></a>ORC_DEBUG_LOG</p></td>
<td class="enum_member_description">
<p>The level for messages that probably don't need to
be logged at all.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="ORC-FUNCTION:CAPS"></a><h3>ORC_FUNCTION</h3>
<pre class="programlisting">#define ORC_FUNCTION __PRETTY_FUNCTION__
</pre>
<p>Internal macro that points to __PRETTY_FUNCTION__ or __func__
if the former is not available.</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.24</div>
</body>
</html>