hexdump: update release script to use version 1.7
[msysgit/kirr.git] / src / hexdump / patches / 0001-Do-not-print-tabs-in-the-ASCII-output.patch
blob1c0f46a1f6dd37c5b7bd32771dc3256a98a2fa1b
1 From 07fde44be79d14cc031a4ddff133299a10b78944 Mon Sep 17 00:00:00 2001
2 From: Pat Thoyts <patthoyts@users.sourceforge.net>
3 Date: Sat, 9 Jun 2012 23:53:12 +0100
4 Subject: [PATCH] Do not print tabs in the ASCII output.
6 Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
7 ---
8 hexdump.c | 3 ++-
9 1 file changed, 2 insertions(+), 1 deletion(-)
11 diff --git a/hexdump.c b/hexdump.c
12 index c158a7f..a347d02 100644
13 --- a/hexdump.c
14 +++ b/hexdump.c
15 @@ -101,8 +101,9 @@ static void dumpfile(FILE *f)
16 else /* we're dumping ASCII */
18 ascii[ai] = (isprint (ch) || ch == ' ') ? ch : '.';
19 + if (ch == 9) ascii[ai] = '.';
21 - if (cflag && (isprint(ch) || ch == ' '))
22 + if (cflag && ((isprint(ch) && ch != 9) || ch == ' '))
23 (void) printf("%c ", ch);
24 else if (cflag && ch && (cp = strchr(specials, ch)))
25 (void) printf("\\%c ", escapes[cp - specials]);
26 --
27 1.7.11.rc1.6953.gf299a20