Revision: 76890
http://sourceforge.net/p/brlcad/code/76890
Author: starseeker
Date: 2020-08-22 15:53:17 +0000 (Sat, 22 Aug 2020)
Log Message:
-----------
The bare '-' character may be used to denote arguments for programs (for
example, to use stdin or stdout in lieu of a file) - update bu_opt to recognize
that the isolated '-' char isn't an option. (Note - need to think about
whether the "--" string is in the same category... probably...
Modified Paths:
--------------
brlcad/trunk/src/libbu/opt.c
Modified: brlcad/trunk/src/libbu/opt.c
===================================================================
--- brlcad/trunk/src/libbu/opt.c 2020-08-22 15:31:32 UTC (rev 76889)
+++ brlcad/trunk/src/libbu/opt.c 2020-08-22 15:53:17 UTC (rev 76890)
@@ -672,7 +672,8 @@
* an option. Right now the criteria are:
*
* 1. Must have a '-' char as first character
- * 2. Must not have white space characters present in the string.
+ * 2. Must not be ONLY the '-' char
+ * 3. Must not have white space characters present in the string.
*/
HIDDEN int
can_be_opt(const char *opt)
@@ -684,6 +685,8 @@
return 0;
if (opt[0] != '-')
return 0;
+ if (BU_STR_EQUAL(opt, "-"))
+ return 0;
for (i = 1; i < strlen(opt); i++) {
if (isspace(opt[i]))
return 0;
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