Revision: 58431
          http://sourceforge.net/p/brlcad/code/58431
Author:   carlmoore
Date:     2013-11-05 19:59:36 +0000 (Tue, 05 Nov 2013)
Log Message:
-----------
implement my run-with-no-arguments/program-continues-running protocol (we do 
see we can run the program with no arguments), and change 2 tabs to spaces

Modified Paths:
--------------
    brlcad/trunk/src/proc-db/nmgmodel.c

Modified: brlcad/trunk/src/proc-db/nmgmodel.c
===================================================================
--- brlcad/trunk/src/proc-db/nmgmodel.c 2013-11-05 18:17:59 UTC (rev 58430)
+++ brlcad/trunk/src/proc-db/nmgmodel.c 2013-11-05 19:59:36 UTC (rev 58431)
@@ -62,17 +62,16 @@
  * U S A G E --- tell user how to invoke this program, then exit
  */
 void
-usage(char *str)
+usage(char *str, int stopprog)
 {
     if (str) (void)fputs(str, stderr);
 
     (void) fprintf(stderr, "Usage: %s [ -0123 ] \n%s\"%s\"\n%s\"%s\"\n",
                   progname,
-                  "\tCreate NMG to mged database ",
-                  mfilename,
-                  "\tand plot3 file ",
-                  plotfilename);
-    bu_exit(1, NULL);
+                  "       Create NMG to mged database ",mfilename,
+                  "       and plot3 file ",plotfilename);
+    if (stopprog) bu_exit(1, NULL);
+    fprintf(stderr,"       Program continues running:\n");
 }
 
 
@@ -107,7 +106,7 @@
            case '0'    : manifold[0] = 0; break;
            case '?'    :
            case 'h'    :
-           default             : usage((char *)NULL); break;
+           default             : usage((char *)NULL,1); break;
        }
 
     return bu_optind;
@@ -533,9 +532,10 @@
     FILE *fdplot;
     struct rt_wdb *fdmodel;
 
-    if (parse_args(ac, av) < ac) usage((char *)NULL);
+    parse_args(ac, av);
+    if (ac==1) usage((char *)NULL,0);
     if (!manifold[0] && !manifold[1] && !manifold[2] && !manifold[3])
-       usage("No manifolds selected\n");
+       usage("No manifolds selected\n",1);
 
 
     m = nmg_mm();

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


------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to