Revision: 55288
http://sourceforge.net/p/brlcad/code/55288
Author: carlmoore
Date: 2013-05-01 20:53:06 +0000 (Wed, 01 May 2013)
Log Message:
-----------
oops, was looking for both stdin & stdout w/r to isatty; move back to earlier
location (removing a set of braces), and also fix usage of -?
Modified Paths:
--------------
brlcad/trunk/src/sig/dfft.c
Modified: brlcad/trunk/src/sig/dfft.c
===================================================================
--- brlcad/trunk/src/sig/dfft.c 2013-05-01 20:50:21 UTC (rev 55287)
+++ brlcad/trunk/src/sig/dfft.c 2013-05-01 20:53:06 UTC (rev 55288)
@@ -74,11 +74,9 @@
int i, n, c;
int L = 1024;
- if (isatty(STDIN_FILENO) || isatty(STDOUT_FILENO)) {
- bu_exit(1, "%s", usage);
- }
-
- while ((c = bu_getopt(argc, argv, "d:clpLANh")) != -1) {
+ while ((c = bu_getopt(argc, argv, "d:clpLANh?")) != -1) {
+ if (bu_optopt == '?')
+ c='h';
switch (c) {
case 'd': mindB = -atof(bu_optarg); break;
case 'c': cflag++; break;
@@ -88,12 +86,13 @@
case 'A': ascii_output++; break;
case 'N': normalize_output++; break;
case 'h': printf("%s", usage); return EXIT_SUCCESS;
- case ':': printf("Missing argument to %c\n%s\n", c, usage); return
EXIT_FAILURE;
- case '?':
- default: printf("Unknown argument: %c\n%s\n", c, usage); return
EXIT_FAILURE;
+ default: bu_exit(1, "%s", usage);
}
}
+ if (isatty(STDIN_FILENO) || isatty(STDOUT_FILENO))
+ bu_exit(1, "%s", usage);
+
/* Calculate Critical Band filter weights */
if (cflag) {
cbweights(&cbfilter[0], L, 19);
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