]>
Commit | Line | Data |
---|---|---|
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 */ | |
8 | typedef 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 | ||
29 | typedef struct { | |
30 | char *content; | |
31 | short length; | |
32 | } sstring; | |
33 | ||
34 | #endif /* COMPILING_SSTRING */ | |
35 | ||
36 | sstring *getsstring(const char *, int); | |
37 | void freesstring(sstring *); | |
38 | int sstringcompare(sstring *ss1, sstring *ss2); | |
39 | void initsstring(); | |
40 | ||
41 | #endif /* __SSTRING_H */ |