From 06bdf83419b2f007fbad64d54ed0acd7effb24e7 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 10 May 2002 15:59:42 +0000 Subject: Kein Roth made --trace-ascii look even better, and make OD 0A occurances get output as plain newlines. --- src/main.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 4e8e7e952..a0981fea4 100644 --- a/src/main.c +++ b/src/main.c @@ -1951,7 +1951,7 @@ void dump(const char *text, /* without the hex output, we can fit more on screen */ width = 0x40; - fprintf(stream, "%s %d (0x%x) bytes\n", text, size, size); + fprintf(stream, "%s, %d bytes (0x%x)\n", text, size, size); for(i=0; i=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.'); - + /* check again for 0D0A, to avoid an extra \n if it's at width */ + if (nohex && (i+c+2 < size) && ptr[i+c+1]==0x0D && ptr[i+c+2]==0x0A) { + i+=(c+3-width); + break; + } + } fputc('\n', stream); /* newline */ - } } -- cgit v1.2.3