]> granicus.if.org Git - apache/commitdiff
tidy up some charset recoding issues
authorJeff Trawick <trawick@apache.org>
Wed, 26 Nov 2003 02:09:25 +0000 (02:09 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 26 Nov 2003 02:09:25 +0000 (02:09 +0000)
the "need" for APACHE_XLATE went away some years ago when BUFF went
POOF and charset recoding (translation) of non-protocol data
could no longer be performed by the core...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101894 13f79535-47bb-0310-9956-ffa450edef68

include/ap_config.h
include/util_charset.h
server/main.c
server/util_charset.c
server/util_ebcdic.c

index 86ec5dc224a98b81bcc3dd35e03c96ba5ae102ec..a951d0fbd54a0c51770736a788cc7e25c432ca79 100644 (file)
 #define AP_HAVE_RELIABLE_PIPED_LOGS TRUE
 #endif
 
-#if APR_CHARSET_EBCDIC && !defined(APACHE_XLATE)
-#define APACHE_XLATE
-#endif
-
 #endif /* AP_CONFIG_H */
index ae4608cc96c91ff83e4a47639ba9b8a63e7c20b9..fb7f889f9ea1f4c809425d73d745c383af701051 100644 (file)
@@ -59,8 +59,6 @@
 #ifndef APACHE_UTIL_CHARSET_H
 #define APACHE_UTIL_CHARSET_H
 
-#ifdef APACHE_XLATE
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -68,6 +66,10 @@ extern "C" {
 /**
  * @package charset conversion
  */
+#include "apr.h"
+
+#if APR_CHARSET_EBCDIC
+
 #include "apr_xlate.h"
 
 /** On EBCDIC machine this is a translation handle used to translate the 
@@ -78,19 +80,11 @@ extern apr_xlate_t *ap_hdrs_to_ascii;
  *  headers from ASCII to the local machine format after network transmission.
  *  On an ASCII machine this is NULL */
 extern apr_xlate_t *ap_hdrs_from_ascii;
-/** On EBCDIC machine this is a translation handle used to translate the 
- *  content from the local machine format to ASCII for network transmission.
- *  On an ASCII machine this is NULL */
-extern apr_xlate_t *ap_locale_to_ascii;
-/** On EBCDIC machine this is a translation handle used to translate the
- *  content from ASCII to the local machine format after network transmission.
- *  On an ASCII machine this is NULL */
-extern apr_xlate_t *ap_locale_from_ascii;
 
+#endif  /* APR_CHARSET_EBCDIC */
+    
 #ifdef __cplusplus
 }
 #endif
 
-#endif  /* APACHE_XLATE */
-    
 #endif  /* !APACHE_UTIL_CHARSET_H */
index 5cc84f86afb6a7f9890299c7d0b35761c40db411..c404c064678a63682317ec84f2099f111325b7dc 100644 (file)
@@ -195,10 +195,6 @@ static void show_compile_settings(void)
     printf(" -D APR_CHARSET_EBCDIC\n");
 #endif
 
-#ifdef APACHE_XLATE
-    printf(" -D APACHE_XLATE\n");
-#endif
-
 #ifdef NEED_HASHBANG_EMUL
     printf(" -D NEED_HASHBANG_EMUL\n");
 #endif
index af203857b2883e77e9e50a33ba95e712061206c9..4a90fdf9c40f3914bcfc3937190b3c7611f0026f 100644 (file)
@@ -58,7 +58,7 @@
 
 #include "ap_config.h"
 
-#ifdef APACHE_XLATE
+#if APR_CHARSET_EBCDIC
 
 #include "httpd.h"
 #include "http_log.h"
  
 apr_xlate_t *ap_hdrs_to_ascii, *ap_hdrs_from_ascii;
 
-/* ap_locale_to_ascii, ap_locale_from_ascii
- *
- * These handles are used for the translation of content, unless a
- * configuration module overrides them.
- *
- * For an EBCDIC machine, these are valid handles which are set up at
- * initialization to translate between ISO-8859-1 and the code page of
- * the httpd process's locale.
- *
- * For an ASCII machine, these remain NULL so that no translation is
- * performed (unless a configuration module does something, of course).
- */
-
-apr_xlate_t *ap_locale_to_ascii, *ap_locale_from_ascii;
-
-#endif /*APACHE_XLATE*/
+#endif /*APR_CHARSET_EBCDIC */
index 342d6a9e8e1331607a174ce4d26facf22a06eaad..e603a11cc3925ad514c197d3786d09cf2e8b1bf5 100644 (file)
@@ -85,20 +85,6 @@ apr_status_t ap_init_ebcdic(apr_pool_t *pool)
         return rv;
     }
 
-    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,
-                     "apr_xlate_open() failed");
-        return rv;
-    }
-
-    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,
-                     "apr_xlate_open() failed");
-        return rv;
-    }
-
     rv = apr_MD5InitEBCDIC(ap_hdrs_to_ascii);
     if (rv) {
         ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL,