author | Olivier Brunel
<jjk@jjacky.com> 2015-02-21 13:24:11 UTC |
committer | Olivier Brunel
<jjk@jjacky.com> 2015-04-04 12:47:34 UTC |
parent | e6c0dc2b16697981370a83ddbc2323af75f44df7 |
src/anopa/aa-enable.c | +4 | -4 |
src/anopa/aa-start.c | +3 | -3 |
src/anopa/aa-stop.c | +4 | -4 |
src/utils/aa-echo.c | +12 | -12 |
diff --git a/src/anopa/aa-enable.c b/src/anopa/aa-enable.c index ea416ad..06245a2 100644 --- a/src/anopa/aa-enable.c +++ b/src/anopa/aa-enable.c @@ -181,7 +181,7 @@ main (int argc, char * const argv[]) }; int c; - c = getopt_long (argc, argv, "Dhk:l:nr:S:s:vw", longopts, NULL); + c = getopt_long (argc, argv, "Dhk:l:nr:S:s:Vw", longopts, NULL); if (c == -1) break; switch (c) @@ -221,13 +221,13 @@ main (int argc, char * const argv[]) strerr_diefu1sys (1, "stralloc_catb"); break; + case 'V': + aa_die_version (); + case 'w': flags &= ~AA_FLAG_AUTO_ENABLE_WANTS; break; - case 'V': - aa_die_version (); - default: dieusage (1); } diff --git a/src/anopa/aa-start.c b/src/anopa/aa-start.c index 7bfde02..20802d1 100644 --- a/src/anopa/aa-start.c +++ b/src/anopa/aa-start.c @@ -246,13 +246,13 @@ main (int argc, char * const argv[]) path_repo = optarg; break; + case 'V': + aa_die_version (); + case 'w': no_wants = 1; break; - case 'V': - aa_die_version (); - default: dieusage (1); } diff --git a/src/anopa/aa-stop.c b/src/anopa/aa-stop.c index b9dc8e3..7738f6e 100644 --- a/src/anopa/aa-stop.c +++ b/src/anopa/aa-stop.c @@ -197,14 +197,14 @@ main (int argc, char * const argv[]) break; switch (c) { - case 'D': - mode_both = 1; - break; - case 'a': all = 1; break; + case 'D': + mode_both = 1; + break; + case 'h': dieusage (0); diff --git a/src/utils/aa-echo.c b/src/utils/aa-echo.c index f588058..28d4632 100644 --- a/src/utils/aa-echo.c +++ b/src/utils/aa-echo.c @@ -54,18 +54,18 @@ main (int argc, char * const argv[]) for (;;) { struct option longopts[] = { - { "help", no_argument, NULL, 'h' }, - { "version", no_argument, NULL, 'V' }, { "double-output", no_argument, NULL, 'D' }, + { "error", no_argument, NULL, 'e' }, + { "help", no_argument, NULL, 'h' }, { "title", no_argument, NULL, 'T' }, { "title2", no_argument, NULL, 't' }, + { "version", no_argument, NULL, 'V' }, { "warning", no_argument, NULL, 'w' }, - { "error", no_argument, NULL, 'e' }, { NULL, 0, 0, 0 } }; int c; - c = getopt_long (argc, argv, "hVDTtwe", longopts, NULL); + c = getopt_long (argc, argv, "DehTtVw", longopts, NULL); if (c == -1) break; switch (c) @@ -74,6 +74,11 @@ main (int argc, char * const argv[]) mode_both = 1; break; + case 'e': + put = aa_put_err; + where = AA_ERR; + break; + case 'h': dieusage (0); @@ -87,19 +92,14 @@ main (int argc, char * const argv[]) where = AA_OUT; break; + case 'V': + aa_die_version (); + case 'w': put = aa_put_warn; where = AA_ERR; break; - case 'e': - put = aa_put_err; - where = AA_ERR; - break; - - case 'V': - aa_die_version (); - default: dieusage (1); }