summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-08-01 00:41:30 +0000
committerMiles Bader <miles@gnu.org>1996-08-01 00:41:30 +0000
commitd4ef09f966e62188a2a67707190d2865bbde02ae (patch)
treeb4ee242b587b25e1c048a89ae84482b663e37904 /utils
parent59543085321ecc5c8b1146956c8e9477ef3be2de (diff)
(options, main): Change --fmt to --format/-F and --sort to --sort/-s.
(OPT_FMT, OPT_SORT): Macros removed.
Diffstat (limited to 'utils')
-rw-r--r--utils/w.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/utils/w.c b/utils/w.c
index 84bb6f6e..0b31385e 100644
--- a/utils/w.c
+++ b/utils/w.c
@@ -50,19 +50,15 @@ extern char *localhost ();
char *argp_program_version = "w 1.0 (GNU " HURD_RELEASE ")";
-/* Long options without corresponding short ones. -1 is EOF. */
-#define OPT_SORT -4
-#define OPT_FMT -5
-
#define OA OPTION_ARG_OPTIONAL
static struct argp_option options[] =
{
- {"fmt", OPT_FMT, "FMT", 0, "Use the custom output-format FMT"},
+ {"format", 'F', "FMT", 0, "Use the custom output-format FMT"},
{"no-header", 'H', 0, 0, "Don't print a descriptive header line"},
{0, 'h', 0, OPTION_ALIAS | OPTION_HIDDEN}, /* BSD compat */
{"reverse", 'r', 0, 0, "Reverse the order of any sort"},
- {"sort", OPT_SORT,"FIELD",0, "Sort the output with respect to FIELD,"
+ {"sort", 's', "FIELD",0, "Sort the output with respect to FIELD,"
" backwards if FIELD is prefixed by `-'"},
{0, 'i', 0, 0, "Sort output by idle time"},
{"tty", 't', "TTY", OA, "Only show entries for terminal TTY"},
@@ -395,8 +391,8 @@ main(int argc, char *argv[])
{
case 'H': case 'h': print_heading = 0; break;
case 'i': sort_key_name = "idle"; break;
- case OPT_SORT: sort_key_name = arg; break;
- case OPT_FMT: fmt_string = arg; break;
+ case 's': sort_key_name = arg; break;
+ case 'F': fmt_string = arg; break;
case 'r': sort_reverse = 1; break;
case 'u': show_entries = 0; break;
case 'U': show_uptime = 0; break;