reorders processing of arguments (help text first)

Sat, 25 Jul 2020 17:53:54 +0200

author
Mike Becker <universe@uap-core.de>
date
Sat, 25 Jul 2020 17:53:54 +0200
changeset 59
c5409c8be36f
parent 58
bb512754aaf3
child 60
69be673a4fd0

reorders processing of arguments (help text first)

src/cline.c file | annotate | diff | comparison | revisions
--- a/src/cline.c	Sat Jul 25 17:42:51 2020 +0200
+++ b/src/cline.c	Sat Jul 25 17:53:54 2020 +0200
@@ -109,6 +109,10 @@
     int argflags = checkArgument(argv[t], "hsSrRmvVbeE");
     int paropt = 0;
 
+    /* h */
+    if ((argflags & 1) > 0 || strcmp(argv[t], "--help") == 0) {
+      return exit_with_help(settings, 0);
+    }
     /* s */
     if ((argflags & 2) > 0) {
       if (!checkParamOpt(&paropt) || registerArgument(&checked, 2)) {
@@ -131,10 +135,6 @@
       }
       excludeSuffix = argv[t];
     }
-    /* h */
-    if ((argflags & 1) > 0 || strcmp(argv[t], "--help") == 0) {
-      return exit_with_help(settings, 0);
-    }
     /* r, R */
     if ((argflags & 24) > 0) {
       if (registerArgument(&checked, 24)) {

mercurial