From 01a8c5d32bd6cc71a4d12c4d9a02775f9e182864 Mon Sep 17 00:00:00 2001 From: Oliver Hartkopp Date: Mon, 16 Jul 2007 08:29:28 +0000 Subject: [PATCH] Added -B option to display binary content with a gap after each data byte. This option is similar to -b but may exceed the 80 char boundary. --- cansniffer.c | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/cansniffer.c b/cansniffer.c index 26e54b3..ed3f869 100644 --- a/cansniffer.c +++ b/cansniffer.c @@ -123,6 +123,7 @@ static long timeout = TIMEOUT; static long hold = HOLD; static long loop = LOOP; static unsigned char binary = 0; +static unsigned char binary_gap = 0; static unsigned char color = 0; void rx_setup (int fd, int id); @@ -141,6 +142,7 @@ void print_usage(char *prg) "\n" "q - quit\n" "b - toggle binary / HEX-ASCII output\n" + "B - toggle binary with gap / HEX-ASCII output (exceeds 80 chars!)\n" "c - toggle color mode\n" "# - notch currently marked/changed bits (can be used repeatedly)\n" "* - clear notched marked\n" @@ -169,6 +171,7 @@ void print_usage(char *prg) fprintf(stderr, " -q (quiet - all IDs deactivated)\n"); fprintf(stderr, " -r (read %sname from file)\n", SETFNAME); fprintf(stderr, " -b (start with binary mode)\n"); + fprintf(stderr, " -B (start with binary mode with gap - exceeds 80 chars!)\n"); fprintf(stderr, " -c (color changes)\n"); fprintf(stderr, " -t