You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@locus.apache.org on 2000/12/20 17:22:37 UTC
cvs commit: apr-util/src/encoding ap_base64.c
trawick 00/12/20 08:22:36
Modified: src/crypto ap_sha1.c
src/encoding ap_base64.c
Log:
Use APR_CHARSET_EBCDIC instead of AP_CHARSET_EBCDIC. (The latter
wasn't being defined properly anyway... Bad Jeff!)
Revision Changes Path
1.19 +4 -4 apr-util/src/crypto/ap_sha1.c
Index: ap_sha1.c
===================================================================
RCS file: /home/cvs/apr-util/src/crypto/ap_sha1.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- ap_sha1.c 2000/12/19 17:05:41 1.18
+++ ap_sha1.c 2000/12/20 16:22:32 1.19
@@ -86,9 +86,9 @@
#include "ap_base64.h"
#include "apr_strings.h"
#include "apr_lib.h"
-#ifdef AP_CHARSET_EBCDIC
+#if APR_CHARSET_EBCDIC
#include "apr_xlate.h"
-#endif /*AP_CHARSET_EBCDIC*/
+#endif /*APR_CHARSET_EBCDIC*/
#include <string.h>
/* a bit faster & bigger, if defined */
@@ -119,7 +119,7 @@
#define SHA_BLOCKSIZE 64
-#ifdef AP_CHARSET_EBCDIC
+#if APR_CHARSET_EBCDIC
static apr_xlate_t *ebcdic2ascii_xlate;
APR_DECLARE(apr_status_t) ap_SHA1InitEBCDIC(apr_xlate_t *x)
@@ -299,7 +299,7 @@
APR_DECLARE(void) ap_SHA1Update(AP_SHA1_CTX *sha_info, const char *buf,
unsigned int count)
{
-#ifdef AP_CHARSET_EBCDIC
+#if APR_CHARSET_EBCDIC
int i;
const AP_BYTE *buffer = (const AP_BYTE *) buf;
apr_size_t inbytes_left, outbytes_left;
1.17 +13 -13 apr-util/src/encoding/ap_base64.c
Index: ap_base64.c
===================================================================
RCS file: /home/cvs/apr-util/src/encoding/ap_base64.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- ap_base64.c 2000/12/19 17:05:45 1.16
+++ ap_base64.c 2000/12/20 16:22:34 1.17
@@ -63,14 +63,14 @@
*/
#include "ap_base64.h"
-#ifdef AP_CHARSET_EBCDIC
+#if APR_CHARSET_EBCDIC
#include "apr_xlate.h"
-#endif /* AP_CHARSET_EBCDIC */
+#endif /* APR_CHARSET_EBCDIC */
/* aaaack but it's fast and const should make it shared text page. */
static const unsigned char pr2six[256] =
{
-#ifndef AP_CHARSET_EBCDIC
+#if !APR_CHARSET_EBCDIC
/* ASCII table */
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
@@ -88,7 +88,7 @@
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64
-#else /*AP_CHARSET_EBCDIC*/
+#else /*APR_CHARSET_EBCDIC*/
/* EBCDIC table */
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
@@ -106,10 +106,10 @@
64, 9, 10, 11, 12, 13, 14, 15, 16, 17, 64, 64, 64, 64, 64, 64,
64, 64, 18, 19, 20, 21, 22, 23, 24, 25, 64, 64, 64, 64, 64, 64,
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 64, 64, 64, 64, 64
-#endif /*AP_CHARSET_EBCDIC*/
+#endif /*APR_CHARSET_EBCDIC*/
};
-#ifdef AP_CHARSET_EBCDIC
+#if APR_CHARSET_EBCDIC
static apr_xlate_t *xlate_to_ebcdic;
static unsigned char os_toascii[256];
@@ -147,7 +147,7 @@
return APR_SUCCESS;
}
-#endif /*AP_CHARSET_EBCDIC*/
+#endif /*APR_CHARSET_EBCDIC*/
APR_DECLARE(int) ap_base64decode_len(const char *bufcoded)
{
@@ -166,17 +166,17 @@
APR_DECLARE(int) ap_base64decode(char *bufplain, const char *bufcoded)
{
-#ifdef AP_CHARSET_EBCDIC
+#if APR_CHARSET_EBCDIC
apr_size_t inbytes_left, outbytes_left;
-#endif /* AP_CHARSET_EBCDIC */
+#endif /* APR_CHARSET_EBCDIC */
int len;
len = ap_base64decode_binary((unsigned char *) bufplain, bufcoded);
-#ifdef AP_CHARSET_EBCDIC
+#if APR_CHARSET_EBCDIC
inbytes_left = outbytes_left = len;
apr_xlate_conv_buffer(xlate_to_ebcdic, bufplain, &inbytes_left,
bufplain, &outbytes_left);
-#endif /* AP_CHARSET_EBCDIC */
+#endif /* APR_CHARSET_EBCDIC */
bufplain[len] = '\0';
return len;
}
@@ -239,7 +239,7 @@
APR_DECLARE(int) ap_base64encode(char *encoded, const char *string, int len)
{
-#ifndef AP_CHARSET_EBCDIC
+#if !APR_CHARSET_EBCDIC
return ap_base64encode_binary(encoded, (const unsigned char *) string, len);
#else /* AP_CHARSET_EBCDIC */
int i;
@@ -270,7 +270,7 @@
*p++ = '\0';
return p - encoded;
-#endif /* AP_CHARSET_EBCDIC */
+#endif /* APR_CHARSET_EBCDIC */
}
/* This is the same as ap_base64encode() except on EBCDIC machines, where