Skip to content

Commit a0d2f05

Browse files
committed
Improve comments for TSLexeme data structure.
Mostly, clean up long-ago pgindent damage.
1 parent 515e813 commit a0d2f05

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

src/include/tsearch/ts_public.h

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,20 +85,31 @@ extern bool searchstoplist(StopList *s, char *key);
8585
/* return struct for any lexize function */
8686
typedef struct
8787
{
88-
/*
89-
* number of variant of split word , for example Word 'fotballklubber'
90-
* (norwegian) has two varian to split: ( fotball, klubb ) and ( fot,
91-
* ball, klubb ). So, dictionary should return: nvariant lexeme 1 fotball
92-
* 1 klubb 2 fot 2 ball 2 klubb
88+
/*----------
89+
* Number of current variant of split word. For example the Norwegian
90+
* word 'fotballklubber' has two variants to split: ( fotball, klubb )
91+
* and ( fot, ball, klubb ). So, dictionary should return:
92+
*
93+
* nvariant lexeme
94+
* 1 fotball
95+
* 1 klubb
96+
* 2 fot
97+
* 2 ball
98+
* 2 klubb
99+
*
100+
* In general, a TSLexeme will be considered to belong to the same split
101+
* variant as the previous one if they have the same nvariant value.
102+
* The exact values don't matter, only changes from one lexeme to next.
103+
*----------
93104
*/
94105
uint16 nvariant;
95106

96-
uint16 flags;
107+
uint16 flags; /* See flag bits below */
97108

98-
/* C-string */
99-
char *lexeme;
109+
char *lexeme; /* C string */
100110
} TSLexeme;
101111

112+
/* Flag bits that can appear in TSLexeme.flags */
102113
#define TSL_ADDPOS 0x01
103114
#define TSL_PREFIX 0x02
104115
#define TSL_FILTER 0x04

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy