]> jfr.im git - irc/quakenet/newserv.git/blob - lib/sstring-new.h
ident comparision should use strcmp
[irc/quakenet/newserv.git] / lib / sstring-new.h
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
9 /* you can actually change USE_VALGRIND here without recompiling! */
10 typedef struct sstring {
11 short length;
12 short alloc;
13 struct sstring *next;
14 #ifdef USE_VALGRIND
15 void *block;
16 #endif
17 unsigned long refcount;
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
35 sstring *getsstring(const char *, int);
36 void freesstring(sstring *);
37 int sstringcompare(sstring *ss1, sstring *ss2);
38 void initsstring();
39 void finisstring();
40
41 #endif /* __SSTRING_H */