diff options
-rw-r--r-- | lexers/LexAU3.cxx | 2 | ||||
-rw-r--r-- | lexers/LexAVE.cxx | 2 | ||||
-rw-r--r-- | lexers/LexAda.cxx | 2 | ||||
-rw-r--r-- | lexers/LexAsm.cxx | 2 | ||||
-rw-r--r-- | lexers/LexBullant.cxx | 2 | ||||
-rw-r--r-- | lexers/LexCOBOL.cxx | 6 | ||||
-rw-r--r-- | lexers/LexConf.cxx | 12 | ||||
-rw-r--r-- | lexers/LexCrontab.cxx | 8 | ||||
-rw-r--r-- | lexers/LexCsound.cxx | 2 | ||||
-rw-r--r-- | lexers/LexD.cxx | 8 | ||||
-rw-r--r-- | lexers/LexForth.cxx | 16 | ||||
-rw-r--r-- | lexers/LexGAP.cxx | 2 | ||||
-rw-r--r-- | lexers/LexHTML.cxx | 18 | ||||
-rw-r--r-- | lexers/LexInno.cxx | 10 | ||||
-rw-r--r-- | lexers/LexLaTeX.cxx | 8 | ||||
-rw-r--r-- | lexers/LexLisp.cxx | 6 | ||||
-rw-r--r-- | lexers/LexMMIXAL.cxx | 2 | ||||
-rw-r--r-- | lexers/LexMPT.cxx | 2 | ||||
-rw-r--r-- | lexers/LexMSSQL.cxx | 2 | ||||
-rw-r--r-- | lexers/LexOpal.cxx | 8 | ||||
-rw-r--r-- | lexers/LexOthers.cxx | 2 | ||||
-rw-r--r-- | lexers/LexPerl.cxx | 2 | ||||
-rw-r--r-- | lexers/LexPython.cxx | 2 | ||||
-rw-r--r-- | lexers/LexR.cxx | 2 | ||||
-rw-r--r-- | lexers/LexSpice.cxx | 2 | ||||
-rw-r--r-- | lexers/LexTCMD.cxx | 2 | ||||
-rw-r--r-- | lexers/LexYAML.cxx | 2 | ||||
-rw-r--r-- | src/Document.cxx | 12 |
28 files changed, 73 insertions, 73 deletions
diff --git a/lexers/LexAU3.cxx b/lexers/LexAU3.cxx index e9ab75772..6f137adba 100644 --- a/lexers/LexAU3.cxx +++ b/lexers/LexAU3.cxx @@ -87,7 +87,7 @@ static inline bool IsAWordStart(const int ch) } static inline bool IsAOperator(char ch) { - if (isascii(ch) && isalnum(ch)) + if (IsASCII(ch) && isalnum(ch)) return false; if (ch == '+' || ch == '-' || ch == '*' || ch == '/' || ch == '&' || ch == '^' || ch == '=' || ch == '<' || ch == '>' || diff --git a/lexers/LexAVE.cxx b/lexers/LexAVE.cxx index 373173ca2..1bce9a2c0 100644 --- a/lexers/LexAVE.cxx +++ b/lexers/LexAVE.cxx @@ -45,7 +45,7 @@ inline bool IsAWordStart(const int ch) { } inline bool isAveOperator(char ch) { - if (isascii(ch) && 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/lexers/LexAda.cxx b/lexers/LexAda.cxx index b11c247bb..7a7dea60f 100644 --- a/lexers/LexAda.cxx +++ b/lexers/LexAda.cxx @@ -511,5 +511,5 @@ static inline bool IsWordCharacter(int ch) { } static inline bool IsWordStartCharacter(int ch) { - return (isascii(ch) && isalpha(ch)) || ch == '_'; + return (IsASCII(ch) && isalpha(ch)) || ch == '_'; } diff --git a/lexers/LexAsm.cxx b/lexers/LexAsm.cxx index 78874de86..b327ce5f2 100644 --- a/lexers/LexAsm.cxx +++ b/lexers/LexAsm.cxx @@ -344,7 +344,7 @@ void SCI_METHOD LexerAsm::Lex(unsigned int startPos, int length, int initStyle, if (sc.state == SCE_ASM_DEFAULT) { if (sc.ch == ';'){ sc.SetState(SCE_ASM_COMMENT); - } else if (isascii(sc.ch) && (isdigit(sc.ch) || (sc.ch == '.' && isascii(sc.chNext) && isdigit(sc.chNext)))) { + } else if (IsASCII(sc.ch) && (isdigit(sc.ch) || (sc.ch == '.' && IsASCII(sc.chNext) && isdigit(sc.chNext)))) { sc.SetState(SCE_ASM_NUMBER); } else if (IsAWordStart(sc.ch)) { sc.SetState(SCE_ASM_IDENTIFIER); diff --git a/lexers/LexBullant.cxx b/lexers/LexBullant.cxx index bb5c9c4a8..51d6bd8f0 100644 --- a/lexers/LexBullant.cxx +++ b/lexers/LexBullant.cxx @@ -116,7 +116,7 @@ static void ColouriseBullantDoc(unsigned int startPos, int length, int initStyle } blockChange=0; */ } - if (!(isascii(ch) && isspace(ch))) + if (!(IsASCII(ch) && isspace(ch))) visibleChars++; if (styler.IsLeadByte(ch)) { diff --git a/lexers/LexCOBOL.cxx b/lexers/LexCOBOL.cxx index b3bc011d6..d689762ec 100644 --- a/lexers/LexCOBOL.cxx +++ b/lexers/LexCOBOL.cxx @@ -44,13 +44,13 @@ inline bool isCOBOLoperator(char ch) inline bool isCOBOLwordchar(char ch) { - return isascii(ch) && (isalnum(ch) || ch == '-'); + return IsASCII(ch) && (isalnum(ch) || ch == '-'); } inline bool isCOBOLwordstart(char ch) { - return isascii(ch) && isalnum(ch); + return IsASCII(ch) && isalnum(ch); } static int CountBits(int nBits) @@ -205,7 +205,7 @@ static void ColouriseCOBOLDoc(unsigned int startPos, int length, int initStyle, } if (state == SCE_C_DEFAULT) { - if (isCOBOLwordstart(ch) || (ch == '$' && isascii(chNext) && isalpha(chNext))) { + if (isCOBOLwordstart(ch) || (ch == '$' && IsASCII(chNext) && isalpha(chNext))) { ColourTo(styler, i-1, state); state = SCE_C_IDENTIFIER; } else if (column == 6 && ch == '*') { diff --git a/lexers/LexConf.cxx b/lexers/LexConf.cxx index 23ed5a6c8..cbd01094d 100644 --- a/lexers/LexConf.cxx +++ b/lexers/LexConf.cxx @@ -74,17 +74,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( isascii(ch) && 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( isascii(ch) && 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( isascii(ch) && isdigit(ch) ) { + } else if( IsASCII(ch) && isdigit(ch) ) { // signals the start of a number bufferCount = 0; buffer[bufferCount++] = ch; @@ -111,7 +111,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( (isascii(ch) && isalnum(ch)) || (ch == '_') || + if( (IsASCII(ch) && isalnum(ch)) || (ch == '_') || (ch == '-') || (ch == '$') || (ch == '/') || (ch == '.') || (ch == '*') ) { @@ -133,7 +133,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( (isascii(ch) && 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; @@ -158,7 +158,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( (isascii(ch) && isdigit(ch)) || ch == '.') { + if( (IsASCII(ch) && isdigit(ch)) || ch == '.') { buffer[bufferCount++] = ch; } else { state = SCE_CONF_DEFAULT; diff --git a/lexers/LexCrontab.cxx b/lexers/LexCrontab.cxx index 08abc7191..68f52e362 100644 --- a/lexers/LexCrontab.cxx +++ b/lexers/LexCrontab.cxx @@ -98,12 +98,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( (isascii(ch) && 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( isascii(ch) && isdigit(ch) ) { + } else if( IsASCII(ch) && isdigit(ch) ) { // signals the start of a number bufferCount = 0; buffer[bufferCount++] = ch; @@ -171,7 +171,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( (isascii(ch) && isalnum(ch)) || (ch == '_') || (ch == '-') || (ch == '/') || + if( (IsASCII(ch) && isalnum(ch)) || (ch == '_') || (ch == '-') || (ch == '/') || (ch == '$') || (ch == '.') || (ch == '<') || (ch == '>') || (ch == '@') ) { buffer[bufferCount++] = ch; @@ -200,7 +200,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( isascii(ch) && isdigit(ch) /* || ch == '.' */ ) { + if( IsASCII(ch) && isdigit(ch) /* || ch == '.' */ ) { buffer[bufferCount++] = ch; } else { state = SCE_NNCRONTAB_DEFAULT; diff --git a/lexers/LexCsound.cxx b/lexers/LexCsound.cxx index 8e5880c90..da5bfeb8c 100644 --- a/lexers/LexCsound.cxx +++ b/lexers/LexCsound.cxx @@ -39,7 +39,7 @@ static inline bool IsAWordStart(const int ch) { } static inline bool IsCsoundOperator(char ch) { - if (isascii(ch) && 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/lexers/LexD.cxx b/lexers/LexD.cxx index 32e3c86ef..045c4cb73 100644 --- a/lexers/LexD.cxx +++ b/lexers/LexD.cxx @@ -41,15 +41,15 @@ using namespace Scintilla; // Underscore, letter, digit and universal alphas from C99 Appendix D. static bool IsWordStart(int ch) { - return (isascii(ch) && (isalpha(ch) || ch == '_')) || !isascii(ch); + return (IsASCII(ch) && (isalpha(ch) || ch == '_')) || !IsASCII(ch); } static bool IsWord(int ch) { - return (isascii(ch) && (isalnum(ch) || ch == '_')) || !isascii(ch); + return (IsASCII(ch) && (isalnum(ch) || ch == '_')) || !IsASCII(ch); } static bool IsDoxygen(int ch) { - if (isascii(ch) && islower(ch)) + if (IsASCII(ch) && islower(ch)) return true; if (ch == '$' || ch == '@' || ch == '\\' || ch == '&' || ch == '#' || ch == '<' || ch == '>' || @@ -267,7 +267,7 @@ void SCI_METHOD LexerD::Lex(unsigned int startPos, int length, int initStyle, ID break; case SCE_D_NUMBER: // We accept almost anything because of hex. and number suffixes - if (isascii(sc.ch) && (isalnum(sc.ch) || sc.ch == '_')) { + if (IsASCII(sc.ch) && (isalnum(sc.ch) || sc.ch == '_')) { continue; } else if (sc.ch == '.' && sc.chNext != '.' && !numFloat) { // Don't parse 0..2 as number. diff --git a/lexers/LexForth.cxx b/lexers/LexForth.cxx index 0e9875ceb..c9c72624e 100644 --- a/lexers/LexForth.cxx +++ b/lexers/LexForth.cxx @@ -123,29 +123,29 @@ static void ColouriseForthDoc(unsigned int startPos, int length, int initStyle, (sc.atLineStart || IsASpaceChar(sc.chPrev)) && (sc.atLineEnd || IsASpaceChar(sc.chNext))) { sc.SetState(SCE_FORTH_COMMENT_ML); - } else if ( (sc.ch == '$' && (isascii(sc.chNext) && isxdigit(sc.chNext))) ) { + } else if ( (sc.ch == '$' && (IsASCII(sc.chNext) && isxdigit(sc.chNext))) ) { // number starting with $ is a hex number sc.SetState(SCE_FORTH_NUMBER); - while(sc.More() && isascii(sc.chNext) && isxdigit(sc.chNext)) + while(sc.More() && IsASCII(sc.chNext) && isxdigit(sc.chNext)) sc.Forward(); - } else if ( (sc.ch == '%' && (isascii(sc.chNext) && (sc.chNext == '0' || sc.chNext == '1'))) ) { + } else if ( (sc.ch == '%' && (IsASCII(sc.chNext) && (sc.chNext == '0' || sc.chNext == '1'))) ) { // number starting with % is binary sc.SetState(SCE_FORTH_NUMBER); - while(sc.More() && isascii(sc.chNext) && (sc.chNext == '0' || sc.chNext == '1')) + while(sc.More() && IsASCII(sc.chNext) && (sc.chNext == '0' || sc.chNext == '1')) sc.Forward(); - } else if ( isascii(sc.ch) && - (isxdigit(sc.ch) || ((sc.ch == '.' || sc.ch == '-') && isascii(sc.chNext) && isxdigit(sc.chNext)) ) + } else if ( IsASCII(sc.ch) && + (isxdigit(sc.ch) || ((sc.ch == '.' || sc.ch == '-') && IsASCII(sc.chNext) && isxdigit(sc.chNext)) ) ){ sc.SetState(SCE_FORTH_NUMBER); } else if (IsAWordStart(sc.ch)) { sc.SetState(SCE_FORTH_IDENTIFIER); } else if (sc.ch == '{') { sc.SetState(SCE_FORTH_LOCALE); - } else if (sc.ch == ':' && isascii(sc.chNext) && isspace(sc.chNext)) { + } else if (sc.ch == ':' && IsASCII(sc.chNext) && isspace(sc.chNext)) { // highlight word definitions e.g. : GCD ( n n -- n ) ..... ; // ^ ^^^ sc.SetState(SCE_FORTH_DEFWORD); - while(sc.More() && isascii(sc.chNext) && isspace(sc.chNext)) + while(sc.More() && IsASCII(sc.chNext) && isspace(sc.chNext)) sc.Forward(); } else if (sc.ch == ';' && (sc.atLineStart || IsASpaceChar(sc.chPrev)) && diff --git a/lexers/LexGAP.cxx b/lexers/LexGAP.cxx index fb3066098..bc0bc2144 100644 --- a/lexers/LexGAP.cxx +++ b/lexers/LexGAP.cxx @@ -29,7 +29,7 @@ using namespace Scintilla; #endif static inline bool IsGAPOperator(char ch) { - if (isascii(ch) && 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/lexers/LexHTML.cxx b/lexers/LexHTML.cxx index ebfd7302e..826448867 100644 --- a/lexers/LexHTML.cxx +++ b/lexers/LexHTML.cxx @@ -43,7 +43,7 @@ static inline bool IsAWordStart(const int ch) { } inline bool IsOperator(int ch) { - if (isascii(ch) && isalnum(ch)) + if (IsASCII(ch) && isalnum(ch)) return false; // '.' left out as it is used to make up numbers if (ch == '%' || ch == '^' || ch == '&' || ch == '*' || @@ -446,12 +446,12 @@ static int StateForScript(script_type scriptLanguage) { } static inline bool issgmlwordchar(int ch) { - return !isascii(ch) || + return !IsASCII(ch) || (isalnum(ch) || ch == '.' || ch == '_' || ch == ':' || ch == '!' || ch == '#' || ch == '['); } static inline bool IsPhpWordStart(int ch) { - return (isascii(ch) && (isalpha(ch) || (ch == '_'))) || (ch >= 0x7f); + return (IsASCII(ch) && (isalpha(ch) || (ch == '_'))) || (ch >= 0x7f); } static inline bool IsPhpWordChar(int ch) { @@ -1233,7 +1233,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty styler.ColourTo(i - 2, StateToPrint); } state = SCE_H_SGML_COMMENT; - } else if (isascii(ch) && isalpha(ch) && (chPrev == '%')) { + } else if (IsASCII(ch) && isalpha(ch) && (chPrev == '%')) { styler.ColourTo(i - 2, StateToPrint); state = SCE_H_SGML_ENTITY; } else if (ch == '#') { @@ -1351,7 +1351,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty } break; case SCE_H_SGML_SPECIAL: - if (!(isascii(ch) && isupper(ch))) { + if (!(IsASCII(ch) && isupper(ch))) { styler.ColourTo(i - 1, StateToPrint); if (isalnum(ch)) { state = SCE_H_SGML_ERROR; @@ -1364,7 +1364,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty if (ch == ';') { styler.ColourTo(i, StateToPrint); state = SCE_H_SGML_DEFAULT; - } else if (!(isascii(ch) && isalnum(ch)) && ch != '-' && ch != '.') { + } else if (!(IsASCII(ch) && isalnum(ch)) && ch != '-' && ch != '.') { styler.ColourTo(i, SCE_H_SGML_ERROR); state = SCE_H_SGML_DEFAULT; } @@ -1374,9 +1374,9 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty styler.ColourTo(i, StateToPrint); state = SCE_H_DEFAULT; } - if (ch != '#' && !(isascii(ch) && isalnum(ch)) // Should check that '#' follows '&', but it is unlikely anyway... + if (ch != '#' && !(IsASCII(ch) && isalnum(ch)) // Should check that '#' follows '&', but it is unlikely anyway... && ch != '.' && ch != '-' && ch != '_' && ch != ':') { // valid in XML - if (!isascii(ch)) // Possibly start of a multibyte character so don't allow this byte to be in entity style + if (!IsASCII(ch)) // Possibly start of a multibyte character so don't allow this byte to be in entity style styler.ColourTo(i-1, SCE_H_TAGUNKNOWN); else styler.ColourTo(i, SCE_H_TAGUNKNOWN); @@ -1702,7 +1702,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty case SCE_HJ_REGEX: if (ch == '\r' || ch == '\n' || ch == '/') { if (ch == '/') { - while (isascii(chNext) && islower(chNext)) { // gobble regex flags + while (IsASCII(chNext) && islower(chNext)) { // gobble regex flags i++; ch = chNext; chNext = static_cast<unsigned char>(styler.SafeGetCharAt(i + 1)); diff --git a/lexers/LexInno.cxx b/lexers/LexInno.cxx index a0f5b3271..63fadf0ba 100644 --- a/lexers/LexInno.cxx +++ b/lexers/LexInno.cxx @@ -104,7 +104,7 @@ static void ColouriseInnoDoc(unsigned int startPos, int length, int, WordList *k } else if (ch == '\'') { // Start of a single-quote string state = SCE_INNO_STRING_SINGLE; - } else if (isascii(ch) && (isalpha(ch) || (ch == '_'))) { + } else if (IsASCII(ch) && (isalpha(ch) || (ch == '_'))) { // Start of an identifier bufferCount = 0; buffer[bufferCount++] = static_cast<char>(tolower(ch)); @@ -123,7 +123,7 @@ static void ColouriseInnoDoc(unsigned int startPos, int length, int, WordList *k break; case SCE_INNO_IDENTIFIER: - if (isascii(ch) && (isalnum(ch) || (ch == '_'))) { + if (IsASCII(ch) && (isalnum(ch) || (ch == '_'))) { buffer[bufferCount++] = static_cast<char>(tolower(ch)); } else { state = SCE_INNO_DEFAULT; @@ -160,7 +160,7 @@ static void ColouriseInnoDoc(unsigned int startPos, int length, int, WordList *k } else { styler.ColourTo(i,SCE_INNO_DEFAULT); } - } else if (isascii(ch) && (isalnum(ch) || (ch == '_'))) { + } else if (IsASCII(ch) && (isalnum(ch) || (ch == '_'))) { buffer[bufferCount++] = static_cast<char>(tolower(ch)); } else { state = SCE_INNO_DEFAULT; @@ -170,7 +170,7 @@ static void ColouriseInnoDoc(unsigned int startPos, int length, int, WordList *k case SCE_INNO_PREPROC: if (isWS || isEOL) { - if (isascii(chPrev) && isalpha(chPrev)) { + if (IsASCII(chPrev) && isalpha(chPrev)) { state = SCE_INNO_DEFAULT; buffer[bufferCount] = '\0'; @@ -185,7 +185,7 @@ static void ColouriseInnoDoc(unsigned int startPos, int length, int, WordList *k chNext = styler[i--]; ch = chPrev; } - } else if (isascii(ch) && isalpha(ch)) { + } else if (IsASCII(ch) && isalpha(ch)) { if (chPrev == '#' || chPrev == ' ' || chPrev == '\t') bufferCount = 0; buffer[bufferCount++] = static_cast<char>(tolower(ch)); diff --git a/lexers/LexLaTeX.cxx b/lexers/LexLaTeX.cxx index f3b14054c..f8af1e7dc 100644 --- a/lexers/LexLaTeX.cxx +++ b/lexers/LexLaTeX.cxx @@ -99,7 +99,7 @@ static bool latexIsBlankAndNL(int ch) { } static bool latexIsLetter(int ch) { - return isascii(ch) && isalpha(ch); + return IsASCII(ch) && isalpha(ch); } static bool latexIsTagValid(int &i, int l, Accessor &styler) { @@ -224,7 +224,7 @@ void SCI_METHOD LexerLaTeX::Lex(unsigned int startPos, int length, int initStyle chNext = styler.SafeGetCharAt(i + 1); } else if (chNext == '\r' || chNext == '\n') { styler.ColourTo(i, SCE_L_ERROR); - } else if (isascii(chNext)) { + } else if (IsASCII(chNext)) { styler.ColourTo(i + 1, SCE_L_SHORTCMD); if (chNext == '(') { mode = 1; @@ -340,7 +340,7 @@ void SCI_METHOD LexerLaTeX::Lex(unsigned int startPos, int length, int initStyle chNext = styler.SafeGetCharAt(i + 1); } else if (chNext == '\r' || chNext == '\n') { styler.ColourTo(i, SCE_L_ERROR); - } else if (isascii(chNext)) { + } else if (IsASCII(chNext)) { if (chNext == ')') { mode = 0; state = SCE_L_DEFAULT; @@ -382,7 +382,7 @@ void SCI_METHOD LexerLaTeX::Lex(unsigned int startPos, int length, int initStyle chNext = styler.SafeGetCharAt(i + 1); } else if (chNext == '\r' || chNext == '\n') { styler.ColourTo(i, SCE_L_ERROR); - } else if (isascii(chNext)) { + } else if (IsASCII(chNext)) { if (chNext == ']') { mode = 0; state = SCE_L_DEFAULT; diff --git a/lexers/LexLisp.cxx b/lexers/LexLisp.cxx index 08f765ad6..8dd6bd9c4 100644 --- a/lexers/LexLisp.cxx +++ b/lexers/LexLisp.cxx @@ -33,7 +33,7 @@ using namespace Scintilla; #define SCE_LISP_MACRO_DISPATCH 31 static inline bool isLispoperator(char ch) { - if (isascii(ch) && isalnum(ch)) + if (IsASCII(ch) && isalnum(ch)) return false; if (ch == '\'' || ch == '`' || ch == '(' || ch == ')' || ch == '[' || ch == ']' || ch == '{' || ch == '}') return true; @@ -41,7 +41,7 @@ static inline bool isLispoperator(char ch) { } static inline bool isLispwordstart(char ch) { - return isascii(ch) && ch != ';' && !isspacechar(ch) && !isLispoperator(ch) && + return IsASCII(ch) && ch != ';' && !isspacechar(ch) && !isLispoperator(ch) && ch != '\n' && ch != '\r' && ch != '\"'; } @@ -142,7 +142,7 @@ static void ColouriseLispDoc(unsigned int startPos, int length, int initStyle, W } } } else if (state == SCE_LISP_MACRO_DISPATCH) { - if (!(isascii(ch) && isdigit(ch))) { + if (!(IsASCII(ch) && isdigit(ch))) { if (ch != 'r' && ch != 'R' && (i - styler.GetStartSegment()) > 1) { state = SCE_LISP_DEFAULT; } else { diff --git a/lexers/LexMMIXAL.cxx b/lexers/LexMMIXAL.cxx index 43361d429..a766d5aad 100644 --- a/lexers/LexMMIXAL.cxx +++ b/lexers/LexMMIXAL.cxx @@ -35,7 +35,7 @@ static inline bool IsAWordChar(const int ch) { } inline bool isMMIXALOperator(char ch) { - if (isascii(ch) && isalnum(ch)) + if (IsASCII(ch) && isalnum(ch)) return false; if (ch == '+' || ch == '-' || ch == '|' || ch == '^' || ch == '*' || ch == '/' || diff --git a/lexers/LexMPT.cxx b/lexers/LexMPT.cxx index b3eed3442..f3443e1ec 100644 --- a/lexers/LexMPT.cxx +++ b/lexers/LexMPT.cxx @@ -37,7 +37,7 @@ static int GetLotLineState(std::string &line) { // Now finds the first non-blank character unsigned i; // Declares counter here to make it persistent after the for loop for (i = 0; i < line.length(); ++i) { - if (!(isascii(line[i]) && isspace(line[i]))) + if (!(IsASCII(line[i]) && isspace(line[i]))) break; } diff --git a/lexers/LexMSSQL.cxx b/lexers/LexMSSQL.cxx index ce600394c..820030ca2 100644 --- a/lexers/LexMSSQL.cxx +++ b/lexers/LexMSSQL.cxx @@ -36,7 +36,7 @@ using namespace Scintilla; #define KW_MSSQL_OPERATORS 6 static bool isMSSQLOperator(char ch) { - if (isascii(ch) && 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/lexers/LexOpal.cxx b/lexers/LexOpal.cxx index 320fe9bee..df487e63a 100644 --- a/lexers/LexOpal.cxx +++ b/lexers/LexOpal.cxx @@ -295,7 +295,7 @@ inline bool HandleInteger( unsigned int & cur, unsigned int one_too_much, Access } ch = styler.SafeGetCharAt( cur ); - if( !( isascii( ch ) && isdigit( ch ) ) ) + if( !( IsASCII( ch ) && isdigit( ch ) ) ) { styler.ColourTo( cur - 1, SCE_OPAL_INTEGER ); styler.StartSegment( cur ); @@ -314,7 +314,7 @@ inline bool HandleWord( unsigned int & cur, unsigned int one_too_much, Accessor { ch = styler.SafeGetCharAt( cur ); if( ( ch != '_' ) && ( ch != '-' ) && - !( isascii( ch ) && ( islower( ch ) || isupper( ch ) || isdigit( ch ) ) ) ) break; + !( IsASCII( ch ) && ( islower( ch ) || isupper( ch ) || isdigit( ch ) ) ) ) break; cur++; if( cur >= one_too_much ) @@ -490,13 +490,13 @@ static void ColouriseOpalDoc( unsigned int startPos, int length, int initStyle, default: { // Integer - if( isascii( ch ) && isdigit( ch ) ) + if( IsASCII( ch ) && isdigit( ch ) ) { if( !HandleInteger( cur, one_too_much, styler ) ) return; } // Keyword - else if( isascii( ch ) && ( islower( ch ) || isupper( ch ) ) ) + else if( IsASCII( ch ) && ( islower( ch ) || isupper( ch ) ) ) { if( !HandleWord( cur, one_too_much, styler, keywordlists ) ) return; diff --git a/lexers/LexOthers.cxx b/lexers/LexOthers.cxx index 8015af1c9..cdb4b3d17 100644 --- a/lexers/LexOthers.cxx +++ b/lexers/LexOthers.cxx @@ -40,7 +40,7 @@ static bool Is1To9(char ch) { } static bool IsAlphabetic(int ch) { - return isascii(ch) && isalpha(ch); + return IsASCII(ch) && isalpha(ch); } static inline bool AtEOL(Accessor &styler, unsigned int i) { diff --git a/lexers/LexPerl.cxx b/lexers/LexPerl.cxx index de47474c3..f694426ef 100644 --- a/lexers/LexPerl.cxx +++ b/lexers/LexPerl.cxx @@ -1626,7 +1626,7 @@ void SCI_METHOD LexerPerl::Fold(unsigned int startPos, int length, int /* initSt else if (styler.Match(i, "=head")) podHeading = PodHeadingLevel(i, styler); } else if (style == SCE_PL_DATASECTION) { - if (ch == '=' && isascii(chNext) && isalpha(chNext) && levelCurrent == SC_FOLDLEVELBASE) + if (ch == '=' && IsASCII(chNext) && isalpha(chNext) && levelCurrent == SC_FOLDLEVELBASE) levelCurrent++; else if (styler.Match(i, "=cut") && levelCurrent > SC_FOLDLEVELBASE) levelCurrent = (levelCurrent & ~PERL_HEADFOLD_MASK) - 1; diff --git a/lexers/LexPython.cxx b/lexers/LexPython.cxx index fedc31259..7ab3e084c 100644 --- a/lexers/LexPython.cxx +++ b/lexers/LexPython.cxx @@ -385,7 +385,7 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle, base_n_number = false; sc.SetState(SCE_P_NUMBER); } - } else if ((isascii(sc.ch) && isoperator(static_cast<char>(sc.ch))) || sc.ch == '`') { + } else if ((IsASCII(sc.ch) && isoperator(static_cast<char>(sc.ch))) || sc.ch == '`') { sc.SetState(SCE_P_OPERATOR); } else if (sc.ch == '#') { sc.SetState(sc.chNext == '#' ? SCE_P_COMMENTBLOCK : SCE_P_COMMENTLINE); diff --git a/lexers/LexR.cxx b/lexers/LexR.cxx index d18fffb9f..f4b451b25 100644 --- a/lexers/LexR.cxx +++ b/lexers/LexR.cxx @@ -37,7 +37,7 @@ static inline bool IsAWordStart(const int ch) { } static inline bool IsAnOperator(const int ch) { - if (isascii(ch) && 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/lexers/LexSpice.cxx b/lexers/LexSpice.cxx index 5fb5dd776..c921b797f 100644 --- a/lexers/LexSpice.cxx +++ b/lexers/LexSpice.cxx @@ -227,5 +227,5 @@ static inline bool IsWordCharacter(int ch) { } static inline bool IsWordStartCharacter(int ch) { - return (isascii(ch) && isalpha(ch)) || ch == '_'; + return (IsASCII(ch) && isalpha(ch)) || ch == '_'; } diff --git a/lexers/LexTCMD.cxx b/lexers/LexTCMD.cxx index ed747da87..6864612ac 100644 --- a/lexers/LexTCMD.cxx +++ b/lexers/LexTCMD.cxx @@ -30,7 +30,7 @@ using namespace Scintilla; static bool IsAlphabetic(int ch) { - return isascii(ch) && isalpha(ch); + return IsASCII(ch) && isalpha(ch); } static inline bool AtEOL(Accessor &styler, unsigned int i) { diff --git a/lexers/LexYAML.cxx b/lexers/LexYAML.cxx index c808d9743..7752d86e3 100644 --- a/lexers/LexYAML.cxx +++ b/lexers/LexYAML.cxx @@ -150,7 +150,7 @@ static void ColouriseYAMLLine( } else { unsigned int i2 = i; while ((i < lengthLine) && lineBuffer[i]) { - if (!(isascii(lineBuffer[i]) && isdigit(lineBuffer[i])) && lineBuffer[i] != '-' && lineBuffer[i] != '.' && lineBuffer[i] != ',') { + if (!(IsASCII(lineBuffer[i]) && isdigit(lineBuffer[i])) && lineBuffer[i] != '-' && lineBuffer[i] != '.' && lineBuffer[i] != ',') { styler.ColourTo(endPos, SCE_YAML_DEFAULT); return; } diff --git a/src/Document.cxx b/src/Document.cxx index 0637c8d50..98574fe13 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -38,7 +38,7 @@ using namespace Scintilla; #endif static inline bool IsPunctuation(char ch) { - return isascii(ch) && ispunct(ch); + return IsASCII(ch) && ispunct(ch); } void LexInterface::Colourise(int start, int end) { @@ -1965,10 +1965,10 @@ int Document::WordPartLeft(int pos) { --pos; if (!isspacechar(cb.CharAt(pos))) ++pos; - } else if (!isascii(startChar)) { - while (pos > 0 && !isascii(cb.CharAt(pos))) + } else if (!IsASCII(startChar)) { + while (pos > 0 && !IsASCII(cb.CharAt(pos))) --pos; - if (isascii(cb.CharAt(pos))) + if (IsASCII(cb.CharAt(pos))) ++pos; } else { ++pos; @@ -1986,8 +1986,8 @@ int Document::WordPartRight(int pos) { ++pos; startChar = cb.CharAt(pos); } - if (!isascii(startChar)) { - while (pos < length && !isascii(cb.CharAt(pos))) + if (!IsASCII(startChar)) { + while (pos < length && !IsASCII(cb.CharAt(pos))) ++pos; } else if (IsLowerCase(startChar)) { while (pos < length && IsLowerCase(cb.CharAt(pos))) |