--- deliantra/server/include/shstr.h 2006/02/03 07:12:50 1.1 +++ deliantra/server/include/shstr.h 2006/08/29 08:01:36 1.3 @@ -1,3 +1,6 @@ +#ifndef SHSTR_H__ +#define SHSTR_H__ + /* The size of the shared strings hashtable. This must be smaller than * 32767, but 947 ought to be plenty enough. */ @@ -54,8 +57,8 @@ typedef struct _shared_string { union { - struct _shared_string **array; - struct _shared_string *previous; + struct _shared_string **array; + struct _shared_string *previous; } u; struct _shared_string *next; /* The top bit of "refcount" is used to signify that "u.array" points @@ -68,3 +71,16 @@ */ char string[PADDING]; } shared_string; + +extern void init_hash_table(void); +extern const char *add_string(const char *str); +extern const char *add_refcount(const char *str); +extern int query_refcount(const char *str); +extern const char *find_string(const char *str); +extern void free_string(const char *str); +extern void ss_dump_statistics(void); +extern const char *ss_dump_table(int what); +extern int buf_overflow(const char *buf1, const char *buf2, int bufsize); + +#endif +