Sophie

Sophie

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

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: apr_strings.h Source File</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>
<div class="nav">
<a class="el" href="dir_000000.html">home</a>&nbsp;/&nbsp;<a class="el" href="dir_000001.html">oden</a>&nbsp;/&nbsp;<a class="el" href="dir_000002.html">RPM</a>&nbsp;/&nbsp;<a class="el" href="dir_000003.html">BUILD</a>&nbsp;/&nbsp;<a class="el" href="dir_000004.html">apr-1.1.1</a>&nbsp;/&nbsp;<a class="el" href="dir_000005.html">include</a></div>
<h1>apr_strings.h</h1><a href="apr__strings_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/* Copyright 2000-2004 The Apache Software Foundation</span>
00002 <span class="comment"> *</span>
00003 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span>
00004 <span class="comment"> * you may not use this file except in compliance with the License.</span>
00005 <span class="comment"> * You may obtain a copy of the License at</span>
00006 <span class="comment"> *</span>
00007 <span class="comment"> *     http://www.apache.org/licenses/LICENSE-2.0</span>
00008 <span class="comment"> *</span>
00009 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span>
00010 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span>
00011 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
00012 <span class="comment"> * See the License for the specific language governing permissions and</span>
00013 <span class="comment"> * limitations under the License.</span>
00014 <span class="comment"> */</span>
00015 
00016 <span class="comment">/* Portions of this file are covered by */</span>
00017 <span class="comment">/* -*- mode: c; c-file-style: "k&amp;r" -*-</span>
00018 <span class="comment"></span>
00019 <span class="comment">  strnatcmp.c -- Perform 'natural order' comparisons of strings in C.</span>
00020 <span class="comment">  Copyright (C) 2000 by Martin Pool &lt;mbp@humbug.org.au&gt;</span>
00021 <span class="comment"></span>
00022 <span class="comment">  This software is provided 'as-is', without any express or implied</span>
00023 <span class="comment">  warranty.  In no event will the authors be held liable for any damages</span>
00024 <span class="comment">  arising from the use of this software.</span>
00025 <span class="comment"></span>
00026 <span class="comment">  Permission is granted to anyone to use this software for any purpose,</span>
00027 <span class="comment">  including commercial applications, and to alter it and redistribute it</span>
00028 <span class="comment">  freely, subject to the following restrictions:</span>
00029 <span class="comment"></span>
00030 <span class="comment">  1. The origin of this software must not be misrepresented; you must not</span>
00031 <span class="comment">     claim that you wrote the original software. If you use this software</span>
00032 <span class="comment">     in a product, an acknowledgment in the product documentation would be</span>
00033 <span class="comment">     appreciated but is not required.</span>
00034 <span class="comment">  2. Altered source versions must be plainly marked as such, and must not be</span>
00035 <span class="comment">     misrepresented as being the original software.</span>
00036 <span class="comment">  3. This notice may not be removed or altered from any source distribution.</span>
00037 <span class="comment">*/</span>
00038 
00039 <span class="preprocessor">#ifndef APR_STRINGS_H</span>
00040 <span class="preprocessor"></span><span class="preprocessor">#define APR_STRINGS_H</span>
00041 <span class="preprocessor"></span><span class="comment"></span>
00042 <span class="comment">/**</span>
00043 <span class="comment"> * @file apr_strings.h</span>
00044 <span class="comment"> * @brief APR Strings library</span>
00045 <span class="comment"> */</span>
00046 
00047 <span class="preprocessor">#include "<a class="code" href="apr_8h.html">apr.h</a>"</span>
00048 <span class="preprocessor">#include "<a class="code" href="apr__errno_8h.html">apr_errno.h</a>"</span>
00049 <span class="preprocessor">#include "<a class="code" href="apr__pools_8h.html">apr_pools.h</a>"</span>
00050 <span class="preprocessor">#define APR_WANT_IOVEC</span>
00051 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="apr__want_8h.html">apr_want.h</a>"</span>
00052 
00053 <span class="preprocessor">#if APR_HAVE_STDARG_H</span>
00054 <span class="preprocessor"></span><span class="preprocessor">#include &lt;stdarg.h&gt;</span>
00055 <span class="preprocessor">#endif</span>
00056 <span class="preprocessor"></span>
00057 <span class="preprocessor">#ifdef __cplusplus</span>
00058 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
00059 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
00060 <span class="comment"></span>
00061 <span class="comment">/**</span>
00062 <span class="comment"> * @defgroup apr_strings String routines</span>
00063 <span class="comment"> * @ingroup APR </span>
00064 <span class="comment"> * @{</span>
00065 <span class="comment"> */</span>
00066 <span class="comment"></span>
00067 <span class="comment">/**</span>
00068 <span class="comment"> * Do a natural order comparison of two strings.</span>
00069 <span class="comment"> * @param a The first string to compare</span>
00070 <span class="comment"> * @param b The second string to compare</span>
00071 <span class="comment"> * @return Either &lt;0, 0, or &gt;0.  If the first string is less than the second</span>
00072 <span class="comment"> *          this returns &lt;0, if they are equivalent it returns 0, and if the</span>
00073 <span class="comment"> *          first string is greater than second string it retuns &gt;0.</span>
00074 <span class="comment"> */</span>
00075 <a class="code" href="group__apr__platform.html#ga123">APR_DECLARE</a>(<span class="keywordtype">int</span>) apr_strnatcmp(<span class="keywordtype">char</span> const *a, <span class="keywordtype">char</span> const *b);
00076 <span class="comment"></span>
00077 <span class="comment">/**</span>
00078 <span class="comment"> * Do a natural order comparison of two strings ignoring the case of the </span>
00079 <span class="comment"> * strings.</span>
00080 <span class="comment"> * @param a The first string to compare</span>
00081 <span class="comment"> * @param b The second string to compare</span>
00082 <span class="comment"> * @return Either &lt;0, 0, or &gt;0.  If the first string is less than the second</span>
00083 <span class="comment"> *         this returns &lt;0, if they are equivalent it returns 0, and if the</span>
00084 <span class="comment"> *         first string is greater than second string it retuns &gt;0.</span>
00085 <span class="comment"> */</span>
00086 APR_DECLARE(<span class="keywordtype">int</span>) apr_strnatcasecmp(<span class="keywordtype">char</span> const *a, <span class="keywordtype">char</span> const *b);
00087 <span class="comment"></span>
00088 <span class="comment">/**</span>
00089 <span class="comment"> * duplicate a string into memory allocated out of a pool</span>
00090 <span class="comment"> * @param p The pool to allocate out of</span>
00091 <span class="comment"> * @param s The string to duplicate</span>
00092 <span class="comment"> * @return The new string</span>
00093 <span class="comment"> */</span>
00094 APR_DECLARE(<span class="keywordtype">char</span> *) apr_pstrdup(apr_pool_t *p, const <span class="keywordtype">char</span> *s);
00095 <span class="comment"></span>
00096 <span class="comment">/**</span>
00097 <span class="comment"> * Create a null-terminated string by making a copy of a sequence</span>
00098 <span class="comment"> * of characters and appending a null byte</span>
00099 <span class="comment"> * @param p The pool to allocate out of</span>
00100 <span class="comment"> * @param s The block of characters to duplicate</span>
00101 <span class="comment"> * @param n The number of characters to duplicate</span>
00102 <span class="comment"> * @return The new string</span>
00103 <span class="comment"> * @remark This is a faster alternative to apr_pstrndup, for use</span>
00104 <span class="comment"> *         when you know that the string being duplicated really</span>
00105 <span class="comment"> *         has 'n' or more characters.  If the string might contain</span>
00106 <span class="comment"> *         fewer characters, use apr_pstrndup.</span>
00107 <span class="comment"> */</span>
00108 APR_DECLARE(<span class="keywordtype">char</span> *) apr_pstrmemdup(apr_pool_t *p, const <span class="keywordtype">char</span> *s, apr_size_t n);
00109 <span class="comment"></span>
00110 <span class="comment">/**</span>
00111 <span class="comment"> * duplicate the first n characters of a string into memory allocated </span>
00112 <span class="comment"> * out of a pool; the new string will be null-terminated</span>
00113 <span class="comment"> * @param p The pool to allocate out of</span>
00114 <span class="comment"> * @param s The string to duplicate</span>
00115 <span class="comment"> * @param n The number of characters to duplicate</span>
00116 <span class="comment"> * @return The new string</span>
00117 <span class="comment"> */</span>
00118 APR_DECLARE(<span class="keywordtype">char</span> *) apr_pstrndup(apr_pool_t *p, const <span class="keywordtype">char</span> *s, apr_size_t n);
00119 <span class="comment"></span>
00120 <span class="comment">/**</span>
00121 <span class="comment"> * Duplicate a block of memory.</span>
00122 <span class="comment"> *</span>
00123 <span class="comment"> * @param p The pool to allocate from</span>
00124 <span class="comment"> * @param m The memory to duplicate</span>
00125 <span class="comment"> * @param n The number of bytes to duplicate</span>
00126 <span class="comment"> * @return The new block of memory</span>
00127 <span class="comment"> */</span>
00128 APR_DECLARE(<span class="keywordtype">void</span> *) apr_pmemdup(apr_pool_t *p, const <span class="keywordtype">void</span> *m, apr_size_t n);
00129 <span class="comment"></span>
00130 <span class="comment">/**</span>
00131 <span class="comment"> * Concatenate multiple strings, allocating memory out a pool</span>
00132 <span class="comment"> * @param p The pool to allocate out of</span>
00133 <span class="comment"> * @param ... The strings to concatenate.  The final string must be NULL</span>
00134 <span class="comment"> * @return The new string</span>
00135 <span class="comment"> */</span>
00136 APR_DECLARE_NONSTD(<span class="keywordtype">char</span> *) apr_pstrcat(apr_pool_t *p, ...);
00137 <span class="comment"></span>
00138 <span class="comment">/**</span>
00139 <span class="comment"> * Concatenate multiple strings specified in a writev-style vector</span>
00140 <span class="comment"> * @param p The pool from which to allocate</span>
00141 <span class="comment"> * @param vec The strings to concatenate</span>
00142 <span class="comment"> * @param nvec The number of strings to concatenate</span>
00143 <span class="comment"> * @param nbytes (output) strlen of new string (pass in NULL to omit)</span>
00144 <span class="comment"> * @return The new string</span>
00145 <span class="comment"> */</span>
00146 APR_DECLARE(<span class="keywordtype">char</span> *) apr_pstrcatv(apr_pool_t *p, const struct iovec *vec,
00147                                  apr_size_t nvec, apr_size_t *nbytes);
00148 <span class="comment"></span>
00149 <span class="comment">/**</span>
00150 <span class="comment"> * printf-style style printing routine.  The data is output to a string </span>
00151 <span class="comment"> * allocated from a pool</span>
00152 <span class="comment"> * @param p The pool to allocate out of</span>
00153 <span class="comment"> * @param fmt The format of the string</span>
00154 <span class="comment"> * @param ap The arguments to use while printing the data</span>
00155 <span class="comment"> * @return The new string</span>
00156 <span class="comment"> */</span>
00157 APR_DECLARE(<span class="keywordtype">char</span> *) apr_pvsprintf(apr_pool_t *p, const <span class="keywordtype">char</span> *fmt, va_list ap);
00158 <span class="comment"></span>
00159 <span class="comment">/**</span>
00160 <span class="comment"> * printf-style style printing routine.  The data is output to a string </span>
00161 <span class="comment"> * allocated from a pool</span>
00162 <span class="comment"> * @param p The pool to allocate out of</span>
00163 <span class="comment"> * @param fmt The format of the string</span>
00164 <span class="comment"> * @param ... The arguments to use while printing the data</span>
00165 <span class="comment"> * @return The new string</span>
00166 <span class="comment"> */</span>
00167 APR_DECLARE_NONSTD(<span class="keywordtype">char</span> *) apr_psprintf(apr_pool_t *p, const <span class="keywordtype">char</span> *fmt, ...)
00168         __attribute__((format(printf,2,3)));
00169 <span class="comment"></span>
00170 <span class="comment">/**</span>
00171 <span class="comment"> * Copy up to dst_size characters from src to dst; does not copy</span>
00172 <span class="comment"> * past a NUL terminator in src, but always terminates dst with a NUL</span>
00173 <span class="comment"> * regardless.</span>
00174 <span class="comment"> * @param dst The destination string</span>
00175 <span class="comment"> * @param src The source string</span>
00176 <span class="comment"> * @param dst_size The space available in dst; dst always receives</span>
00177 <span class="comment"> *                 NUL termination, so if src is longer than</span>
00178 <span class="comment"> *                 dst_size, the actual number of characters copied is</span>
00179 <span class="comment"> *                 dst_size - 1.</span>
00180 <span class="comment"> * @return Pointer to the NUL terminator of the destination string, dst</span>
00181 <span class="comment"> * @remark</span>
00182 <span class="comment"> * &lt;PRE&gt;</span>
00183 <span class="comment"> * Note the differences between this function and strncpy():</span>
00184 <span class="comment"> *  1) strncpy() doesn't always NUL terminate; apr_cpystrn() does.</span>
00185 <span class="comment"> *  2) strncpy() pads the destination string with NULs, which is often </span>
00186 <span class="comment"> *     unnecessary; apr_cpystrn() does not.</span>
00187 <span class="comment"> *  3) strncpy() returns a pointer to the beginning of the dst string;</span>
00188 <span class="comment"> *     apr_cpystrn() returns a pointer to the NUL terminator of dst, </span>
00189 <span class="comment"> *     to allow a check for truncation.</span>
00190 <span class="comment"> * &lt;/PRE&gt;</span>
00191 <span class="comment"> */</span>
00192 APR_DECLARE(<span class="keywordtype">char</span> *) apr_cpystrn(<span class="keywordtype">char</span> *dst, const <span class="keywordtype">char</span> *src,
00193                                 apr_size_t dst_size);
00194 <span class="comment"></span>
00195 <span class="comment">/**</span>
00196 <span class="comment"> * Strip spaces from a string</span>
00197 <span class="comment"> * @param dest The destination string.  It is okay to modify the string</span>
00198 <span class="comment"> *             in place.  Namely dest == src</span>
00199 <span class="comment"> * @param src The string to rid the spaces from.</span>
00200 <span class="comment"> * @return The destination string, dest.</span>
00201 <span class="comment"> */</span>
00202 APR_DECLARE(<span class="keywordtype">char</span> *) apr_collapse_spaces(<span class="keywordtype">char</span> *dest, const <span class="keywordtype">char</span> *src);
00203 <span class="comment"></span>
00204 <span class="comment">/**</span>
00205 <span class="comment"> * Convert the arguments to a program from one string to an array of </span>
00206 <span class="comment"> * strings terminated by a NULL pointer</span>
00207 <span class="comment"> * @param arg_str The arguments to convert</span>
00208 <span class="comment"> * @param argv_out Output location.  This is a pointer to an array of strings.</span>
00209 <span class="comment"> * @param token_context Pool to use.</span>
00210 <span class="comment"> */</span>
00211 APR_DECLARE(apr_status_t) apr_tokenize_to_argv(const <span class="keywordtype">char</span> *arg_str,
00212                                                <span class="keywordtype">char</span> ***argv_out,
00213                                                apr_pool_t *token_context);
00214 <span class="comment"></span>
00215 <span class="comment">/**</span>
00216 <span class="comment"> * Split a string into separate null-terminated tokens.  The tokens are </span>
00217 <span class="comment"> * delimited in the string by one or more characters from the sep</span>
00218 <span class="comment"> * argument.</span>
00219 <span class="comment"> * @param str The string to separate; this should be specified on the</span>
00220 <span class="comment"> *            first call to apr_strtok() for a given string, and NULL</span>
00221 <span class="comment"> *            on subsequent calls.</span>
00222 <span class="comment"> * @param sep The set of delimiters</span>
00223 <span class="comment"> * @param last Internal state saved by apr_strtok() between calls.</span>
00224 <span class="comment"> * @return The next token from the string</span>
00225 <span class="comment"> */</span>
00226 APR_DECLARE(<span class="keywordtype">char</span> *) apr_strtok(<span class="keywordtype">char</span> *str, const <span class="keywordtype">char</span> *sep, <span class="keywordtype">char</span> **last);
00227 <span class="comment"></span>
00228 <span class="comment">/**</span>
00229 <span class="comment"> * @defgroup APR_Strings_Snprintf snprintf implementations</span>
00230 <span class="comment"> * @warning</span>
00231 <span class="comment"> * These are snprintf implementations based on apr_vformatter().</span>
00232 <span class="comment"> *</span>
00233 <span class="comment"> * Note that various standards and implementations disagree on the return</span>
00234 <span class="comment"> * value of snprintf, and side-effects due to %n in the formatting string.</span>
00235 <span class="comment"> * apr_snprintf (and apr_vsnprintf) behaves as follows:</span>
00236 <span class="comment"> *</span>
00237 <span class="comment"> * Process the format string until the entire string is exhausted, or</span>
00238 <span class="comment"> * the buffer fills.  If the buffer fills then stop processing immediately</span>
00239 <span class="comment"> * (so no further %n arguments are processed), and return the buffer</span>
00240 <span class="comment"> * length.  In all cases the buffer is NUL terminated. It will return the</span>
00241 <span class="comment"> * number of characters inserted into the buffer, not including the</span>
00242 <span class="comment"> * terminating NUL. As a special case, if len is 0, apr_snprintf will</span>
00243 <span class="comment"> * return the number of characters that would have been inserted if</span>
00244 <span class="comment"> * the buffer had been infinite (in this case, *buffer can be NULL)</span>
00245 <span class="comment"> *</span>
00246 <span class="comment"> * In no event does apr_snprintf return a negative number.</span>
00247 <span class="comment"> * @{</span>
00248 <span class="comment"> */</span>
00249 <span class="comment"></span>
00250 <span class="comment">/**</span>
00251 <span class="comment"> * snprintf routine based on apr_vformatter.  This means it understands the</span>
00252 <span class="comment"> * same extensions.</span>
00253 <span class="comment"> * @param buf The buffer to write to</span>
00254 <span class="comment"> * @param len The size of the buffer</span>
00255 <span class="comment"> * @param format The format string</span>
00256 <span class="comment"> * @param ... The arguments to use to fill out the format string.</span>
00257 <span class="comment"> */</span>
00258 APR_DECLARE_NONSTD(<span class="keywordtype">int</span>) apr_snprintf(<span class="keywordtype">char</span> *buf, apr_size_t len,
00259                                      const <span class="keywordtype">char</span> *format, ...)
00260         __attribute__((format(printf,3,4)));
00261 <span class="comment"></span>
00262 <span class="comment">/**</span>
00263 <span class="comment"> * vsnprintf routine based on apr_vformatter.  This means it understands the</span>
00264 <span class="comment"> * same extensions.</span>
00265 <span class="comment"> * @param buf The buffer to write to</span>
00266 <span class="comment"> * @param len The size of the buffer</span>
00267 <span class="comment"> * @param format The format string</span>
00268 <span class="comment"> * @param ap The arguments to use to fill out the format string.</span>
00269 <span class="comment"> */</span>
00270 APR_DECLARE(<span class="keywordtype">int</span>) apr_vsnprintf(<span class="keywordtype">char</span> *buf, apr_size_t len, const <span class="keywordtype">char</span> *format,
00271                                va_list ap);<span class="comment"></span>
00272 <span class="comment">/** @} */</span>
00273 <span class="comment"></span>
00274 <span class="comment">/**</span>
00275 <span class="comment"> * create a string representation of an int, allocated from a pool</span>
00276 <span class="comment"> * @param p The pool from which to allocate</span>
00277 <span class="comment"> * @param n The number to format</span>
00278 <span class="comment"> * @return The string representation of the number</span>
00279 <span class="comment"> */</span>
00280 APR_DECLARE(<span class="keywordtype">char</span> *) apr_itoa(apr_pool_t *p, <span class="keywordtype">int</span> n);
00281 <span class="comment"></span>
00282 <span class="comment">/**</span>
00283 <span class="comment"> * create a string representation of a long, allocated from a pool</span>
00284 <span class="comment"> * @param p The pool from which to allocate</span>
00285 <span class="comment"> * @param n The number to format</span>
00286 <span class="comment"> * @return The string representation of the number</span>
00287 <span class="comment"> */</span>
00288 APR_DECLARE(<span class="keywordtype">char</span> *) apr_ltoa(apr_pool_t *p, <span class="keywordtype">long</span> n);
00289 <span class="comment"></span>
00290 <span class="comment">/**</span>
00291 <span class="comment"> * create a string representation of an apr_off_t, allocated from a pool</span>
00292 <span class="comment"> * @param p The pool from which to allocate</span>
00293 <span class="comment"> * @param n The number to format</span>
00294 <span class="comment"> * @return The string representation of the number</span>
00295 <span class="comment"> */</span>
00296 APR_DECLARE(<span class="keywordtype">char</span> *) apr_off_t_toa(apr_pool_t *p, apr_off_t n);
00297 <span class="comment"></span>
00298 <span class="comment">/**</span>
00299 <span class="comment"> * Convert a numeric string into an apr_off_t numeric value.</span>
00300 <span class="comment"> * @param offset The value of the parsed string.</span>
00301 <span class="comment"> * @param buf The string to parse. It may contain optional whitespace,</span>
00302 <span class="comment"> *   followed by an optional '+' (positive, default) or '-' (negative)</span>
00303 <span class="comment"> *   character, followed by an optional '0x' prefix if base is 0 or 16,</span>
00304 <span class="comment"> *   followed by numeric digits appropriate for base.</span>
00305 <span class="comment"> * @param end A pointer to the end of the valid character in buf. If</span>
00306 <span class="comment"> *   not NULL, it is set to the first invalid character in buf.</span>
00307 <span class="comment"> * @param base A numeric base in the range between 2 and 36 inclusive,</span>
00308 <span class="comment"> *   or 0.  If base is zero, buf will be treated as base ten unless its</span>
00309 <span class="comment"> *   digits are prefixed with '0x', in which case it will be treated as</span>
00310 <span class="comment"> *   base 16.</span>
00311 <span class="comment"> */</span>
00312 APR_DECLARE(apr_status_t) apr_strtoff(apr_off_t *offset, const <span class="keywordtype">char</span> *buf, 
00313                                       <span class="keywordtype">char</span> **end, <span class="keywordtype">int</span> base);
00314 <span class="comment"></span>
00315 <span class="comment">/**</span>
00316 <span class="comment"> * parse a numeric string into a 64-bit numeric value</span>
00317 <span class="comment"> * @param buf The string to parse. It may contain optional whitespace,</span>
00318 <span class="comment"> *   followed by an optional '+' (positive, default) or '-' (negative)</span>
00319 <span class="comment"> *   character, followed by an optional '0x' prefix if base is 0 or 16,</span>
00320 <span class="comment"> *   followed by numeric digits appropriate for base.</span>
00321 <span class="comment"> * @param end A pointer to the end of the valid character in buf. If</span>
00322 <span class="comment"> *   not NULL, it is set to the first invalid character in buf.</span>
00323 <span class="comment"> * @param base A numeric base in the range between 2 and 36 inclusive,</span>
00324 <span class="comment"> *   or 0.  If base is zero, buf will be treated as base ten unless its</span>
00325 <span class="comment"> *   digits are prefixed with '0x', in which case it will be treated as</span>
00326 <span class="comment"> *   base 16.</span>
00327 <span class="comment"> * @return The numeric value of the string.  On overflow, errno is set</span>
00328 <span class="comment"> * to ERANGE.</span>
00329 <span class="comment"> */</span>
00330 APR_DECLARE(apr_int64_t) apr_strtoi64(const <span class="keywordtype">char</span> *buf, <span class="keywordtype">char</span> **end, <span class="keywordtype">int</span> base);
00331 <span class="comment"></span>
00332 <span class="comment">/**</span>
00333 <span class="comment"> * parse a base-10 numeric string into a 64-bit numeric value.</span>
00334 <span class="comment"> * Equivalent to apr_strtoi64(buf, (char**)NULL, 10).</span>
00335 <span class="comment"> * @param buf The string to parse</span>
00336 <span class="comment"> * @return The numeric value of the string</span>
00337 <span class="comment"> */</span>
00338 APR_DECLARE(apr_int64_t) apr_atoi64(const <span class="keywordtype">char</span> *buf);
00339 <span class="comment"></span>
00340 <span class="comment">/**</span>
00341 <span class="comment"> * Format a binary size (magnitiudes are 2^10 rather than 10^3) from an apr_off_t,</span>
00342 <span class="comment"> * as bytes, K, M, T, etc, to a four character compacted human readable string.</span>
00343 <span class="comment"> * @param size The size to format</span>
00344 <span class="comment"> * @param buf The 5 byte text buffer (counting the trailing null)</span>
00345 <span class="comment"> * @return The buf passed to apr_strfsize()</span>
00346 <span class="comment"> * @remark All negative sizes report '  - ', apr_strfsize only formats positive values.</span>
00347 <span class="comment"> */</span>
00348 APR_DECLARE(<span class="keywordtype">char</span> *) apr_strfsize(apr_off_t size, <span class="keywordtype">char</span> *buf);
00349 <span class="comment"></span>
00350 <span class="comment">/** @} */</span>
00351 
00352 #ifdef __cplusplus
00353 }
00354 #endif
00355 
00356 #endif  <span class="comment">/* !APR_STRINGS_H */</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Mar 20 19:52:26 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>