|
@@ -30,6 +30,24 @@ typedef enum {
|
|
|
TRI_TRUE = 1
|
|
|
} tri_t;
|
|
|
|
|
|
+/**
|
|
|
+ * Converts a string to a tri
|
|
|
+ *
|
|
|
+ * "true" yields TRI_TRUE.
|
|
|
+ * "false" yields TRI_FALSE.
|
|
|
+ * Anything else is TRI_FALSE.
|
|
|
+ */
|
|
|
+tri_t lub_tri_from_string(const char *s);
|
|
|
+
|
|
|
+/**
|
|
|
+ * Reduce a tri to bool using a default value
|
|
|
+ *
|
|
|
+ * Will return D if T == TRI_UNDEFINED.
|
|
|
+ *
|
|
|
+ * Returns boolean value of T otherwise.
|
|
|
+ */
|
|
|
+bool_t lub_tri_default(tri_t t, bool_t d);
|
|
|
+
|
|
|
|
|
|
/** @} */
|
|
|
#endif /* _lub_types_h */
|