]> git.cworth.org Git - wordgame/blobdiff - dict.h
grid: Don't consider 2-letter words as valid.
[wordgame] / dict.h
diff --git a/dict.h b/dict.h
index ca0e6f6e9a209efe442a3ea8083e0d2480cc7e1b..af21015650d906b7e7e9e0c2de6f86c6f4329d7c 100644 (file)
--- a/dict.h
+++ b/dict.h
 #ifndef _DICT_H_
 #define _DICT_H_
 
+/* Portably, schmortability. I want ease of programming. */
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
 #include <stdint.h>
 
 #ifndef FALSE
@@ -70,7 +74,9 @@ dict_count (dict_t                    *dict,
 /* Querying a dictionary entry. The dict interface uses 1 bit.
  * All of the remaining bits are available for application use.
  */
-#define DICT_ENTRY_IS_WORD(entry) ((entry) && ((*entry) & 0x01))
+#define DICT_ENTRY_FLAG_IS_WORD                (1<<0)
+
+#define DICT_ENTRY_IS_WORD(entry) ((entry) && ((*entry) & DICT_ENTRY_FLAG_IS_WORD))
 
 /* Printing the dictionary */
 int