summaryrefslogtreecommitdiff
path: root/girepository/cmph/fch_buckets.h
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-11-11 15:01:07 -0500
committerColin Walters <walters@verbum.org>2010-12-03 16:03:31 -0500
commit3a94a5e36287072486831eb68bfe43a0e1c8ea78 (patch)
tree59eb83ba02a9acfd7032c2199d6e523e89efe418 /girepository/cmph/fch_buckets.h
parentf6e5defff5a8d8ba83e0b414496d28b5e2361f39 (diff)
downloadgobject-introspection-3a94a5e36287072486831eb68bfe43a0e1c8ea78.tar.gz
Import CMPH 1.0
This will be used for typelib indexing. See README-CMPH-IMPORT.txt for more information.
Diffstat (limited to 'girepository/cmph/fch_buckets.h')
-rw-r--r--girepository/cmph/fch_buckets.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/girepository/cmph/fch_buckets.h b/girepository/cmph/fch_buckets.h
new file mode 100644
index 00000000..2a1b8b2a
--- /dev/null
+++ b/girepository/cmph/fch_buckets.h
@@ -0,0 +1,30 @@
+#ifndef __CMPH_FCH_BUCKETS_H__
+#define __CMPH_FCH_BUCKETS_H__
+
+#include "cmph_types.h"
+typedef struct __fch_buckets_t fch_buckets_t;
+
+fch_buckets_t * fch_buckets_new(cmph_uint32 nbuckets);
+
+cmph_uint8 fch_buckets_is_empty(fch_buckets_t * buckets, cmph_uint32 index);
+
+void fch_buckets_insert(fch_buckets_t * buckets, cmph_uint32 index, char * key, cmph_uint32 length);
+
+cmph_uint32 fch_buckets_get_size(fch_buckets_t * buckets, cmph_uint32 index);
+
+char * fch_buckets_get_key(fch_buckets_t * buckets, cmph_uint32 index, cmph_uint32 index_key);
+
+cmph_uint32 fch_buckets_get_keylength(fch_buckets_t * buckets, cmph_uint32 index, cmph_uint32 index_key);
+
+// returns the size of biggest bucket.
+cmph_uint32 fch_buckets_get_max_size(fch_buckets_t * buckets);
+
+// returns the number of buckets.
+cmph_uint32 fch_buckets_get_nbuckets(fch_buckets_t * buckets);
+
+cmph_uint32 * fch_buckets_get_indexes_sorted_by_size(fch_buckets_t * buckets);
+
+void fch_buckets_print(fch_buckets_t * buckets);
+
+void fch_buckets_destroy(fch_buckets_t * buckets);
+#endif