From cd1d988313c718929bfffe0936a7123eac27c7d5 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Thu, 4 Jun 2020 21:02:32 +0100 Subject: [PATCH] clients/disorder.c: Remove the short forms for undocumented options. Also, somewhat sneakily, move the internal names for these options out of the way of my future plans. The affected options are `-N' (`--no-per-user-config'), `-u' (`--user') and `-p' (`--password'). As far as I can make out, `--user' and `--password' are only intended to be used during testing, and only the long forms are given; and `--no-per-user-config' isn't actually used at all. --- clients/disorder.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/clients/disorder.c b/clients/disorder.c index 8fdbc60..c7672fb 100644 --- a/clients/disorder.c +++ b/clients/disorder.c @@ -77,8 +77,8 @@ static const struct option options[] = { { "local", no_argument, 0, 'l' }, { "no-per-user-config", no_argument, 0, 'N' }, { "help-commands", no_argument, 0, 'H' }, - { "user", required_argument, 0, 'u' }, - { "password", required_argument, 0, 'p' }, + { "user", required_argument, 0, 'U' }, + { "password", required_argument, 0, 'P' }, { 0, 0, 0, 0 } }; @@ -883,7 +883,7 @@ int main(int argc, char **argv) { regexp_setup(); if(!setlocale(LC_CTYPE, "")) disorder_fatal(errno, "error calling setlocale"); if(!setlocale(LC_TIME, "")) disorder_fatal(errno, "error calling setlocale"); - while((n = getopt_long(argc, argv, "+hVc:dHlNu:p:", options, 0)) >= 0) { + while((n = getopt_long(argc, argv, "+hVc:dHl", options, 0)) >= 0) { switch(n) { case 'h': help(); case 'H': help_commands(); @@ -892,8 +892,8 @@ int main(int argc, char **argv) { case 'd': debugging = 1; break; case 'l': local = 1; break; case 'N': config_per_user = 0; break; - case 'u': user = optarg; break; - case 'p': password = optarg; break; + case 'U': user = optarg; break; + case 'P': password = optarg; break; default: disorder_fatal(0, "invalid option"); } } -- 2.11.0