diff options
author | Doug MacEachern <dougm@apache.org> | 2000-08-02 05:26:45 +0000 |
---|---|---|
committer | Doug MacEachern <dougm@apache.org> | 2000-08-02 05:26:45 +0000 |
commit | 1a1463dbfc6e28b6a5852142b0c87d4abe33c3d9 (patch) | |
tree | 4da0bfd73d36292921960aaabc877a57e680b8c4 /strings | |
parent | 4dd06339dd5b46bd735c56dc3738146416f52ccf (diff) | |
download | apr-1a1463dbfc6e28b6a5852142b0c87d4abe33c3d9.tar.gz |
prefix libapr functions and types with apr_
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60470 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'strings')
-rw-r--r-- | strings/apr_cpystrn.c | 20 | ||||
-rw-r--r-- | strings/apr_fnmatch.c | 6 | ||||
-rw-r--r-- | strings/apr_snprintf.c | 22 | ||||
-rw-r--r-- | strings/apr_strings.c | 14 | ||||
-rw-r--r-- | strings/apr_strnatcmp.c | 4 |
5 files changed, 33 insertions, 33 deletions
diff --git a/strings/apr_cpystrn.c b/strings/apr_cpystrn.c index 0f6a503b2..7c12cc878 100644 --- a/strings/apr_cpystrn.c +++ b/strings/apr_cpystrn.c @@ -77,10 +77,10 @@ * the destination string, we return a pointer to the * terminating '\0' to allow us to "check" for truncation * - * ap_cpystrn() follows the same call structure as strncpy(). + * apr_cpystrn() follows the same call structure as strncpy(). */ -APR_EXPORT(char *) ap_cpystrn(char *dst, const char *src, size_t dst_size) +APR_EXPORT(char *) apr_cpystrn(char *dst, const char *src, size_t dst_size) { char *d, *end; @@ -120,9 +120,9 @@ APR_EXPORT(char *) ap_cpystrn(char *dst, const char *src, size_t dst_size) * pool and filled in with copies of the tokens * found during parsing of the arg_str. */ -APR_EXPORT(ap_status_t) ap_tokenize_to_argv(const char *arg_str, +APR_EXPORT(apr_status_t) apr_tokenize_to_argv(const char *arg_str, char ***argv_out, - ap_pool_t *token_context) + apr_pool_t *token_context) { const char *cp; const char *tmpCnt; @@ -172,7 +172,7 @@ APR_EXPORT(ap_status_t) ap_tokenize_to_argv(const char *arg_str, SKIP_WHITESPACE(tmpCnt); } - *argv_out = ap_palloc(token_context, numargs*sizeof(char*)); + *argv_out = apr_palloc(token_context, numargs*sizeof(char*)); if (*argv_out == NULL) { return (APR_ENOMEM); } @@ -184,15 +184,15 @@ APR_EXPORT(ap_status_t) ap_tokenize_to_argv(const char *arg_str, tmpCnt = cp; DETERMINE_NEXTSTRING(cp, isquoted); if (*cp == '\0') { - (*argv_out)[numargs] = ap_pstrdup(token_context, tmpCnt); + (*argv_out)[numargs] = apr_pstrdup(token_context, tmpCnt); numargs++; (*argv_out)[numargs] = '\0'; break; } else { cp++; - (*argv_out)[numargs] = ap_palloc(token_context, cp - tmpCnt); - ap_cpystrn((*argv_out)[numargs], tmpCnt, cp - tmpCnt); + (*argv_out)[numargs] = apr_palloc(token_context, cp - tmpCnt); + apr_cpystrn((*argv_out)[numargs], tmpCnt, cp - tmpCnt); numargs++; } @@ -212,7 +212,7 @@ APR_EXPORT(ap_status_t) ap_tokenize_to_argv(const char *arg_str, * Corrected Win32 to accept "a/b\\stuff", "a:stuff" */ -APR_EXPORT(const char *) ap_filename_of_pathname(const char *pathname) +APR_EXPORT(const char *) apr_filename_of_pathname(const char *pathname) { const char path_separator = '/'; const char *s = strrchr(pathname, path_separator); @@ -234,7 +234,7 @@ APR_EXPORT(const char *) ap_filename_of_pathname(const char *pathname) * collapse in place (src == dest) is legal. * returns terminating null ptr to dest string. */ -APR_EXPORT(char *) ap_collapse_spaces(char *dest, const char *src) +APR_EXPORT(char *) apr_collapse_spaces(char *dest, const char *src) { while (*src) { if (!ap_isspace(*src)) diff --git a/strings/apr_fnmatch.c b/strings/apr_fnmatch.c index b8449ef37..f1c86fca3 100644 --- a/strings/apr_fnmatch.c +++ b/strings/apr_fnmatch.c @@ -56,7 +56,7 @@ static char sccsid[] = "@(#)fnmatch.c 8.2 (Berkeley) 4/16/94"; static const char *rangematch(const char *, int, int); -APR_EXPORT(ap_status_t) ap_fnmatch(const char *pattern, const char *string, int flags) +APR_EXPORT(apr_status_t) apr_fnmatch(const char *pattern, const char *string, int flags) { const char *stringstart; char c, test; @@ -110,7 +110,7 @@ APR_EXPORT(ap_status_t) ap_fnmatch(const char *pattern, const char *string, int /* General case, use recursion. */ while ((test = *string) != EOS) { - if (!ap_fnmatch(pattern, string, flags & ~FNM_PERIOD)) { + if (!apr_fnmatch(pattern, string, flags & ~FNM_PERIOD)) { return (APR_SUCCESS); } if (test == '/' && flags & FNM_PATHNAME) { @@ -210,7 +210,7 @@ static const char *rangematch(const char *pattern, int test, int flags) /* This function is an Apache addition */ /* return non-zero if pattern has any glob chars in it */ -APR_EXPORT(int) ap_is_fnmatch(const char *pattern) +APR_EXPORT(int) apr_is_fnmatch(const char *pattern) { int nesting; diff --git a/strings/apr_snprintf.c b/strings/apr_snprintf.c index 4e377f8a3..3427baa69 100644 --- a/strings/apr_snprintf.c +++ b/strings/apr_snprintf.c @@ -51,7 +51,7 @@ * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * - * The ap_vsnprintf/ap_snprintf functions are based on, and used with the + * The apr_vsnprintf/apr_snprintf functions are based on, and used with the * permission of, the SIO stdio-replacement strx_* functions by Panos * Tsirigotis <panos@alumni.cs.colorado.edu> for xinetd. */ @@ -656,8 +656,8 @@ static char *conv_p2_quad(u_widest_int num, register int nbits, /* * Do format conversion placing the output in buffer */ -APR_EXPORT(int) ap_vformatter(int (*flush_func)(ap_vformatter_buff_t *), - ap_vformatter_buff_t *vbuff, const char *fmt, va_list ap) +APR_EXPORT(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *), + apr_vformatter_buff_t *vbuff, const char *fmt, va_list ap) { register char *sp; register char *bep; @@ -1149,21 +1149,21 @@ APR_EXPORT(int) ap_vformatter(int (*flush_func)(ap_vformatter_buff_t *), } -static int snprintf_flush(ap_vformatter_buff_t *vbuff) +static int snprintf_flush(apr_vformatter_buff_t *vbuff) { /* if the buffer fills we have to abort immediately, there is no way - * to "flush" an ap_snprintf... there's nowhere to flush it to. + * to "flush" an apr_snprintf... there's nowhere to flush it to. */ return -1; } -APR_EXPORT_NONSTD(int) ap_snprintf(char *buf, size_t len, +APR_EXPORT_NONSTD(int) apr_snprintf(char *buf, size_t len, const char *format, ...) { int cc; va_list ap; - ap_vformatter_buff_t vbuff; + apr_vformatter_buff_t vbuff; if (len == 0) return 0; @@ -1172,18 +1172,18 @@ APR_EXPORT_NONSTD(int) ap_snprintf(char *buf, size_t len, vbuff.curpos = buf; vbuff.endpos = buf + len - 1; va_start(ap, format); - cc = ap_vformatter(snprintf_flush, &vbuff, format, ap); + cc = apr_vformatter(snprintf_flush, &vbuff, format, ap); va_end(ap); *vbuff.curpos = '\0'; return (cc == -1) ? len : cc; } -APR_EXPORT(int) ap_vsnprintf(char *buf, size_t len, const char *format, +APR_EXPORT(int) apr_vsnprintf(char *buf, size_t len, const char *format, va_list ap) { int cc; - ap_vformatter_buff_t vbuff; + apr_vformatter_buff_t vbuff; if (len == 0) return 0; @@ -1191,7 +1191,7 @@ APR_EXPORT(int) ap_vsnprintf(char *buf, size_t len, const char *format, /* save one byte for nul terminator */ vbuff.curpos = buf; vbuff.endpos = buf + len - 1; - cc = ap_vformatter(snprintf_flush, &vbuff, format, ap); + cc = apr_vformatter(snprintf_flush, &vbuff, format, ap); *vbuff.curpos = '\0'; return (cc == -1) ? len : cc; } diff --git a/strings/apr_strings.c b/strings/apr_strings.c index 2d53695f8..f072f260d 100644 --- a/strings/apr_strings.c +++ b/strings/apr_strings.c @@ -57,7 +57,7 @@ #include "apr_private.h" #include "apr_lib.h" -APR_EXPORT(char *) ap_pstrdup(ap_pool_t *a, const char *s) +APR_EXPORT(char *) apr_pstrdup(apr_pool_t *a, const char *s) { char *res; size_t len; @@ -66,31 +66,31 @@ APR_EXPORT(char *) ap_pstrdup(ap_pool_t *a, const char *s) return NULL; } len = strlen(s) + 1; - res = ap_palloc(a, len); + res = apr_palloc(a, len); memcpy(res, s, len); return res; } -APR_EXPORT(char *) ap_pstrndup(ap_pool_t *a, const char *s, ap_size_t n) +APR_EXPORT(char *) apr_pstrndup(apr_pool_t *a, const char *s, apr_size_t n) { char *res; if (s == NULL) { return NULL; } - res = ap_palloc(a, n + 1); + res = apr_palloc(a, n + 1); memcpy(res, s, n); res[n] = '\0'; return res; } -APR_EXPORT_NONSTD(char *) ap_pstrcat(ap_pool_t *a, ...) +APR_EXPORT_NONSTD(char *) apr_pstrcat(apr_pool_t *a, ...) { char *cp, *argp, *res; /* Pass one --- find length of required string */ - ap_size_t len = 0; + apr_size_t len = 0; va_list adummy; va_start(adummy, a); @@ -103,7 +103,7 @@ APR_EXPORT_NONSTD(char *) ap_pstrcat(ap_pool_t *a, ...) /* Allocate the required string */ - res = (char *) ap_palloc(a, len + 1); + res = (char *) apr_palloc(a, len + 1); cp = res; *cp = '\0'; diff --git a/strings/apr_strnatcmp.c b/strings/apr_strnatcmp.c index 8eeaf41cd..f1057fde6 100644 --- a/strings/apr_strnatcmp.c +++ b/strings/apr_strnatcmp.c @@ -140,12 +140,12 @@ static int strnatcmp0(char const *a, char const *b, int fold_case) -int ap_strnatcmp(char const *a, char const *b) { +int apr_strnatcmp(char const *a, char const *b) { return strnatcmp0(a, b, 0); } /* Compare, recognizing numeric string and ignoring case. */ -int ap_strnatcasecmp(char const *a, char const *b) { +int apr_strnatcasecmp(char const *a, char const *b) { return strnatcmp0(a, b, 1); } |