summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/pdftexdir/avl.h
diff options
context:
space:
mode:
authorMartin Schröder <martin@oneiros.de>2007-01-31 21:21:03 +0000
committerMartin Schröder <martin@oneiros.de>2007-01-31 21:21:03 +0000
commit0a561962a632af39cb4d18a69f6ac0f7509e3453 (patch)
tree5a46cd7cdc20cabf3a4539a3340b1146857143ea /Build/source/texk/web2c/pdftexdir/avl.h
parentfbd7c58833aeabafd2bd9f2d85fe1e3e13ac2302 (diff)
pdftex 1.40.2
git-svn-id: svn://tug.org/texlive/trunk@3839 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/pdftexdir/avl.h')
-rw-r--r--Build/source/texk/web2c/pdftexdir/avl.h147
1 files changed, 72 insertions, 75 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/avl.h b/Build/source/texk/web2c/pdftexdir/avl.h
index c993ee01f26..b9f9e3c01a9 100644
--- a/Build/source/texk/web2c/pdftexdir/avl.h
+++ b/Build/source/texk/web2c/pdftexdir/avl.h
@@ -1,7 +1,7 @@
-/* Produced by texiweb from libavl.w on 2003/01/06 at 18:07. */
+/* Produced by texiweb from libavl.w. */
/* libavl - library for manipulation of binary trees.
- Copyright (C) 1998-2002 Free Software Foundation, Inc.
+ Copyright (C) 1998-2002, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -24,95 +24,92 @@
*/
#ifndef AVL_H
-# define AVL_H 1
-
-# include <stddef.h>
-# if defined(__cplusplus)
-extern "C" {
-# endif
+#define AVL_H 1
+#include <stddef.h>
/* Function types. */
- typedef int avl_comparison_func(const void *avl_a, const void *avl_b,
- void *avl_param);
- typedef void avl_item_func(void *avl_item, void *avl_param);
- typedef void *avl_copy_func(void *avl_item, void *avl_param);
+typedef int avl_comparison_func (const void *avl_a, const void *avl_b,
+ void *avl_param);
+typedef void avl_item_func (void *avl_item, void *avl_param);
+typedef void *avl_copy_func (void *avl_item, void *avl_param);
-# ifndef LIBAVL_ALLOCATOR
-# define LIBAVL_ALLOCATOR
+#ifndef LIBAVL_ALLOCATOR
+#define LIBAVL_ALLOCATOR
/* Memory allocator. */
- struct libavl_allocator {
- void *(*libavl_malloc) (struct libavl_allocator *, size_t libavl_size);
- void (*libavl_free) (struct libavl_allocator *, void *libavl_block);
- };
-# endif
+struct libavl_allocator
+ {
+ void *(*libavl_malloc) (struct libavl_allocator *, size_t libavl_size);
+ void (*libavl_free) (struct libavl_allocator *, void *libavl_block);
+ };
+#endif
/* Default memory allocator. */
- extern struct libavl_allocator avl_allocator_default;
- void *avl_malloc(struct libavl_allocator *, size_t);
- void avl_free(struct libavl_allocator *, void *);
+extern struct libavl_allocator avl_allocator_default;
+void *avl_malloc (struct libavl_allocator *, size_t);
+void avl_free (struct libavl_allocator *, void *);
/* Maximum AVL height. */
-# ifndef AVL_MAX_HEIGHT
-# define AVL_MAX_HEIGHT 32
-# endif
+#ifndef AVL_MAX_HEIGHT
+#define AVL_MAX_HEIGHT 32
+#endif
/* Tree data structure. */
- struct avl_table {
- struct avl_node *avl_root; /* Tree's root. */
- avl_comparison_func *avl_compare; /* Comparison function. */
- void *avl_param; /* Extra argument to |avl_compare|. */
- struct libavl_allocator *avl_alloc; /* Memory allocator. */
- size_t avl_count; /* Number of items in tree. */
- unsigned long avl_generation; /* Generation number. */
- };
+struct avl_table
+ {
+ struct avl_node *avl_root; /* Tree's root. */
+ avl_comparison_func *avl_compare; /* Comparison function. */
+ void *avl_param; /* Extra argument to |avl_compare|. */
+ struct libavl_allocator *avl_alloc; /* Memory allocator. */
+ size_t avl_count; /* Number of items in tree. */
+ unsigned long avl_generation; /* Generation number. */
+ };
/* An AVL tree node. */
- struct avl_node {
- struct avl_node *avl_link[2]; /* Subtrees. */
- void *avl_data; /* Pointer to data. */
- signed char avl_balance; /* Balance factor. */
- };
+struct avl_node
+ {
+ struct avl_node *avl_link[2]; /* Subtrees. */
+ void *avl_data; /* Pointer to data. */
+ signed char avl_balance; /* Balance factor. */
+ };
/* AVL traverser structure. */
- struct avl_traverser {
- struct avl_table *avl_table; /* Tree being traversed. */
- struct avl_node *avl_node; /* Current node in tree. */
- struct avl_node *avl_stack[AVL_MAX_HEIGHT];
- /* All the nodes above |avl_node|. */
- size_t avl_height; /* Number of nodes in |avl_parent|. */
- unsigned long avl_generation; /* Generation number. */
- };
+struct avl_traverser
+ {
+ struct avl_table *avl_table; /* Tree being traversed. */
+ struct avl_node *avl_node; /* Current node in tree. */
+ struct avl_node *avl_stack[AVL_MAX_HEIGHT];
+ /* All the nodes above |avl_node|. */
+ size_t avl_height; /* Number of nodes in |avl_parent|. */
+ unsigned long avl_generation; /* Generation number. */
+ };
/* Table functions. */
- struct avl_table *avl_create(avl_comparison_func *, void *,
- struct libavl_allocator *);
- struct avl_table *avl_copy(const struct avl_table *, avl_copy_func *,
- avl_item_func *, struct libavl_allocator *);
- void avl_destroy(struct avl_table *, avl_item_func *);
- void **avl_probe(struct avl_table *, void *);
- void *avl_insert(struct avl_table *, void *);
- void *avl_replace(struct avl_table *, void *);
- void *avl_delete(struct avl_table *, const void *);
- void *avl_find(const struct avl_table *, const void *);
- void avl_assert_insert(struct avl_table *, void *);
- void *avl_assert_delete(struct avl_table *, void *);
-
-# define avl_count(table) ((size_t) (table)->avl_count)
+struct avl_table *avl_create (avl_comparison_func *, void *,
+ struct libavl_allocator *);
+struct avl_table *avl_copy (const struct avl_table *, avl_copy_func *,
+ avl_item_func *, struct libavl_allocator *);
+void avl_destroy (struct avl_table *, avl_item_func *);
+void **avl_probe (struct avl_table *, void *);
+void *avl_insert (struct avl_table *, void *);
+void *avl_replace (struct avl_table *, void *);
+void *avl_delete (struct avl_table *, const void *);
+void *avl_find (const struct avl_table *, const void *);
+void avl_assert_insert (struct avl_table *, void *);
+void *avl_assert_delete (struct avl_table *, void *);
+
+#define avl_count(table) ((size_t) (table)->avl_count)
/* Table traverser functions. */
- void avl_t_init(struct avl_traverser *, struct avl_table *);
- void *avl_t_first(struct avl_traverser *, struct avl_table *);
- void *avl_t_last(struct avl_traverser *, struct avl_table *);
- void *avl_t_find(struct avl_traverser *, struct avl_table *, void *);
- void *avl_t_insert(struct avl_traverser *, struct avl_table *, void *);
- void *avl_t_copy(struct avl_traverser *, const struct avl_traverser *);
- void *avl_t_next(struct avl_traverser *);
- void *avl_t_prev(struct avl_traverser *);
- void *avl_t_cur(struct avl_traverser *);
- void *avl_t_replace(struct avl_traverser *, void *);
-
-# if defined(__cplusplus)
-}
-# endif
-#endif /* avl.h */
+void avl_t_init (struct avl_traverser *, struct avl_table *);
+void *avl_t_first (struct avl_traverser *, struct avl_table *);
+void *avl_t_last (struct avl_traverser *, struct avl_table *);
+void *avl_t_find (struct avl_traverser *, struct avl_table *, void *);
+void *avl_t_insert (struct avl_traverser *, struct avl_table *, void *);
+void *avl_t_copy (struct avl_traverser *, const struct avl_traverser *);
+void *avl_t_next (struct avl_traverser *);
+void *avl_t_prev (struct avl_traverser *);
+void *avl_t_cur (struct avl_traverser *);
+void *avl_t_replace (struct avl_traverser *, void *);
+
+#endif /* avl.h */