1 /* Copyright 2000-2004 The Apache Software Foundation
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
16 #ifndef APACHE_UTIL_EBCDIC_H
17 #define APACHE_UTIL_EBCDIC_H
24 #include "apr_xlate.h"
26 #include "util_charset.h"
29 * @package Utilities for EBCDIC conversion
32 #if APR_CHARSET_EBCDIC
35 * Setup all of the global translation handlers
36 * @param pool pool to allocate out of
38 apr_status_t ap_init_ebcdic(apr_pool_t *pool);
41 * Convert protocol data from the implementation character
43 * @param buffer buffer to translate
44 * @param len number of bytes to translate
46 void ap_xlate_proto_to_ascii(char *buffer, apr_size_t len);
49 * Convert protocol data to the implementation character
51 * @param buffer buffer to translate
52 * @param len number of bytes to translate
54 void ap_xlate_proto_from_ascii(char *buffer, apr_size_t len);
57 * Convert protocol data from the implementation charater
58 * set to ASCII, then send it.
59 * @param r the current request
60 * @param ... the strings to write, followed by a NULL pointer
62 int ap_rvputs_proto_in_ascii(request_rec *r, ...);
64 #else /* APR_CHARSET_EBCDIC */
66 #define ap_xlate_proto_to_ascii(x,y) /* NOOP */
67 #define ap_xlate_proto_from_ascii(x,y) /* NOOP */
69 #define ap_rvputs_proto_in_ascii ap_rvputs
71 #endif /* APR_CHARSET_EBCDIC */
77 #endif /* !APACHE_UTIL_EBCDIC_H */