Revision: 56629
http://sourceforge.net/p/brlcad/code/56629
Author: carlmoore
Date: 2013-08-06 16:25:51 +0000 (Tue, 06 Aug 2013)
Log Message:
-----------
remove H, and simplify output of usage
Modified Paths:
--------------
brlcad/trunk/src/conv/g-dot.c
Modified: brlcad/trunk/src/conv/g-dot.c
===================================================================
--- brlcad/trunk/src/conv/g-dot.c 2013-08-06 16:08:14 UTC (rev 56628)
+++ brlcad/trunk/src/conv/g-dot.c 2013-08-06 16:25:51 UTC (rev 56629)
@@ -40,6 +40,7 @@
#include "raytrace.h"
#include "ged.h"
+const char *usage_fmt = "Usage: %s [-o output.dot] input.g [object1 ...]\n";
struct output {
FILE *outfp;
@@ -185,13 +186,12 @@
static void
-help()
+help(const char *argv0)
{
- bu_log("\n\t-? | -h | -H (optional) displays this help");
+ bu_log(usage_fmt, argv0);
bu_log("\n\t-o output.dot (optional) name of output Graphviz .dot file");
bu_log("\n\tinput.g name of input BRL-CAD .g database");
- bu_log("\n\tobject1 ... (optional) name of object(s) to export from .g
file");
- bu_log("\n");
+ bu_log("\n\tobject1 ... (optional) name of object(s) to export from .g
file\n");
}
@@ -200,7 +200,6 @@
{
int c;
- const char *usage_fmt = "Usage: %s [-?hH] [-o output.dot] input.g [object1
...]\n";
const char *argv0 = av[0];
const int argc0 = ac;
@@ -217,16 +216,13 @@
bu_setprogname(av[0]);
- while ((c = bu_getopt(ac, av, "o:")) != -1) {
+ while ((c = bu_getopt(ac, av, "o:h?")) != -1) {
switch (c) {
case 'o':
output = bu_strdup(bu_optarg);
break;
- case 'h':
- case 'H':
- case '?':
- bu_log(usage_fmt, argv0);
- help();
+ default:
+ help(argv0);
bu_exit(0, NULL);
break;
}
@@ -236,7 +232,7 @@
/* there should at least be a db filename remaining */
if (ac < 1) {
- bu_log(usage_fmt, argv0);
+ help(argv0);
if (argc0 > 1) {
bu_exit(2, "ERROR: input geometry database not specified\n");
} else {
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