along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
/* Specification. */
#include "gl_avltree_oset.h"
gl_tree_add_first (gl_oset_t set, const void *elt)
{
/* Create new node. */
- gl_oset_node_t new_node =
- (struct gl_oset_node_impl *) xmalloc (sizeof (struct gl_oset_node_impl));
+ gl_oset_node_t new_node = XMALLOC (struct gl_oset_node_impl);
new_node->left = NULL;
new_node->right = NULL;
gl_tree_add_before (gl_oset_t set, gl_oset_node_t node, const void *elt)
{
/* Create new node. */
- gl_oset_node_t new_node =
- (struct gl_oset_node_impl *) xmalloc (sizeof (struct gl_oset_node_impl));
+ gl_oset_node_t new_node = XMALLOC (struct gl_oset_node_impl);
bool height_inc;
new_node->left = NULL;
gl_tree_add_after (gl_oset_t set, gl_oset_node_t node, const void *elt)
{
/* Create new node. */
- gl_oset_node_t new_node =
- (struct gl_oset_node_impl *) xmalloc (sizeof (struct gl_oset_node_impl));
+ gl_oset_node_t new_node = XMALLOC (struct gl_oset_node_impl);
bool height_inc;
new_node->left = NULL;
gl_tree_create_empty,
gl_tree_size,
gl_tree_search,
+ gl_tree_search_atleast,
gl_tree_add,
gl_tree_remove,
gl_tree_oset_free,