From 99cf606197e0eb64fb89f3a9b2f5c7e539f854ac Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Mon, 7 Aug 2000 19:26:02 +0000 Subject: [PATCH] Fix some problems with the apr conversion so that APACHE_XLATE builds work again. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86018 13f79535-47bb-0310-9956-ffa450edef68 --- modules/experimental/mod_charset_lite.c | 6 +++--- modules/http/http_core.c | 2 +- server/rfc1413.c | 8 ++++---- server/util_charset.c | 2 +- server/util_ebcdic.c | 20 ++++++++++---------- server/util_md5.c | 4 ++-- server/util_script.c | 6 +++--- support/ab.c | 12 ++++++------ support/htdigest.c | 2 +- support/htpasswd.c | 8 ++++---- 10 files changed, 35 insertions(+), 35 deletions(-) diff --git a/modules/experimental/mod_charset_lite.c b/modules/experimental/mod_charset_lite.c index a5b8371591..b41620edf1 100644 --- a/modules/experimental/mod_charset_lite.c +++ b/modules/experimental/mod_charset_lite.c @@ -226,7 +226,7 @@ static int find_code_page(request_rec *r) dc && dc->charset_default ? dc->charset_default : "(none)"); } - rv = ap_xlate_open(&output_xlate, dc->charset_default, dc->charset_source, r->pool); + rv = apr_xlate_open(&output_xlate, dc->charset_default, dc->charset_source, r->pool); if (rv != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server, "can't open translation %s->%s", @@ -247,8 +247,8 @@ static int find_code_page(request_rec *r) * with the OPTIONS method, but for now we don't set up translation * of it. */ - rv = ap_xlate_open(&input_xlate, dc->charset_source, - dc->charset_default, r->pool); + rv = apr_xlate_open(&input_xlate, dc->charset_source, + dc->charset_default, r->pool); if (rv != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server, "can't open translation %s->%s", diff --git a/modules/http/http_core.c b/modules/http/http_core.c index eefdbcae0a..3f686d29c3 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -2850,7 +2850,7 @@ static int default_handler(request_rec *r) apr_MD5Init(&context); #ifdef APACHE_XLATE if (r->rrx->to_net) { - ap_MD5SetXlate(&context, r->rrx->to_net); + apr_MD5SetXlate(&context, r->rrx->to_net); } #endif apr_MD5Update(&context, addr, (unsigned int)r->finfo.size); diff --git a/server/rfc1413.c b/server/rfc1413.c index faab9f2d4d..ce1758ff9d 100644 --- a/server/rfc1413.c +++ b/server/rfc1413.c @@ -158,8 +158,8 @@ static int get_rfc1413(apr_socket_t *sock, const char *local_ip, sav_our_port); #ifdef CHARSET_EBCDIC inbytes_left = outbytes_left = buflen; - ap_xlate_conv_buffer(ap_hdrs_to_ascii, buffer, &inbytes_left, - buffer, &outbytes_left); + apr_xlate_conv_buffer(ap_hdrs_to_ascii, buffer, &inbytes_left, + buffer, &outbytes_left); #endif /* send query to server. Handle short write. */ @@ -211,8 +211,8 @@ static int get_rfc1413(apr_socket_t *sock, const char *local_ip, /* RFC1413_USERLEN = 512 */ #ifdef CHARSET_EBCDIC inbytes_left = outbytes_left = i; - ap_xlate_conv_buffer(ap_hdrs_from_ascii, buffer, &inbytes_left, - buffer, &outbytes_left); + apr_xlate_conv_buffer(ap_hdrs_from_ascii, buffer, &inbytes_left, + buffer, &outbytes_left); #endif if (sscanf(buffer, "%u , %u : USERID :%*[^:]:%512s", &rmt_port, &our_port, user) != 3 || sav_rmt_port != rmt_port diff --git a/server/util_charset.c b/server/util_charset.c index e284711c5c..edec8ad006 100644 --- a/server/util_charset.c +++ b/server/util_charset.c @@ -104,7 +104,7 @@ API_EXPORT(apr_status_t) ap_set_content_xlate(request_rec *r, int output, if (output) { r->rrx->to_net = xlate; if (xlate) { - ap_xlate_get_sb(r->rrx->to_net, &r->rrx->to_net_sb); + apr_xlate_get_sb(r->rrx->to_net, &r->rrx->to_net_sb); } rv = ap_bsetopt(r->connection->client, BO_WXLATE, &xlate); } diff --git a/server/util_ebcdic.c b/server/util_ebcdic.c index c642035f48..9ca292d87c 100644 --- a/server/util_ebcdic.c +++ b/server/util_ebcdic.c @@ -70,38 +70,38 @@ apr_status_t ap_init_ebcdic(apr_pool_t *pool) apr_status_t rv; char buf[80]; - rv = ap_xlate_open(&ap_hdrs_to_ascii, "ISO8859-1", APR_DEFAULT_CHARSET, pool); + rv = apr_xlate_open(&ap_hdrs_to_ascii, "ISO8859-1", APR_DEFAULT_CHARSET, pool); if (rv) { ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, - "ap_xlate_open() failed"); + "apr_xlate_open() failed"); return rv; } - rv = ap_xlate_open(&ap_hdrs_from_ascii, APR_DEFAULT_CHARSET, "ISO8859-1", pool); + rv = apr_xlate_open(&ap_hdrs_from_ascii, APR_DEFAULT_CHARSET, "ISO8859-1", pool); if (rv) { ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, - "ap_xlate_open() failed"); + "apr_xlate_open() failed"); return rv; } - rv = ap_xlate_open(&ap_locale_to_ascii, "ISO8859-1", APR_LOCALE_CHARSET, pool); + rv = apr_xlate_open(&ap_locale_to_ascii, "ISO8859-1", APR_LOCALE_CHARSET, pool); if (rv) { ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, - "ap_xlate_open() failed"); + "apr_xlate_open() failed"); return rv; } - rv = ap_xlate_open(&ap_locale_from_ascii, APR_LOCALE_CHARSET, "ISO8859-1", pool); + rv = apr_xlate_open(&ap_locale_from_ascii, APR_LOCALE_CHARSET, "ISO8859-1", pool); if (rv) { ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, - "ap_xlate_open() failed"); + "apr_xlate_open() failed"); return rv; } - rv = ap_MD5InitEBCDIC(ap_hdrs_to_ascii); + rv = apr_MD5InitEBCDIC(ap_hdrs_to_ascii); if (rv) { ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, - "ap_MD5InitEBCDIC() failed"); + "apr_MD5InitEBCDIC() failed"); return rv; } diff --git a/server/util_md5.c b/server/util_md5.c index 32c1d2e41d..f7e3945f06 100644 --- a/server/util_md5.c +++ b/server/util_md5.c @@ -106,7 +106,7 @@ API_EXPORT(char *) ap_md5_binary(apr_pool_t *p, const unsigned char *buf, int le apr_MD5Init(&my_md5); #ifdef CHARSET_EBCDIC - ap_MD5SetXlate(&my_md5, ap_hdrs_to_ascii); + apr_MD5SetXlate(&my_md5, ap_hdrs_to_ascii); #endif apr_MD5Update(&my_md5, buf, (unsigned int)length); apr_MD5Final(hash, &my_md5); @@ -208,7 +208,7 @@ API_EXPORT(char *) ap_md5digest(apr_pool_t *p, apr_file_t *infile, apr_MD5Init(&context); if (xlate) { - ap_MD5SetXlate(&context, xlate); + apr_MD5SetXlate(&context, xlate); } nbytes = sizeof(buf); while (apr_read(infile, buf, &nbytes) == APR_SUCCESS) { diff --git a/server/util_script.c b/server/util_script.c index 01bc37c9cd..31f410a16a 100644 --- a/server/util_script.c +++ b/server/util_script.c @@ -496,7 +496,7 @@ API_EXPORT(int) ap_scan_script_header_err_core(request_rec *r, char *buffer, apr_size_t inbytes_left, outbytes_left; for (cp = w; *cp != '\0'; ++cp) { - native = ap_xlate_conv_byte(ap_hdrs_from_ascii, *cp); + native = apr_xlate_conv_byte(ap_hdrs_from_ascii, *cp); if (isprint(*cp) && !isprint(native)) ++maybeEBCDIC; if (!isprint(*cp) && isprint(native)) @@ -507,8 +507,8 @@ API_EXPORT(int) ap_scan_script_header_err_core(request_rec *r, char *buffer, "CGI Interface Error: Script headers apparently ASCII: (CGI = %s)", r->filename); inbytes_left = outbytes_left = cp - w; - ap_xlate_conv_buffer(ap_hdrs_from_ascii, - w, &inbytes_left, w, &outbytes_left); + apr_xlate_conv_buffer(ap_hdrs_from_ascii, + w, &inbytes_left, w, &outbytes_left); } } #endif /*CHARSET_EBCDIC*/ diff --git a/support/ab.c b/support/ab.c index 5be01f2043..5b3b56a4b0 100644 --- a/support/ab.c +++ b/support/ab.c @@ -862,14 +862,14 @@ static void test(void) static void copyright(void) { if (!use_html) { - printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.22 $> apache-2.0"); + printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.23 $> apache-2.0"); printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n"); printf("Copyright (c) 1998-2000 The Apache Software Foundation, http://www.apache.org/\n"); printf("\n"); } else { printf("

\n"); - printf(" This is ApacheBench, Version %s <%s> apache-2.0
\n", AB_VERSION, "$Revision: 1.22 $"); + printf(" This is ApacheBench, Version %s <%s> apache-2.0
\n", AB_VERSION, "$Revision: 1.23 $"); printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
\n"); printf(" Copyright (c) 1998-2000 The Apache Software Foundation, http://www.apache.org/
\n"); printf("

\n

\n"); @@ -989,14 +989,14 @@ int main(int argc, char **argv) apr_create_pool(&cntxt, NULL); #ifdef NOT_ASCII - status = ap_xlate_open(&to_ascii, "ISO8859-1", APR_DEFAULT_CHARSET, cntxt); + status = apr_xlate_open(&to_ascii, "ISO8859-1", APR_DEFAULT_CHARSET, cntxt); if (status) { - fprintf(stderr, "ap_xlate_open(to ASCII)->%d\n", status); + fprintf(stderr, "apr_xlate_open(to ASCII)->%d\n", status); exit(1); } - status = ap_xlate_open(&from_ascii, APR_DEFAULT_CHARSET, "ISO8859-1", cntxt); + status = apr_xlate_open(&from_ascii, APR_DEFAULT_CHARSET, "ISO8859-1", cntxt); if (status) { - fprintf(stderr, "ap_xlate_open(from ASCII)->%d\n", status); + fprintf(stderr, "apr_xlate_open(from ASCII)->%d\n", status); exit(1); } status = ap_base64init_ebcdic(to_ascii, from_ascii); diff --git a/support/htdigest.c b/support/htdigest.c index 195e241304..0699b97a73 100644 --- a/support/htdigest.c +++ b/support/htdigest.c @@ -186,7 +186,7 @@ static void add_password(char *user, char *realm, apr_file_t *f) apr_MD5Init(&context); #ifdef CHARSET_EBCDIC - ap_MD5SetXlate(&context, to_ascii); + apr_MD5SetXlate(&context, to_ascii); #endif apr_MD5Update(&context, (unsigned char *) string, strlen(string)); apr_MD5Final(digest, &context); diff --git a/support/htpasswd.c b/support/htpasswd.c index 89013c5c83..ad9fa94499 100644 --- a/support/htpasswd.c +++ b/support/htpasswd.c @@ -384,9 +384,9 @@ int main(int argc, char *argv[]) atexit(apr_terminate); apr_create_pool(&pool, NULL); - rv = ap_xlate_open(&to_ascii, "ISO8859-1", APR_DEFAULT_CHARSET, pool); + rv = apr_xlate_open(&to_ascii, "ISO8859-1", APR_DEFAULT_CHARSET, pool); if (rv) { - fprintf(stderr, "ap_xlate_open(to ASCII)->%d\n", rv); + fprintf(stderr, "apr_xlate_open(to ASCII)->%d\n", rv); exit(1); } rv = ap_SHA1InitEBCDIC(to_ascii); @@ -394,9 +394,9 @@ int main(int argc, char *argv[]) fprintf(stderr, "ap_SHA1InitEBCDIC()->%d\n", rv); exit(1); } - rv = ap_MD5InitEBCDIC(to_ascii); + rv = apr_MD5InitEBCDIC(to_ascii); if (rv) { - fprintf(stderr, "ap_MD5InitEBCDIC()->%d\n", rv); + fprintf(stderr, "apr_MD5InitEBCDIC()->%d\n", rv); exit(1); } #endif /*CHARSET_EBCDIC*/ -- 2.40.0