Revision: 56696
          http://sourceforge.net/p/brlcad/code/56696
Author:   carlmoore
Date:     2013-08-08 18:34:45 +0000 (Thu, 08 Aug 2013)
Log Message:
-----------
remove unneeded break in g-acad, and revise usage statement in g-egg (adding -P)

Modified Paths:
--------------
    brlcad/trunk/src/conv/g-acad.c
    brlcad/trunk/src/conv/g-egg.c

Modified: brlcad/trunk/src/conv/g-acad.c
===================================================================
--- brlcad/trunk/src/conv/g-acad.c      2013-08-08 18:23:31 UTC (rev 56695)
+++ brlcad/trunk/src/conv/g-acad.c      2013-08-08 18:34:45 UTC (rev 56696)
@@ -556,7 +556,6 @@
                break;
            default:
                usage(argv[0]);
-               break;
        }
     }
 

Modified: brlcad/trunk/src/conv/g-egg.c
===================================================================
--- brlcad/trunk/src/conv/g-egg.c       2013-08-08 18:23:31 UTC (rev 56695)
+++ brlcad/trunk/src/conv/g-egg.c       2013-08-08 18:34:45 UTC (rev 56696)
@@ -58,6 +58,14 @@
 static struct gcv_data gcvwriter;
 
 static void
+usage(const char *argv0)
+{
+    bu_log("\nUsage: %s [-bvM] [-xX lvl] [-a abs_tess_tol] [-r rel_tess_tol] 
[-n norm_tess_tol]\n", argv0);
+    bu_log("[-D dist_calc_tol] [-P #_of_CPUs] [-o output_file_name.egg] 
brlcad_db.g object(s)\n");
+    bu_exit(1,NULL);
+}
+
+static void
 nmg_to_egg(struct nmgregion *r, const struct db_full_path *pathp, int 
UNUSED(region_id), int UNUSED(material_id), float UNUSED(color[3]))
 {
     struct model *m;
@@ -176,8 +184,6 @@
 int
 main(int argc, char *argv[])
 {
-    char usage[] = "Usage: %s [-bvM] [-xX lvl] [-a abs_tess_tol] [-r 
rel_tess_tol] [-n norm_tess_tol] [-D dist_calc_tol] [-o output_file_name.egg] 
brlcad_db.g object(s)\n";
-
     int verbose = 0;
     int ncpu = 1;                      /* Number of processors */
     char *output_file = NULL;  /* output filename */
@@ -262,13 +268,12 @@
                use_bottess = 1;
                break;
            default:
-               bu_exit(1, usage, argv[0]);
+               usage(argv[0]);
        }
     }
 
-    if (bu_optind+1 >= argc) {
-       bu_exit(1, usage, argv[0]);
-    }
+    if (bu_optind+1 >= argc)
+       usage(argv[0]);
 
     gcvwriter.fp = stdout;
     if (output_file) {
@@ -282,7 +287,7 @@
     argc -= bu_optind;
     argv += bu_optind;
     if(argc < 2 || argv[0] == NULL || argv[1] == NULL)
-       bu_exit(1, usage, argv[0]);
+       usage(argv[0]);
 
     gcvwriter.func = nmg_to_egg;
 

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


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to