summaryrefslogtreecommitdiffabout
path: root/include/grecs/symtab.h
Unidiff
Diffstat (limited to 'include/grecs/symtab.h') (more/less context) (ignore whitespace changes)
-rw-r--r--include/grecs/symtab.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/include/grecs/symtab.h b/include/grecs/symtab.h
index a4a7106..3008b17 100644
--- a/include/grecs/symtab.h
+++ b/include/grecs/symtab.h
@@ -17,7 +17,8 @@
17#ifndef _GRECS_SYMTAB_H 17#ifndef _GRECS_SYMTAB_H
18#define _GRECS_SYMTAB_H 18#define _GRECS_SYMTAB_H
19 19
20typedef struct grecs_symtab *grecs_symtab_t; 20typedef struct grecs_symtab *grecs_symtab_ptr_t;
21typedef struct grecs_syment *grecs_syment_ptr_t;
21 22
22struct grecs_syment { 23struct grecs_syment {
23 char *name; 24 char *name;
@@ -27,24 +28,24 @@ typedef int (*grecs_symtab_enumerator_t)(void *sym, void *data);
27 28
28const char *grecs_symtab_strerror(int rc); 29const char *grecs_symtab_strerror(int rc);
29 30
30void *grecs_symtab_lookup_or_install(grecs_symtab_t st, 31void *grecs_symtab_lookup_or_install(grecs_symtab_ptr_t st,
31 void *key, int *install); 32 void *key, int *install);
32void grecs_symtab_clear(grecs_symtab_t st); 33void grecs_symtab_clear(grecs_symtab_ptr_t st);
33grecs_symtab_t grecs_symtab_create(size_t elsize, 34grecs_symtab_ptr_t grecs_symtab_create(size_t elsize,
34 unsigned (*hash_fun)(void *, unsigned long), 35 unsigned (*hash_fun)(void *, unsigned long),
35 int (*cmp_fun)(const void *, const void *), 36 int (*cmp_fun)(const void *, const void *),
36 int (*copy_fun)(void *, void *), 37 int (*copy_fun)(void *, void *),
37 void *(*alloc_fun)(size_t), 38 void *(*alloc_fun)(size_t),
38 void (*free_fun)(void *)); 39 void (*free_fun)(void *));
39grecs_symtab_t grecs_symtab_create_default(size_t elsize); 40grecs_symtab_ptr_t grecs_symtab_create_default(size_t elsize);
40 41
41void grecs_symtab_free(grecs_symtab_t pst); 42void grecs_symtab_free(grecs_symtab_ptr_t pst);
42int grecs_symtab_remove(grecs_symtab_t st, void *elt); 43int grecs_symtab_remove(grecs_symtab_ptr_t st, void *elt);
43int grecs_symtab_replace(grecs_symtab_t st, void *ent, void **old_ent); 44int grecs_symtab_replace(grecs_symtab_ptr_t st, void *ent, void **old_ent);
44int grecs_symtab_enumerate(grecs_symtab_t st, 45int grecs_symtab_enumerate(grecs_symtab_ptr_t st,
45 grecs_symtab_enumerator_t fun, void *data); 46 grecs_symtab_enumerator_t fun, void *data);
46 47
47size_t grecs_symtab_count_entries(grecs_symtab_t st); 48size_t grecs_symtab_count_entries(grecs_symtab_ptr_t st);
48 49
49unsigned grecs_hash_string(const char *name, unsigned long hashsize); 50unsigned grecs_hash_string(const char *name, unsigned long hashsize);
50unsigned grecs_hash_string_ci(const char *name, unsigned long hashsize); 51unsigned grecs_hash_string_ci(const char *name, unsigned long hashsize);

Return to:

Send suggestions and report system problems to the System administrator.