diff options
| author | nyamatongwe <devnull@localhost> | 2001-01-24 07:19:19 +0000 | 
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2001-01-24 07:19:19 +0000 | 
| commit | 6bb7eba9e1bfa7c4bf3080f59d9f594d1f4f25a5 (patch) | |
| tree | 62723ebcb6eefc3f474dd9d5c4dccaf8216416f4 | |
| parent | 6aaed7ef7aa920c1ef8e6fee5a2d404137654b79 (diff) | |
| download | scintilla-mirror-6bb7eba9e1bfa7c4bf3080f59d9f594d1f4f25a5.tar.gz | |
Changed isspace to isspacechar which is safe for characters >= 128.
| -rw-r--r-- | src/LexHTML.cxx | 2 | ||||
| -rw-r--r-- | src/LexOthers.cxx | 12 | ||||
| -rw-r--r-- | src/LexPascal.cxx | 2 | ||||
| -rw-r--r-- | src/LexPerl.cxx | 10 | ||||
| -rw-r--r-- | src/LexVB.cxx | 2 | 
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) { | 
