⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 apr__lib_8h-source.html

📁 apr函数库使用手册
💻 HTML
📖 第 1 页 / 共 2 页
字号:
00116 <span class="comment"> *      [ipv6-address]:port</span>
00117 <span class="comment"> * %%pT takes an apr_os_thread_t * and prints it in decimal</span>
00118 <span class="comment"> *      ('0' is printed if !APR_HAS_THREADS)</span>
00119 <span class="comment"> * %%pp takes a void * and outputs it in hex</span>
00120 <span class="comment"> *</span>
00121 <span class="comment"> * The %%p hacks are to force gcc's printf warning code to skip</span>
00122 <span class="comment"> * over a pointer argument without complaining.  This does</span>
00123 <span class="comment"> * mean that the ANSI-style %%p (output a void * in hex format) won't</span>
00124 <span class="comment"> * work as expected at all, but that seems to be a fair trade-off</span>
00125 <span class="comment"> * for the increased robustness of having printf-warnings work.</span>
00126 <span class="comment"> *</span>
00127 <span class="comment"> * Additionally, apr_vformatter allows for arbitrary output methods</span>
00128 <span class="comment"> * using the apr_vformatter_buff and flush_func.</span>
00129 <span class="comment"> *</span>
00130 <span class="comment"> * The apr_vformatter_buff has two elements curpos and endpos.</span>
00131 <span class="comment"> * curpos is where apr_vformatter will write the next byte of output.</span>
00132 <span class="comment"> * It proceeds writing output to curpos, and updating curpos, until</span>
00133 <span class="comment"> * either the end of output is reached, or curpos == endpos (i.e. the</span>
00134 <span class="comment"> * buffer is full).</span>
00135 <span class="comment"> *</span>
00136 <span class="comment"> * If the end of output is reached, apr_vformatter returns the</span>
00137 <span class="comment"> * number of bytes written.</span>
00138 <span class="comment"> *</span>
00139 <span class="comment"> * When the buffer is full, the flush_func is called.  The flush_func</span>
00140 <span class="comment"> * can return -1 to indicate that no further output should be attempted,</span>
00141 <span class="comment"> * and apr_vformatter will return immediately with -1.  Otherwise</span>
00142 <span class="comment"> * the flush_func should flush the buffer in whatever manner is</span>
00143 <span class="comment"> * appropriate, re apr_pool_t nitialize curpos and endpos, and return 0.</span>
00144 <span class="comment"> *</span>
00145 <span class="comment"> * Note that flush_func is only invoked as a result of attempting to</span>
00146 <span class="comment"> * write another byte at curpos when curpos &gt;= endpos.  So for</span>
00147 <span class="comment"> * example, it's possible when the output exactly matches the buffer</span>
00148 <span class="comment"> * space available that curpos == endpos will be true when</span>
00149 <span class="comment"> * apr_vformatter returns.</span>
00150 <span class="comment"> *</span>
00151 <span class="comment"> * apr_vformatter does not call out to any other code, it is entirely</span>
00152 <span class="comment"> * self-contained.  This allows the callers to do things which are</span>
00153 <span class="comment"> * otherwise "unsafe".  For example, apr_psprintf uses the "scratch"</span>
00154 <span class="comment"> * space at the unallocated end of a block, and doesn't actually</span>
00155 <span class="comment"> * complete the allocation until apr_vformatter returns.  apr_psprintf</span>
00156 <span class="comment"> * would be completely broken if apr_vformatter were to call anything</span>
00157 <span class="comment"> * that used this same pool.  Similarly http_bprintf() uses the "scratch"</span>
00158 <span class="comment"> * space at the end of its output buffer, and doesn't actually note</span>
00159 <span class="comment"> * that the space is in use until it either has to flush the buffer</span>
00160 <span class="comment"> * or until apr_vformatter returns.</span>
00161 <span class="comment"> * &lt;/PRE&gt;</span>
00162 <span class="comment"> */</span>
00163 APR_DECLARE(<span class="keywordtype">int</span>) apr_vformatter(<span class="keywordtype">int</span> (*flush_func)(apr_vformatter_buff_t *b),
00164                                 apr_vformatter_buff_t *c, const <span class="keywordtype">char</span> *fmt,
00165                                 va_list ap);
00166 <span class="comment"></span>
00167 <span class="comment">/**</span>
00168 <span class="comment"> * Display a prompt and read in the password from stdin.</span>
00169 <span class="comment"> * @param prompt The prompt to display</span>
00170 <span class="comment"> * @param pwbuf Buffer to store the password</span>
00171 <span class="comment"> * @param bufsize The length of the password buffer.</span>
00172 <span class="comment"> * @remark If the password entered must be truncated to fit in</span>
00173 <span class="comment"> * the provided buffer, APR_ENAMETOOLONG will be returned.</span>
00174 <span class="comment"> * Note that the bufsize paramater is passed by reference for no</span>
00175 <span class="comment"> * reason; its value will never be modified by the apr_password_get()</span>
00176 <span class="comment"> * function.</span>
00177 <span class="comment"> */</span>
00178 APR_DECLARE(apr_status_t) apr_password_get(const <span class="keywordtype">char</span> *prompt, <span class="keywordtype">char</span> *pwbuf, 
00179                                            apr_size_t *bufsize);
00180 <span class="comment"></span>
00181 <span class="comment">/** @} */</span>
00182 <span class="comment"></span>
00183 <span class="comment">/**</span>
00184 <span class="comment"> * @defgroup apr_ctype ctype functions</span>
00185 <span class="comment"> * These macros allow correct support of 8-bit characters on systems which</span>
00186 <span class="comment"> * support 8-bit characters.  Pretty dumb how the cast is required, but</span>
00187 <span class="comment"> * that's legacy libc for ya.  These new macros do not support EOF like</span>
00188 <span class="comment"> * the standard macros do.  Tough.</span>
00189 <span class="comment"> * @{</span>
00190 <span class="comment"> */</span><span class="comment"></span>
00191 <span class="comment">/** @see isalnum */</span>
<a name="l00192"></a><a class="code" href="group__apr__ctype.html#ga0">00192</a> #define apr_isalnum(c) (isalnum(((<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>)(c))))<span class="comment"></span>
00193 <span class="comment">/** @see isalpha */</span>
<a name="l00194"></a><a class="code" href="group__apr__ctype.html#ga1">00194</a> #define apr_isalpha(c) (isalpha(((<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>)(c))))<span class="comment"></span>
00195 <span class="comment">/** @see iscntrl */</span>
<a name="l00196"></a><a class="code" href="group__apr__ctype.html#ga2">00196</a> #define apr_iscntrl(c) (iscntrl(((<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>)(c))))<span class="comment"></span>
00197 <span class="comment">/** @see isdigit */</span>
<a name="l00198"></a><a class="code" href="group__apr__ctype.html#ga3">00198</a> #define apr_isdigit(c) (isdigit(((<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>)(c))))<span class="comment"></span>
00199 <span class="comment">/** @see isgraph */</span>
<a name="l00200"></a><a class="code" href="group__apr__ctype.html#ga4">00200</a> #define apr_isgraph(c) (isgraph(((<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>)(c))))<span class="comment"></span>
00201 <span class="comment">/** @see islower*/</span>
<a name="l00202"></a><a class="code" href="group__apr__ctype.html#ga5">00202</a> #define apr_islower(c) (islower(((<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>)(c))))<span class="comment"></span>
00203 <span class="comment">/** @see isascii */</span>
00204 #ifdef isascii
00205 #define apr_isascii(c) (isascii(((<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>)(c))))
00206 #else
<a name="l00207"></a><a class="code" href="group__apr__ctype.html#ga6">00207</a> #define apr_isascii(c) (((c) &amp; ~0x7f)==0)
00208 #endif<span class="comment"></span>
00209 <span class="comment">/** @see isprint */</span>
<a name="l00210"></a><a class="code" href="group__apr__ctype.html#ga7">00210</a> #define apr_isprint(c) (isprint(((<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>)(c))))<span class="comment"></span>
00211 <span class="comment">/** @see ispunct */</span>
<a name="l00212"></a><a class="code" href="group__apr__ctype.html#ga8">00212</a> #define apr_ispunct(c) (ispunct(((<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>)(c))))<span class="comment"></span>
00213 <span class="comment">/** @see isspace */</span>
<a name="l00214"></a><a class="code" href="group__apr__ctype.html#ga9">00214</a> #define apr_isspace(c) (isspace(((<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>)(c))))<span class="comment"></span>
00215 <span class="comment">/** @see isupper */</span>
<a name="l00216"></a><a class="code" href="group__apr__ctype.html#ga10">00216</a> #define apr_isupper(c) (isupper(((<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>)(c))))<span class="comment"></span>
00217 <span class="comment">/** @see isxdigit */</span>
<a name="l00218"></a><a class="code" href="group__apr__ctype.html#ga11">00218</a> #define apr_isxdigit(c) (isxdigit(((<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>)(c))))<span class="comment"></span>
00219 <span class="comment">/** @see tolower */</span>
<a name="l00220"></a><a class="code" href="group__apr__ctype.html#ga12">00220</a> #define apr_tolower(c) (tolower(((<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>)(c))))<span class="comment"></span>
00221 <span class="comment">/** @see toupper */</span>
<a name="l00222"></a><a class="code" href="group__apr__ctype.html#ga13">00222</a> #define apr_toupper(c) (toupper(((<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>)(c))))
00223 <span class="comment"></span>
00224 <span class="comment">/** @} */</span>
00225 
00226 #ifdef __cplusplus
00227 }
00228 #endif
00229 
00230 #endif  <span class="comment">/* ! APR_LIB_H */</span>
</div></pre><hr size="1"><address style="align: right;"><small>Generated on Mon Feb 7 13:18:25 2005 for Apache Portable Runtime by
<a href="../../../www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.7 </small></address>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -