Revision: 76893
          http://sourceforge.net/p/brlcad/code/76893
Author:   starseeker
Date:     2020-08-22 16:17:52 +0000 (Sat, 22 Aug 2020)
Log Message:
-----------
Handle help options in debug2c so it won't write spurious -? file in usage.sh 
execution.

Modified Paths:
--------------
    brlcad/trunk/misc/tools/debug2c/debug2c.cxx

Modified: brlcad/trunk/misc/tools/debug2c/debug2c.cxx
===================================================================
--- brlcad/trunk/misc/tools/debug2c/debug2c.cxx 2020-08-22 16:14:01 UTC (rev 
76892)
+++ brlcad/trunk/misc/tools/debug2c/debug2c.cxx 2020-08-22 16:17:52 UTC (rev 
76893)
@@ -111,6 +111,14 @@
        return -1;
     }
 
+    for (int i = 0; i < argc; i++) {
+       std::string arg(argv[i]);
+       if (arg == std::string("--help") || arg == std::string("-h") || arg == 
std::string("-?")) {
+           std::cerr << "Usage: debug2c [-v] file_list output_file\n";
+           return 0;
+       }
+    }
+
     if (argc == 4) {
        if (std::string(argv[1]) == std::string("-v")) {
            argc--;

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to