Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > bdbf07027827e6ad7d9208f8a9eaea97 > files > 106

apr-docs-1.2.7-11.el5_6.5.x86_64.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: snprintf implementations</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    <li><a href="examples.html"><span>Examples</span></a></li>
  </ul></div>
<h1>snprintf implementations<br>
<small>
[<a class="el" href="group__apr__strings.html">String routines</a>]</small>
</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___a_p_r___strings___snprintf.html#g097dbf530e3540c4fafad9f2a72adb3c">apr_snprintf</a> (char *buf, apr_size_t len, const char *format,...)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___a_p_r___strings___snprintf.html#g4d74251e4dab00c3daac470a67327ea3">apr_vsnprintf</a> (char *buf, apr_size_t len, const char *format, va_list ap)</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<dl compact><dt><b>Warning:</b></dt><dd>These are snprintf implementations based on <a class="el" href="group__apr__lib.html#gad6b3d63a4f36841bd33bd254c7949be">apr_vformatter()</a>.</dd></dl>
Note that various standards and implementations disagree on the return value of snprintf, and side-effects due to n in the formatting string. apr_snprintf (and apr_vsnprintf) behaves as follows:<p>
Process the format string until the entire string is exhausted, or the buffer fills. If the buffer fills then stop processing immediately (so no further n arguments are processed), and return the buffer length. In all cases the buffer is NUL terminated. It will return the number of characters inserted into the buffer, not including the terminating NUL. As a special case, if len is 0, apr_snprintf will return the number of characters that would have been inserted if the buffer had been infinite (in this case, *buffer can be NULL)<p>
In no event does apr_snprintf return a negative number. <hr><h2>Function Documentation</h2>
<a class="anchor" name="g097dbf530e3540c4fafad9f2a72adb3c"></a><!-- doxytag: member="apr_strings.h::apr_snprintf" ref="g097dbf530e3540c4fafad9f2a72adb3c" args="(char *buf, apr_size_t len, const char *format,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int apr_snprintf           </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">apr_size_t&nbsp;</td>
          <td class="paramname"> <em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&nbsp;</td>
          <td class="paramname"> <em>...</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
snprintf routine based on apr_vformatter. This means it understands the same 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>buf</em>&nbsp;</td><td>The buffer to write to </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>The size of the buffer </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>format</em>&nbsp;</td><td>The format string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>...</em>&nbsp;</td><td>The arguments to use to fill out the format string. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="g4d74251e4dab00c3daac470a67327ea3"></a><!-- doxytag: member="apr_strings.h::apr_vsnprintf" ref="g4d74251e4dab00c3daac470a67327ea3" args="(char *buf, apr_size_t len, const char *format, va_list ap)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int apr_vsnprintf           </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">apr_size_t&nbsp;</td>
          <td class="paramname"> <em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">va_list&nbsp;</td>
          <td class="paramname"> <em>ap</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
vsnprintf routine based on apr_vformatter. This means it understands the same 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>buf</em>&nbsp;</td><td>The buffer to write to </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>The size of the buffer </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>format</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>

</div>
</div><p>
<hr size="1"><address style="align: right;"><small>Generated on Tue May 31 12:20:26 2011 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.4.7 </small></address>
</body>
</html>