Sophie

Sophie

distrib > Mandriva > 10.2 > i586 > by-pkgid > 4f37b923758ceff94a2c0ccca62b4b43 > files > 178

libapr1-devel-1.1.1-1mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Apache Portable Runtime: General Purpose Library Routines</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.9.1 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>General Purpose Library Routines<br>
<small>
[<a class="el" href="group__APR.html">Apache Portability Runtime library</a>]</small>
</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structapr__vformatter__buff__t.html">apr_vformatter_buff_t</a></td></tr>

<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__lib.html#ga4">HUGE_STRING_LEN</a>&nbsp;&nbsp;&nbsp;8192</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__lib.html#ga5">apr_killpg</a>(x, y)&nbsp;&nbsp;&nbsp;(killpg ((x), (y)))</td></tr>

<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="structapr__vformatter__buff__t.html">apr_vformatter_buff_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__lib.html#ga0">apr_vformatter_buff_t</a></td></tr>

<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__lib.html#ga1">apr_filepath_name_get</a> (const char *pathname)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__lib.html#ga2">apr_vformatter</a> (int(*flush_func)(<a class="el" href="structapr__vformatter__buff__t.html">apr_vformatter_buff_t</a> *b), <a class="el" href="structapr__vformatter__buff__t.html">apr_vformatter_buff_t</a> *c, const char *fmt, va_list ap)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__apr__lib.html#ga3">apr_password_get</a> (const char *prompt, char *pwbuf, apr_size_t *bufsize)</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This is collection of oddballs that didn't fit anywhere else, and might move to more appropriate headers with the release of APR 1.0. <hr><h2>Define Documentation</h2>
<a class="anchor" name="ga5" doxytag="apr_lib.h::apr_killpg"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">#define apr_killpg          </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">x,         <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>y&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap>&nbsp;&nbsp;&nbsp;(killpg ((x), (y)))</td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
apr_killpg Small utility macros to make things easier to read. Not usually a goal, to be sure..     </td>
  </tr>
</table>
<a class="anchor" name="ga4" doxytag="apr_lib.h::HUGE_STRING_LEN"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">#define HUGE_STRING_LEN&nbsp;&nbsp;&nbsp;8192          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
A constant representing a 'large' string.     </td>
  </tr>
</table>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="ga0" doxytag="apr_lib.h::apr_vformatter_buff_t"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">typedef struct <a class="el" href="structapr__vformatter__buff__t.html">apr_vformatter_buff_t</a> <a class="el" href="structapr__vformatter__buff__t.html">apr_vformatter_buff_t</a>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="structapr__vformatter__buff__t.html">apr_vformatter_buff_t</a> </dd></dl>
    </td>
  </tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ga1" doxytag="apr_lib.h::apr_filepath_name_get"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">const char* apr_filepath_name_get           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pathname</em>          </td>
          <td class="md" valign="top">&nbsp;)&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>
return the final element of the pathname <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pathname</em>&nbsp;</td><td>The path to get the final element of </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the final element of the path </dd></dl>
<dl compact><dt><b>Remarks:</b></dt><dd><pre>
 For example:
                 "/foo/bar/gum"    -&gt; "gum"
                 "/foo/bar/gum/"   -&gt; ""
                 "gum"             -&gt; "gum"
                 "bs\\path\\stuff" -&gt; "stuff"
 </pre> </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga3" doxytag="apr_lib.h::apr_password_get"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a> apr_password_get           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>prompt</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>char *&nbsp;</td>
          <td class="mdname" nowrap> <em>pwbuf</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>apr_size_t *&nbsp;</td>
          <td class="mdname" nowrap> <em>bufsize</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Display a prompt and read in the password from stdin. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>prompt</em>&nbsp;</td><td>The prompt to display </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pwbuf</em>&nbsp;</td><td>Buffer to store the password </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>bufsize</em>&nbsp;</td><td>The length of the password buffer. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Remarks:</b></dt><dd>If the password entered must be truncated to fit in the provided buffer, APR_ENAMETOOLONG will be returned. Note that the bufsize paramater is passed by reference for no reason; its value will never be modified by the <a class="el" href="group__apr__lib.html#ga3">apr_password_get()</a> function. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga2" doxytag="apr_lib.h::apr_vformatter"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int apr_vformatter           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int(*)(<a class="el" href="structapr__vformatter__buff__t.html">apr_vformatter_buff_t</a> *b)&nbsp;</td>
          <td class="mdname" nowrap> <em>flush_func</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap><a class="el" href="structapr__vformatter__buff__t.html">apr_vformatter_buff_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>c</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>fmt</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>va_list&nbsp;</td>
          <td class="mdname" nowrap> <em>ap</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<a class="el" href="group__apr__lib.html#ga2">apr_vformatter()</a> is a generic printf-style formatting routine with some extensions. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>flush_func</em>&nbsp;</td><td>The function to call when the buffer is full </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>The buffer to write to </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>fmt</em>&nbsp;</td><td>The format string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ap</em>&nbsp;</td><td>The arguments to use to fill out the format string.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Remarks:</b></dt><dd><pre>
 The extensions are:</pre></dd></dl>
%pA takes a struct in_addr *, and prints it as a.b.c.d %pI takes an <a class="el" href="structapr__sockaddr__t.html">apr_sockaddr_t</a> * and prints it as a.b.c.d:port or [ipv6-address]:port %pT takes an apr_os_thread_t * and prints it in decimal ('0' is printed if !APR_HAS_THREADS) %pp takes a void * and outputs it in hex<p>
<pre> The %p hacks are to force gcc's printf warning code to skip
 over a pointer argument without complaining.  This does
 mean that the ANSI-style %p (output a void * in hex format) won't
 work as expected at all, but that seems to be a fair trade-off
 for the increased robustness of having printf-warnings work.</pre><p>
<pre> Additionally, apr_vformatter allows for arbitrary output methods
 using the apr_vformatter_buff and flush_func.</pre><p>
<pre> The apr_vformatter_buff has two elements curpos and endpos.
 curpos is where apr_vformatter will write the next byte of output.
 It proceeds writing output to curpos, and updating curpos, until
 either the end of output is reached, or curpos == endpos (i.e. the
 buffer is full).</pre><p>
<pre> If the end of output is reached, apr_vformatter returns the
 number of bytes written.</pre><p>
<pre> When the buffer is full, the flush_func is called.  The flush_func
 can return -1 to indicate that no further output should be attempted,
 and apr_vformatter will return immediately with -1.  Otherwise
 the flush_func should flush the buffer in whatever manner is
 appropriate, re apr_pool_t nitialize curpos and endpos, and return 0.</pre><p>
<pre> Note that flush_func is only invoked as a result of attempting to
 write another byte at curpos when curpos &gt;= endpos.  So for
 example, it's possible when the output exactly matches the buffer
 space available that curpos == endpos will be true when
 apr_vformatter returns.</pre><p>
<pre> apr_vformatter does not call out to any other code, it is entirely
 self-contained.  This allows the callers to do things which are
 otherwise "unsafe".  For example, apr_psprintf uses the "scratch"
 space at the unallocated end of a block, and doesn't actually
 complete the allocation until apr_vformatter returns.  apr_psprintf
 would be completely broken if apr_vformatter were to call anything
 that used this same pool.  Similarly http_bprintf() uses the "scratch"
 space at the end of its output buffer, and doesn't actually note
 that the space is in use until it either has to flush the buffer
 or until apr_vformatter returns.
 </pre>     </td>
  </tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Sun Mar 20 19:52:27 2005 for Apache Portable Runtime by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.3.9.1 </small></address>
</body>
</html>