From 3b8a8c0c866ff03de34ce8e1f8eb2f0970ae1961 Mon Sep 17 00:00:00 2001 From: Darren Hiebert Date: Tue, 19 Feb 2002 05:18:46 +0000 Subject: [PATCH] Added casts to quite compiler. git-svn-id: https://ctags.svn.sourceforge.net/svnroot/ctags/trunk@113 c5d04d22-be80-434c-894e-aa346cc9e8e8 --- beta.c | 19 +++++++++---------- lua.c | 4 ++-- parse.c | 4 ++-- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/beta.c b/beta.c index 04e474ee57..e2989bf948 100644 --- a/beta.c +++ b/beta.c @@ -106,8 +106,8 @@ static void findBetaTags (void) last = vStringLength (line) - 1; first = 0; /* skip white space at start and end of line */ - while (last && isspace (vStringChar (line, last))) last--; - while (first < last && isspace (vStringChar (line, first))) first++; + while (last && isspace ((int) vStringChar (line, last))) last--; + while (first < last && isspace ((int) vStringChar (line, first))) first++; /* if line still has a reasonable length and ... */ if (last - first > 4 && (vStringChar (line, first) == '-' && @@ -125,9 +125,9 @@ static void findBetaTags (void) last -= 2; first += 2; while (last && vStringChar (line, last) != ':') last--; - while (last && (isspace (vStringChar (line, last-1)))) last--; + while (last && (isspace ((int) vStringChar (line, last-1)))) last--; while (first < last && - (isspace (vStringChar (line, first)) || + (isspace ((int) vStringChar (line, first)) || vStringChar (line, first) == '-')) first++; /* If there's anything left it is a fragment title */ @@ -185,8 +185,7 @@ static void findBetaTags (void) char c2; pos += 2; /* skip past << */ /* skip past space before SLOT */ - while (pos < len && - isspace (vStringChar (line, pos))) + while (pos < len && isspace ((int) vStringChar (line, pos))) pos++; /* skip past SLOT */ if (pos+4 <= len && @@ -194,14 +193,14 @@ static void findBetaTags (void) pos += 4; /* skip past space after SLOT */ while (pos < len && - isspace (vStringChar (line, pos))) + isspace ((int) vStringChar (line, pos))) pos++; eoname = pos; /* skip to end of name */ while (eoname < len && (c2 = vStringChar (line, eoname)) != '>' && c2 != ':' && - !isspace (c2)) + !isspace ((int) c2)) eoname++; if (eoname < len) { @@ -238,7 +237,7 @@ static void findBetaTags (void) /* Found pattern name, get start and end */ int eoname = pos; int soname; - while (eoname && isspace (vStringChar (line, eoname-1))) + while (eoname && isspace ((int) vStringChar (line, eoname-1))) eoname--; foundanothername: /* terminate right after name */ @@ -254,7 +253,7 @@ static void findBetaTags (void) makeBetaTag (vStringValue (line) + soname, K_PATTERN); /* scan back past white space */ while (soname && - isspace (vStringChar (line, soname-1))) + isspace ((int) vStringChar (line, soname-1))) soname--; if (soname && vStringChar (line, soname-1) == ',') { diff --git a/lua.c b/lua.c index eed2d2dfac..2746d826d5 100644 --- a/lua.c +++ b/lua.c @@ -73,9 +73,9 @@ static void extract_name (const char *begin, const char *end, vString *name) { const char *cp; - while (isspace (*begin)) + while (isspace ((int) *begin)) begin++; - while (isspace (*end)) + while (isspace ((int) *end)) end--; if (begin < end) { diff --git a/parse.c b/parse.c index 596522ed8e..ce258e818f 100644 --- a/parse.c +++ b/parse.c @@ -133,9 +133,9 @@ static vString* determineInterpreter (const char* const cmd) do { vStringClear (interpreter); - for ( ; isspace (*p) ; ++p) + for ( ; isspace ((int) *p) ; ++p) ; /* no-op */ - for ( ; *p != '\0' && ! isspace (*p) ; ++p) + for ( ; *p != '\0' && ! isspace ((int) *p) ; ++p) vStringPut (interpreter, (int) *p); vStringTerminate (interpreter); } while (strcmp (vStringValue (interpreter), "env") == 0);