aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2001-01-24 07:19:19 +0000
committernyamatongwe <unknown>2001-01-24 07:19:19 +0000
commit52aefb2ddcf90b362f24010e6efab4eb148f6a98 (patch)
tree62723ebcb6eefc3f474dd9d5c4dccaf8216416f4 /src
parentf62ebeccbfd8c1e9e30f7329a9294a4b57e3b453 (diff)
downloadscintilla-mirror-52aefb2ddcf90b362f24010e6efab4eb148f6a98.tar.gz
Changed isspace to isspacechar which is safe for characters >= 128.
Diffstat (limited to 'src')
-rw-r--r--src/LexHTML.cxx2
-rw-r--r--src/LexOthers.cxx12
-rw-r--r--src/LexPascal.cxx2
-rw-r--r--src/LexPerl.cxx10
-rw-r--r--src/LexVB.cxx2
5 files changed, 14 insertions, 14 deletions
diff --git a/src/LexHTML.cxx b/src/LexHTML.cxx
index 8011da39f..4fe96f0bb 100644
--- a/src/LexHTML.cxx
+++ b/src/LexHTML.cxx
@@ -364,7 +364,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
continue;
}
- if (fold && !isspace(ch))
+ if (fold && !isspacechar(ch))
visibleChars++;
// handle script folding
diff --git a/src/LexOthers.cxx b/src/LexOthers.cxx
index 4ead7e580..68f7bf82b 100644
--- a/src/LexOthers.cxx
+++ b/src/LexOthers.cxx
@@ -22,11 +22,11 @@ static void ColouriseBatchLine(char *lineBuffer, int startLine, int endLine, Acc
for (unsigned int i = 0; i < 4; i++) {
lineBuffer[i] = tolower(lineBuffer[i]);
}
- if (0 == strncmp(lineBuffer, "rem", 3) && isspace(lineBuffer[3])) {
+ if (0 == strncmp(lineBuffer, "rem", 3) && isspacechar(lineBuffer[3])) {
styler.ColourTo(endLine, 1);
- } else if (0 == strncmp(lineBuffer, "set", 3) && isspace(lineBuffer[3])) {
+ } else if (0 == strncmp(lineBuffer, "set", 3) && isspacechar(lineBuffer[3])) {
styler.ColourTo(endLine, 2);
- } else if (0 == strncmp(lineBuffer, "if", 2) && isspace(lineBuffer[2])) {
+ } else if (0 == strncmp(lineBuffer, "if", 2) && isspacechar(lineBuffer[2])) {
styler.ColourTo(endLine, 2);
} else if (lineBuffer[0] == ':') {
if (lineBuffer[1] == ':') { // Fake label, similar to REM, see http://www.winmag.com/columns/explorer/2000/21.htm
@@ -66,7 +66,7 @@ static void ColouriseBatchDoc(unsigned int startPos, int length, int, WordList *
styler.StartSegment(startPos);
unsigned int linePos = 0, startLine = startPos;
for (unsigned int i = startPos; i < startPos + length; i++) {
- if (linePos != 0 || !isspace(styler[i])) { // Skip initial spaces
+ if (linePos != 0 || !isspacechar(styler[i])) { // Skip initial spaces
lineBuffer[linePos++] = static_cast<char>(tolower(styler[i]));
}
if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) {
@@ -132,7 +132,7 @@ static void ColourisePropsLine(char *lineBuffer,
unsigned int endPos,
Accessor &styler) {
unsigned int i = 0;
- while (isspace(lineBuffer[i]) && (i < lengthLine)) // Skip initial spaces
+ while (isspacechar(lineBuffer[i]) && (i < lengthLine)) // Skip initial spaces
i++;
if (lineBuffer[i] == '#' || lineBuffer[i] == '!' || lineBuffer[i] == ';') {
styler.ColourTo(endPos, 1);
@@ -184,7 +184,7 @@ static void ColouriseMakeLine(char *lineBuffer,
unsigned int i = 0, state = 0;
bool bSpecial = false;
// Skip initial spaces
- while (isspace(lineBuffer[i]) && (i < lengthLine))
+ while (isspacechar(lineBuffer[i]) && (i < lengthLine))
i++;
if (lineBuffer[i] == '#') {
styler.ColourTo(endPos, 1);
diff --git a/src/LexPascal.cxx b/src/LexPascal.cxx
index d9227df99..ee568c77f 100644
--- a/src/LexPascal.cxx
+++ b/src/LexPascal.cxx
@@ -84,7 +84,7 @@ static void ColourisePascalDoc(unsigned int startPos, int length, int initStyle,
}
visibleChars = 0;
}
- if (!isspace(ch))
+ if (!isspacechar(ch))
visibleChars++;
if (styler.IsLeadByte(ch)) {
diff --git a/src/LexPerl.cxx b/src/LexPerl.cxx
index 4ba835c56..4140d70d9 100644
--- a/src/LexPerl.cxx
+++ b/src/LexPerl.cxx
@@ -406,7 +406,7 @@ static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle,
chNext = chNext2;
} else if (isalnum(chNext) || chNext == '_') { // an unquoted here-doc delimiter
}
- else if (isspace(chNext)) { // deprecated here-doc delimiter || TODO: left shift operator
+ else if (isspacechar(chNext)) { // deprecated here-doc delimiter || TODO: left shift operator
}
else { // TODO: ???
}
@@ -493,7 +493,7 @@ static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle,
} else if (state == SCE_PL_REGEX
|| state == SCE_PL_STRING_QR
) {
- if (!Quote.Up && !isspace(ch)) {
+ if (!Quote.Up && !isspacechar(ch)) {
Quote.Open(ch);
} else if (ch == '\\' && Quote.Up != '\\') {
// SG: Is it save to skip *every* escaped char?
@@ -527,7 +527,7 @@ static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle,
}
}
} else if (state == SCE_PL_REGSUBST) {
- if (!Quote.Up && !isspace(ch)) {
+ if (!Quote.Up && !isspacechar(ch)) {
Quote.Open(ch);
} else if (ch == '\\' && Quote.Up != '\\') {
// SG: Is it save to skip *every* escaped char?
@@ -549,7 +549,7 @@ static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle,
*
* Eric Promislow ericp@activestate.com Aug 9,2000
*/
- if (isspace(ch)) {
+ if (isspacechar(ch)) {
// Keep going
}
else if (isalnum(ch)) {
@@ -592,7 +592,7 @@ static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle,
|| state == SCE_PL_CHARACTER
|| state == SCE_PL_BACKTICKS
) {
- if (!Quote.Down && !isspace(ch)) {
+ if (!Quote.Down && !isspacechar(ch)) {
Quote.Open(ch);
} else if (ch == '\\' && Quote.Up != '\\') {
i++;
diff --git a/src/LexVB.cxx b/src/LexVB.cxx
index 67dfa7842..34f5136a6 100644
--- a/src/LexVB.cxx
+++ b/src/LexVB.cxx
@@ -73,7 +73,7 @@ static void ColouriseVBDoc(unsigned int startPos, int length, int initStyle,
}
visibleChars = 0;
}
- if (!isspace(ch))
+ if (!isspacechar(ch))
visibleChars++;
if (state == SCE_C_DEFAULT) {