From 70539048ba95b1bc7ade71dad4ed99d2d34638cc Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 10 Nov 2010 22:21:06 +1030 Subject: [PATCH] ccanlint: use isspace instead of isblank I am told that CentOS 5.3 doesn't like isblank (it's ISO C). --- tools/ccanlint/tests/examples_compile.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/ccanlint/tests/examples_compile.c b/tools/ccanlint/tests/examples_compile.c index e8fb2451..746b47f9 100644 --- a/tools/ccanlint/tests/examples_compile.c +++ b/tools/ccanlint/tests/examples_compile.c @@ -142,7 +142,7 @@ static char *start_main(char *ret, const char *why) static char *add_func(char *others, const char *line) { const char *p, *end = strchr(line, '(') - 1; - while (isblank(*end)) { + while (isspace(*end)) { end--; if (end == line) return others; @@ -185,7 +185,7 @@ static bool looks_internal(char **lines, char **why) const char *line = lines[i] + strspn(lines[i], " \t"); unsigned len = strspn(line, IDENT_CHARS); - if (!line[0] || isblank(line[0]) || strstarts(line, "//")) + if (!line[0] || isspace(line[0]) || strstarts(line, "//")) continue; /* The winners. */ @@ -342,7 +342,7 @@ static char *mangle(struct manifest *m, char **lines) } else { /* Character at start of line, with ( and no ; * == function start. Ignore comments. */ - if (!isblank(lines[i][0]) + if (!isspace(lines[i][0]) && strchr(lines[i], '(') && !strchr(lines[i], ';') && !strstr(lines[i], "//")) { -- 2.39.2