From 7927d7da0bbc485a142426bd6dbb9d6db8c2c105 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 13 Jan 2019 16:30:28 +1100 Subject: Backport: 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. Backport of changeset 7228:348e55f8107c. --- cocoa/ScintillaCocoa.h | 1 - gtk/ScintillaGTK.cxx | 1 - lexlib/StyleContext.cxx | 1 - src/CharClassify.cxx | 5 +++-- src/EditView.cxx | 1 - src/Editor.cxx | 1 - src/MarginView.cxx | 1 - win32/PlatWin.cxx | 1 - win32/ScintillaWin.cxx | 1 - 9 files changed, 3 insertions(+), 10 deletions(-) diff --git a/cocoa/ScintillaCocoa.h b/cocoa/ScintillaCocoa.h index ddfa205d6..ab0fca20d 100644 --- a/cocoa/ScintillaCocoa.h +++ b/cocoa/ScintillaCocoa.h @@ -15,7 +15,6 @@ #include #include -#include #include #include diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index b1dbd9bfe..24d2ef212 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include diff --git a/lexlib/StyleContext.cxx b/lexlib/StyleContext.cxx index 683e21453..fe56e53d7 100644 --- a/lexlib/StyleContext.cxx +++ b/lexlib/StyleContext.cxx @@ -7,7 +7,6 @@ #include #include -#include #include "ILexer.h" 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 29ff92501..3143134d2 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 045266604..563b3a665 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 3662c7eef..8473974ba 100644 --- a/src/MarginView.cxx +++ b/src/MarginView.cxx @@ -9,7 +9,6 @@ #include #include #include -#include #include #include diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index e5cff0042..74d212031 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 5b78a3ed6..6a5618918 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include -- cgit v1.2.3