Revision: 68964
http://sourceforge.net/p/brlcad/code/68964
Author: starseeker
Date: 2016-10-01 15:45:41 +0000 (Sat, 01 Oct 2016)
Log Message:
-----------
revert r68707 until we can determine why it's breaking the spdi, solid and
shader regression tests.
Revision Links:
--------------
http://sourceforge.net/p/brlcad/code/68707
Modified Paths:
--------------
brlcad/trunk/src/libbu/booleanize.c
Modified: brlcad/trunk/src/libbu/booleanize.c
===================================================================
--- brlcad/trunk/src/libbu/booleanize.c 2016-10-01 04:02:53 UTC (rev 68963)
+++ brlcad/trunk/src/libbu/booleanize.c 2016-10-01 15:45:41 UTC (rev 68964)
@@ -58,27 +58,32 @@
return 0;
}
- /* case-insensitive "false" */
- if (BU_STR_EQUIV(newstr, "false")) {
+ /* exactly "f" or "F" (for false) */
+ if (BU_STR_EQUIV(newstr, "f")) {
bu_vls_free(&vls);
return 0;
}
- /* case-insensitive "off" */
- if (BU_STR_EQUIV(newstr, "off")) {
+ /* exact case insensitive match for "false" */
+ if (BU_STR_EQUIV(newstr, "false")) {
bu_vls_free(&vls);
return 0;
}
+ /* exactly "0" */
+ if (BU_STR_EQUAL(newstr, "0")) {
+ bu_vls_free(&vls);
+ return 0;
+ }
- /* any variant of "0" (e.g., 000) */
+ /* variant of "0" (e.g., 000) */
val = strtol(newstr, &endptr, 10);
if (val == 0 && errno != EINVAL && *endptr == '\0') {
bu_vls_free(&vls);
return 0;
}
- /* case-insensitive "(null)" */
- if (BU_STR_EQUIV(newstr, "(null)")) {
+ /* exactly "(null)" */
+ if (BU_STR_EQUAL(newstr, "(null)")) {
bu_vls_free(&vls);
return 0;
}
@@ -91,14 +96,20 @@
return 1;
}
- /* case-insensitive "true" */
+ /* exactly "t" or "T" (for true) */
+ if (BU_STR_EQUIV(newstr, "t")) {
+ bu_vls_free(&vls);
+ return 1;
+ }
+
+ /* exact case insensitive match for "true" */
if (BU_STR_EQUIV(newstr, "true")) {
bu_vls_free(&vls);
return 1;
}
- /* case-insensitive "on" */
- if (BU_STR_EQUIV(newstr, "on")) {
+ /* exactly "1" */
+ if (BU_STR_EQUAL(newstr, "1")) {
bu_vls_free(&vls);
return 1;
}
@@ -115,7 +126,9 @@
bu_vls_free(&vls);
/* anything else */
- return (int)val;
+ if ((int)val > 1)
+ return (int)val;
+ return 2;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits