]> jfr.im git - irc/quakenet/newserv.git/blame - lib/sstring-new.h
fix last 2 warnings
[irc/quakenet/newserv.git] / lib / sstring-new.h
CommitLineData
855548e6 1/* sstring.h - Declaration of "static strings" functions */
2
3#ifndef __SSTRING_H
4#define __SSTRING_H
5
6/* Externally visibly max string length */
7#define SSTRING_MAX 512
8
48866b49 9/* you can actually change USE_VALGRIND here without recompiling! */
855548e6 10typedef struct sstring {
11 short length;
12 short alloc;
13 struct sstring *next;
48866b49
CP
14#ifdef USE_VALGRIND
15 void *block;
16#endif
17 unsigned long refcount;
855548e6 18 char content[];
19} sstring;
20
21#ifdef COMPILING_SSTRING
22
23/* Internal defines */
24
25/* SSTRING_MAXLEN is the internal version of SSTRING_MAX which includes
26 * space for the trailing NUL */
27#define SSTRING_MAXLEN (SSTRING_MAX + 1)
28#define SSTRING_SLACK 8
29#define SSTRING_ALLOC 16384
30
31#define SSTRING_HASHSIZE 85243
32
33#endif /* COMPILING_SSTRING */
34
35sstring *getsstring(const char *, int);
36void freesstring(sstring *);
37int sstringcompare(sstring *ss1, sstring *ss2);
38void initsstring();
39void finisstring();
40
41#endif /* __SSTRING_H */