Revision: 55279
          http://sourceforge.net/p/brlcad/code/55279
Author:   carlmoore
Date:     2013-05-01 18:31:17 +0000 (Wed, 01 May 2013)
Log Message:
-----------
shift the isatty test further up (no point in processing the options if this 
fails), and add '< inputfile' to the usage

Modified Paths:
--------------
    brlcad/trunk/src/sig/ddisp.c

Modified: brlcad/trunk/src/sig/ddisp.c
===================================================================
--- brlcad/trunk/src/sig/ddisp.c        2013-05-01 18:02:19 UTC (rev 55278)
+++ brlcad/trunk/src/sig/ddisp.c        2013-05-01 18:31:17 UTC (rev 55279)
@@ -47,7 +47,7 @@
 void   disp_bars(double *buf, int size);
 
 static const char usage[] = "\
-Usage: ddisp [-v -b -p -c -h] [width (512)]\n";
+Usage: ddisp [-v -b -p -c -h] [width (512)] < inputfile\n";
 
 int
 main(int argc, char **argv)
@@ -56,6 +56,10 @@
 
     int        n, L;
 
+    if ( isatty(fileno(stdin)) ) {
+       bu_exit(1, "%s", usage );
+    }
+
     while ( argc > 1 ) {
        if ( BU_STR_EQUAL(argv[1], "-v") ) {
            mode = VERT;
@@ -75,9 +79,6 @@
        argv++;
     }
 
-    if ( isatty(fileno(stdin)) ) {
-       bu_exit(1, "%s", usage );
-    }
     if ( (fbp = fb_open( NULL, fbsize, fbsize )) == FBIO_NULL ) {
        bu_exit(2, "Unable to open framebuffer\n");
     }

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


------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to