Przeglądaj źródła

faux: Add tri_t Tri-state boolean

Serj Kalichev 3 lat temu
rodzic
commit
9a6d0362aa
1 zmienionych plików z 11 dodań i 0 usunięć
  1. 11 0
      faux/faux.h

+ 11 - 0
faux/faux.h

@@ -20,6 +20,17 @@ typedef enum {
 } 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;
+
+
 /** @def C_DECL_BEGIN
  * This macro can be used instead standard preprocessor
  * directive like this: