Skip to content

Commit aa6970e

Browse files
committed
Fix some portability problems (get it to compile, at least, on HP's cc)
1 parent 1e27791 commit aa6970e

File tree

1 file changed

+8
-4
lines changed
  • contrib/fulltextindex

1 file changed

+8
-4
lines changed

contrib/fulltextindex/fti.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,17 @@ static bool is_stopword(char *);
9595
static bool new_tuple = false;
9696

9797

98+
#ifdef USE_STOP_WORDS
99+
98100
/* THIS LIST MUST BE IN SORTED ORDER, A BINARY SEARCH IS USED!!!! */
99101
char *StopWords[] = { /* list of words to skip in indexing */
100-
#ifdef SAMPLE_STOP_WORDS
101-
"no"
102+
"no",
102103
"the",
103-
"yes",
104-
#endif
104+
"yes"
105105
};
106106

107+
#endif /* USE_STOP_WORDS */
108+
107109
/* stuff for caching query-plans, stolen from contrib/spi/\*.c */
108110
typedef struct
109111
{
@@ -385,6 +387,7 @@ breakup(char *string, char *substring)
385387
static bool
386388
is_stopword(char *text)
387389
{
390+
#ifdef USE_STOP_WORDS
388391
char **StopLow; /* for list of stop-words */
389392
char **StopHigh;
390393
char **StopMiddle;
@@ -406,6 +409,7 @@ is_stopword(char *text)
406409
else
407410
StopHigh = StopMiddle;
408411
}
412+
#endif /* USE_STOP_WORDS */
409413

410414
return (false);
411415
}

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