patch 9.1.1928: xxd: exit_with_usage() can be simplified
Commit:
https://github.com/vim/vim/commit/40699e399041508a5d42a3aaaa1474ee305b4066
Author: Stefan Haubenthal <
pol...@sdf.org>
Date: Wed Nov 26 20:02:16 2025 +0000
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 <
pol...@sdf.org>
Signed-off-by: Christian Brabandt <
c...@256bit.org>
diff --git a/src/version.c b/src/version.c
index 1c0186ccb..8210130ee 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 b46cee41f..ddc11ee96 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 (
jnwe...@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:
%s [options] [infile [outfile]]
", pname);
fprintf(stderr, " or
%s -r [-s [-]offset] [-c cols] [-ps] [infile [outfile]]
", pname);
- fprintf(stderr, "Options:
");
- fprintf(stderr, " -a toggle autoskip: A single '*' replaces nul-lines. Default off.
");
- fprintf(stderr, " -b binary digit dump (incompatible with -ps). Default hex.
");
- fprintf(stderr, " -C capitalize variable names in C include file style (-i).
");
- fprintf(stderr, " -c cols format <cols> octets per line. Default 16 (-i: 12, -ps: 30).
");
- fprintf(stderr, " -E show characters in EBCDIC. Default ASCII.
");
- fprintf(stderr, " -e little-endian dump (incompatible with -ps,-i,-r).
");
- fprintf(stderr, " -g bytes number of octets per group in normal output. Default 2 (-e: 4).
");
- fprintf(stderr, " -h print this summary.
");
- fprintf(stderr, " -i output in C include file style.
");
- fprintf(stderr, " -l len stop after <len> octets.
");
- fprintf(stderr, " -n name set the variable name used in C include output (-i).
");
- fprintf(stderr, " -o off add <off> to the displayed file position.
");
- fprintf(stderr, " -ps output in postscript plain hexdump style.
");
- fprintf(stderr, " -r reverse operation: convert (or patch) hexdump into binary.
");
- fprintf(stderr, " -r -s off revert with <off> added to file positions found in hexdump.
");
- fprintf(stderr, " -d show offset in decimal instead of hex.
");
+ fprintf(stderr, "Options:
"
+ " -a toggle autoskip: A single '*' replaces nul-lines. Default off.
"
+ " -b binary digit dump (incompatible with -ps). Default hex.
"
+ " -C capitalize variable names in C include file style (-i).
"
+ " -c cols format <cols> octets per line. Default 16 (-i: 12, -ps: 30).
"
+ " -E show characters in EBCDIC. Default ASCII.
"
+ " -e little-endian dump (incompatible with -ps,-i,-r).
"
+ " -g bytes number of octets per group in normal output. Default 2 (-e: 4).
"
+ " -h print this summary.
"
+ " -i output in C include file style.
"
+ " -l len stop after <len> octets.
"
+ " -n name set the variable name used in C include output (-i).
"
+ " -o off add <off> to the displayed file position.
"
+ " -ps output in postscript plain hexdump style.
"
+ " -r reverse operation: convert (or patch) hexdump into binary.
"
+ " -r -s off revert with <off> added to file positions found in hexdump.
"
+ " -d show offset in decimal instead of hex.
");
fprintf(stderr, " -s %sseek start at <seek> bytes abs. %sinfile offset.
",
#ifdef TRY_SEEK
"[+][-]", "(or +: rel.) ");
#else
"", "");
#endif
- fprintf(stderr, " -u use upper case hex letters.
");
- fprintf(stderr, " -R when colorize the output; <when> can be 'always', 'auto' or 'never'. Default: 'auto'.
"),
- fprintf(stderr, " -v show version: \"%s%s\".
", version, osver);
+ fprintf(stderr, " -u use upper case hex letters.
"
+ " -R when colorize the output; <when> can be 'always', 'auto' or 'never'. Default: 'auto'.
"
+ " -v show version: \"%s%s\".
", version, osver);
exit(1);
}