apr__general_8h-source.html
来自「apr函数库使用手册」· HTML 代码 · 共 251 行 · 第 1/2 页
HTML
251 行
00120 <span class="preprocessor"></span><span class="keywordtype">int</span> strcasecmp(<span class="keyword">const</span> <span class="keywordtype">char</span> *a, <span class="keyword">const</span> <span class="keywordtype">char</span> *b);
00121 <span class="preprocessor">#endif</span>
00122 <span class="preprocessor"></span>
00123 <span class="preprocessor">#if (!APR_HAVE_STRNCASECMP) && (APR_HAVE_STRNICMP)</span>
00124 <span class="preprocessor"></span><span class="preprocessor">#define strncasecmp(s1, s2, n) strnicmp(s1, s2, n)</span>
00125 <span class="preprocessor"></span><span class="preprocessor">#elif (!APR_HAVE_STRNCASECMP)</span>
00126 <span class="preprocessor"></span><span class="keywordtype">int</span> strncasecmp(<span class="keyword">const</span> <span class="keywordtype">char</span> *a, <span class="keyword">const</span> <span class="keywordtype">char</span> *b, size_t n);
00127 <span class="preprocessor">#endif</span>
00128 <span class="preprocessor"></span>
00129 <span class="preprocessor">#endif</span>
00130 <span class="preprocessor"></span><span class="comment"></span>
00131 <span class="comment">/**</span>
00132 <span class="comment"> * Alignment macros</span>
00133 <span class="comment"> */</span>
00134
00135 <span class="comment">/* APR_ALIGN() is only to be used to align on a power of 2 boundary */</span>
<a name="l00136"></a><a class="code" href="group__apr__general.html#ga10">00136</a> <span class="preprocessor">#define APR_ALIGN(size, boundary) \</span>
00137 <span class="preprocessor"> (((size) + ((boundary) - 1)) & ~((boundary) - 1))</span>
00138 <span class="preprocessor"></span><span class="comment"></span>
00139 <span class="comment">/** Default alignment */</span>
<a name="l00140"></a><a class="code" href="group__apr__general.html#ga11">00140</a> <span class="preprocessor">#define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8)</span>
00141 <span class="preprocessor"></span>
00142 <span class="comment"></span>
00143 <span class="comment">/**</span>
00144 <span class="comment"> * String and memory functions</span>
00145 <span class="comment"> */</span>
00146 <span class="comment"></span>
00147 <span class="comment">/** Properly quote a value as a string in the C preprocessor */</span>
<a name="l00148"></a><a class="code" href="group__apr__general.html#ga12">00148</a> <span class="preprocessor">#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)</span>
00149 <span class="preprocessor"></span><span class="comment">/** Helper macro for APR_STRINGIFY */</span>
<a name="l00150"></a><a class="code" href="group__apr__general.html#ga13">00150</a> <span class="preprocessor">#define APR_STRINGIFY_HELPER(n) #n</span>
00151 <span class="preprocessor"></span>
00152 <span class="preprocessor">#if (!APR_HAVE_MEMMOVE)</span>
00153 <span class="preprocessor"></span><span class="preprocessor">#define memmove(a,b,c) bcopy(b,a,c)</span>
00154 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00155 <span class="preprocessor"></span>
00156 <span class="preprocessor">#if (!APR_HAVE_MEMCHR)</span>
00157 <span class="preprocessor"></span><span class="keywordtype">void</span> *memchr(<span class="keyword">const</span> <span class="keywordtype">void</span> *s, <span class="keywordtype">int</span> c, size_t n);
00158 <span class="preprocessor">#endif</span>
00159 <span class="preprocessor"></span><span class="comment"></span>
00160 <span class="comment">/** @} */</span>
00161 <span class="comment"></span>
00162 <span class="comment">/**</span>
00163 <span class="comment"> * @defgroup apr_library Library initialization and termination</span>
00164 <span class="comment"> * @{</span>
00165 <span class="comment"> */</span>
00166 <span class="comment"></span>
00167 <span class="comment">/**</span>
00168 <span class="comment"> * Setup any APR internal data structures. This MUST be the first function </span>
00169 <span class="comment"> * called for any APR library.</span>
00170 <span class="comment"> * @remark See apr_app_initialize if this is an application, rather than</span>
00171 <span class="comment"> * a library consumer of apr.</span>
00172 <span class="comment"> */</span>
00173 APR_DECLARE(apr_status_t) apr_initialize(<span class="keywordtype">void</span>);
00174 <span class="comment"></span>
00175 <span class="comment">/**</span>
00176 <span class="comment"> * Set up an application with normalized argc, argv (and optionally env) in</span>
00177 <span class="comment"> * order to deal with platform-specific oddities, such as Win32 services,</span>
00178 <span class="comment"> * code pages and signals. This must be the first function called for any</span>
00179 <span class="comment"> * APR program.</span>
00180 <span class="comment"> * @param argc Pointer to the argc that may be corrected</span>
00181 <span class="comment"> * @param argv Pointer to the argv that may be corrected</span>
00182 <span class="comment"> * @param env Pointer to the env that may be corrected, may be NULL</span>
00183 <span class="comment"> * @remark See apr_initialize if this is a library consumer of apr.</span>
00184 <span class="comment"> * Otherwise, this call is identical to apr_initialize, and must be closed</span>
00185 <span class="comment"> * with a call to apr_terminate at the end of program execution.</span>
00186 <span class="comment"> */</span>
00187 APR_DECLARE(apr_status_t) apr_app_initialize(<span class="keywordtype">int</span> *argc,
00188 <span class="keywordtype">char</span> const * const * *argv,
00189 <span class="keywordtype">char</span> const * const * *env);
00190 <span class="comment"></span>
00191 <span class="comment">/**</span>
00192 <span class="comment"> * Tear down any APR internal data structures which aren't torn down </span>
00193 <span class="comment"> * automatically.</span>
00194 <span class="comment"> * @remark An APR program must call this function at termination once it </span>
00195 <span class="comment"> * has stopped using APR services. The APR developers suggest using</span>
00196 <span class="comment"> * atexit to ensure this is called. When using APR from a language</span>
00197 <span class="comment"> * other than C that has problems with the calling convention, use</span>
00198 <span class="comment"> * apr_terminate2() instead.</span>
00199 <span class="comment"> */</span>
00200 APR_DECLARE_NONSTD(<span class="keywordtype">void</span>) apr_terminate(<span class="keywordtype">void</span>);
00201 <span class="comment"></span>
00202 <span class="comment">/**</span>
00203 <span class="comment"> * Tear down any APR internal data structures which aren't torn down </span>
00204 <span class="comment"> * automatically, same as apr_terminate</span>
00205 <span class="comment"> * @remark An APR program must call either the apr_terminate or apr_terminate2 </span>
00206 <span class="comment"> * function once it it has finished using APR services. The APR </span>
00207 <span class="comment"> * developers suggest using atexit(apr_terminate) to ensure this is done.</span>
00208 <span class="comment"> * apr_terminate2 exists to allow non-c language apps to tear down apr, </span>
00209 <span class="comment"> * while apr_terminate is recommended from c language applications.</span>
00210 <span class="comment"> */</span>
00211 APR_DECLARE(<span class="keywordtype">void</span>) apr_terminate2(<span class="keywordtype">void</span>);
00212 <span class="comment"></span>
00213 <span class="comment">/** @} */</span>
00214 <span class="comment"></span>
00215 <span class="comment">/**</span>
00216 <span class="comment"> * @defgroup apr_random Random Functions</span>
00217 <span class="comment"> * @{</span>
00218 <span class="comment"> */</span>
00219
00220 #if APR_HAS_RANDOM || defined(DOXYGEN)
00221
00222 <span class="comment">/* TODO: I'm not sure this is the best place to put this prototype...*/</span><span class="comment"></span>
00223 <span class="comment">/**</span>
00224 <span class="comment"> * Generate random bytes.</span>
00225 <span class="comment"> * @param buf Buffer to fill with random bytes</span>
00226 <span class="comment"> * @param length Length of buffer in bytes</span>
00227 <span class="comment"> */</span>
00228 APR_DECLARE(apr_status_t) apr_generate_random_bytes(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * buf,
00229 apr_size_t length);
00230
00231 #endif<span class="comment"></span>
00232 <span class="comment">/** @} */</span>
00233
00234 #ifdef __cplusplus
00235 }
00236 #endif
00237
00238 #endif <span class="comment">/* ! APR_GENERAL_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 + =
减小字号Ctrl + -
显示快捷键?