X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fbio%2Fb_dump.c;h=a7cd828978505ca1607cca7f84eb28a15466276f;hp=839dfeb15e69bd48ee6ffa4b679abddb9ae19003;hb=f598cd13a3a194bf51bba32fc45751f392609898;hpb=6b691a5c85ddc4e407e32781841fee5c029506cd diff --git a/crypto/bio/b_dump.c b/crypto/bio/b_dump.c index 839dfeb15e..a7cd828978 100644 --- a/crypto/bio/b_dump.c +++ b/crypto/bio/b_dump.c @@ -62,7 +62,7 @@ #include #include "cryptlib.h" -#include "bio.h" +#include #define TRUNCATE #define DUMP_WIDTH 16 @@ -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");