piler/src/hash.h

22 lines
463 B
C
Raw Normal View History

2013-08-09 10:13:54 +02:00
/*
* hash.h, SJ
*/
#ifndef _HASH_H
#define _HASH_H
#include "cfg.h"
#include "defs.h"
void inithash(struct node *xhash[]);
void clearhash(struct node *xhash[]);
2016-04-05 21:10:09 +02:00
struct node *makenewnode(char *s);
2013-08-09 10:13:54 +02:00
int addnode(struct node *xhash[], char *s);
struct node *findnode(struct node *xhash[], char *s);
2013-08-22 00:33:39 +02:00
int is_substr_in_hash(struct node *xhash[], char *s);
2013-08-09 10:13:54 +02:00
inline int hash(unsigned int key);
unsigned int DJBHash(char* str, unsigned int len);
#endif /* _HASH_H */