len = strlen(var_name);
- if (!isalpha((int)var_name[0]) && var_name[0] != '_')
+ if (!isalpha((int)((unsigned char *)var_name)[0]) && var_name[0] != '_')
return 0;
if (len > 1) {
for (i=1; i<len; i++) {
- if (!isalnum((int)var_name[i]) && var_name[i] != '_') {
+ if (!isalnum((int)((unsigned char *)var_name)[i]) && var_name[i] != '_') {
return 0;
}
}
from_table = NULL;
to_table = NULL;
- switch (toupper(from))
+ switch (toupper((int)(unsigned char)from))
{
case 'W':
from_table = _cyr_win1251;
break;
}
- switch (toupper(to))
+ switch (toupper((int)(unsigned char)to))
{
case 'W':
to_table = _cyr_win1251;
} else if (type == 2) {
/* strip trailing whitespaces */
l = bufl;
- while (l-- && isspace(buf[l]));
+ while (l-- && isspace(((unsigned char *)buf)[l]));
if (l != (bufl - 1)) {
bufl = l + 1;
buf[bufl] = '\0';
/* strip trailing whitespaces if we have not done so already */
if (type != 2) {
l = bufl;
- while (l-- && isspace(buf[l]));
+ while (l-- && isspace(((unsigned char *)buf)[l]));
if (l != (bufl - 1)) {
bufl = l + 1;
buf[bufl] = '\0';
ctx->tag.len = 0;
smart_str_appendl(&ctx->tag, start, YYCURSOR - start);
for (i = 0; i < ctx->tag.len; i++)
- ctx->tag.c[i] = tolower(ctx->tag.c[i]);
+ ctx->tag.c[i] = tolower((int)(unsigned char)ctx->tag.c[i]);
if (zend_hash_find(ctx->tags, ctx->tag.c, ctx->tag.len, (void **) &ctx->lookup_data) == SUCCESS)
ok = 1;
STATE = ok ? STATE_NEXT_ARG : STATE_PLAIN;