changeset 2441:275374725598

Show help when no arguments.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 29 Feb 2020 12:32:08 +0200
parents 5b8cb850f5ab
children 07b02bb63191
files tools/fanalyze.c tools/packed.c tools/ppl.c
diffstat 3 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/tools/fanalyze.c	Wed Feb 26 18:15:17 2020 +0200
+++ b/tools/fanalyze.c	Sat Feb 29 12:32:08 2020 +0200
@@ -678,7 +678,7 @@
 
     if (nsrcFiles < 1)
     {
-        dmErrorMsg("Nothing to do. (try --help)\n");
+        argShowHelp();
         goto out;
     }
 
--- a/tools/packed.c	Wed Feb 26 18:15:17 2020 +0200
+++ b/tools/packed.c	Sat Feb 29 12:32:08 2020 +0200
@@ -670,8 +670,7 @@
 
     if (optCommand == CMD_NONE)
     {
-        dmErrorMsg("Nothing to do. Perhaps try \"%s --help\"?\n",
-            dmProgName);
+        argShowHelp();
         goto error;
     }
 
--- a/tools/ppl.c	Wed Feb 26 18:15:17 2020 +0200
+++ b/tools/ppl.c	Sat Feb 29 12:32:08 2020 +0200
@@ -567,9 +567,9 @@
         exit(1);
 
     // Open the files
-    if (optFilename == NULL)
+    if (optFilename == NULL || argc < 2)
     {
-        dmErrorMsg("No filename specified.\n");
+        argShowHelp();
         return 1;
     }