]> granicus.if.org Git - postgresql/blob - contrib/tsearch2/snowball/api.h
Reduce WAL activity for page splits:
[postgresql] / contrib / tsearch2 / snowball / api.h
1
2 typedef unsigned char symbol;
3
4 /* Or replace 'char' above with 'short' for 16 bit characters.
5
6    More precisely, replace 'char' with whatever type guarantees the
7    character width you need. Note however that sizeof(symbol) should divide
8    HEAD, defined in header.h as 2*sizeof(int), without remainder, otherwise
9    there is an alignment problem. In the unlikely event of a problem here,
10    consult Martin Porter.
11
12 */
13
14 struct SN_env
15 {
16         symbol     *p;
17         int                     c;
18         int                     a;
19         int                     l;
20         int                     lb;
21         int                     bra;
22         int                     ket;
23         int                     S_size;
24         int                     I_size;
25         int                     B_size;
26         symbol    **S;
27         int                *I;
28         symbol     *B;
29 };
30
31 extern struct SN_env *SN_create_env(int S_size, int I_size, int B_size);
32 extern void SN_close_env(struct SN_env * z);
33
34 extern int      SN_set_current(struct SN_env * z, int size, const symbol * s);