Revision: 54588
          http://brlcad.svn.sourceforge.net/brlcad/?rev=54588&view=rev
Author:   carlmoore
Date:     2013-03-08 21:52:42 +0000 (Fri, 08 Mar 2013)
Log Message:
-----------
shorten the code in filename check, and clarify the Usage message

Modified Paths:
--------------
    brlcad/trunk/src/util/bw3-pix.c

Modified: brlcad/trunk/src/util/bw3-pix.c
===================================================================
--- brlcad/trunk/src/util/bw3-pix.c     2013-03-08 21:52:29 UTC (rev 54587)
+++ brlcad/trunk/src/util/bw3-pix.c     2013-03-08 21:52:42 UTC (rev 54588)
@@ -40,13 +40,9 @@
     /* check for special names */
     if (BU_STR_EQUAL(name, "-")) {
        *fp = stdin;
-       return;
     } else if (BU_STR_EQUAL(name, ".")) {
        *fp = fopen("/dev/null", "r");
-       return;
-    }
-
-    if ((*fp = fopen(name, "r")) == NULL) {
+    } else if ((*fp = fopen(name, "r")) == NULL) {
        bu_exit(2, "bw3-pix: Can't open \"%s\"\n", name);
     }
 }
@@ -64,7 +60,7 @@
     FILE *rfp, *bfp, *gfp;
 
     if (argc != 4 || isatty(fileno(stdout))) {
-       bu_exit(1, "Usage: bw3-pix redin greenin bluein > file.pix (- stdin, . 
skip)\n");
+       bu_exit(1, "Usage: bw3-pix redin greenin bluein > file.pix (use - for 
stdin, . for /dev/null)\n");
     }
 
     open_file(&rfp, argv[1]);

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


------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to