aboutsummaryrefslogtreecommitdiff
path: root/crypto/bio/b_dump.c
diff options
context:
space:
mode:
authorUlf Möller <ulf@openssl.org>1999-06-04 21:35:58 +0000
committerUlf Möller <ulf@openssl.org>1999-06-04 21:35:58 +0000
commita53955d8abd68c604de02cc1e101c66169207fb7 (patch)
treee51051484f2b073f7b58a1549442bf0657ca2978 /crypto/bio/b_dump.c
parent9231f4779677a3cb95a4f8ccebd56432cb914498 (diff)
downloadopenssl-a53955d8abd68c604de02cc1e101c66169207fb7.zip
openssl-a53955d8abd68c604de02cc1e101c66169207fb7.tar.gz
openssl-a53955d8abd68c604de02cc1e101c66169207fb7.tar.bz2
Support the EBCDIC character set and BS2000/OSD-POSIX (work in progress).
Submitted by: Martin Kraemer <Martin.Kraemer@MchP.Siemens.De>
Diffstat (limited to 'crypto/bio/b_dump.c')
-rw-r--r--crypto/bio/b_dump.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/crypto/bio/b_dump.c b/crypto/bio/b_dump.c
index 71bbce8..a7cd828 100644
--- a/crypto/bio/b_dump.c
+++ b/crypto/bio/b_dump.c
@@ -102,7 +102,13 @@ int BIO_dump(BIO *bio, const char *s, 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");