From 7d49d13b4114136b55c5cf015ddcad912cfd5b26 Mon Sep 17 00:00:00 2001 From: Walter de Jong <walter.dejong@surf.nl> Date: Thu, 2 Jan 2025 08:51:38 +0100 Subject: [PATCH 1/6] help message shows option --files-from --- cli/xxhsum.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cli/xxhsum.c b/cli/xxhsum.c index 046070d8..cadd0bc9 100644 --- a/cli/xxhsum.c +++ b/cli/xxhsum.c @@ -1402,6 +1402,7 @@ static int XSUM_usage(const char* exename) XSUM_log( " 2: XXH128 (also called XXH3_128bits) \n"); XSUM_log( " 3: XXH3 (also called XXH3_64bits) \n"); XSUM_log( " -c, --check read xxHash checksum from [files] and check them \n"); + XSUM_log( " --files-from generate hashes for files listed in [files] \n"); XSUM_log( " --filelist generate hashes for files listed in [files] \n"); XSUM_log( " -h, --help display a long help page about advanced options \n"); return 0; From 540433885fed2b24f789acc1b2c8bc25d97aa312 Mon Sep 17 00:00:00 2001 From: Walter de Jong <walter.dejong@surf.nl> Date: Thu, 2 Jan 2025 08:54:53 +0100 Subject: [PATCH 2/6] align help message --- cli/xxhsum.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cli/xxhsum.c b/cli/xxhsum.c index cadd0bc9..2756a3a0 100644 --- a/cli/xxhsum.c +++ b/cli/xxhsum.c @@ -1396,15 +1396,15 @@ static int XSUM_usage(const char* exename) XSUM_log( "Usage: %s [options] [files] \n\n", exename); XSUM_log( "When no filename provided or when '-' is provided, uses stdin as input. \n"); XSUM_log( "\nOptions: \n"); - XSUM_log( " -H# select an xxhash algorithm (default: %i) \n", (int)g_defaultAlgo); - XSUM_log( " 0: XXH32 \n"); - XSUM_log( " 1: XXH64 \n"); - XSUM_log( " 2: XXH128 (also called XXH3_128bits) \n"); - XSUM_log( " 3: XXH3 (also called XXH3_64bits) \n"); - XSUM_log( " -c, --check read xxHash checksum from [files] and check them \n"); - XSUM_log( " --files-from generate hashes for files listed in [files] \n"); - XSUM_log( " --filelist generate hashes for files listed in [files] \n"); - XSUM_log( " -h, --help display a long help page about advanced options \n"); + XSUM_log( " -H# select an xxhash algorithm (default: %i) \n", (int)g_defaultAlgo); + XSUM_log( " 0: XXH32 \n"); + XSUM_log( " 1: XXH64 \n"); + XSUM_log( " 2: XXH128 (also called XXH3_128bits) \n"); + XSUM_log( " 3: XXH3 (also called XXH3_64bits) \n"); + XSUM_log( " -c, --check read xxHash checksum from [files] and check them \n"); + XSUM_log( " --files-from generate hashes for files listed in [files] \n"); + XSUM_log( " --filelist generate hashes for files listed in [files] \n"); + XSUM_log( " -h, --help display a long help page about advanced options \n"); return 0; } From 5920111153e85d80b094fa666bec19d9cf900489 Mon Sep 17 00:00:00 2001 From: Walter de Jong <walter.dejong@surf.nl> Date: Thu, 2 Jan 2025 08:55:26 +0100 Subject: [PATCH 3/6] consistency typo --- cli/xxhsum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/xxhsum.c b/cli/xxhsum.c index 2756a3a0..7a03f999 100644 --- a/cli/xxhsum.c +++ b/cli/xxhsum.c @@ -1412,7 +1412,7 @@ static int XSUM_usage(const char* exename) static int XSUM_usage_advanced(const char* exename) { XSUM_usage(exename); - XSUM_log( "\nAdvanced :\n"); + XSUM_log( "\nAdvanced: \n"); XSUM_log( " -V, --version Display version information \n"); XSUM_log( " --tag Produce BSD-style checksum lines \n"); XSUM_log( " --little-endian Checksum values use little endian convention (default: big endian) \n"); From 6d39e97f25f1892cb373ef8f949d5344b9b75148 Mon Sep 17 00:00:00 2001 From: Walter de Jong <walter.dejong@surf.nl> Date: Thu, 2 Jan 2025 08:56:04 +0100 Subject: [PATCH 4/6] cleanup newline --- cli/xxhsum.c | 1 - 1 file changed, 1 deletion(-) diff --git a/cli/xxhsum.c b/cli/xxhsum.c index 7a03f999..fb9c1b03 100644 --- a/cli/xxhsum.c +++ b/cli/xxhsum.c @@ -1408,7 +1408,6 @@ static int XSUM_usage(const char* exename) return 0; } - static int XSUM_usage_advanced(const char* exename) { XSUM_usage(exename); From 1c54e8abc3c19abcc21d9278071d6bb83d8b65fc Mon Sep 17 00:00:00 2001 From: Walter de Jong <walter.dejong@surf.nl> Date: Thu, 2 Jan 2025 09:09:38 +0100 Subject: [PATCH 5/6] help is basically lying about omitting filename --- cli/xxhsum.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cli/xxhsum.c b/cli/xxhsum.c index fb9c1b03..07e4d88d 100644 --- a/cli/xxhsum.c +++ b/cli/xxhsum.c @@ -1394,8 +1394,7 @@ static int XSUM_usage(const char* exename) XSUM_log( WELCOME_MESSAGE(exename) ); XSUM_log( "Create or verify checksums using fast non-cryptographic algorithm xxHash \n\n" ); XSUM_log( "Usage: %s [options] [files] \n\n", exename); - XSUM_log( "When no filename provided or when '-' is provided, uses stdin as input. \n"); - XSUM_log( "\nOptions: \n"); + XSUM_log( "Options: \n"); XSUM_log( " -H# select an xxhash algorithm (default: %i) \n", (int)g_defaultAlgo); XSUM_log( " 0: XXH32 \n"); XSUM_log( " 1: XXH64 \n"); From f90089f90b248f7fc027927230d5646454507808 Mon Sep 17 00:00:00 2001 From: Walter de Jong <walter.dejong@surf.nl> Date: Thu, 2 Jan 2025 10:15:56 +0100 Subject: [PATCH 6/6] Revert "help is basically lying about omitting filename" This reverts commit 1c54e8abc3c19abcc21d9278071d6bb83d8b65fc. --- cli/xxhsum.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/xxhsum.c b/cli/xxhsum.c index 07e4d88d..fb9c1b03 100644 --- a/cli/xxhsum.c +++ b/cli/xxhsum.c @@ -1394,7 +1394,8 @@ static int XSUM_usage(const char* exename) XSUM_log( WELCOME_MESSAGE(exename) ); XSUM_log( "Create or verify checksums using fast non-cryptographic algorithm xxHash \n\n" ); XSUM_log( "Usage: %s [options] [files] \n\n", exename); - XSUM_log( "Options: \n"); + XSUM_log( "When no filename provided or when '-' is provided, uses stdin as input. \n"); + XSUM_log( "\nOptions: \n"); XSUM_log( " -H# select an xxhash algorithm (default: %i) \n", (int)g_defaultAlgo); XSUM_log( " 0: XXH32 \n"); XSUM_log( " 1: XXH64 \n");