<!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>stream.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="classes.html">Alphabetical List</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> </center> <hr><h1>stream.c File Reference</h1><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><a class="el" href="types_8h.html#a23">wmfStream</a> * </td><td valign=bottom><a class="el" href="stream_8c.html#a0">wmf_ztream_create</a> (<a class="el" href="types_8h.html#a22">wmfAPI</a> *API, gzFile out)</td></tr> <tr><td nowrap align=right valign=top><a class="el" href="types_8h.html#a23">wmfStream</a> * </td><td valign=bottom><a class="el" href="stream_8c.html#a1">wmf_stream_create</a> (<a class="el" href="types_8h.html#a22">wmfAPI</a> *API, FILE *out)</td></tr> <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="stream_8c.html#a2">wmf_ztream_destroy</a> (<a class="el" href="types_8h.html#a22">wmfAPI</a> *API, <a class="el" href="types_8h.html#a23">wmfStream</a> *stream, char **buffer, unsigned long *length)</td></tr> <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="stream_8c.html#a3">wmf_stream_destroy</a> (<a class="el" href="types_8h.html#a22">wmfAPI</a> *API, <a class="el" href="types_8h.html#a23">wmfStream</a> *stream, char **buffer, unsigned long *length)</td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="stream_8c.html#a4">wmf_stream_printf</a> (<a class="el" href="types_8h.html#a22">wmfAPI</a> *API, <a class="el" href="types_8h.html#a23">wmfStream</a> *stream, char *format,...)</td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="stream_8c.html#a5">wmf_stream_zputs</a> (char *str, void *context)</td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="stream_8c.html#a6">wmf_stream_sputs</a> (char *str, void *context)</td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="stream_8c.html#a7">wmf_stream_rezet</a> (void *context)</td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="stream_8c.html#a8">wmf_stream_reset</a> (void *context)</td></tr> </table> <hr><h2>Function Documentation</h2> <a name="a1" doxytag="stream.c::wmf_stream_create"></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="types_8h.html#a23">wmfStream</a>* wmf_stream_create </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="types_8h.html#a22">wmfAPI</a> * </td> <td class="mdname" nowrap> <em>API</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>FILE * </td> <td class="mdname" nowrap> <em>out</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> Open an uncompressed character output stream.<dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>API</em> </td><td> the API handle </td></tr> <tr><td valign=top><em>out</em> </td><td> descriptor for a file stream; or zero to write to memory</td></tr> </table> </dl><a class="el" href="stream_8c.html#a1">wmf_stream_create()</a> creates a <b><a class="el" href="types_8h.html#a23">wmfStream</a></b> (a character-based output stream) for output to a file or, if <code>out</code> is zero, to memory. <p> <dl compact><dt><b>Returns: </b></dt><dd> Returns a <b><a class="el" href="types_8h.html#a23">wmfStream</a></b> pointer, or zero on failure. Possible library error states of <b>wmf_E_InsMem</b> or <b>wmf_E_BadFile</b>. </dl> </td> </tr> </table> <a name="a3" doxytag="stream.c::wmf_stream_destroy"></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"> void wmf_stream_destroy </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="types_8h.html#a22">wmfAPI</a> * </td> <td class="mdname" nowrap> <em>API</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="types_8h.html#a23">wmfStream</a> * </td> <td class="mdname" nowrap> <em>stream</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>char ** </td> <td class="mdname" nowrap> <em>buffer</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>unsigned long * </td> <td class="mdname" nowrap> <em>length</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> Close an uncompressed character output stream.<dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>API</em> </td><td> the API handle </td></tr> <tr><td valign=top><em>stream</em> </td><td> stream handle </td></tr> <tr><td valign=top><em>buffer</em> </td><td> for memory return </td></tr> <tr><td valign=top><em>length</em> </td><td> for length return</td></tr> </table> </dl>In the case of write-to-memory, on return <code>*buffer</code> is an array of length <code>length</code>. </td> </tr> </table> <a name="a4" doxytag="stream.c::wmf_stream_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 wmf_stream_printf </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="types_8h.html#a22">wmfAPI</a> * </td> <td class="mdname" nowrap> <em>API</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="types_8h.html#a23">wmfStream</a> * </td> <td class="mdname" nowrap> <em>stream</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>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> Formatted print to character output stream.<dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>API</em> </td><td> the API handle </td></tr> <tr><td valign=top><em>stream</em> </td><td> stream handle </td></tr> <tr><td valign=top><em>format</em> </td><td> print format</td></tr> </table> </dl>With syntax similar to printf(), <a class="el" href="stream_8c.html#a4">wmf_stream_printf()</a> prints a formatted message to a <b><a class="el" href="types_8h.html#a23">wmfStream</a></b> character stream. <p> <dl compact><dt><b>Returns: </b></dt><dd> Returns the number of characters written, or zero on failure. Possible library error state of <b>wmf_E_InsMem</b>. </dl> </td> </tr> </table> <a name="a8" doxytag="stream.c::wmf_stream_reset"></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 wmf_stream_reset </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void * </td> <td class="mdname1" valign="top" nowrap> </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> uncompressed char output (wmf_stream_create): rewind() </td> </tr> </table> <a name="a7" doxytag="stream.c::wmf_stream_rezet"></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 wmf_stream_rezet </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void * </td> <td class="mdname1" valign="top" nowrap> </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> compressed char output (wmf_ztream_create): rewind() </td> </tr> </table> <a name="a6" doxytag="stream.c::wmf_stream_sputs"></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 wmf_stream_sputs </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char * </td> <td class="mdname" nowrap> , </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>void * </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> uncompressed char output (wmf_stream_create): fputs() </td> </tr> </table> <a name="a5" doxytag="stream.c::wmf_stream_zputs"></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 wmf_stream_zputs </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char * </td> <td class="mdname" nowrap> , </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>void * </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> compressed char output (wmf_ztream_create): fputs() </td> </tr> </table> <a name="a0" doxytag="stream.c::wmf_ztream_create"></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="types_8h.html#a23">wmfStream</a>* wmf_ztream_create </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="types_8h.html#a22">wmfAPI</a> * </td> <td class="mdname" nowrap> <em>API</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>gzFile </td> <td class="mdname" nowrap> <em>out</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> Open a compressed character output stream.<dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>API</em> </td><td> the API handle </td></tr> <tr><td valign=top><em>out</em> </td><td> descriptor for a zlib compressed file stream</td></tr> </table> </dl><a class="el" href="stream_8c.html#a0">wmf_ztream_create()</a> creates a <b><a class="el" href="types_8h.html#a23">wmfStream</a></b> (a character-based output stream) for output to a file opened via <b>zlib</b>. (Writing compressed data to memory is not currently supported.) <p> <dl compact><dt><b>Returns: </b></dt><dd> Returns a <b><a class="el" href="types_8h.html#a23">wmfStream</a></b> pointer, or zero on failure. Possible library error state of <b>wmf_E_InsMem</b>. </dl> </td> </tr> </table> <a name="a2" doxytag="stream.c::wmf_ztream_destroy"></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"> void wmf_ztream_destroy </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="types_8h.html#a22">wmfAPI</a> * </td> <td class="mdname" nowrap> <em>API</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="types_8h.html#a23">wmfStream</a> * </td> <td class="mdname" nowrap> <em>stream</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>char ** </td> <td class="mdname" nowrap> <em>buffer</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>unsigned long * </td> <td class="mdname" nowrap> <em>length</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> Close a compressed character output stream.<dl compact><dt><b>Parameters: </b></dt><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>API</em> </td><td> the API handle </td></tr> <tr><td valign=top><em>stream</em> </td><td> stream handle </td></tr> <tr><td valign=top><em>buffer</em> </td><td> (unused) </td></tr> <tr><td valign=top><em>length</em> </td><td> (unused) </td></tr> </table> </dl> </td> </tr> </table> <hr><address style="align: right;"><small>Generated on Tue Dec 10 19:53:51 2002 for libwmf 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>