Revision: 55537
http://sourceforge.net/p/brlcad/code/55537
Author: carlmoore
Date: 2013-05-22 18:39:44 +0000 (Wed, 22 May 2013)
Log Message:
-----------
implement -? and no-arguments; switch over to use of getopt's error messages;
have not yet resolved -h
Modified Paths:
--------------
brlcad/trunk/src/proc-db/brickwall.c
Modified: brlcad/trunk/src/proc-db/brickwall.c
===================================================================
--- brlcad/trunk/src/proc-db/brickwall.c 2013-05-22 17:56:14 UTC (rev
55536)
+++ brlcad/trunk/src/proc-db/brickwall.c 2013-05-22 18:39:44 UTC (rev
55537)
@@ -34,7 +34,7 @@
#include "vmath.h"
/* declarations to support use of bu_getopt() */
-char *options = "w:h:d:W:H:sn:t:Du:mc:C:";
+char *options = "w:h:d:W:H:sn:t:Du:mc:C:?";
char *progname = "(noname)";
double brick_width=8.0;
@@ -87,9 +87,6 @@
else
++progname;
- /* Turn off getopt's error messages */
- bu_opterr = 0;
-
/* get all the option flags from the command line */
while ((c=bu_getopt(ac, av, options)) != -1)
switch (c) {
@@ -151,9 +148,8 @@
case 's':
standalone = !standalone;
break;
- case '?':
default:
- usage("bad command line option\n");
+ usage("\n");
break;
}
@@ -327,13 +323,15 @@
double horiz_spacing;
double vert_spacing;
+ if (ac == 1 && isatty(fileno(stdin)) && isatty(fileno(stdout)))
+ usage("\n");
/* parse command flags, and make sure there are arguments
* left over for processing.
*/
- if (parse_args(ac, av) < ac) usage("Excess command line arguments\n");
+ if (parse_args(ac, av) < ac)
+ usage("Excess command line arguments\n");
-
/* build the wall
if (debug)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits