From a0af35a9dbefe36440fcd6b603a89cf21041c0a1 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 8 Nov 2002 02:28:40 +0000 Subject: Some minor changes from Stefan Allius to make conf and mconf compile under Solaris. --- extra/config/conf.c | 6 +++--- extra/config/confdata.c | 2 +- extra/config/mconf.c | 3 ++- extra/config/symbol.c | 6 +++--- 4 files changed, 9 insertions(+), 8 deletions(-) (limited to 'extra') diff --git a/extra/config/conf.c b/extra/config/conf.c index 910d52ce6..6bc5de943 100644 --- a/extra/config/conf.c +++ b/extra/config/conf.c @@ -78,7 +78,7 @@ static void strip(char *str) char *p = str; int l; - while ((isspace(*p))) + while ((isspace((int)*p))) p++; l = strlen(p); if (p != str) @@ -86,7 +86,7 @@ static void strip(char *str) if (!l) return; p = str + l - 1; - while ((isspace(*p))) + while ((isspace((int)*p))) *p-- = 0; } @@ -358,7 +358,7 @@ static int conf_choice(struct menu *menu) continue; } if (line[0]) { - len = strlen(line) - 1; + len = strlen(line); line[len] = 0; def_menu = NULL; diff --git a/extra/config/confdata.c b/extra/config/confdata.c index d3df3ab34..9e413b4a3 100644 --- a/extra/config/confdata.c +++ b/extra/config/confdata.c @@ -40,7 +40,7 @@ static char *conf_expand_value(const char *in) strncat(res_value, in, src - in); src++; dst = name; - while (isalnum(*src) || *src == '_') + while (isalnum((int)*src) || *src == '_') *dst++ = *src++; *dst = 0; sym = sym_lookup(name, 0); diff --git a/extra/config/mconf.c b/extra/config/mconf.c index 2ebc18819..dad2f5f9d 100644 --- a/extra/config/mconf.c +++ b/extra/config/mconf.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -443,7 +444,7 @@ static void conf(struct menu *menu) if (!type) continue; - for (i = 0; input_buf[i] && !isspace(input_buf[i]); i++) + for (i = 0; input_buf[i] && !isspace((int)input_buf[i]); i++) ; if (i >= sizeof(active_entry)) i = sizeof(active_entry) - 1; diff --git a/extra/config/symbol.c b/extra/config/symbol.c index 7ec2ff48b..f2d0015de 100644 --- a/extra/config/symbol.c +++ b/extra/config/symbol.c @@ -404,12 +404,12 @@ bool sym_string_valid(struct symbol *sym, const char *str) ch = *str++; if (ch == '-') ch = *str++; - if (!isdigit(ch)) + if (!isdigit((int)ch)) return false; if (ch == '0' && *str != 0) return false; while ((ch = *str++)) { - if (!isdigit(ch)) + if (!isdigit((int)ch)) return false; } return true; @@ -418,7 +418,7 @@ bool sym_string_valid(struct symbol *sym, const char *str) str += 2; ch = *str++; do { - if (!isxdigit(ch)) + if (!isxdigit((int)ch)) return false; } while ((ch = *str++)); return true; -- cgit v1.2.3