diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2007-08-11 08:30:43 +0200 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2007-08-11 08:32:50 +0200 |
commit | ed31c612c12e603ce86073952018bf7f00f9cd59 (patch) | |
tree | 6b4a11c2f0f491d53127516d9e01fb1914fa9f76 /src/system.h | |
parent | d243c0e840138cc5d8bf67c9d2a785bdbd74a8d9 (diff) | |
download | coreutils-ed31c612c12e603ce86073952018bf7f00f9cd59.tar.xz |
Accommodate more xstrtol changes.
* src/df.c (long_options): Don't bother prepending "--" to long
options that OPT_STR might decode, as that hack is no longer needed.
(main): Invoke xstrtol_fatal rather than STRTOL_FATAL_ERROR.
* src/du.c (long_options, main): Likewise.
* src/ls.c (decode_switches): Likewise.
* src/od.c (long_options, main): Likewise.
* src/pr.c (first_last_page, main): Likewise.
* src/sort.c (long_options, specify_sort_size): Likewise.
* src/pr.c (first_last_page): Accept option index and option char
instead of an assembled option string. All callers changed.
* src/sort.c (specify_sort_size): Likewise.
* src/system.h (OPT_STR, LONG_OPT_STR, short_opt_str, OPT_STR_INIT):
Remove.
Diffstat (limited to 'src/system.h')
-rw-r--r-- | src/system.h | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/system.h b/src/system.h index dcb13bad0..3c7f49d10 100644 --- a/src/system.h +++ b/src/system.h @@ -592,28 +592,3 @@ emit_bug_reporting_address (void) bugs (typically your translation team's web or email address). */ printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); } - -/* Use OPT_IDX to decide whether to return either a short option - string "-C", or a long option string derived from LONG_OPTIONS. - OPT_IDX is -1 if the short option C was used; otherwise it is an - index into LONG_OPTIONS, which should have a name preceded by two - '-' characters. */ -#define OPT_STR(opt_idx, c, long_options) \ - ((opt_idx) < 0 \ - ? short_opt_str (c) \ - : LONG_OPT_STR (opt_idx, long_options)) - -/* Likewise, but assume OPT_IDX is nonnegative. */ -#define LONG_OPT_STR(opt_idx, long_options) ((long_options)[opt_idx].name - 2) - -/* Given the byte, C, return the string "-C" in static storage. */ -static inline char * -short_opt_str (char c) -{ - static char opt_str_storage[3] = {'-', 0, 0}; - opt_str_storage[1] = c; - return opt_str_storage; -} - -/* Define an option string that will be used with OPT_STR or LONG_OPT_STR. */ -#define OPT_STR_INIT(name) ("--" name + 2) |