|
71 | 71 | * 08.08.2025 fix overflow with bitwise output |
72 | 72 | * 20.08.2025 remove external library call for autoconversion on z/OS (MVS) |
73 | 73 | * 24.08.2025 avoid NULL dereference with autoskip colorless |
| 74 | + * 26.11.2025 update indent in exit_with_usage() |
74 | 75 | * |
75 | 76 | * (c) 1990-1998 by Juergen Weigert ([email protected]) |
76 | 77 | * |
@@ -151,7 +152,7 @@ extern void perror __P((char *)); |
151 | 152 | # endif |
152 | 153 | #endif |
153 | 154 |
|
154 | | -char version[] = "xxd 2025-08-24 by Juergen Weigert et al."; |
| 155 | +char version[] = "xxd 2025-11-26 by Juergen Weigert et al."; |
155 | 156 | #ifdef WIN32 |
156 | 157 | char osver[] = " (Win32)"; |
157 | 158 | #else |
@@ -274,32 +275,32 @@ exit_with_usage(void) |
274 | 275 | { |
275 | 276 | fprintf(stderr, "Usage:\n %s [options] [infile [outfile]]\n", pname); |
276 | 277 | fprintf(stderr, " or\n %s -r [-s [-]offset] [-c cols] [-ps] [infile [outfile]]\n", pname); |
277 | | - fprintf(stderr, "Options:\n"); |
278 | | - fprintf(stderr, " -a toggle autoskip: A single '*' replaces nul-lines. Default off.\n"); |
279 | | - fprintf(stderr, " -b binary digit dump (incompatible with -ps). Default hex.\n"); |
280 | | - fprintf(stderr, " -C capitalize variable names in C include file style (-i).\n"); |
281 | | - fprintf(stderr, " -c cols format <cols> octets per line. Default 16 (-i: 12, -ps: 30).\n"); |
282 | | - fprintf(stderr, " -E show characters in EBCDIC. Default ASCII.\n"); |
283 | | - fprintf(stderr, " -e little-endian dump (incompatible with -ps,-i,-r).\n"); |
284 | | - fprintf(stderr, " -g bytes number of octets per group in normal output. Default 2 (-e: 4).\n"); |
285 | | - fprintf(stderr, " -h print this summary.\n"); |
286 | | - fprintf(stderr, " -i output in C include file style.\n"); |
287 | | - fprintf(stderr, " -l len stop after <len> octets.\n"); |
288 | | - fprintf(stderr, " -n name set the variable name used in C include output (-i).\n"); |
289 | | - fprintf(stderr, " -o off add <off> to the displayed file position.\n"); |
290 | | - fprintf(stderr, " -ps output in postscript plain hexdump style.\n"); |
291 | | - fprintf(stderr, " -r reverse operation: convert (or patch) hexdump into binary.\n"); |
292 | | - fprintf(stderr, " -r -s off revert with <off> added to file positions found in hexdump.\n"); |
293 | | - fprintf(stderr, " -d show offset in decimal instead of hex.\n"); |
| 278 | + fprintf(stderr, "Options:\n" |
| 279 | + " -a toggle autoskip: A single '*' replaces nul-lines. Default off.\n" |
| 280 | + " -b binary digit dump (incompatible with -ps). Default hex.\n" |
| 281 | + " -C capitalize variable names in C include file style (-i).\n" |
| 282 | + " -c cols format <cols> octets per line. Default 16 (-i: 12, -ps: 30).\n" |
| 283 | + " -E show characters in EBCDIC. Default ASCII.\n" |
| 284 | + " -e little-endian dump (incompatible with -ps,-i,-r).\n" |
| 285 | + " -g bytes number of octets per group in normal output. Default 2 (-e: 4).\n" |
| 286 | + " -h print this summary.\n" |
| 287 | + " -i output in C include file style.\n" |
| 288 | + " -l len stop after <len> octets.\n" |
| 289 | + " -n name set the variable name used in C include output (-i).\n" |
| 290 | + " -o off add <off> to the displayed file position.\n" |
| 291 | + " -ps output in postscript plain hexdump style.\n" |
| 292 | + " -r reverse operation: convert (or patch) hexdump into binary.\n" |
| 293 | + " -r -s off revert with <off> added to file positions found in hexdump.\n" |
| 294 | + " -d show offset in decimal instead of hex.\n"); |
294 | 295 | fprintf(stderr, " -s %sseek start at <seek> bytes abs. %sinfile offset.\n", |
295 | 296 | #ifdef TRY_SEEK |
296 | 297 | "[+][-]", "(or +: rel.) "); |
297 | 298 | #else |
298 | 299 | "", ""); |
299 | 300 | #endif |
300 | | - fprintf(stderr, " -u use upper case hex letters.\n"); |
301 | | - fprintf(stderr, " -R when colorize the output; <when> can be 'always', 'auto' or 'never'. Default: 'auto'.\n"), |
302 | | - fprintf(stderr, " -v show version: \"%s%s\".\n", version, osver); |
| 301 | + fprintf(stderr, " -u use upper case hex letters.\n" |
| 302 | + " -R when colorize the output; <when> can be 'always', 'auto' or 'never'. Default: 'auto'.\n" |
| 303 | + " -v show version: \"%s%s\".\n", version, osver); |
303 | 304 | exit(1); |
304 | 305 | } |
305 | 306 |
|
|
0 commit comments