From: Stefan Haubenthal Date: Wed, 26 Nov 2025 20:02:16 +0000 (+0000) Subject: patch 9.1.1928: xxd: exit_with_usage() can be simplified X-Git-Tag: v9.1.1928^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40699e399041508a5d42a3aaaa1474ee305b4066;p=thirdparty%2Fvim.git patch 9.1.1928: xxd: exit_with_usage() can be simplified Problem: xxd: exit_with_usage() can be simplified Solution: Clean up exit_with_usage() formatting slightly (Stefan Haubenthal) closes: #18813 Signed-off-by: Stefan Haubenthal Signed-off-by: Christian Brabandt --- diff --git a/src/version.c b/src/version.c index 1c0186ccbd..8210130ee7 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1928, /**/ 1927, /**/ diff --git a/src/xxd/xxd.c b/src/xxd/xxd.c index b46cee41f0..ddc11ee96b 100644 --- a/src/xxd/xxd.c +++ b/src/xxd/xxd.c @@ -71,6 +71,7 @@ * 08.08.2025 fix overflow with bitwise output * 20.08.2025 remove external library call for autoconversion on z/OS (MVS) * 24.08.2025 avoid NULL dereference with autoskip colorless + * 26.11.2025 update indent in exit_with_usage() * * (c) 1990-1998 by Juergen Weigert (jnweiger@gmail.com) * @@ -151,7 +152,7 @@ extern void perror __P((char *)); # endif #endif -char version[] = "xxd 2025-08-24 by Juergen Weigert et al."; +char version[] = "xxd 2025-11-26 by Juergen Weigert et al."; #ifdef WIN32 char osver[] = " (Win32)"; #else @@ -274,32 +275,32 @@ exit_with_usage(void) { fprintf(stderr, "Usage:\n %s [options] [infile [outfile]]\n", pname); fprintf(stderr, " or\n %s -r [-s [-]offset] [-c cols] [-ps] [infile [outfile]]\n", pname); - fprintf(stderr, "Options:\n"); - fprintf(stderr, " -a toggle autoskip: A single '*' replaces nul-lines. Default off.\n"); - fprintf(stderr, " -b binary digit dump (incompatible with -ps). Default hex.\n"); - fprintf(stderr, " -C capitalize variable names in C include file style (-i).\n"); - fprintf(stderr, " -c cols format octets per line. Default 16 (-i: 12, -ps: 30).\n"); - fprintf(stderr, " -E show characters in EBCDIC. Default ASCII.\n"); - fprintf(stderr, " -e little-endian dump (incompatible with -ps,-i,-r).\n"); - fprintf(stderr, " -g bytes number of octets per group in normal output. Default 2 (-e: 4).\n"); - fprintf(stderr, " -h print this summary.\n"); - fprintf(stderr, " -i output in C include file style.\n"); - fprintf(stderr, " -l len stop after octets.\n"); - fprintf(stderr, " -n name set the variable name used in C include output (-i).\n"); - fprintf(stderr, " -o off add to the displayed file position.\n"); - fprintf(stderr, " -ps output in postscript plain hexdump style.\n"); - fprintf(stderr, " -r reverse operation: convert (or patch) hexdump into binary.\n"); - fprintf(stderr, " -r -s off revert with added to file positions found in hexdump.\n"); - fprintf(stderr, " -d show offset in decimal instead of hex.\n"); + fprintf(stderr, "Options:\n" + " -a toggle autoskip: A single '*' replaces nul-lines. Default off.\n" + " -b binary digit dump (incompatible with -ps). Default hex.\n" + " -C capitalize variable names in C include file style (-i).\n" + " -c cols format octets per line. Default 16 (-i: 12, -ps: 30).\n" + " -E show characters in EBCDIC. Default ASCII.\n" + " -e little-endian dump (incompatible with -ps,-i,-r).\n" + " -g bytes number of octets per group in normal output. Default 2 (-e: 4).\n" + " -h print this summary.\n" + " -i output in C include file style.\n" + " -l len stop after octets.\n" + " -n name set the variable name used in C include output (-i).\n" + " -o off add to the displayed file position.\n" + " -ps output in postscript plain hexdump style.\n" + " -r reverse operation: convert (or patch) hexdump into binary.\n" + " -r -s off revert with added to file positions found in hexdump.\n" + " -d show offset in decimal instead of hex.\n"); fprintf(stderr, " -s %sseek start at bytes abs. %sinfile offset.\n", #ifdef TRY_SEEK "[+][-]", "(or +: rel.) "); #else "", ""); #endif - fprintf(stderr, " -u use upper case hex letters.\n"); - fprintf(stderr, " -R when colorize the output; can be 'always', 'auto' or 'never'. Default: 'auto'.\n"), - fprintf(stderr, " -v show version: \"%s%s\".\n", version, osver); + fprintf(stderr, " -u use upper case hex letters.\n" + " -R when colorize the output; can be 'always', 'auto' or 'never'. Default: 'auto'.\n" + " -v show version: \"%s%s\".\n", version, osver); exit(1); }