Revision: 56702
          http://sourceforge.net/p/brlcad/code/56702
Author:   tbrowder2
Date:     2013-08-08 21:02:03 +0000 (Thu, 08 Aug 2013)
Log Message:
-----------
add usage string; eliminate usage function

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

Modified: brlcad/trunk/src/proc-db/wdb_example.c
===================================================================
--- brlcad/trunk/src/proc-db/wdb_example.c      2013-08-08 20:57:55 UTC (rev 
56701)
+++ brlcad/trunk/src/proc-db/wdb_example.c      2013-08-08 21:02:03 UTC (rev 
56702)
@@ -41,15 +41,8 @@
 #include "rtgeom.h"
 #include "wdb.h"
 
+static const char usage[] = "Usage: wdb_example db_file.g\n";
 
-char *progname ="(noname)";
-
-void usage(void)
-{
-    fprintf(stderr, "Usage: %s db_file.g\n", progname);
-}
-
-
 int
 main(int ac, char *av[])
 {
@@ -59,11 +52,8 @@
     unsigned char rgb[3];
     struct wmember wm_hd; /* defined in wdb.h */
 
-    progname = *av;
-
     if (ac < 2) {
-       usage();
-       return 1;
+       bu_exit(1, usage);
     }
 
     if ((db_fp = wdb_fopen(av[1])) == NULL) {

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