Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

apr_strings.h

Go to the documentation of this file.
00001 /* ==================================================================== 00002 * The Apache Software License, Version 1.1 00003 * 00004 * Copyright (c) 2000-2003 The Apache Software Foundation. All rights 00005 * reserved. 00006 * 00007 * Redistribution and use in source and binary forms, with or without 00008 * modification, are permitted provided that the following conditions 00009 * are met: 00010 * 00011 * 1. Redistributions of source code must retain the above copyright 00012 * notice, this list of conditions and the following disclaimer. 00013 * 00014 * 2. Redistributions in binary form must reproduce the above copyright 00015 * notice, this list of conditions and the following disclaimer in 00016 * the documentation and/or other materials provided with the 00017 * distribution. 00018 * 00019 * 3. The end-user documentation included with the redistribution, 00020 * if any, must include the following acknowledgment: 00021 * "This product includes software developed by the 00022 * Apache Software Foundation (http://www.apache.org/)." 00023 * Alternately, this acknowledgment may appear in the software itself, 00024 * if and wherever such third-party acknowledgments normally appear. 00025 * 00026 * 4. The names "Apache" and "Apache Software Foundation" must 00027 * not be used to endorse or promote products derived from this 00028 * software without prior written permission. For written 00029 * permission, please contact apache@apache.org. 00030 * 00031 * 5. Products derived from this software may not be called "Apache", 00032 * nor may "Apache" appear in their name, without prior written 00033 * permission of the Apache Software Foundation. 00034 * 00035 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 00036 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00037 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00038 * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR 00039 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00040 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00041 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 00042 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00043 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00044 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 00045 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00046 * SUCH DAMAGE. 00047 * ==================================================================== 00048 * 00049 * This software consists of voluntary contributions made by many 00050 * individuals on behalf of the Apache Software Foundation. For more 00051 * information on the Apache Software Foundation, please see 00052 * <http://www.apache.org/>. 00053 */ 00054 00055 /* Portions of this file are covered by */ 00056 /* -*- mode: c; c-file-style: "k&r" -*- 00057 00058 strnatcmp.c -- Perform 'natural order' comparisons of strings in C. 00059 Copyright (C) 2000 by Martin Pool <mbp@humbug.org.au> 00060 00061 This software is provided 'as-is', without any express or implied 00062 warranty. In no event will the authors be held liable for any damages 00063 arising from the use of this software. 00064 00065 Permission is granted to anyone to use this software for any purpose, 00066 including commercial applications, and to alter it and redistribute it 00067 freely, subject to the following restrictions: 00068 00069 1. The origin of this software must not be misrepresented; you must not 00070 claim that you wrote the original software. If you use this software 00071 in a product, an acknowledgment in the product documentation would be 00072 appreciated but is not required. 00073 2. Altered source versions must be plainly marked as such, and must not be 00074 misrepresented as being the original software. 00075 3. This notice may not be removed or altered from any source distribution. 00076 */ 00077 00078 #ifndef APR_STRINGS_H 00079 #define APR_STRINGS_H 00080 00086 #include "apr.h" 00087 #include "apr_errno.h" 00088 #include "apr_pools.h" 00089 #define APR_WANT_IOVEC 00090 #include "apr_want.h" 00091 00092 #if APR_HAVE_STDARG_H 00093 #include <stdarg.h> 00094 #endif 00095 00096 #ifdef __cplusplus 00097 extern "C" { 00098 #endif /* __cplusplus */ 00099 00114 APR_DECLARE(int) apr_strnatcmp(char const *a, char const *b); 00115 00125 APR_DECLARE(int) apr_strnatcasecmp(char const *a, char const *b); 00126 00133 APR_DECLARE(char *) apr_pstrdup(apr_pool_t *p, const char *s); 00134 00147 APR_DECLARE(char *) apr_pstrmemdup(apr_pool_t *p, const char *s, apr_size_t n); 00148 00157 APR_DECLARE(char *) apr_pstrndup(apr_pool_t *p, const char *s, apr_size_t n); 00158 00167 APR_DECLARE(void *) apr_pmemdup(apr_pool_t *p, const void *m, apr_size_t n); 00168 00175 APR_DECLARE_NONSTD(char *) apr_pstrcat(apr_pool_t *p, ...); 00176 00185 APR_DECLARE(char *) apr_pstrcatv(apr_pool_t *p, const struct iovec *vec, 00186 apr_size_t nvec, apr_size_t *nbytes); 00187 00196 APR_DECLARE(char *) apr_pvsprintf(apr_pool_t *p, const char *fmt, va_list ap); 00197 00206 APR_DECLARE_NONSTD(char *) apr_psprintf(apr_pool_t *p, const char *fmt, ...) 00207 __attribute__((format(printf,2,3))); 00208 00228 APR_DECLARE(char *) apr_cpystrn(char *dst, const char *src, 00229 apr_size_t dst_size); 00230 00237 APR_DECLARE(char *) apr_collapse_spaces(char *dest, const char *src); 00238 00246 APR_DECLARE(apr_status_t) apr_tokenize_to_argv(const char *arg_str, 00247 char ***argv_out, 00248 apr_pool_t *token_context); 00249 00261 APR_DECLARE(char *) apr_strtok(char *str, const char *sep, char **last); 00262 00293 APR_DECLARE_NONSTD(int) apr_snprintf(char *buf, apr_size_t len, 00294 const char *format, ...) 00295 __attribute__((format(printf,3,4))); 00296 00305 APR_DECLARE(int) apr_vsnprintf(char *buf, apr_size_t len, const char *format, 00306 va_list ap); 00315 APR_DECLARE(char *) apr_itoa(apr_pool_t *p, int n); 00316 00323 APR_DECLARE(char *) apr_ltoa(apr_pool_t *p, long n); 00324 00331 APR_DECLARE(char *) apr_off_t_toa(apr_pool_t *p, apr_off_t n); 00332 00347 APR_DECLARE(apr_int64_t) apr_strtoi64(const char *buf, char **end, int base); 00348 00355 APR_DECLARE(apr_int64_t) apr_atoi64(const char *buf); 00356 00365 APR_DECLARE(char *) apr_strfsize(apr_off_t size, char *buf); 00366 00369 #ifdef __cplusplus 00370 } 00371 #endif 00372 00373 #endif /* !APR_STRINGS_H */

Generated on Wed Sep 1 05:16:36 2004 for Apache Portable Runtime by doxygen 1.3.8