Revision: 76872
http://sourceforge.net/p/brlcad/code/76872
Author: starseeker
Date: 2020-08-21 15:43:20 +0000 (Fri, 21 Aug 2020)
Log Message:
-----------
Still can't determine why bu_exit is an issue in these cases (only commonality
seems to be bu_exit called right after isatty - not sure why that would
matter...) but bu_exit isn't really necessary to print the help msgs. Just
bu_log and return. usage.sh can complete its run without throwing bombs now on
linux, although one or more programs are producing a '-?' file rather than
intepreting ? as a help option.
Modified Paths:
--------------
brlcad/trunk/src/fb/fbstretch.c
brlcad/trunk/src/sig/dauto.c
Modified: brlcad/trunk/src/fb/fbstretch.c
===================================================================
--- brlcad/trunk/src/fb/fbstretch.c 2020-08-21 15:37:41 UTC (rev 76871)
+++ brlcad/trunk/src/fb/fbstretch.c 2020-08-21 15:43:20 UTC (rev 76872)
@@ -265,8 +265,10 @@
if (argc == 1 && isatty(fileno(stdin)) && isatty(fileno(stdout)))
errors = 1;
- if (errors)
- bu_exit(1, "Usage: %s\n%s\n%s\n", USAGE1, USAGE2, USAGE3);
+ if (errors) {
+ bu_log("Usage: %s\n%s\n%s\n", USAGE1, USAGE2, USAGE3);
+ return 1;
+ }
}
if (bu_optind < argc) {
Modified: brlcad/trunk/src/sig/dauto.c
===================================================================
--- brlcad/trunk/src/sig/dauto.c 2020-08-21 15:37:41 UTC (rev 76871)
+++ brlcad/trunk/src/sig/dauto.c 2020-08-21 15:43:20 UTC (rev 76872)
@@ -35,8 +35,8 @@
#include "bio.h"
#include "bu/app.h"
+#include "bu/log.h"
#include "bu/malloc.h"
-#include "bu/exit.h"
int
main(int argc, char *argv[])
@@ -54,7 +54,8 @@
bu_setprogname(argv[0]);
if (isatty(fileno(stdin)) || isatty(fileno(stdout))) {
- bu_exit(1, "%s", usage);
+ bu_log("%s", usage);
+ return 1;
}
L = (argc > 1) ? atoi(argv[1]) : 512;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits