diff --git a/mwparserfromhell/parser/ctokenizer/avl_tree.c b/mwparserfromhell/parser/ctokenizer/avl_tree.c index 4fdff6f..dd034b2 100644 --- a/mwparserfromhell/parser/ctokenizer/avl_tree.c +++ b/mwparserfromhell/parser/ctokenizer/avl_tree.c @@ -3,6 +3,7 @@ * binary search tree), implementation file * * Written in 2014-2016 by Eric Biggers + * Slight changes for compatibility by Ben Kurtovic * * To the extent possible under law, the author(s) have dedicated all copyright * and related and neighboring rights to this software to the public domain @@ -17,6 +18,11 @@ * see . */ +#define false 0 +#define true 1 + +typedef int bool; + #include "avl_tree.h" /* Returns the left child (sign < 0) or the right child (sign > 0) of the diff --git a/mwparserfromhell/parser/ctokenizer/avl_tree.h b/mwparserfromhell/parser/ctokenizer/avl_tree.h index 86ade3f..86e2c75 100644 --- a/mwparserfromhell/parser/ctokenizer/avl_tree.h +++ b/mwparserfromhell/parser/ctokenizer/avl_tree.h @@ -3,6 +3,7 @@ * binary search tree), header file * * Written in 2014-2016 by Eric Biggers + * Slight changes for compatibility by Ben Kurtovic * * To the extent possible under law, the author(s) have dedicated all copyright * and related and neighboring rights to this software to the public domain @@ -20,7 +21,6 @@ #ifndef _AVL_TREE_H_ #define _AVL_TREE_H_ -#include #include #include /* for uintptr_t */ @@ -78,7 +78,7 @@ avl_tree_node_set_unlinked(struct avl_tree_node *node) /* Returns true iff the specified AVL tree node has been marked with * avl_tree_node_set_unlinked() and has not subsequently been inserted into a * tree. */ -static AVL_INLINE bool +static AVL_INLINE int avl_tree_node_is_unlinked(const struct avl_tree_node *node) { return node->parent_balance == (uintptr_t)node;