diff options
Diffstat (limited to 'src/lib/utils.h')
-rw-r--r-- | src/lib/utils.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/utils.h b/src/lib/utils.h new file mode 100644 index 0000000..64e2787 --- /dev/null +++ b/src/lib/utils.h @@ -0,0 +1,19 @@ +#ifndef UTILS_H +#define UTILS_H + +#include "mdb.h" + +// dellist: deletes the provided table +void dellist(tablist_t *list); + +/* hash: calculates the DJB2 hash of a string, + * and returns that mod TABLEN */ +int hash(char *str); + +// clone: clones and returns a pointer to int +int *clone(int n); + +// copytab: copys table src into table dst +tablist_t *copytab(tablist_t *dst, tablist_t *src); + +#endif |