From 3a0bafea3e458fbe58d7de7bd242934784ceb02b Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 13 Jan 2019 16:30:28 +1100 Subject: Replace the only use of a function from with a Scintilla function. Remove inclusion of except in lexers as cctype functions often behave poorly and may crash for out of bounds arguments. --- src/CharClassify.cxx | 5 +++-- src/EditView.cxx | 1 - src/Editor.cxx | 1 - src/MarginView.cxx | 1 - 4 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/CharClassify.cxx b/src/CharClassify.cxx index ba8433e62..5ae47a2ef 100644 --- a/src/CharClassify.cxx +++ b/src/CharClassify.cxx @@ -6,10 +6,11 @@ // The License.txt file describes the conditions under which this software may be distributed. #include -#include +#include #include +#include "CharacterSet.h" #include "CharClassify.h" using namespace Scintilla; @@ -25,7 +26,7 @@ void CharClassify::SetDefaultCharClasses(bool includeWordClass) { charClass[ch] = ccNewLine; else if (ch < 0x20 || ch == ' ') charClass[ch] = ccSpace; - else if (includeWordClass && (ch >= 0x80 || isalnum(ch) || ch == '_')) + else if (includeWordClass && (ch >= 0x80 || IsAlphaNumeric(ch) || ch == '_')) charClass[ch] = ccWord; else charClass[ch] = ccPunctuation; diff --git a/src/EditView.cxx b/src/EditView.cxx index c97f2ae87..6356dac63 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -9,7 +9,6 @@ #include #include #include -#include #include #include diff --git a/src/Editor.cxx b/src/Editor.cxx index 671e8a3b0..efae01a4d 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -9,7 +9,6 @@ #include #include #include -#include #include #include diff --git a/src/MarginView.cxx b/src/MarginView.cxx index 0b52056d4..9dcd81f3a 100644 --- a/src/MarginView.cxx +++ b/src/MarginView.cxx @@ -9,7 +9,6 @@ #include #include #include -#include #include #include -- cgit v1.2.3