Browse Source

Tri-state boolean tri_t type

Serj Kalichev 3 years ago
parent
commit
76f6b864d9
1 changed files with 11 additions and 0 deletions
  1. 11 0
      lub/types.h

+ 11 - 0
lub/types.h

@@ -20,5 +20,16 @@ typedef enum {
 	BOOL_TRUE
 } bool_t;
 
+/**
+ * A tri-state boolean. The possible values are
+ * TRI_FALSE, TRI_TRUE, TRI_UNDEFINED.
+ */
+typedef enum {
+       TRI_UNDEFINED = -1,
+       TRI_FALSE = 0,
+       TRI_TRUE = 1
+} tri_t;
+
+
 /** @} */
 #endif				/* _lub_types_h */