/* skip white space */
do {
c = next_char();
- } while (c != '\0' && isspace(c));
+ } while (c != '\0' && isspace((unsigned char)c));
lexer.tok_start = lexer.curr_pos - 1;
- if (c == '.' || isalpha(c)) {
+ if (c == '.' || isalpha((unsigned char)c)) {
/* command begins here */
int len = 0;
const char* tok_start;
do {
c = next_char();
++len;
- } while (isgraph(c));
+ } while (isgraph((unsigned char)c));
unput();
tok_start = lexer.tok_start;
lexer.s = lexer.tok_start;
lexer.len = lexer.curr_pos - lexer.s;
return tok_identifier;
- } else if (isdigit(c) || c == '-') {
+ } else if (isdigit((unsigned char)c) || c == '-') {
unsigned number = 0;
unsigned sign = 0;
for (;;) {
c = next_char();
- if (! isxdigit(c))
+ if (! isxdigit((unsigned char)c))
break;
- if (isdigit(c))
+ if (isdigit((unsigned char)c))
number = (number << 4) | (c - '0');
else
- number = (number << 4) | (toupper(c) - 'A' + 10);
+ number = (number << 4) | (toupper((unsigned char)c) - 'A' + 10);
}
unput();
lexer.number = number;
}
}
for (;;) {
- if (! isdigit(c))
+ if (! isdigit((unsigned char)c))
break;
number = number * 10 + (c - '0');
c = next_char();
case k_entity: {
ir_entity *entity = (ir_entity*)X;
snprintf(buf, sizeof(buf), "%s%s", A("ent"),
- isupper(occ->conversion) ? get_entity_ld_name_ex(entity): get_entity_name(entity));
+ isupper((unsigned char)occ->conversion) ? get_entity_ld_name_ex(entity): get_entity_name(entity));
snprintf(add, sizeof(add), "[%ld]", get_entity_nr(entity));
break;
}
arg.letter = letter;
arg.handler = handler;
- if (isupper(letter)) {
+ if (isupper((unsigned char)letter)) {
map = env->upper;
base = 'A';
}
- else if (islower(letter)) {
+ else if (islower((unsigned char)letter)) {
map = env->lower;
base = 'a';
}
const char *mod = s;
/* Read, as long there are letters */
- while (isalpha(ch) && !arg) {
+ while (isalpha((unsigned char)ch) && !arg) {
int base = 'a';
lc_arg_t * const *map = env->lower;
/* If uppercase, select the uppercase map from the environment */
- if (isupper(ch)) {
+ if (isupper((unsigned char)ch)) {
base = 'A';
map = env->upper;
}