Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > updates > by-pkgid > 18785641029f14f23cccc82925607ace > files > 40

libalsa2-docs-0.9.0-0.14rc7.1mdk.ppc.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Error handling</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.18 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="globals.html">Globals</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; <a class="qindex" href="examples.html">Examples</a> &nbsp; </center>
<hr><h1>Error handling</h1><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group___error.html#a4">SND_ERROR_BEGIN</a>&nbsp;&nbsp;&nbsp;500000</td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group___error.html#a5">SND_ERROR_INCOMPATIBLE_VERSION</a>&nbsp;&nbsp;&nbsp;(SND_ERROR_BEGIN+0)</td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group___error.html#a6">SNDERR</a>(args...)&nbsp;&nbsp;&nbsp;<a class="el" href="error_8c.html#a1">snd_lib_error</a>(__FILE__, __LINE__, __FUNCTION__, 0, ##args)</td></tr>
<tr><td nowrap align=right valign=top>#define&nbsp;</td><td valign=bottom><a class="el" href="group___error.html#a7">SYSERR</a>(args...)&nbsp;&nbsp;&nbsp;<a class="el" href="error_8c.html#a1">snd_lib_error</a>(__FILE__, __LINE__, __FUNCTION__, errno, ##args)</td></tr>
<tr><td colspan=2><br><h2>Typedefs</h2></td></tr>
<tr><td nowrap align=right valign=top>typedef void(*&nbsp;</td><td valign=bottom><a class="el" href="group___error.html#a0">snd_lib_error_handler_t</a> )(const char *file, int line, const char *function, int err, const char *fmt,...)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Error handler callback.</em> <a href="#a0"></a><em></em></font><br><br></td></tr>
<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td nowrap align=right valign=top>const char *&nbsp;</td><td valign=bottom><a class="el" href="group___error.html#a2">snd_strerror</a> (int errnum)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Returns the message for an error code.</em> <a href="#a2"></a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="group___error.html#a3">snd_lib_error_set_handler</a> (<a class="el" href="group___error.html#a0">snd_lib_error_handler_t</a> handler)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Sets the error handler.</em> <a href="#a3"></a><em></em></font><br><br></td></tr>
<tr><td colspan=2><br><h2>Variables</h2></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="group___error.html#a0">snd_lib_error_handler_t</a>&nbsp;</td><td valign=bottom><a class="el" href="group___error.html#a1">snd_lib_error</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Error handling macros and functions. <hr><h2>Define Documentation</h2>
<a name="a4" doxytag="error.h::SND_ERROR_BEGIN"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define SND_ERROR_BEGIN&nbsp;&nbsp;&nbsp;500000
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Lower boundary of sound error codes.     </td>
  </tr>
</table>
<a name="a5" doxytag="error.h::SND_ERROR_INCOMPATIBLE_VERSION"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define SND_ERROR_INCOMPATIBLE_VERSION&nbsp;&nbsp;&nbsp;(SND_ERROR_BEGIN+0)
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Kernel/library protocols are not compatible.     </td>
  </tr>
</table>
<a name="a6" doxytag="error.h::SNDERR"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define SNDERR</td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">args...&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap>&nbsp;&nbsp;&nbsp;<a class="el" href="group___error.html#a1">snd_lib_error</a>(__FILE__, __LINE__, __FUNCTION__, 0, ##args)
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Shows a sound error message.     </td>
  </tr>
</table>
<a name="a7" doxytag="error.h::SYSERR"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define SYSERR</td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">args...&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap>&nbsp;&nbsp;&nbsp;<a class="el" href="group___error.html#a1">snd_lib_error</a>(__FILE__, __LINE__, __FUNCTION__, errno, ##args)
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Shows a system error message (related to <code>errno)</code>.     </td>
  </tr>
</table>
<hr><h2>Typedef Documentation</h2>
<a name="a0" doxytag="error.h::snd_lib_error_handler_t"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> typedef void(* snd_lib_error_handler_t)(const char *file, int line, const char *function, int err, const char *fmt, ...)
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Error handler callback.
<p>
<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>file</em>&nbsp;</td><td>
Source file name. </td></tr>
<tr><td valign=top><em>line</em>&nbsp;</td><td>
Line number. </td></tr>
<tr><td valign=top><em>function</em>&nbsp;</td><td>
Function name. </td></tr>
<tr><td valign=top><em>err</em>&nbsp;</td><td>
Value of <code>errno</code>, or 0 if not relevant. </td></tr>
<tr><td valign=top><em>fmt</em>&nbsp;</td><td>
<code>printf(3)</code> format. </td></tr>
<tr><td valign=top><em>...</em>&nbsp;</td><td>
<code>printf(3)</code> arguments.</td></tr>
</table>
</dl>A function of this type is called by the ALSA library when an error occurs. This function usually shows the message on the screen, and/or logs it.     </td>
  </tr>
</table>
<hr><h2>Function Documentation</h2>
<a name="a3" doxytag="error.h::snd_lib_error_set_handler"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int snd_lib_error_set_handler </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group___error.html#a0">snd_lib_error_handler_t</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>handler</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets the error handler.
<p>
<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>handler</em>&nbsp;</td><td>
The pointer to the new error handler function.</td></tr>
</table>
</dl>This function sets a new error handler, or (if <code>handler</code> is <code>NULL)</code> the default one which prints the error messages to <code>stderr</code>.     </td>
  </tr>
</table>
<a name="a2" doxytag="error.h::snd_strerror"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> const char* snd_strerror </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>errnum</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns the message for an error code.
<p>
<dl compact><dt><b>Parameters: </b></dt><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>errnum</em>&nbsp;</td><td>
The error code number, which must be a system error code or an ALSA error code. </td></tr>
</table>
</dl><dl compact><dt><b>Returns: </b></dt><dd>
The ASCII description of the given numeric error code. </dl><dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="_2test_2latency_8c-example.html#a1">/test/latency.c</a>, <a class="el" href="_2test_2pcm_8c-example.html#a5">/test/pcm.c</a>, and <a class="el" href="_2test_2timer_8c-example.html#a2">/test/timer.c</a>.</dl>    </td>
  </tr>
</table>
<hr><h2>Variable Documentation</h2>
<a name="a1" doxytag="error.h::snd_lib_error"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="group___error.html#a0">snd_lib_error_handler_t</a> snd_lib_error </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Pointer to the error handler function. For internal use only.     </td>
  </tr>
</table>
<hr><address style="align: right;"><small>Generated on Wed Apr 2 16:06:36 2003 for ALSA project - the C library reference by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.18 </small></address>
</body>
</html>