summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2000-08-06 06:07:33 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2000-08-06 06:07:33 +0000
commit06b2035cc7444370e4ad913f25e400545915a743 (patch)
tree4f0eea47f7ec42ad43d4b3fad7f7d5907e416115 /strings
parent6105382e1c48011d628cd0562e87471ca605e8cb (diff)
downloadlibapr-06b2035cc7444370e4ad913f25e400545915a743.tar.gz
Remaining cleanup of ap_ -> apr_ and AP_ -> APR_ transformation...
see src/lib/apr/apr_compat.h for most details. Also a few minor nits to get Win32 to build. PR: Obtained from: Submitted by: Reviewed by: git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60481 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'strings')
-rw-r--r--strings/apr_cpystrn.c12
-rw-r--r--strings/apr_fnmatch.c8
-rw-r--r--strings/apr_snprintf.c43
3 files changed, 32 insertions, 31 deletions
diff --git a/strings/apr_cpystrn.c b/strings/apr_cpystrn.c
index 7c12cc878..53433c656 100644
--- a/strings/apr_cpystrn.c
+++ b/strings/apr_cpystrn.c
@@ -108,7 +108,7 @@ APR_EXPORT(char *) apr_cpystrn(char *dst, const char *src, size_t dst_size)
* This function provides a way to parse a generic argument string
* into a standard argv[] form of argument list. It respects the
* usual "whitespace" and quoteing rules. In the future this could
- * be expanded to include support for the ap_call_exec command line
+ * be expanded to include support for the apr_call_exec command line
* string processing (including converting '+' to ' ' and doing the
* url processing. It does not currently support this function.
*
@@ -237,7 +237,7 @@ APR_EXPORT(const char *) apr_filename_of_pathname(const char *pathname)
APR_EXPORT(char *) apr_collapse_spaces(char *dest, const char *src)
{
while (*src) {
- if (!ap_isspace(*src))
+ if (!apr_isspace(*src))
*dest++ = *src;
++src;
}
@@ -254,8 +254,8 @@ char *strdup(const char *str)
if (!(sdup = (char *) malloc(len))) {
/* ### whoops! we can't call Apache logging routines here... */
#if 0
- ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
- "Ouch! Out of memory in our strdup()!");
+ apr_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
+ "Ouch! Out of memory in our strdup()!");
#endif
return NULL;
}
@@ -272,7 +272,7 @@ int strcasecmp(const char *a, const char *b)
const char *p = a;
const char *q = b;
for (p = a, q = b; *p && *q; p++, q++) {
- int diff = ap_tolower(*p) - ap_tolower(*q);
+ int diff = apr_tolower(*p) - apr_tolower(*q);
if (diff)
return diff;
}
@@ -297,7 +297,7 @@ int strncasecmp(const char *a, const char *b, size_t n)
return 0; /* Match up to n characters */
if (!(*p && *q))
return *p - *q;
- diff = ap_tolower(*p) - ap_tolower(*q);
+ diff = apr_tolower(*p) - apr_tolower(*q);
if (diff)
return diff;
}
diff --git a/strings/apr_fnmatch.c b/strings/apr_fnmatch.c
index f1c86fca3..131379eca 100644
--- a/strings/apr_fnmatch.c
+++ b/strings/apr_fnmatch.c
@@ -146,7 +146,7 @@ APR_EXPORT(apr_status_t) apr_fnmatch(const char *pattern, const char *string, in
/* FALLTHROUGH */
default:
if (flags & FNM_CASE_BLIND) {
- if (ap_tolower(c) != ap_tolower(*string)) {
+ if (apr_tolower(c) != apr_tolower(*string)) {
return (FNM_NOMATCH);
}
}
@@ -193,14 +193,14 @@ static const char *rangematch(const char *pattern, int test, int flags)
}
if ((c <= test && test <= c2)
|| ((flags & FNM_CASE_BLIND)
- && ((ap_tolower(c) <= ap_tolower(test))
- && (ap_tolower(test) <= ap_tolower(c2))))) {
+ && ((apr_tolower(c) <= apr_tolower(test))
+ && (apr_tolower(test) <= apr_tolower(c2))))) {
ok = 1;
}
}
else if ((c == test)
|| ((flags & FNM_CASE_BLIND)
- && (ap_tolower(c) == ap_tolower(test)))) {
+ && (apr_tolower(c) == apr_tolower(test)))) {
ok = 1;
}
}
diff --git a/strings/apr_snprintf.c b/strings/apr_snprintf.c
index 3427baa69..9e826938d 100644
--- a/strings/apr_snprintf.c
+++ b/strings/apr_snprintf.c
@@ -90,12 +90,12 @@ typedef enum {
#ifndef TRUE
#define TRUE 1
#endif
-#ifndef AP_LONGEST_LONG
-#define AP_LONGEST_LONG long
+#ifndef APR_LONGEST_LONG
+#define APR_LONGEST_LONG long
#endif
#define NUL '\0'
#define WIDE_INT long
-#define WIDEST_INT AP_LONGEST_LONG
+#define WIDEST_INT APR_LONGEST_LONG
typedef WIDE_INT wide_int;
typedef unsigned WIDE_INT u_wide_int;
@@ -127,7 +127,7 @@ typedef int bool_int;
*/
/*
- * ap_ecvt converts to decimal
+ * apr_ecvt converts to decimal
* the number of digits is specified by ndigit
* decpt is set to the position of the decimal point
* sign is set to 0 for positive, 1 for negative
@@ -136,7 +136,8 @@ typedef int bool_int;
#define NDIG 80
/* buf must have at least NDIG bytes */
-static char *ap_cvt(double arg, int ndigits, int *decpt, int *sign, int eflag, char *buf)
+static char *apr_cvt(double arg, int ndigits, int *decpt, int *sign,
+ int eflag, char *buf)
{
register int r2;
double fi, fj;
@@ -209,29 +210,29 @@ static char *ap_cvt(double arg, int ndigits, int *decpt, int *sign, int eflag, c
return (buf);
}
-static char *ap_ecvt(double arg, int ndigits, int *decpt, int *sign, char *buf)
+static char *apr_ecvt(double arg, int ndigits, int *decpt, int *sign, char *buf)
{
- return (ap_cvt(arg, ndigits, decpt, sign, 1, buf));
+ return (apr_cvt(arg, ndigits, decpt, sign, 1, buf));
}
-static char *ap_fcvt(double arg, int ndigits, int *decpt, int *sign, char *buf)
+static char *apr_fcvt(double arg, int ndigits, int *decpt, int *sign, char *buf)
{
- return (ap_cvt(arg, ndigits, decpt, sign, 0, buf));
+ return (apr_cvt(arg, ndigits, decpt, sign, 0, buf));
}
/*
- * ap_gcvt - Floating output conversion to
+ * apr_gcvt - Floating output conversion to
* minimal length string
*/
-static char *ap_gcvt(double number, int ndigit, char *buf, boolean_e altform)
+static char *apr_gcvt(double number, int ndigit, char *buf, boolean_e altform)
{
int sign, decpt;
register char *p1, *p2;
register int i;
char buf1[NDIG];
- p1 = ap_ecvt(number, ndigit, &decpt, &sign, buf1);
+ p1 = apr_ecvt(number, ndigit, &decpt, &sign, buf1);
p2 = buf;
if (sign)
*p2++ = '-';
@@ -310,7 +311,7 @@ static char *ap_gcvt(double number, int ndigit, char *buf, boolean_e altform)
#define STR_TO_DEC( str, num ) \
num = NUM( *str++ ) ; \
- while ( ap_isdigit( *str ) ) \
+ while ( apr_isdigit( *str ) ) \
{ \
num *= 10 ; \
num += NUM( *str++ ) ; \
@@ -523,14 +524,14 @@ static char *conv_fp(register char format, register double num,
char buf1[NDIG];
if (format == 'f')
- p = ap_fcvt(num, precision, &decimal_point, is_negative, buf1);
+ p = apr_fcvt(num, precision, &decimal_point, is_negative, buf1);
else /* either e or E format */
- p = ap_ecvt(num, precision + 1, &decimal_point, is_negative, buf1);
+ p = apr_ecvt(num, precision + 1, &decimal_point, is_negative, buf1);
/*
* Check for Infinity and NaN
*/
- if (ap_isalpha(*p)) {
+ if (apr_isalpha(*p)) {
*len = strlen(strcpy(buf, p));
*is_negative = FALSE;
return (buf);
@@ -721,7 +722,7 @@ APR_EXPORT(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
/*
* Try to avoid checking for flags, width or precision
*/
- if (!ap_islower(*fmt)) {
+ if (!apr_islower(*fmt)) {
/*
* Recognize flags: -, #, BLANK, +
*/
@@ -743,7 +744,7 @@ APR_EXPORT(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
/*
* Check if a width was specified
*/
- if (ap_isdigit(*fmt)) {
+ if (apr_isdigit(*fmt)) {
STR_TO_DEC(fmt, min_width);
adjust_width = YES;
}
@@ -769,7 +770,7 @@ APR_EXPORT(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
if (*fmt == '.') {
adjust_precision = YES;
fmt++;
- if (ap_isdigit(*fmt)) {
+ if (apr_isdigit(*fmt)) {
STR_TO_DEC(fmt, precision);
}
else if (*fmt == '*') {
@@ -958,7 +959,7 @@ APR_EXPORT(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
/*
* * We use &num_buf[ 1 ], so that we have room for the sign
*/
- s = ap_gcvt(va_arg(ap, double), precision, &num_buf[1],
+ s = apr_gcvt(va_arg(ap, double), precision, &num_buf[1],
alternate_form);
if (*s == '-')
prefix_char = *s++;
@@ -1018,7 +1019,7 @@ APR_EXPORT(int) apr_vformatter(int (*flush_func)(apr_vformatter_buff_t *),
* don't handle "%p".
*/
case 'p':
-#ifdef AP_VOID_P_IS_QUAD
+#ifdef APR_VOID_P_IS_QUAD
if (sizeof(void *) <= sizeof(u_widest_int)) {
ui_quad = (u_widest_int) va_arg(ap, void *);
s = conv_p2_quad(ui_quad, 4, 'x',