aboutsummaryrefslogtreecommitdiff
path: root/contrib/tsearch2/tsvector.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-04-02 00:41:18 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-04-02 00:41:18 +0000
commit89ee5b89a6e82a6b0a5a44bb5d2776372614e01c (patch)
tree1521a03d3f4aa7720ae28899ecf0e96cead6cb13 /contrib/tsearch2/tsvector.c
parenteeaef25ad6824d4bfceeec650be8dbbbd455eb37 (diff)
downloadpostgresql-89ee5b89a6e82a6b0a5a44bb5d2776372614e01c.tar.gz
postgresql-89ee5b89a6e82a6b0a5a44bb5d2776372614e01c.zip
Fix some more compatibility issues (ctype.h macros must never be passed
signed chars...)
Diffstat (limited to 'contrib/tsearch2/tsvector.c')
-rw-r--r--contrib/tsearch2/tsvector.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/tsearch2/tsvector.c b/contrib/tsearch2/tsvector.c
index cc2e96c2257..827627b068d 100644
--- a/contrib/tsearch2/tsvector.c
+++ b/contrib/tsearch2/tsvector.c
@@ -310,7 +310,7 @@ gettoken_tsvector(TI_IN_STATE * state)
}
else if (state->state == INPOSINFO)
{
- if (isdigit(*(state->prsbuf)))
+ if (isdigit((unsigned char) *(state->prsbuf)))
{
if (state->alen == 0)
{
@@ -373,9 +373,10 @@ gettoken_tsvector(TI_IN_STATE * state)
errmsg("syntax error")));
state->pos[*(uint16 *) (state->pos)].weight = 0;
}
- else if (isspace(*(state->prsbuf)) || *(state->prsbuf) == '\0')
+ else if (isspace((unsigned char) *(state->prsbuf)) ||
+ *(state->prsbuf) == '\0')
return 1;
- else if (!isdigit(*(state->prsbuf)))
+ else if (!isdigit((unsigned char) *(state->prsbuf)))
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("syntax error")));