]> jfr.im git - irc/quakenet/newserv.git/blame - lib/sstring.h
Merged revisions 303 via svnmerge from
[irc/quakenet/newserv.git] / lib / sstring.h
CommitLineData
c86edd1d
Q
1/* sstring.h - Declaration of "static strings" functions */
2
3#ifndef __SSTRING_H
4#define __SSTRING_H
5
6#ifdef COMPILING_SSTRING
7/* Internal version of structure */
8typedef struct {
9 char *content;
10 union {
11 struct {
12 short length;
13 short alloc;
14 } l;
15 void *next;
16 } u;
17} sstring;
18
19/* Internal defines */
20
21#define SSTRING_MAXLEN 513
22#define SSTRING_SLACK 8
23#define SSTRING_STRUCTALLOC 4096
24#define SSTRING_DATAALLOC 4096
25
26#else
27/* External (simpler) version */
28
29typedef struct {
30 char *content;
31 short length;
32} sstring;
33
34#endif /* COMPILING_SSTRING */
35
36sstring *getsstring(const char *, int);
37void freesstring(sstring *);
38int sstringcompare(sstring *ss1, sstring *ss2);
39void initsstring();
40
41#endif /* __SSTRING_H */