{
if (state == CS_WAITKEY)
{
- if (isalpha(*ptr))
+ if (isalpha((unsigned char) *ptr))
{
begin = ptr;
state = CS_INKEY;
}
- else if (!isspace(*ptr))
+ else if (!isspace((unsigned char) *ptr))
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("syntax error"),
}
else if (state == CS_INKEY)
{
- if (isspace(*ptr))
+ if (isspace((unsigned char) *ptr))
{
mptr->key = nstrdup(begin, ptr - begin);
state = CS_WAITEQ;
mptr->key = nstrdup(begin, ptr - begin);
state = CS_WAITVALUE;
}
- else if (!isalpha(*ptr))
+ else if (!isalpha((unsigned char) *ptr))
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("syntax error"),
{
if (*ptr == '=')
state = CS_WAITVALUE;
- else if (!isspace(*ptr))
+ else if (!isspace((unsigned char) *ptr))
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("syntax error"),
begin = ptr + 1;
state = CS_INVALUE;
}
- else if (!isspace(*ptr))
+ else if (!isspace((unsigned char) *ptr))
{
begin = ptr;
state = CS_IN2VALUE;
}
else if (state == CS_IN2VALUE)
{
- if (isspace(*ptr) || *ptr == ',')
+ if (isspace((unsigned char) *ptr) || *ptr == ',')
{
mptr->value = nstrdup(begin, ptr - begin);
mptr++;
{
if (*ptr == ',')
state = CS_WAITKEY;
- else if (!isspace(*ptr))
+ else if (!isspace((unsigned char) *ptr))
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("syntax error"),
}
else if (state->state == INPOSINFO)
{
- if (isdigit(*(state->prsbuf)))
+ if (isdigit((unsigned char) *(state->prsbuf)))
{
if (state->alen == 0)
{
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")));