<!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>output.c File Reference</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> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> <a class="qindex" href="pages.html">Related Pages</a> <a class="qindex" href="examples.html">Examples</a> </center> <hr><h1>output.c File Reference</h1>Generic stdio-like output interface. <a href="#_details">More...</a> <p> <table border=0 cellpadding=0 cellspacing=0> <tr><td></td></tr> <tr><td colspan=2><br><h2>Functions</h2></td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="output_8c.html#a0">snd_output_close</a> (<a class="el" href="group___output.html#a0">snd_output_t</a> *output)</td></tr> <tr><td> </td><td><font size=-1><em>Closes an output handle.</em> <a href="#a0"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="output_8c.html#a1">snd_output_printf</a> (<a class="el" href="group___output.html#a0">snd_output_t</a> *output, const char *format,...)</td></tr> <tr><td> </td><td><font size=-1><em>Writes formatted output (like <code>fprintf(3))</code> to an output handle.</em> <a href="#a1"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="output_8c.html#a2">snd_output_puts</a> (<a class="el" href="group___output.html#a0">snd_output_t</a> *output, const char *str)</td></tr> <tr><td> </td><td><font size=-1><em>Writes a string to an output handle (like <code>fputs(3))</code>.</em> <a href="#a2"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="output_8c.html#a3">snd_output_putc</a> (<a class="el" href="group___output.html#a0">snd_output_t</a> *output, int c)</td></tr> <tr><td> </td><td><font size=-1><em>Writes a character to an output handle (like <code>putc(3))</code>.</em> <a href="#a3"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="output_8c.html#a4">snd_output_flush</a> (<a class="el" href="group___output.html#a0">snd_output_t</a> *output)</td></tr> <tr><td> </td><td><font size=-1><em>Flushes an output handle (like fflush(3)).</em> <a href="#a4"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="output_8c.html#a5">snd_output_stdio_attach</a> (<a class="el" href="group___output.html#a0">snd_output_t</a> **outputp, FILE *fp, int _close)</td></tr> <tr><td> </td><td><font size=-1><em>Creates a new output object using an existing stdio <code>FILE</code> pointer.</em> <a href="#a5"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="output_8c.html#a6">snd_output_stdio_open</a> (<a class="el" href="group___output.html#a0">snd_output_t</a> **outputp, const char *file, const char *mode)</td></tr> <tr><td> </td><td><font size=-1><em>Creates a new output object writing to a file.</em> <a href="#a6"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>size_t </td><td valign=bottom><a class="el" href="output_8c.html#a7">snd_output_buffer_string</a> (<a class="el" href="group___output.html#a0">snd_output_t</a> *output, char **buf)</td></tr> <tr><td> </td><td><font size=-1><em>Returns the address of the buffer of a SND_OUTPUT_TYPE_BUFFER output handle.</em> <a href="#a7"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="output_8c.html#a8">snd_output_buffer_open</a> (<a class="el" href="group___output.html#a0">snd_output_t</a> **outputp)</td></tr> <tr><td> </td><td><font size=-1><em>Creates a new output object with an auto-extending memory buffer.</em> <a href="#a8"></a><em></em></font><br><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Generic stdio-like output interface. <p> <p> <dl compact><dt><b>Author: </b></dt><dd> Abramo Bagnara <<a href="mailto:abramo@alsa-project.org">abramo@alsa-project.org</a>> </dl><dl compact><dt><b>Date: </b></dt><dd> 2000</dl>Generic stdio-like output interface <p> <hr><h2>Function Documentation</h2> <a name="a8" doxytag="output.c::snd_output_buffer_open"></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_output_buffer_open </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___output.html#a0">snd_output_t</a> ** </td> <td class="mdname1" valign="top" nowrap> <em>outputp</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Creates a new output object with an auto-extending memory buffer. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>outputp</em> </td><td> The function puts the pointer to the new output object at the address specified by <code>outputp</code>. </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> Zero if successful, otherwise a negative error code. </dl> </td> </tr> </table> <a name="a7" doxytag="output.c::snd_output_buffer_string"></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"> size_t snd_output_buffer_string </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___output.html#a0">snd_output_t</a> * </td> <td class="mdname" nowrap> <em>output</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>char ** </td> <td class="mdname" nowrap> <em>buf</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Returns the address of the buffer of a SND_OUTPUT_TYPE_BUFFER output handle. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>output</em> </td><td> The output handle. </td></tr> <tr><td valign=top><em>buf</em> </td><td> The functions puts the current address of the buffer at the address specified by <code>buf</code>. </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> The current size of valid data in the buffer.</dl>The address of the buffer may become invalid when output functions or <a class="el" href="output_8c.html#a0">snd_output_close</a> are called. </td> </tr> </table> <a name="a0" doxytag="output.c::snd_output_close"></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_output_close </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___output.html#a0">snd_output_t</a> * </td> <td class="mdname1" valign="top" nowrap> <em>output</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Closes an output handle. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>output</em> </td><td> The output handle to be closed. </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> Zero if successful, otherwise a negative error code. </dl> </td> </tr> </table> <a name="a4" doxytag="output.c::snd_output_flush"></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_output_flush </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___output.html#a0">snd_output_t</a> * </td> <td class="mdname1" valign="top" nowrap> <em>output</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Flushes an output handle (like fflush(3)). <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>output</em> </td><td> The output handle. </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> Zero if successful, otherwise <code>EOF</code>.</dl>If the underlying destination is a stdio stream, this function calls <code>fflush</code>. If the underlying destination is a memory buffer, the write position is reset to the beginning of the buffer. =:<code>-o</code> </td> </tr> </table> <a name="a1" doxytag="output.c::snd_output_printf"></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_output_printf </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___output.html#a0">snd_output_t</a> * </td> <td class="mdname" nowrap> <em>output</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const char * </td> <td class="mdname" nowrap> <em>format</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>... </td> <td class="mdname" nowrap> </td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Writes formatted output (like <code>fprintf(3))</code> to an output handle. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>output</em> </td><td> The output handle. </td></tr> <tr><td valign=top><em>format</em> </td><td> Format string in <code>fprintf</code> format. </td></tr> <tr><td valign=top><em>...</em> </td><td> Other <code>fprintf</code> arguments. </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> The number of characters written, or a negative error code. </dl> </td> </tr> </table> <a name="a3" doxytag="output.c::snd_output_putc"></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_output_putc </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___output.html#a0">snd_output_t</a> * </td> <td class="mdname" nowrap> <em>output</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>c</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Writes a character to an output handle (like <code>putc(3))</code>. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>output</em> </td><td> The output handle. </td></tr> <tr><td valign=top><em>c</em> </td><td> The character. </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> Zero if successful, otherwise a negative error code or <code>EOF</code>. </dl> </td> </tr> </table> <a name="a2" doxytag="output.c::snd_output_puts"></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_output_puts </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___output.html#a0">snd_output_t</a> * </td> <td class="mdname" nowrap> <em>output</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const char * </td> <td class="mdname" nowrap> <em>str</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Writes a string to an output handle (like <code>fputs(3))</code>. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>output</em> </td><td> The output handle. </td></tr> <tr><td valign=top><em>str</em> </td><td> Pointer to the string. </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> Zero if successful, otherwise a negative error code or <code>EOF</code>. </dl> </td> </tr> </table> <a name="a5" doxytag="output.c::snd_output_stdio_attach"></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_output_stdio_attach </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___output.html#a0">snd_output_t</a> ** </td> <td class="mdname" nowrap> <em>outputp</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>FILE * </td> <td class="mdname" nowrap> <em>fp</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>_close</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Creates a new output object using an existing stdio <code>FILE</code> pointer. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>outputp</em> </td><td> The function puts the pointer to the new output object at the address specified by <code>outputp</code>. </td></tr> <tr><td valign=top><em>fp</em> </td><td> The <code>FILE</code> pointer to write to. Characters are written to the file starting at the current file position. </td></tr> <tr><td valign=top><em>close</em> </td><td> Close flag. Set this to 1 if <a class="el" href="output_8c.html#a0">snd_output_close</a> should close <code>fp</code> by calling <code>fclose</code>. </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> Zero if successful, otherwise a negative error code. </dl> </td> </tr> </table> <a name="a6" doxytag="output.c::snd_output_stdio_open"></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_output_stdio_open </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group___output.html#a0">snd_output_t</a> ** </td> <td class="mdname" nowrap> <em>outputp</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const char * </td> <td class="mdname" nowrap> <em>file</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const char * </td> <td class="mdname" nowrap> <em>mode</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Creates a new output object writing to a file. <p> <dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>outputp</em> </td><td> The function puts the pointer to the new output object at the address specified by <code>outputp</code>. </td></tr> <tr><td valign=top><em>file</em> </td><td> The name of the file to open. </td></tr> <tr><td valign=top><em>mode</em> </td><td> The open mode, like <code>fopen(3)</code>. </td></tr> </table> </dl><dl compact><dt><b>Returns: </b></dt><dd> Zero if successful, otherwise a negative error code. </dl> </td> </tr> </table> <hr><address style="align: right;"><small>Generated on Thu Feb 20 16:45:44 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>