From: markus schnalke Date: Sat, 5 May 2012 05:55:20 +0000 (+0200) Subject: Don't require a length for switch prefixes without good reason. X-Git-Tag: mmh-thesis-end~48 X-Git-Url: http://git.marmaro.de/?p=mmh;a=commitdiff_plain;h=bd60514e13b4b1d4e2f726e6fc54da9eff6a263e Don't require a length for switch prefixes without good reason. E.g. there's no reason (anymore?) to require the user to type `whatnow -prom' when `whatnow -p' is already distinguishing. --- diff --git a/uip/anno.c b/uip/anno.c index 7ede7e0..3958eb1 100644 --- a/uip/anno.c +++ b/uip/anno.c @@ -34,17 +34,17 @@ static struct swit switches[] = { #define HELPSW 5 { "help", 0 }, #define LISTSW 6 - { "list", 1 }, + { "list", 0 }, #define DELETESW 7 - { "delete", 2 }, + { "delete", 0 }, #define NUMBERSW 8 - { "number", 2 }, + { "number", 0 }, #define APPENDSW 9 - { "append", 1 }, + { "append", 0 }, #define PRESERVESW 10 - { "preserve", 1 }, + { "preserve", 0 }, #define NOPRESERVESW 11 - { "nopreserve", 3 }, + { "nopreserve", 0 }, { NULL, 0 } }; diff --git a/uip/new.c b/uip/new.c index de3c0be..7c3191a 100644 --- a/uip/new.c +++ b/uip/new.c @@ -22,13 +22,13 @@ static struct swit switches[] = { #define MODESW 0 - { "mode", 1 }, + { "mode", 0 }, #define FOLDERSSW 1 - { "folders", 1 }, + { "folders", 0 }, #define VERSIONSW 2 - { "Version", 1 }, + { "Version", 0 }, #define HELPSW 3 - { "help", 1 }, + { "help", 0 }, { NULL, 0 } }; diff --git a/uip/rcvdist.c b/uip/rcvdist.c index d409b5c..fa2a170 100644 --- a/uip/rcvdist.c +++ b/uip/rcvdist.c @@ -14,7 +14,7 @@ static struct swit switches[] = { #define FORMSW 0 - { "form formfile", 4 }, + { "form formfile", 0 }, #define VERSIONSW 1 { "Version", 0 }, #define HELPSW 2 diff --git a/uip/scan.c b/uip/scan.c index 085cc7f..269193f 100644 --- a/uip/scan.c +++ b/uip/scan.c @@ -19,7 +19,7 @@ static struct swit switches[] = { #define WIDTHSW 1 { "width columns", 0 }, #define FILESW 2 - { "file file", 4 }, + { "file file", 0 }, #define VERSIONSW 3 { "Version", 0 }, #define HELPSW 4 diff --git a/uip/whatnow.c b/uip/whatnow.c index e3a411a..ead1bd5 100644 --- a/uip/whatnow.c +++ b/uip/whatnow.c @@ -46,7 +46,7 @@ static struct swit whatnowswitches[] = { #define EDITRSW 0 { "editor editor", 0 }, #define PRMPTSW 1 - { "prompt string", 4 }, + { "prompt string", 0 }, #define VERSIONSW 2 { "Version", 0 }, #define HELPSW 3