summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apr.dsp8
-rw-r--r--build/nw_export.inc4
-rw-r--r--configure.in4
-rw-r--r--docs/doxygen.conf1
-rw-r--r--i18n/unix/.cvsignore4
-rw-r--r--i18n/unix/Makefile.in13
-rw-r--r--i18n/unix/xlate.c420
-rw-r--r--include/apr.h.in2
-rw-r--r--include/apr.hnw4
-rw-r--r--include/apr.hw2
-rw-r--r--include/apr_xlate.h191
-rw-r--r--libapr.dsp12
12 files changed, 7 insertions, 658 deletions
diff --git a/apr.dsp b/apr.dsp
index 539fb6578..61f58e0c7 100644
--- a/apr.dsp
+++ b/apr.dsp
@@ -155,10 +155,6 @@ SOURCE=.\file_io\win32\seek.c
# Begin Group "i18n"
# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\i18n\unix\xlate.c
-# End Source File
# End Group
# Begin Group "locks"
@@ -595,10 +591,6 @@ SOURCE=.\include\apr_user.h
SOURCE=.\include\apr_want.h
# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_xlate.h
-# End Source File
# End Group
# End Target
# End Project
diff --git a/build/nw_export.inc b/build/nw_export.inc
index fff5dc584..85500742c 100644
--- a/build/nw_export.inc
+++ b/build/nw_export.inc
@@ -24,7 +24,6 @@
#include "apr_hash.h"
#include "apr_inherit.h"
#include "apr_lib.h"
-#include "apr_md5.h"
#include "apr_mmap.h"
#include "apr_network_io.h"
#include "apr_poll.h"
@@ -43,10 +42,9 @@
#include "apr_thread_rwlock.h"
#include "apr_time.h"
#include "apr_user.h"
-#include "apr_uuid.h"
#include "apr_version.h"
#include "apr_want.h"
-#include "apr_xlate.h"
+
/* Must include apu.h first so that we can undefine
the standard prototypes macros after it messes with
diff --git a/configure.in b/configure.in
index 886f434f2..448eef6cc 100644
--- a/configure.in
+++ b/configure.in
@@ -851,7 +851,7 @@ AC_CHECK_FUNCS(crypt_r, [ crypt_r="1" ], [ crypt_r="0" ])
if test "$crypt_r" = "1"; then
APR_CHECK_CRYPT_R_STYLE
fi
-AC_CHECK_FUNCS(iconv, [ iconv="1" ], [ iconv="0" ])
+AC_CHECK_FUNCS(iconv, [ have_iconv="1" ], [ have_iconv="0" ])
if test "$iconv" = "1"; then
APR_CHECK_ICONV_INBUF
fi
@@ -871,7 +871,7 @@ AC_SUBST(have_inet_network)
AC_SUBST(have_sigaction)
AC_SUBST(have_setrlimit)
AC_SUBST(have_getrlimit)
-AC_SUBST(iconv)
+AC_SUBST(have_iconv)
AC_SUBST(mmap)
AC_SUBST(have_memmove)
diff --git a/docs/doxygen.conf b/docs/doxygen.conf
index 9388af2f9..b741a1aba 100644
--- a/docs/doxygen.conf
+++ b/docs/doxygen.conf
@@ -13,7 +13,6 @@ EXPAND_ONLY_PREDEF=YES
# not sure why this doesn't work as EXPAND_AS_DEFINED, it should!
PREDEFINED="APR_DECLARE(x)=x" \
"APR_DECLARE_NONSTD(x)=x" \
- "APR_HAS_XLATE" \
"APR_HAS_THREADS" \
DOXYGEN=
diff --git a/i18n/unix/.cvsignore b/i18n/unix/.cvsignore
deleted file mode 100644
index 2ebd06d35..000000000
--- a/i18n/unix/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-Makefile
-*.lo
-.libs
-.deps
diff --git a/i18n/unix/Makefile.in b/i18n/unix/Makefile.in
deleted file mode 100644
index cd42ace99..000000000
--- a/i18n/unix/Makefile.in
+++ /dev/null
@@ -1,13 +0,0 @@
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-TARGETS = xlate.lo
-
-# bring in rules.mk for standard functionality
-@INCLUDE_RULES@
-
-DEFOSDIR=$(INCDIR)/arch/@DEFAULT_OSDIR@
-INCDIR=../../include
-INCLUDES=-I$(INCDIR) -I$(DEFOSDIR)
-
-# DO NOT REMOVE
diff --git a/i18n/unix/xlate.c b/i18n/unix/xlate.c
deleted file mode 100644
index 8c6aa98f2..000000000
--- a/i18n/unix/xlate.c
+++ /dev/null
@@ -1,420 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-#include "apr_private.h"
-
-#include "apr_lib.h"
-#include "apr_strings.h"
-#include "apr_xlate.h"
-
-/* If no implementation is available, don't generate code here since
- * apr_xlate.h emitted macros which return APR_ENOTIMPL.
- */
-
-#if APR_HAS_XLATE
-
-#ifdef HAVE_STDDEF_H
-#include <stddef.h> /* for NULL */
-#endif
-#if APR_HAVE_STRING_H
-#include <string.h>
-#endif
-#if APR_HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#ifdef HAVE_LANGINFO_H
-#include <langinfo.h>
-#endif
-#ifdef HAVE_ICONV_H
-#include <iconv.h>
-#endif
-
-#ifdef APR_ICONV_INBUF_CONST
-#define ICONV_INBUF_TYPE const char **
-#else
-#define ICONV_INBUF_TYPE char **
-#endif
-
-#ifndef min
-#define min(x,y) ((x) <= (y) ? (x) : (y))
-#endif
-
-struct apr_xlate_t {
- apr_pool_t *pool;
- char *frompage;
- char *topage;
- char *sbcs_table;
-#ifdef HAVE_ICONV
- iconv_t ich;
-#endif
-};
-
-/* get_default_charset()
- *
- * simple heuristic to determine codepage of source code so that
- * literal strings (e.g., "GET /\r\n") in source code can be translated
- * properly
- *
- * If appropriate, a symbol can be set at configure time to determine
- * this. On EBCDIC platforms, it will be important how the code was
- * unpacked.
- */
-
-static const char *get_default_charset(void)
-{
-#ifdef __MVS__
-# ifdef __CODESET__
- return __CODESET__;
-# else
- return "IBM-1047";
-# endif
-#endif
-
- if ('}' == 0xD0) {
- return "IBM-1047";
- }
-
- if ('{' == 0xFB) {
- return "EDF04";
- }
-
- if ('A' == 0xC1) {
- return "EBCDIC"; /* not useful */
- }
-
- if ('A' == 0x41) {
- return "ISO8859-1"; /* not necessarily true */
- }
-
- return "unknown";
-}
-
-/* get_locale_charset()
- *
- * If possible on this system, get the charset of the locale. Otherwise,
- * defer to get_default_charset().
- */
-
-static const char *get_locale_charset(void)
-{
-#if defined(HAVE_NL_LANGINFO) && defined(HAVE_CODESET)
- const char *charset;
- charset = nl_langinfo(CODESET);
- if (charset) {
- return charset;
- }
-#endif
- return get_default_charset();
-}
-
-static const char *handle_special_names(const char *page)
-{
- if (page == APR_DEFAULT_CHARSET) {
- return get_default_charset();
- }
- else if (page == APR_LOCALE_CHARSET) {
- return get_locale_charset();
- }
- else {
- return page;
- }
-}
-
-static apr_status_t apr_xlate_cleanup(void *convset)
-{
-#ifdef HAVE_ICONV
- apr_xlate_t *old = convset;
-
- if (old->ich != (iconv_t)-1) {
- if (iconv_close(old->ich)) {
- return errno;
- }
- }
-#endif
- return APR_SUCCESS;
-}
-
-#ifdef HAVE_ICONV
-static void check_sbcs(apr_xlate_t *convset)
-{
- char inbuf[256], outbuf[256];
- char *inbufptr = inbuf;
- char *outbufptr = outbuf;
- apr_size_t inbytes_left, outbytes_left;
- int i;
- apr_size_t translated;
-
- for (i = 0; i < sizeof(inbuf); i++) {
- inbuf[i] = i;
- }
-
- inbytes_left = outbytes_left = sizeof(inbuf);
- translated = iconv(convset->ich, (ICONV_INBUF_TYPE)&inbufptr,
- &inbytes_left, &outbufptr, &outbytes_left);
- if (translated != (apr_size_t) -1 &&
- inbytes_left == 0 &&
- outbytes_left == 0) {
- /* hurray... this is simple translation; save the table,
- * close the iconv descriptor
- */
-
- convset->sbcs_table = apr_palloc(convset->pool, sizeof(outbuf));
- memcpy(convset->sbcs_table, outbuf, sizeof(outbuf));
- iconv_close(convset->ich);
- convset->ich = (iconv_t)-1;
-
- /* TODO: add the table to the cache */
- }
-}
-#endif /* HAVE_ICONV */
-
-static void make_identity_table(apr_xlate_t *convset)
-{
- int i;
- convset->sbcs_table = apr_palloc(convset->pool, 256);
- for (i = 0; i < 256; i++)
- convset->sbcs_table[i] = i;
-}
-
-apr_status_t apr_xlate_open(apr_xlate_t **convset, const char *topage,
- const char *frompage, apr_pool_t *pool)
-{
- apr_status_t status;
- apr_xlate_t *new;
- int found = 0;
-
- *convset = NULL;
-
- topage = handle_special_names(topage);
- frompage = handle_special_names(frompage);
-
- new = (apr_xlate_t *)apr_pcalloc(pool, sizeof(apr_xlate_t));
- if (!new) {
- return APR_ENOMEM;
- }
-
- new->pool = pool;
- new->topage = apr_pstrdup(pool, topage);
- new->frompage = apr_pstrdup(pool, frompage);
- if (!new->topage || !new->frompage) {
- return APR_ENOMEM;
- }
-
-#ifdef TODO
- /* search cache of codepage pairs; we may be able to avoid the
- * expensive iconv_open()
- */
-
- set found to non-zero if found in the cache
-#endif
-
- if ((! found) && (strcmp(topage, frompage) == 0)) {
- /* to and from are the same */
- found = 1;
- make_identity_table(new);
- }
-
-#ifdef HAVE_ICONV
- if (!found) {
- new->ich = iconv_open(topage, frompage);
- if (new->ich == (iconv_t)-1) {
- return errno;
- }
- found = 1;
- check_sbcs(new);
- } else
- new->ich = (iconv_t)-1;
-#endif /* HAVE_ICONV */
-
- if (found) {
- *convset = new;
- apr_pool_cleanup_register(pool, (void *)new, apr_xlate_cleanup,
- apr_pool_cleanup_null);
- status = APR_SUCCESS;
- }
- else {
- status = EINVAL; /* same as what iconv() would return if it
- couldn't handle the pair */
- }
-
- return status;
-}
-
-apr_status_t apr_xlate_sb_get(apr_xlate_t *convset, int *onoff)
-{
- *onoff = convset->sbcs_table != NULL;
- return APR_SUCCESS;
-}
-
-apr_status_t apr_xlate_conv_buffer(apr_xlate_t *convset, const char *inbuf,
- apr_size_t *inbytes_left, char *outbuf,
- apr_size_t *outbytes_left)
-{
- apr_status_t status = APR_SUCCESS;
-#ifdef HAVE_ICONV
- apr_size_t translated;
-
- if (convset->ich != (iconv_t)-1) {
- const char *inbufptr = inbuf;
- char *outbufptr = outbuf;
-
- translated = iconv(convset->ich, (ICONV_INBUF_TYPE)&inbufptr,
- inbytes_left, &outbufptr, outbytes_left);
- /* If everything went fine but we ran out of buffer, don't
- * report it as an error. Caller needs to look at the two
- * bytes-left values anyway.
- *
- * There are three expected cases where rc is -1. In each of
- * these cases, *inbytes_left != 0.
- * a) the non-error condition where we ran out of output
- * buffer
- * b) the non-error condition where we ran out of input (i.e.,
- * the last input character is incomplete)
- * c) the error condition where the input is invalid
- */
- if (translated == (apr_size_t)-1) {
- switch (errno) {
- case E2BIG: /* out of space on output */
- status = 0; /* change table lookup code below if you
- make this an error */
- break;
- case EINVAL: /* input character not complete (yet) */
- status = APR_INCOMPLETE;
- break;
- case EILSEQ: /* bad input byte */
- status = APR_EINVAL;
- break;
- default:
- status = errno;
- }
- }
- }
- else
-#endif
- {
- int to_convert = min(*inbytes_left, *outbytes_left);
- int converted = to_convert;
- char *table = convset->sbcs_table;
-
- while (to_convert) {
- *outbuf = table[(unsigned char)*inbuf];
- ++outbuf;
- ++inbuf;
- --to_convert;
- }
- *inbytes_left -= converted;
- *outbytes_left -= converted;
- }
-
- return status;
-}
-
-apr_int32_t apr_xlate_conv_byte(apr_xlate_t *convset, unsigned char inchar)
-{
- if (convset->sbcs_table) {
- return convset->sbcs_table[inchar];
- }
- else {
- return -1;
- }
-}
-
-apr_status_t apr_xlate_close(apr_xlate_t *convset)
-{
- return apr_pool_cleanup_run(convset->pool, convset, apr_xlate_cleanup);
-}
-
-#else /* !APR_HAS_XLATE */
-
-APR_DECLARE(apr_status_t) apr_xlate_open(apr_xlate_t **convset,
- const char *topage,
- const char *frompage,
- apr_pool_t *pool)
-{
- return APR_ENOTIMPL;
-}
-
-APR_DECLARE(apr_status_t) apr_xlate_sb_get(apr_xlate_t *convset, int *onoff)
-{
- return APR_ENOTIMPL;
-}
-
-APR_DECLARE(apr_int32_t) apr_xlate_conv_byte(apr_xlate_t *convset,
- unsigned char inchar)
-{
- return (-1);
-}
-
-APR_DECLARE(apr_status_t) apr_xlate_conv_buffer(apr_xlate_t *convset,
- const char *inbuf,
- apr_size_t *inbytes_left,
- char *outbuf,
- apr_size_t *outbytes_left)
-{
- return APR_ENOTIMPL;
-}
-
-APR_DECLARE(apr_status_t) apr_xlate_close(apr_xlate_t *convset)
-{
- return APR_ENOTIMPL;
-}
-
-#endif /* APR_HAS_XLATE */
-
-/* Deprecated
- */
-APR_DECLARE(apr_status_t) apr_xlate_get_sb(apr_xlate_t *convset, int *onoff)
-{
- return apr_xlate_sb_get(convset, onoff);
-}
diff --git a/include/apr.h.in b/include/apr.h.in
index ea9caf161..a07c94be6 100644
--- a/include/apr.h.in
+++ b/include/apr.h.in
@@ -99,6 +99,7 @@
#define APR_HAVE_CORKABLE_TCP @have_corkable_tcp@
#define APR_HAVE_GETRLIMIT @have_getrlimit@
+#define APR_HAVE_ICONV @have_iconv@
#define APR_HAVE_IN_ADDR @have_in_addr@
#define APR_HAVE_INET_ADDR @have_inet_addr@
#define APR_HAVE_INET_NETWORK @have_inet_network@
@@ -137,7 +138,6 @@
#define APR_HAS_MMAP @mmap@
#define APR_HAS_FORK @fork@
#define APR_HAS_RANDOM @rand@
-#define APR_HAS_XLATE @iconv@
#define APR_HAS_OTHER_CHILD @oc@
#define APR_HAS_DSO @aprdso@
#define APR_HAS_SO_ACCEPTFILTER @acceptfilter@
diff --git a/include/apr.hnw b/include/apr.hnw
index 063c9f80d..783fae17a 100644
--- a/include/apr.hnw
+++ b/include/apr.hnw
@@ -165,8 +165,9 @@
#define APR_HAVE_CORKABLE_TCP 0
#define APR_HAVE_GETRLIMIT 0
+#define APR_HAVE_ICONV 0
#define APR_HAVE_IN_ADDR 1
-#define APR_HAVE_INET_ADDR 1
+#define APR_HAVE_INET_ADDR 1
#define APR_HAVE_INET_NETWORK 0
#define APR_HAVE_IPV6 0
#define APR_HAVE_MEMCHR 1
@@ -200,7 +201,6 @@
#define APR_HAS_MMAP 0
#define APR_HAS_FORK 0
#define APR_HAS_RANDOM 1
-#define APR_HAS_XLATE 0
#define APR_HAS_OTHER_CHILD 0
#define APR_HAS_DSO 1
#define APR_HAS_SO_ACCEPTFILTER 0
diff --git a/include/apr.hw b/include/apr.hw
index 75a328973..2368c1276 100644
--- a/include/apr.hw
+++ b/include/apr.hw
@@ -189,6 +189,7 @@ extern "C" {
#define APR_HAVE_CORKABLE_TCP 0
#define APR_HAVE_GETRLIMIT 0
+#define APR_HAVE_ICONV 0
#define APR_HAVE_IN_ADDR 1
#define APR_HAVE_INET_ADDR 1
#define APR_HAVE_INET_NETWORK 0
@@ -280,7 +281,6 @@ extern "C" {
#define APR_HAS_MMAP 1
#define APR_HAS_FORK 0
#define APR_HAS_RANDOM 1
-#define APR_HAS_XLATE 0
#define APR_HAS_OTHER_CHILD 1
#define APR_HAS_DSO 1
#define APR_HAS_SO_ACCEPTFILTER 0
diff --git a/include/apr_xlate.h b/include/apr_xlate.h
deleted file mode 100644
index f9c5040ee..000000000
--- a/include/apr_xlate.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-#ifndef APR_XLATE_H
-#define APR_XLATE_H
-
-#include "apr.h"
-#include "apr_pools.h"
-#include "apr_errno.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/**
- * @file apr_xlate.h
- * @brief APR I18N translation library
- */
-
-/**
- * @defgroup APR_I18N I18N translation library
- * @ingroup APR
- * @{
- */
-
-/**
- * APR_HAS_XLATE determines whether or not useful implementations of
- * apr_xlate_open() et al are provided.
- *
- * If APR_HAS_XLATE is zero, apr_xlate_open() et al will all return
- * APR_ENOTIMPL at run-time.
- */
-
-typedef struct apr_xlate_t apr_xlate_t;
-
-/**
- * Set up for converting text from one charset to another.
- * @param convset The handle to be filled in by this function
- * @param topage The name of the target charset
- * @param frompage The name of the source charset
- * @param pool The pool to use
- * @remark
- * Specify APR_DEFAULT_CHARSET for one of the charset
- * names to indicate the charset of the source code at
- * compile time. This is useful if there are literal
- * strings in the source code which must be translated
- * according to the charset of the source code.
- * APR_DEFAULT_CHARSET is not useful if the source code
- * of the caller was not encoded in the same charset as
- * APR at compile time.
- *
- * @remark
- * Specify APR_LOCALE_CHARSET for one of the charset
- * names to indicate the charset of the current locale.
- * </PRE>
- */
-APR_DECLARE(apr_status_t) apr_xlate_open(apr_xlate_t **convset,
- const char *topage,
- const char *frompage,
- apr_pool_t *pool);
-
-/**
- * This is to indicate the charset of the sourcecode at compile time
- * names to indicate the charset of the source code at
- * compile time. This is useful if there are literal
- * strings in the source code which must be translated
- * according to the charset of the source code.
- */
-#define APR_DEFAULT_CHARSET (const char *)0
-/**
- * To indicate charset names of the current locale
- */
-#define APR_LOCALE_CHARSET (const char *)1
-
-/**
- * Find out whether or not the specified conversion is single-byte-only.
- * @param convset The handle allocated by apr_xlate_open, specifying the
- * parameters of conversion
- * @param onoff Output: whether or not the conversion is single-byte-only
- */
-APR_DECLARE(apr_status_t) apr_xlate_sb_get(apr_xlate_t *convset, int *onoff);
-
-/** @deprecated @see apr_xlate_sb_get */
-APR_DECLARE(apr_status_t) apr_xlate_get_sb(apr_xlate_t *convset, int *onoff);
-
-/**
- * Convert a buffer of text from one codepage to another.
- * @param convset The handle allocated by apr_xlate_open, specifying
- * the parameters of conversion
- * @param inbuf The address of the source buffer
- * @param inbytes_left Input: the amount of input data to be translated
- * Output: the amount of input data not yet translated
- * @param outbuf The address of the destination buffer
- * @param outbytes_left Input: the size of the output buffer
- * Output: the amount of the output buffer not yet used
- */
-APR_DECLARE(apr_status_t) apr_xlate_conv_buffer(apr_xlate_t *convset,
- const char *inbuf,
- apr_size_t *inbytes_left,
- char *outbuf,
- apr_size_t *outbytes_left);
-
-/* @see apr_file_io.h the comment in apr_file_io.h about this hack */
-#ifdef APR_NOT_DONE_YET
-/**
- * The purpose of apr_xlate_conv_char is to translate one character
- * at a time. This needs to be written carefully so that it works
- * with double-byte character sets.
- * @param convset The handle allocated by apr_xlate_open, specifying the
- * parameters of conversion
- * @param inchar The character to convert
- * @param outchar The converted character
- */
-APR_DECLARE(apr_status_t) apr_xlate_conv_char(apr_xlate_t *convset,
- char inchar, char outchar);
-#endif
-
-/**
- * Convert a single-byte character from one charset to another.
- * @param convset The handle allocated by apr_xlate_open, specifying the
- * parameters of conversion
- * @param inchar The single-byte character to convert.
- * @warning This only works when converting between single-byte character sets.
- * -1 will be returned if the conversion can't be performed.
- */
-APR_DECLARE(apr_int32_t) apr_xlate_conv_byte(apr_xlate_t *convset,
- unsigned char inchar);
-
-/**
- * Close a codepage translation handle.
- * @param convset The codepage translation handle to close
- */
-APR_DECLARE(apr_status_t) apr_xlate_close(apr_xlate_t *convset);
-
-/** @} */
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ! APR_XLATE_H */
diff --git a/libapr.dsp b/libapr.dsp
index fd48cb056..a0e03cdb3 100644
--- a/libapr.dsp
+++ b/libapr.dsp
@@ -158,14 +158,6 @@ SOURCE=.\file_io\win32\readwrite.c
SOURCE=.\file_io\win32\seek.c
# End Source File
# End Group
-# Begin Group "i18n"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\i18n\unix\xlate.c
-# End Source File
-# End Group
# Begin Group "locks"
# PROP Default_Filter ""
@@ -601,10 +593,6 @@ SOURCE=.\include\apr_user.h
SOURCE=.\include\apr_want.h
# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_xlate.h
-# End Source File
# End Group
# Begin Source File