📄 apr__lib_8h-source.html
字号:
<!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: apr_lib.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.7 -->
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</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> | <a class="qindex" href="pages.html">Related Pages</a></div>
<h1>apr_lib.h</h1><a href="apr__lib_8h.html">Go to the documentation of this file.</a><pre class="fragment"><div>00001 <span class="comment">/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as</span>
00002 <span class="comment"> * applicable.</span>
00003 <span class="comment"> *</span>
00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span>
00005 <span class="comment"> * you may not use this file except in compliance with the License.</span>
00006 <span class="comment"> * You may obtain a copy of the License at</span>
00007 <span class="comment"> *</span>
00008 <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span>
00009 <span class="comment"> *</span>
00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span>
00011 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span>
00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
00013 <span class="comment"> * See the License for the specific language governing permissions and</span>
00014 <span class="comment"> * limitations under the License.</span>
00015 <span class="comment"> */</span>
00016
00017 <span class="preprocessor">#ifndef APR_LIB_H</span>
00018 <span class="preprocessor"></span><span class="preprocessor">#define APR_LIB_H</span>
00019 <span class="preprocessor"></span><span class="comment"></span>
00020 <span class="comment">/**</span>
00021 <span class="comment"> * @file apr_lib.h</span>
00022 <span class="comment"> * This is collection of oddballs that didn't fit anywhere else,</span>
00023 <span class="comment"> * and might move to more appropriate headers with the release</span>
00024 <span class="comment"> * of APR 1.0.</span>
00025 <span class="comment"> * @brief APR general purpose library routines</span>
00026 <span class="comment"> */</span>
00027
00028 <span class="preprocessor">#include "apr.h"</span>
00029 <span class="preprocessor">#include "<a class="code" href="apr__errno_8h.html">apr_errno.h</a>"</span>
00030
00031 <span class="preprocessor">#if APR_HAVE_CTYPE_H</span>
00032 <span class="preprocessor"></span><span class="preprocessor">#include <ctype.h></span>
00033 <span class="preprocessor">#endif</span>
00034 <span class="preprocessor"></span><span class="preprocessor">#if APR_HAVE_STDARG_H</span>
00035 <span class="preprocessor"></span><span class="preprocessor">#include <stdarg.h></span>
00036 <span class="preprocessor">#endif</span>
00037 <span class="preprocessor"></span>
00038 <span class="preprocessor">#ifdef __cplusplus</span>
00039 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
00040 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
00041 <span class="comment"></span>
00042 <span class="comment">/**</span>
00043 <span class="comment"> * @defgroup apr_lib General Purpose Library Routines</span>
00044 <span class="comment"> * @ingroup APR </span>
00045 <span class="comment"> * This is collection of oddballs that didn't fit anywhere else,</span>
00046 <span class="comment"> * and might move to more appropriate headers with the release</span>
00047 <span class="comment"> * of APR 1.0.</span>
00048 <span class="comment"> * @{</span>
00049 <span class="comment"> */</span>
00050 <span class="comment"></span>
00051 <span class="comment">/** A constant representing a 'large' string. */</span>
<a name="l00052"></a><a class="code" href="group__apr__lib.html#ga4">00052</a> <span class="preprocessor">#define HUGE_STRING_LEN 8192</span>
00053 <span class="preprocessor"></span>
00054 <span class="comment">/*</span>
00055 <span class="comment"> * Define the structures used by the APR general-purpose library.</span>
00056 <span class="comment"> */</span>
00057 <span class="comment"></span>
00058 <span class="comment">/** @see apr_vformatter_buff_t */</span>
<a name="l00059"></a><a class="code" href="group__apr__lib.html#ga0">00059</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structapr__vformatter__buff__t.html">apr_vformatter_buff_t</a> <a class="code" href="group__apr__lib.html#ga0">apr_vformatter_buff_t</a>;
00060 <span class="comment"></span>
00061 <span class="comment">/**</span>
00062 <span class="comment"> * Structure used by the variable-formatter routines.</span>
00063 <span class="comment"> */</span>
<a name="l00064"></a><a class="code" href="structapr__vformatter__buff__t.html">00064</a> <span class="keyword">struct </span><a class="code" href="group__apr__lib.html#ga0">apr_vformatter_buff_t</a> {<span class="comment"></span>
00065 <span class="comment"> /** The current position */</span>
<a name="l00066"></a><a class="code" href="structapr__vformatter__buff__t.html#o0">00066</a> <span class="keywordtype">char</span> *<a class="code" href="structapr__vformatter__buff__t.html#o0">curpos</a>;<span class="comment"></span>
00067 <span class="comment"> /** The end position of the format string */</span>
<a name="l00068"></a><a class="code" href="structapr__vformatter__buff__t.html#o1">00068</a> <span class="keywordtype">char</span> *<a class="code" href="structapr__vformatter__buff__t.html#o1">endpos</a>;
00069 };
00070 <span class="comment"></span>
00071 <span class="comment">/**</span>
00072 <span class="comment"> * return the final element of the pathname</span>
00073 <span class="comment"> * @param pathname The path to get the final element of</span>
00074 <span class="comment"> * @return the final element of the path</span>
00075 <span class="comment"> * @remark</span>
00076 <span class="comment"> * <PRE></span>
00077 <span class="comment"> * For example:</span>
00078 <span class="comment"> * "/foo/bar/gum" -> "gum"</span>
00079 <span class="comment"> * "/foo/bar/gum/" -> ""</span>
00080 <span class="comment"> * "gum" -> "gum"</span>
00081 <span class="comment"> * "bs\\path\\stuff" -> "stuff"</span>
00082 <span class="comment"> * </PRE></span>
00083 <span class="comment"> */</span>
00084 APR_DECLARE(<span class="keyword">const</span> <span class="keywordtype">char</span> *) apr_filepath_name_get(const <span class="keywordtype">char</span> *pathname);
00085 <span class="comment"></span>
00086 <span class="comment">/**</span>
00087 <span class="comment"> * apr_killpg</span>
00088 <span class="comment"> * Small utility macros to make things easier to read. Not usually a</span>
00089 <span class="comment"> * goal, to be sure..</span>
00090 <span class="comment"> */</span>
00091
00092 #ifdef WIN32
00093 #define apr_killpg(x, y)
00094 #else <span class="comment">/* WIN32 */</span>
00095 #ifdef NO_KILLPG
00096 #define apr_killpg(x, y) (kill (-(x), (y)))
00097 #else <span class="comment">/* NO_KILLPG */</span>
<a name="l00098"></a><a class="code" href="group__apr__lib.html#ga5">00098</a> #define apr_killpg(x, y) (killpg ((x), (y)))
00099 #endif <span class="comment">/* NO_KILLPG */</span>
00100 #endif <span class="comment">/* WIN32 */</span>
00101 <span class="comment"></span>
00102 <span class="comment">/**</span>
00103 <span class="comment"> * apr_vformatter() is a generic printf-style formatting routine</span>
00104 <span class="comment"> * with some extensions.</span>
00105 <span class="comment"> * @param flush_func The function to call when the buffer is full</span>
00106 <span class="comment"> * @param c The buffer to write to</span>
00107 <span class="comment"> * @param fmt The format string</span>
00108 <span class="comment"> * @param ap The arguments to use to fill out the format string.</span>
00109 <span class="comment"> *</span>
00110 <span class="comment"> * @remark</span>
00111 <span class="comment"> * <PRE></span>
00112 <span class="comment"> * The extensions are:</span>
00113 <span class="comment"> *</span>
00114 <span class="comment"> * %%pA takes a struct in_addr *, and prints it as a.b.c.d</span>
00115 <span class="comment"> * %%pI takes an apr_sockaddr_t * and prints it as a.b.c.d:port or</span>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -