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

apr_strings.h

Go to the documentation of this file.
00001 /* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
00002  * applicable.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 /* Portions of this file are covered by */
00018 /* -*- mode: c; c-file-style: "k&r" -*-
00019 
00020   strnatcmp.c -- Perform 'natural order' comparisons of strings in C.
00021   Copyright (C) 2000 by Martin Pool <mbp@humbug.org.au>
00022 
00023   This software is provided 'as-is', without any express or implied
00024   warranty.  In no event will the authors be held liable for any damages
00025   arising from the use of this software.
00026 
00027   Permission is granted to anyone to use this software for any purpose,
00028   including commercial applications, and to alter it and redistribute it
00029   freely, subject to the following restrictions:
00030 
00031   1. The origin of this software must not be misrepresented; you must not
00032      claim that you wrote the original software. If you use this software
00033      in a product, an acknowledgment in the product documentation would be
00034      appreciated but is not required.
00035   2. Altered source versions must be plainly marked as such, and must not be
00036      misrepresented as being the original software.
00037   3. This notice may not be removed or altered from any source distribution.
00038 */
00039 
00040 #ifndef APR_STRINGS_H
00041 #define APR_STRINGS_H
00042 
00048 #include "apr.h"
00049 #include "apr_errno.h"
00050 #include "apr_pools.h"
00051 #define APR_WANT_IOVEC
00052 #include "apr_want.h"
00053 
00054 #if APR_HAVE_STDARG_H
00055 #include <stdarg.h>
00056 #endif
00057 
00058 #ifdef __cplusplus
00059 extern "C" {
00060 #endif /* __cplusplus */
00061 
00076 APR_DECLARE(int) apr_strnatcmp(char const *a, char const *b);
00077 
00087 APR_DECLARE(int) apr_strnatcasecmp(char const *a, char const *b);
00088 
00095 APR_DECLARE(char *) apr_pstrdup(apr_pool_t *p, const char *s);
00096 
00109 APR_DECLARE(char *) apr_pstrmemdup(apr_pool_t *p, const char *s, apr_size_t n);
00110 
00119 APR_DECLARE(char *) apr_pstrndup(apr_pool_t *p, const char *s, apr_size_t n);
00120 
00129 APR_DECLARE(void *) apr_pmemdup(apr_pool_t *p, const void *m, apr_size_t n);
00130 
00137 APR_DECLARE_NONSTD(char *) apr_pstrcat(apr_pool_t *p, ...);
00138 
00147 APR_DECLARE(char *) apr_pstrcatv(apr_pool_t *p, const struct iovec *vec,
00148                                  apr_size_t nvec, apr_size_t *nbytes);
00149 
00158 APR_DECLARE(char *) apr_pvsprintf(apr_pool_t *p, const char *fmt, va_list ap);
00159 
00168 APR_DECLARE_NONSTD(char *) apr_psprintf(apr_pool_t *p, const char *fmt, ...)
00169         __attribute__((format(printf,2,3)));
00170 
00190 APR_DECLARE(char *) apr_cpystrn(char *dst, const char *src,
00191                                 apr_size_t dst_size);
00192 
00199 APR_DECLARE(char *) apr_collapse_spaces(char *dest, const char *src);
00200 
00208 APR_DECLARE(apr_status_t) apr_tokenize_to_argv(const char *arg_str,
00209                                                char ***argv_out,
00210                                                apr_pool_t *token_context);
00211 
00223 APR_DECLARE(char *) apr_strtok(char *str, const char *sep, char **last);
00224 
00255 APR_DECLARE_NONSTD(int) apr_snprintf(char *buf, apr_size_t len,
00256                                      const char *format, ...)
00257         __attribute__((format(printf,3,4)));
00258 
00267 APR_DECLARE(int) apr_vsnprintf(char *buf, apr_size_t len, const char *format,
00268                                va_list ap);
00277 APR_DECLARE(char *) apr_itoa(apr_pool_t *p, int n);
00278 
00285 APR_DECLARE(char *) apr_ltoa(apr_pool_t *p, long n);
00286 
00293 APR_DECLARE(char *) apr_off_t_toa(apr_pool_t *p, apr_off_t n);
00294 
00309 APR_DECLARE(apr_int64_t) apr_strtoi64(const char *buf, char **end, int base);
00310 
00317 APR_DECLARE(apr_int64_t) apr_atoi64(const char *buf);
00318 
00327 APR_DECLARE(char *) apr_strfsize(apr_off_t size, char *buf);
00328 
00331 #ifdef __cplusplus
00332 }
00333 #endif
00334 
00335 #endif  /* !APR_STRINGS_H */

Generated on Thu Nov 3 20:34:22 2005 for Apache Portable Runtime by  doxygen 1.4.2