diff options
author | nyamatongwe <unknown> | 2010-05-13 01:30:06 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2010-05-13 01:30:06 +0000 |
commit | 74d92c0f19f84c9f1f5f9e87130c89484db155f6 (patch) | |
tree | 8eb24653968c21beb97ca0350c3c5fe854bb816e | |
parent | 9328c929f1e7259ec256f076eba0a47013a5fb62 (diff) | |
download | scintilla-mirror-74d92c0f19f84c9f1f5f9e87130c89484db155f6.tar.gz |
Fix debug assertions for bug #3000566.
-rw-r--r-- | src/LexAVE.cxx | 2 | ||||
-rw-r--r-- | src/LexCOBOL.cxx | 2 | ||||
-rw-r--r-- | src/LexConf.cxx | 12 | ||||
-rw-r--r-- | src/LexCrontab.cxx | 8 | ||||
-rw-r--r-- | src/LexCsound.cxx | 2 | ||||
-rw-r--r-- | src/LexGAP.cxx | 2 | ||||
-rw-r--r-- | src/LexMMIXAL.cxx | 2 |
7 files changed, 15 insertions, 15 deletions
diff --git a/src/LexAVE.cxx b/src/LexAVE.cxx index 2b7029b1a..09b393343 100644 --- a/src/LexAVE.cxx +++ b/src/LexAVE.cxx @@ -42,7 +42,7 @@ inline bool IsAWordStart(const int ch) { } inline bool isAveOperator(char ch) { - if (isalnum(ch)) + if (isascii(ch) && isalnum(ch)) return false; // '.' left out as it is used to make up numbers if (ch == '*' || ch == '/' || ch == '-' || ch == '+' || diff --git a/src/LexCOBOL.cxx b/src/LexCOBOL.cxx index d061d5c67..cd42e3e89 100644 --- a/src/LexCOBOL.cxx +++ b/src/LexCOBOL.cxx @@ -202,7 +202,7 @@ static void ColouriseCOBOLDoc(unsigned int startPos, int length, int initStyle, } if (state == SCE_C_DEFAULT) { - if (isCOBOLwordstart(ch) || (ch == '$' && isalpha(chNext))) { + if (isCOBOLwordstart(ch) || (ch == '$' && isascii(chNext) && isalpha(chNext))) { ColourTo(styler, i-1, state); state = SCE_C_IDENTIFIER; } else if (column == 0 && ch == '*' && chNext != '*') { diff --git a/src/LexConf.cxx b/src/LexConf.cxx index 969275f92..7b066af7b 100644 --- a/src/LexConf.cxx +++ b/src/LexConf.cxx @@ -70,17 +70,17 @@ static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *k } else if( ch == '"') { state = SCE_CONF_STRING; styler.ColourTo(i,SCE_CONF_STRING); - } else if( ispunct(ch) ) { + } else if( isascii(ch) && ispunct(ch) ) { // signals an operator... // no state jump necessary for this // simple case... styler.ColourTo(i,SCE_CONF_OPERATOR); - } else if( isalpha(ch) ) { + } else if( isascii(ch) && isalpha(ch) ) { // signals the start of an identifier bufferCount = 0; buffer[bufferCount++] = static_cast<char>(tolower(ch)); state = SCE_CONF_IDENTIFIER; - } else if( isdigit(ch) ) { + } else if( isascii(ch) && isdigit(ch) ) { // signals the start of a number bufferCount = 0; buffer[bufferCount++] = ch; @@ -107,7 +107,7 @@ static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *k // if we find a non-alphanumeric char, // we simply go to default state // else we're still dealing with an extension... - if( isalnum(ch) || (ch == '_') || + if( (isascii(ch) && isalnum(ch)) || (ch == '_') || (ch == '-') || (ch == '$') || (ch == '/') || (ch == '.') || (ch == '*') ) { @@ -129,7 +129,7 @@ static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *k case SCE_CONF_IDENTIFIER: // stay in CONF_IDENTIFIER state until we find a non-alphanumeric - if( isalnum(ch) || (ch == '_') || (ch == '-') || (ch == '/') || (ch == '$') || (ch == '.') || (ch == '*')) { + if( (isascii(ch) && isalnum(ch)) || (ch == '_') || (ch == '-') || (ch == '/') || (ch == '$') || (ch == '.') || (ch == '*')) { buffer[bufferCount++] = static_cast<char>(tolower(ch)); } else { state = SCE_CONF_DEFAULT; @@ -154,7 +154,7 @@ static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *k case SCE_CONF_NUMBER: // stay in CONF_NUMBER state until we find a non-numeric - if( isdigit(ch) || ch == '.') { + if( (isascii(ch) && isdigit(ch)) || ch == '.') { buffer[bufferCount++] = ch; } else { state = SCE_CONF_DEFAULT; diff --git a/src/LexCrontab.cxx b/src/LexCrontab.cxx index 62044c370..f6c4d42f1 100644 --- a/src/LexCrontab.cxx +++ b/src/LexCrontab.cxx @@ -94,12 +94,12 @@ static void ColouriseNncrontabDoc(unsigned int startPos, int length, int, WordLi // signals an asterisk // no state jump necessary for this simple case... styler.ColourTo(i,SCE_NNCRONTAB_ASTERISK); - } else if( isalpha(ch) || ch == '<' ) { + } else if( (isascii(ch) && isalpha(ch)) || ch == '<' ) { // signals the start of an identifier bufferCount = 0; buffer[bufferCount++] = ch; state = SCE_NNCRONTAB_IDENTIFIER; - } else if( isdigit(ch) ) { + } else if( isascii(ch) && isdigit(ch) ) { // signals the start of a number bufferCount = 0; buffer[bufferCount++] = ch; @@ -167,7 +167,7 @@ static void ColouriseNncrontabDoc(unsigned int startPos, int length, int, WordLi case SCE_NNCRONTAB_IDENTIFIER: // stay in CONF_IDENTIFIER state until we find a non-alphanumeric - if( isalnum(ch) || (ch == '_') || (ch == '-') || (ch == '/') || + if( (isascii(ch) && isalnum(ch)) || (ch == '_') || (ch == '-') || (ch == '/') || (ch == '$') || (ch == '.') || (ch == '<') || (ch == '>') || (ch == '@') ) { buffer[bufferCount++] = ch; @@ -196,7 +196,7 @@ static void ColouriseNncrontabDoc(unsigned int startPos, int length, int, WordLi case SCE_NNCRONTAB_NUMBER: // stay in CONF_NUMBER state until we find a non-numeric - if( isdigit(ch) /* || ch == '.' */ ) { + if( isascii(ch) && isdigit(ch) /* || ch == '.' */ ) { buffer[bufferCount++] = ch; } else { state = SCE_NNCRONTAB_DEFAULT; diff --git a/src/LexCsound.cxx b/src/LexCsound.cxx index 4162c9b3a..3aa2eb897 100644 --- a/src/LexCsound.cxx +++ b/src/LexCsound.cxx @@ -35,7 +35,7 @@ static inline bool IsAWordStart(const int ch) { } static inline bool IsCsoundOperator(char ch) { - if (isalnum(ch)) + if (isascii(ch) && isalnum(ch)) return false; // '.' left out as it is used to make up numbers if (ch == '*' || ch == '/' || ch == '-' || ch == '+' || diff --git a/src/LexGAP.cxx b/src/LexGAP.cxx index 25bd33b90..fb6e739bd 100644 --- a/src/LexGAP.cxx +++ b/src/LexGAP.cxx @@ -26,7 +26,7 @@ using namespace Scintilla; #endif static inline bool IsGAPOperator(char ch) { - if (isalnum(ch)) return false; + if (isascii(ch) && isalnum(ch)) return false; if (ch == '+' || ch == '-' || ch == '*' || ch == '/' || ch == '^' || ch == ',' || ch == '!' || ch == '.' || ch == '=' || ch == '<' || ch == '>' || ch == '(' || diff --git a/src/LexMMIXAL.cxx b/src/LexMMIXAL.cxx index a00f35ca0..369929998 100644 --- a/src/LexMMIXAL.cxx +++ b/src/LexMMIXAL.cxx @@ -32,7 +32,7 @@ static inline bool IsAWordChar(const int ch) { } inline bool isMMIXALOperator(char ch) { - if (isalnum(ch)) + if (isascii(ch) && isalnum(ch)) return false; if (ch == '+' || ch == '-' || ch == '|' || ch == '^' || ch == '*' || ch == '/' || ch == '/' || |