bottleneck testcase based on rubbos
[bottlenecks.git] / rubbos / app / apache2 / include / util_ebcdic.h
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2  * contributor license agreements.  See the NOTICE file distributed with
3  * this work for additional information regarding copyright ownership.
4  * The ASF licenses this file to You under the Apache License, Version 2.0
5  * (the "License"); you may not use this file except in compliance with
6  * the License.  You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef APACHE_UTIL_EBCDIC_H
18 #define APACHE_UTIL_EBCDIC_H
19
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 #include "apr_xlate.h"
26 #include "httpd.h"
27 #include "util_charset.h"
28
29 /**
30  * @package Utilities for EBCDIC conversion
31  */
32
33 #if APR_CHARSET_EBCDIC
34
35 /**
36  * Setup all of the global translation handlers
37  * @param pool pool to allocate out of
38  */
39 apr_status_t ap_init_ebcdic(apr_pool_t *pool);
40
41 /**
42  * Convert protocol data from the implementation character
43  * set to ASCII.
44  * @param buffer buffer to translate
45  * @param len number of bytes to translate
46  */
47 void ap_xlate_proto_to_ascii(char *buffer, apr_size_t len);
48
49 /**
50  * Convert protocol data to the implementation character
51  * set from ASCII.
52  * @param buffer buffer to translate
53  * @param len number of bytes to translate
54  */
55 void ap_xlate_proto_from_ascii(char *buffer, apr_size_t len);
56
57 /**
58  * Convert protocol data from the implementation charater
59  * set to ASCII, then send it.
60  * @param r   the current request
61  * @param ... the strings to write, followed by a NULL pointer
62  */
63 int ap_rvputs_proto_in_ascii(request_rec *r, ...);
64
65 #else   /* APR_CHARSET_EBCDIC */
66
67 #define ap_xlate_proto_to_ascii(x,y)          /* NOOP */
68 #define ap_xlate_proto_from_ascii(x,y)        /* NOOP */
69
70 #define ap_rvputs_proto_in_ascii  ap_rvputs
71
72 #endif  /* APR_CHARSET_EBCDIC */
73
74 #ifdef __cplusplus
75 }
76 #endif
77
78 #endif  /* !APACHE_UTIL_EBCDIC_H */