#ifndef _DICT_H_
#define _DICT_H_
-#include "dict-impl.h"
+/* Portably, schmortability. I want ease of programming. */
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+
+#ifndef FALSE
+# define FALSE 0
+#endif
+
+#ifndef TRUE
+# define TRUE 1
+#endif
+
+typedef int bool_t;
+
+typedef struct _trie {
+ uint32_t flags;
+ struct _trie *next[26];
+} trie_t;
-/* Only looks opaque. Perfectly stack-allocatable */
typedef trie_t dict_t;
typedef trie_t *dict_cursor_t;
typedef uint32_t dict_entry_t;
/* 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