summaryrefslogtreecommitdiff
path: root/src/lib/utils.h
blob: 64e2787de20a87df561cda24bf13a5a99c5b69b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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