From eba913d887726b25205356bb971f6eadc207033a Mon Sep 17 00:00:00 2001 From: Christian Grasser Date: Mon, 13 Mar 2017 21:28:02 +0100 Subject: [PATCH] Scintilla Namespace - corrected missing scintilla namespaces - activated usage of scintilla namespace in nmakefile and vcxproj Closes #3033 --- scintilla/boostregex/AnsiDocumentIterator.h | 8 ++++++++ scintilla/boostregex/UTF8DocumentIterator.cxx | 3 +++ scintilla/boostregex/UTF8DocumentIterator.h | 10 ++++++++++ scintilla/lexers/LexObjC.cxx | 4 ++++ scintilla/lexers/LexSearchResult.cxx | 4 ++++ scintilla/win32/SciLexer.vcxproj | 2 +- scintilla/win32/scintilla.mak | 3 +++ 7 files changed, 33 insertions(+), 1 deletion(-) diff --git a/scintilla/boostregex/AnsiDocumentIterator.h b/scintilla/boostregex/AnsiDocumentIterator.h index 4e469800..b4e0e368 100644 --- a/scintilla/boostregex/AnsiDocumentIterator.h +++ b/scintilla/boostregex/AnsiDocumentIterator.h @@ -1,6 +1,10 @@ #ifndef ANSIDOCUMENTITERATOR_H_12481491281240 #define ANSIDOCUMENTITERATOR_H_12481491281240 +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + class AnsiDocumentIterator : public std::iterator { public: @@ -91,4 +95,8 @@ private: Document* m_doc; }; +#ifdef SCI_NAMESPACE +} +#endif + #endif \ No newline at end of file diff --git a/scintilla/boostregex/UTF8DocumentIterator.cxx b/scintilla/boostregex/UTF8DocumentIterator.cxx index e075c4f3..ab995314 100644 --- a/scintilla/boostregex/UTF8DocumentIterator.cxx +++ b/scintilla/boostregex/UTF8DocumentIterator.cxx @@ -1,5 +1,8 @@ #include "UTF8DocumentIterator.h" +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif void UTF8DocumentIterator::readCharacter() { diff --git a/scintilla/boostregex/UTF8DocumentIterator.h b/scintilla/boostregex/UTF8DocumentIterator.h index fee1b6b4..c8522038 100644 --- a/scintilla/boostregex/UTF8DocumentIterator.h +++ b/scintilla/boostregex/UTF8DocumentIterator.h @@ -15,6 +15,12 @@ #include "CaseFolder.h" #include + +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + + class UTF8DocumentIterator : public std::iterator { public: @@ -153,4 +159,8 @@ private: static const unsigned char m_firstByteMask[]; }; +#ifdef SCI_NAMESPACE +} +#endif + #endif // UTF8DOCUMENTITERATOR_H_3452843291318441149 diff --git a/scintilla/lexers/LexObjC.cxx b/scintilla/lexers/LexObjC.cxx index 72f70586..bfa57d5a 100644 --- a/scintilla/lexers/LexObjC.cxx +++ b/scintilla/lexers/LexObjC.cxx @@ -27,6 +27,10 @@ #include "Scintilla.h" #include "SciLexer.h" +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + #define KEYWORD_BOXHEADER 1 #define KEYWORD_FOLDCONTRACTED 2 diff --git a/scintilla/lexers/LexSearchResult.cxx b/scintilla/lexers/LexSearchResult.cxx index cfb76608..ffb15f8d 100644 --- a/scintilla/lexers/LexSearchResult.cxx +++ b/scintilla/lexers/LexSearchResult.cxx @@ -39,6 +39,10 @@ #include "CharacterSet.h" #include "LexerModule.h" +#ifdef SCI_NAMESPACE +using namespace Scintilla; +#endif + // The following definitions are a copy of the ones in FindReplaceDlg.h enum { searchHeaderLevel = SC_FOLDLEVELBASE + 1, fileHeaderLevel, resultLevel }; diff --git a/scintilla/win32/SciLexer.vcxproj b/scintilla/win32/SciLexer.vcxproj index f7f70579..05f24192 100644 --- a/scintilla/win32/SciLexer.vcxproj +++ b/scintilla/win32/SciLexer.vcxproj @@ -57,7 +57,7 @@ Level4 - WIN32;SCI_LEXER;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES;_CRT_SECURE_NO_DEPRECATE;_WINDOWS;_USRDLL;SCI_OWNREGEX;%(PreprocessorDefinitions) + WIN32;SCI_LEXER;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES;_CRT_SECURE_NO_DEPRECATE;_WINDOWS;_USRDLL;SCI_OWNREGEX;SCI_NAMESPACE;%(PreprocessorDefinitions) ..\include;..\src;..\lexlib; true true diff --git a/scintilla/win32/scintilla.mak b/scintilla/win32/scintilla.mak index d9b5da58..d2371bde 100644 --- a/scintilla/win32/scintilla.mak +++ b/scintilla/win32/scintilla.mak @@ -51,6 +51,9 @@ LDFLAGS=$(LDDEBUG) $(LDFLAGS) CXXFLAGS=$(CXXFLAGS) $(CXXNDEBUG) !ENDIF +#unconditionally use scintilla namespace +CXXFLAGS=$(CXXFLAGS) -DSCI_NAMESPACE + INCLUDEDIRS=-I../include -I../src -I../lexlib CXXFLAGS=$(CXXFLAGS) $(INCLUDEDIRS)