From 4568d4a180c09de87f5a77ae6aa6958505a0df2e Mon Sep 17 00:00:00 2001 From: Alexander Gerasiov Date: Sun, 11 Feb 2018 19:03:05 +0300 Subject: [PATCH] cansniffer.c: Reformat help/usage output to be compatible with help2man. Signed-off-by: Alexander Gerasiov Gbp-Pq: Name 0011-cansniffer.c-Reformat-help-usage-output-to-be-compat.patch --- cansniffer.c | 60 ++++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/cansniffer.c b/cansniffer.c index 1a41b8a..b388235 100644 --- a/cansniffer.c +++ b/cansniffer.c @@ -134,26 +134,25 @@ void print_usage(char *prg) { const char manual [] = { "commands that can be entered at runtime:\n" - "\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" - "rMYNAME - read settings file (filter/notch)\n" - "wMYNAME - write settings file (filter/notch)\n" - "+FILTER - add CAN-IDs to sniff\n" - "-FILTER - remove CAN-IDs to sniff\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" + " rMYNAME - read settings file (filter/notch)\n" + " wMYNAME - write settings file (filter/notch)\n" + " +FILTER - add CAN-IDs to sniff\n" + " -FILTER - remove CAN-IDs to sniff\n" "\n" "FILTER can be a single CAN-ID or a CAN-ID/Bitmask:\n" - "+1F5 - add CAN-ID 0x1F5\n" - "-42E - remove CAN-ID 0x42E\n" - "-42E7FF - remove CAN-ID 0x42E (using Bitmask)\n" - "-500700 - remove CAN-IDs 0x500 - 0x5FF\n" - "+400600 - add CAN-IDs 0x400 - 0x5FF\n" - "+000000 - add all CAN-IDs\n" - "-000000 - remove all CAN-IDs\n" + " +1F5 - add CAN-ID 0x1F5\n" + " -42E - remove CAN-ID 0x42E\n" + " -42E7FF - remove CAN-ID 0x42E (using Bitmask)\n" + " -500700 - remove CAN-IDs 0x500 - 0x5FF\n" + " +400600 - add CAN-IDs 0x400 - 0x5FF\n" + " +000000 - add all CAN-IDs\n" + " -000000 - remove all CAN-IDs\n" "\n" "if (id & filter) == (sniff-id & filter) the action (+/-) is performed,\n" "which is quite easy when the filter is 000\n" @@ -161,18 +160,19 @@ void print_usage(char *prg) }; fprintf(stderr, "\nUsage: %s [can-interface]\n", prg); - fprintf(stderr, "Options: -m (initial FILTER default 0x00000000)\n"); - fprintf(stderr, " -v (initial FILTER default 0x00000000)\n"); - 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, " -f (filter on CAN-ID only)\n"); - fprintf(stderr, " -t