summaryrefslogtreecommitdiff
path: root/include/apr_xlate.h
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2000-05-10 19:45:31 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2000-05-10 19:45:31 +0000
commit3dbb12d90225073a4ad5e466d005029b1d2776f7 (patch)
treef0cf15255a2607331aadc94c5e7914d303d415f6 /include/apr_xlate.h
parent7e4c7560922e12aef78908488ba566c3c247c0dd (diff)
downloadlibapr-3dbb12d90225073a4ad5e466d005029b1d2776f7.tar.gz
Add ap_xlate_conv_byte() to convert one char between single-byte character
sets. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60034 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_xlate.h')
-rw-r--r--include/apr_xlate.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/apr_xlate.h b/include/apr_xlate.h
index 39c891da7..df82e5201 100644
--- a/include/apr_xlate.h
+++ b/include/apr_xlate.h
@@ -84,6 +84,8 @@ typedef void ap_xlate_t;
#define ap_xlate_conv_buffer(convset, inbuf, inbytes_left, outbuf, \
outbytes_left) APR_ENOTIMPL
+#define ap_xlate_conv_byte(convset, inchar) (-1)
+
/* The purpose of ap_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.
@@ -152,6 +154,23 @@ ap_status_t ap_xlate_conv_char(ap_xlate_t *convset, char inchar, char outchar);
/*
+=head1 ap_int32_t ap_xlate_conv_byte(ap_xlate_t *convset, unsigned char inchar)
+
+B<Convert a single-byte character from one charset to another.>
+
+ arg 1) The handle allocated by ap_xlate_open, specifying the parameters
+ of conversion
+ arg 2) The single-byte character to convert.
+
+B<NOTE>: This only works when converting between single-byte character sets.
+ -1 will be returned if the conversion can't be performed.
+
+=cut
+*/
+ap_int32_t ap_xlate_conv_byte(ap_xlate_t *convset, unsigned char inchar);
+
+/*
+
=head1 ap_status_t ap_xlate_close(ap_xlate_t *convset)
B<Close a codepage translation handle.>