From de8f24ea083384bb66b32ec105dc4743c5663cdf Mon Sep 17 00:00:00 2001 From: beck <> Date: Wed, 29 Sep 1999 04:37:45 +0000 Subject: OpenSSL 0.9.4 merge --- src/lib/libcrypto/bio/b_dump.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/lib/libcrypto/bio/b_dump.c') diff --git a/src/lib/libcrypto/bio/b_dump.c b/src/lib/libcrypto/bio/b_dump.c index db84ad3d47..a7cd828978 100644 --- a/src/lib/libcrypto/bio/b_dump.c +++ b/src/lib/libcrypto/bio/b_dump.c @@ -62,15 +62,12 @@ #include #include "cryptlib.h" -#include "bio.h" +#include #define TRUNCATE #define DUMP_WIDTH 16 -int BIO_dump(bio,s,len) -BIO *bio; -char *s; -int len; +int BIO_dump(BIO *bio, const char *s, int len) { int ret=0; char buf[160+1],tmp[20]; @@ -105,7 +102,13 @@ int len; if (((i*DUMP_WIDTH)+j)>=len) break; ch=((unsigned char)*((char *)(s)+i*DUMP_WIDTH+j)) & 0xff; +#ifndef CHARSET_EBCDIC sprintf(tmp,"%c",((ch>=' ')&&(ch<='~'))?ch:'.'); +#else + sprintf(tmp,"%c",((ch>=os_toascii[' '])&&(ch<=os_toascii['~'])) + ? os_toebcdic[ch] + : '.'); +#endif strcat(buf,tmp); } strcat(buf,"\n"); -- cgit v1.2.3-55-g6feb