PostgreSQL Source Code
git master
Loading...
Searching...
No Matches
regis.h
Go to the documentation of this file.
1
/*-------------------------------------------------------------------------
2
*
3
* regis.h
4
*
5
* Declarations for fast regex subset, used by ISpell
6
*
7
* Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
8
*
9
* src/include/tsearch/dicts/regis.h
10
*
11
*-------------------------------------------------------------------------
12
*/
13
14
#ifndef __REGIS_H__
15
#define __REGIS_H__
16
17
typedef
struct
RegisNode
18
{
19
uint32
20
type
:2,
21
len
:16,
22
unused
:14;
23
struct
RegisNode
*
next
;
24
unsigned
char
data
[
FLEXIBLE_ARRAY_MEMBER
];
25
}
RegisNode
;
26
27
#define RNHDRSZ (offsetof(RegisNode,data))
28
29
#define RSF_ONEOF 1
30
#define RSF_NONEOF 2
31
32
typedef
struct
Regis
33
{
34
RegisNode
*
node
;
35
uint32
36
issuffix
:1,
37
nchar
:16,
38
unused
:15;
39
}
Regis
;
40
41
extern
bool
RS_isRegis
(
const
char
*
str
);
42
43
extern
void
RS_compile
(
Regis
*r,
bool
issuffix,
const
char
*
str
);
44
extern
void
RS_free
(
Regis
*r);
45
46
/*returns true if matches */
47
extern
bool
RS_execute
(
Regis
*r,
char
*
str
);
48
49
#endif
FLEXIBLE_ARRAY_MEMBER
#define FLEXIBLE_ARRAY_MEMBER
Definition
c.h:480
uint32
uint32_t uint32
Definition
c.h:546
str
const char * str
Definition
hashfn_unstable.h:261
RS_compile
void RS_compile(Regis *r, bool issuffix, const char *str)
Definition
regis.c:85
RS_execute
bool RS_execute(Regis *r, char *str)
Definition
regis.c:213
RS_isRegis
bool RS_isRegis(const char *str)
Definition
regis.c:31
RS_free
void RS_free(Regis *r)
Definition
regis.c:166
RegisNode
Definition
regis.h:18
RegisNode::data
unsigned char data[FLEXIBLE_ARRAY_MEMBER]
Definition
regis.h:24
RegisNode::len
uint32 len
Definition
regis.h:21
RegisNode::next
struct RegisNode * next
Definition
regis.h:23
RegisNode::unused
uint32 unused
Definition
regis.h:22
RegisNode::type
uint32 type
Definition
regis.h:20
Regis
Definition
regis.h:33
Regis::issuffix
uint32 issuffix
Definition
regis.h:36
Regis::unused
uint32 unused
Definition
regis.h:38
Regis::node
RegisNode * node
Definition
regis.h:34
Regis::nchar
uint32 nchar
Definition
regis.h:37
src
include
tsearch
dicts
regis.h
Generated on Sun Feb 1 2026 12:13:16 for PostgreSQL Source Code by
1.9.8