aboutsummaryrefslogtreecommitdiff
path: root/contrib/tsearch2/ts_cfg.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/tsearch2/ts_cfg.h')
-rw-r--r--contrib/tsearch2/ts_cfg.h111
1 files changed, 59 insertions, 52 deletions
diff --git a/contrib/tsearch2/ts_cfg.h b/contrib/tsearch2/ts_cfg.h
index 01006c1f93c..cde35ca2a6e 100644
--- a/contrib/tsearch2/ts_cfg.h
+++ b/contrib/tsearch2/ts_cfg.h
@@ -3,66 +3,73 @@
#include "postgres.h"
#include "query.h"
-typedef struct {
- int len;
- Datum *dict_id;
-} ListDictionary;
+typedef struct
+{
+ int len;
+ Datum *dict_id;
+} ListDictionary;
-typedef struct {
- Oid id;
- Oid prs_id;
- int len;
- ListDictionary *map;
+typedef struct
+{
+ Oid id;
+ Oid prs_id;
+ int len;
+ ListDictionary *map;
} TSCfgInfo;
-Oid name2id_cfg(text *name);
-TSCfgInfo * findcfg(Oid id);
-void init_cfg(Oid id, TSCfgInfo *cfg);
-void reset_cfg(void);
+Oid name2id_cfg(text *name);
+TSCfgInfo *findcfg(Oid id);
+void init_cfg(Oid id, TSCfgInfo * cfg);
+void reset_cfg(void);
-typedef struct {
- uint16 len;
- union {
+typedef struct
+{
+ uint16 len;
+ union
+ {
uint16 pos;
- uint16 *apos;
- } pos;
- char *word;
- uint32 alen;
-} WORD;
-
-typedef struct {
- WORD *words;
- int4 lenwords;
- int4 curwords;
+ uint16 *apos;
+ } pos;
+ char *word;
+ uint32 alen;
+} WORD;
+
+typedef struct
+{
+ WORD *words;
+ int4 lenwords;
+ int4 curwords;
int4 pos;
-} PRSTEXT;
+} PRSTEXT;
+
+typedef struct
+{
+ uint16 len;
+ uint8 selected:1,
+ in:1,
+ skip:1,
+ replace:1,
+ repeated:1;
+ uint8 type;
+ char *word;
+ ITEM *item;
+} HLWORD;
-typedef struct {
- uint16 len;
- uint8 selected:1,
- in:1,
- skip:1,
- replace:1,
- repeated:1;
- uint8 type;
- char *word;
- ITEM *item;
-} HLWORD;
-
-typedef struct {
- HLWORD *words;
- int4 lenwords;
- int4 curwords;
- char *startsel;
- char *stopsel;
- int2 startsellen;
- int2 stopsellen;
-} HLPRSTEXT;
+typedef struct
+{
+ HLWORD *words;
+ int4 lenwords;
+ int4 curwords;
+ char *startsel;
+ char *stopsel;
+ int2 startsellen;
+ int2 stopsellen;
+} HLPRSTEXT;
-void hlparsetext(TSCfgInfo *cfg, HLPRSTEXT * prs, QUERYTYPE *query, char *buf, int4 buflen);
-text* genhl(HLPRSTEXT * prs);
+void hlparsetext(TSCfgInfo * cfg, HLPRSTEXT * prs, QUERYTYPE * query, char *buf, int4 buflen);
+text *genhl(HLPRSTEXT * prs);
-void parsetext_v2(TSCfgInfo *cfg, PRSTEXT * prs, char *buf, int4 buflen);
-int get_currcfg(void);
+void parsetext_v2(TSCfgInfo * cfg, PRSTEXT * prs, char *buf, int4 buflen);
+int get_currcfg(void);
#endif