From 9bdcb0a31bd5d164d7aa027e975e6c4b0da611af Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 28 May 2017 00:35:38 +0200 Subject: [PATCH 1/3] More POSIX.2, staying compatible --- src/ar65/main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ar65/main.c b/src/ar65/main.c index a1839bad2..9985f1f71 100644 --- a/src/ar65/main.c +++ b/src/ar65/main.c @@ -64,8 +64,8 @@ static void Usage (void) "Operations are some of:\n" "\ta\tAdd modules\n" "\td\tDelete modules\n" - "\tl\tList library contents\n" - "\tv\tIncrease verbosity (put before other operation)\n" + "\tt\tList library table\n" + "\tv\tIncrease verbosity (put after other operation)\n" "\tx\tExtract modules\n" "\tV\tPrint the archiver version\n", ProgName); @@ -94,10 +94,6 @@ int main (int argc, char* argv []) /* Get the argument */ const char* Arg = ArgVec [I]; - /* Check for an option */ - if (strlen (Arg) != 1) { - Usage (); - } switch (Arg [0]) { case 'a': @@ -108,7 +104,11 @@ int main (int argc, char* argv []) DelObjFiles (ArgCount - I - 1, &ArgVec [I+1]); break; - case 'l': + case 't': /* POSIX.2 */ + case 'l': /* staying compatible */ + if (Arg [1] == 'v') { + ++Verbosity; + } ListObjFiles (ArgCount - I - 1, &ArgVec [I+1]); break; From 49e22f566fa04cfaf841797732c7bb9b08a96c01 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 28 May 2017 15:29:49 +0200 Subject: [PATCH 2/3] Update main.c --- src/ar65/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ar65/main.c b/src/ar65/main.c index 9985f1f71..9fb5d6cf8 100644 --- a/src/ar65/main.c +++ b/src/ar65/main.c @@ -65,7 +65,7 @@ static void Usage (void) "\ta\tAdd modules\n" "\td\tDelete modules\n" "\tt\tList library table\n" - "\tv\tIncrease verbosity (put after other operation)\n" + "\tv\tIncrease verbosity (put before other operation)\n" "\tx\tExtract modules\n" "\tV\tPrint the archiver version\n", ProgName); From 80feb80168eccc8b8097b9150c13deb848a8eb45 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 28 May 2017 16:17:34 +0200 Subject: [PATCH 3/3] Update main.c --- src/ar65/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ar65/main.c b/src/ar65/main.c index 9fb5d6cf8..48561027f 100644 --- a/src/ar65/main.c +++ b/src/ar65/main.c @@ -62,7 +62,7 @@ static void Usage (void) { fprintf (stderr, "Usage: %s lib file|module ...\n" "Operations are some of:\n" - "\ta\tAdd modules\n" + "\tr\tAdd modules\n" "\td\tDelete modules\n" "\tt\tList library table\n" "\tv\tIncrease verbosity (put before other operation)\n" @@ -96,7 +96,8 @@ int main (int argc, char* argv []) switch (Arg [0]) { - case 'a': + case 'r': /* POSIX.2 */ + case 'a': /* staying compatible */ AddObjFiles (ArgCount - I - 1, &ArgVec[I+1]); break;