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/sort.c | |
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/sort.c')
-rw-r--r-- | src/sort.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sort.c b/src/sort.c index dc7874a9e..620a4bc7c 100644 --- a/src/sort.c +++ b/src/sort.c @@ -414,7 +414,7 @@ static struct option const long_options[] = {"output", required_argument, NULL, 'o'}, {"reverse", no_argument, NULL, 'r'}, {"stable", no_argument, NULL, 's'}, - {OPT_STR_INIT ("buffer-size"), required_argument, NULL, 'S'}, + {"buffer-size", required_argument, NULL, 'S'}, {"field-separator", required_argument, NULL, 't'}, {"temporary-directory", required_argument, NULL, 'T'}, {"unique", no_argument, NULL, 'u'}, @@ -1032,7 +1032,7 @@ inittables (void) /* Specify the amount of main memory to use when sorting. */ static void -specify_sort_size (char const *option, char const *s) +specify_sort_size (int oi, char c, char const *s) { uintmax_t n; char *suffix; @@ -1088,7 +1088,7 @@ specify_sort_size (char const *option, char const *s) e = LONGINT_OVERFLOW; } - STRTOL_FATAL_ERROR (option, s, e); + xstrtol_fatal (e, oi, c, long_options, s); } /* Return the default sort size. */ @@ -3012,7 +3012,7 @@ main (int argc, char **argv) break; case 'S': - specify_sort_size (OPT_STR (oi, c, long_options), optarg); + specify_sort_size (oi, c, optarg); break; case 't': |