69 #define DUMP_WIDTH_LESS_INDENT(i) (DUMP_WIDTH-((i-(i>6?6:i)+3)/4))
72 void *u,
const char *s,
int len)
78 void *u,
const char *s,
int len,
int indent)
81 char buf[288+1],tmp[20],str[128+1];
89 for(; (len > 0) && ((s[len-1] ==
' ') || (s[len-1] ==
'\0')); len--)
97 if (indent > 128) indent=128;
98 memset(str,
' ',indent);
103 rows=(len/dump_width);
104 if ((rows*dump_width)<
len)
112 for(j=0;j<dump_width;j++)
114 if (((i*dump_width)+j)>=len)
120 ch=((
unsigned char)*(s+i*dump_width+j)) & 0xff;
127 for(j=0;j<dump_width;j++)
129 if (((i*dump_width)+j)>=len)
131 ch=((
unsigned char)*(s+i*dump_width+j)) & 0xff;
132 #ifndef CHARSET_EBCDIC
134 ((ch>=
' ')&&(ch<=
'~'))?ch:
'.');
147 ret+=
cb((
void *)buf,strlen(buf),u);
152 BIO_snprintf(buf,
sizeof buf,
"%s%04x - <SPACES/NULS>\n",str,
154 ret+=
cb((
void *)buf,strlen(buf),u);
160 #ifndef OPENSSL_NO_FP_API
161 static int write_fp(
const void *
data,
size_t len,
void *
fp)
175 static int write_bio(
const void *
data,
size_t len,
void *
bp)