aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorscaraveo <unknown>2007-06-01 00:57:26 +0000
committerscaraveo <unknown>2007-06-01 00:57:26 +0000
commit710f716e96f6e9ee9eb410b343b78b3c4d95bc46 (patch)
tree55e5547869daa67b6a639c89825058baf75545c7 /src
parentcac98b923422b91839f7c285a9b78ea282cd6f0a (diff)
downloadscintilla-mirror-710f716e96f6e9ee9eb410b343b78b3c4d95bc46.tar.gz
integrate OS X support for scintilla. a big patch with a little commit message :)
- now uses namespaces (optionally for non-os x) to avoid conflicts with OS X libraries - several fixes in the OS X layer since the branch was commited in 2005 - used in Komodo since 2005, so pretty stable
Diffstat (limited to 'src')
-rw-r--r--src/AutoComplete.cxx4
-rw-r--r--src/AutoComplete.h8
-rw-r--r--src/CallTip.cxx15
-rw-r--r--src/CallTip.h8
-rw-r--r--src/CellBuffer.cxx4
-rw-r--r--src/CellBuffer.h8
-rw-r--r--src/ContractionState.cxx4
-rw-r--r--src/ContractionState.h8
-rw-r--r--src/Decoration.cxx4
-rw-r--r--src/Decoration.h8
-rw-r--r--src/Document.cxx4
-rw-r--r--src/Document.h8
-rw-r--r--src/DocumentAccessor.cxx4
-rw-r--r--src/DocumentAccessor.h8
-rw-r--r--src/Editor.cxx20
-rw-r--r--src/Editor.h8
-rw-r--r--src/ExternalLexer.cxx4
-rw-r--r--src/ExternalLexer.h8
-rw-r--r--src/Indicator.cxx4
-rw-r--r--src/Indicator.h8
-rw-r--r--src/KeyMap.cxx4
-rw-r--r--src/KeyMap.h8
-rw-r--r--src/KeyWords.cxx4
-rw-r--r--src/LexAPDL.cxx3
-rw-r--r--src/LexAU3.cxx4
-rw-r--r--src/LexAVE.cxx3
-rw-r--r--src/LexAda.cxx4
-rw-r--r--src/LexAsm.cxx3
-rw-r--r--src/LexAsn1.cxx4
-rw-r--r--src/LexBaan.cxx4
-rw-r--r--src/LexBash.cxx4
-rw-r--r--src/LexBasic.cxx4
-rw-r--r--src/LexBullant.cxx3
-rw-r--r--src/LexCLW.cxx4
-rw-r--r--src/LexCPP.cxx4
-rw-r--r--src/LexCSS.cxx4
-rw-r--r--src/LexCaml.cxx4
-rw-r--r--src/LexCmake.cxx3
-rw-r--r--src/LexConf.cxx4
-rw-r--r--src/LexCrontab.cxx4
-rw-r--r--src/LexCsound.cxx3
-rw-r--r--src/LexD.cxx4
-rw-r--r--src/LexEScript.cxx3
-rw-r--r--src/LexEiffel.cxx4
-rw-r--r--src/LexErlang.cxx4
-rw-r--r--src/LexFlagship.cxx4
-rw-r--r--src/LexForth.cxx4
-rw-r--r--src/LexFortran.cxx5
-rw-r--r--src/LexGAP.cxx3
-rw-r--r--src/LexGen.py31
-rw-r--r--src/LexGui4Cli.cxx4
-rw-r--r--src/LexHTML.cxx4
-rw-r--r--src/LexHaskell.cxx4
-rw-r--r--src/LexInno.cxx4
-rw-r--r--src/LexKix.cxx4
-rw-r--r--src/LexLisp.cxx4
-rw-r--r--src/LexLout.cxx4
-rw-r--r--src/LexLua.cxx4
-rw-r--r--src/LexMMIXAL.cxx3
-rw-r--r--src/LexMPT.cxx4
-rw-r--r--src/LexMSSQL.cxx4
-rw-r--r--src/LexMatlab.cxx3
-rw-r--r--src/LexMetapost.cxx4
-rw-r--r--src/LexNsis.cxx4
-rw-r--r--src/LexOpal.cxx4
-rw-r--r--src/LexOthers.cxx4
-rw-r--r--src/LexPB.cxx4
-rw-r--r--src/LexPOV.cxx4
-rw-r--r--src/LexPS.cxx4
-rw-r--r--src/LexPascal.cxx4
-rw-r--r--src/LexPerl.cxx4
-rw-r--r--src/LexPython.cxx4
-rw-r--r--src/LexRebol.cxx3
-rw-r--r--src/LexSQL.cxx4
-rw-r--r--src/LexScriptol.cxx4
-rw-r--r--src/LexSmalltalk.cxx4
-rw-r--r--src/LexSpecman.cxx3
-rw-r--r--src/LexSpice.cxx4
-rw-r--r--src/LexTADS3.cxx4
-rw-r--r--src/LexTCL.cxx4
-rw-r--r--src/LexTeX.cxx4
-rw-r--r--src/LexVB.cxx4
-rw-r--r--src/LexVHDL.cxx4
-rw-r--r--src/LexVerilog.cxx4
-rw-r--r--src/LexYAML.cxx4
-rw-r--r--src/LineMarker.cxx4
-rw-r--r--src/LineMarker.h8
-rw-r--r--src/PropSet.cxx4
-rw-r--r--src/RESearch.cxx4
-rw-r--r--src/RESearch.h8
-rw-r--r--src/RunStyles.cxx4
-rw-r--r--src/RunStyles.h8
-rw-r--r--src/SVector.h8
-rw-r--r--src/ScintillaBase.cxx4
-rw-r--r--src/ScintillaBase.h8
-rw-r--r--src/Style.cxx4
-rw-r--r--src/Style.h8
-rw-r--r--src/StyleContext.cxx4
-rw-r--r--src/StyleContext.h8
-rw-r--r--src/ViewStyle.cxx4
-rw-r--r--src/ViewStyle.h8
-rw-r--r--src/WindowAccessor.cxx4
-rw-r--r--src/XPM.cxx4
-rw-r--r--src/XPM.h8
104 files changed, 525 insertions, 14 deletions
diff --git a/src/AutoComplete.cxx b/src/AutoComplete.cxx
index 753adca77..af6154ea1 100644
--- a/src/AutoComplete.cxx
+++ b/src/AutoComplete.cxx
@@ -14,6 +14,10 @@
#include "PropSet.h"
#include "AutoComplete.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
AutoComplete::AutoComplete() :
active(false),
separator(' '),
diff --git a/src/AutoComplete.h b/src/AutoComplete.h
index 10577ca38..b10cdce82 100644
--- a/src/AutoComplete.h
+++ b/src/AutoComplete.h
@@ -8,6 +8,10 @@
#ifndef AUTOCOMPLETE_H
#define AUTOCOMPLETE_H
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
/**
*/
class AutoComplete {
@@ -67,4 +71,8 @@ public:
void Select(const char *word);
};
+#ifdef SCI_NAMESPACE
+}
+#endif
+
#endif
diff --git a/src/CallTip.cxx b/src/CallTip.cxx
index f4bc5f83c..9f5f88476 100644
--- a/src/CallTip.cxx
+++ b/src/CallTip.cxx
@@ -12,6 +12,11 @@
#include "Scintilla.h"
#include "CallTip.h"
+#include <stdio.h>
+
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
static const int insetX = 5; // text inset in x from calltip border
static const int widthArrow = 14;
@@ -29,8 +34,14 @@ CallTip::CallTip() {
tabSize = 0;
useStyleCallTip = false; // for backwards compatibility
+#ifdef __APPLE__
+ // proper apple colours for the default
+ colourBG.desired = ColourDesired(0xff, 0xff, 0xc6);
+ colourUnSel.desired = ColourDesired(0, 0, 0);
+#else
colourBG.desired = ColourDesired(0xff, 0xff, 0xff);
colourUnSel.desired = ColourDesired(0x80, 0x80, 0x80);
+#endif
colourSel.desired = ColourDesired(0, 0, 0x80);
colourShade.desired = ColourDesired(0, 0, 0);
colourLight.desired = ColourDesired(0xc0, 0xc0, 0xc0);
@@ -170,6 +181,7 @@ int CallTip::PaintContents(Surface *surfaceWindow, bool draw) {
char *chunkVal = val;
bool moreChunks = true;
int maxWidth = 0;
+
while (moreChunks) {
char *chunkEnd = strchr(chunkVal, '\n');
if (chunkEnd == NULL) {
@@ -217,6 +229,8 @@ void CallTip::PaintCT(Surface *surfaceWindow) {
offsetMain = insetX; // initial alignment assuming no arrows
PaintContents(surfaceWindow, true);
+#ifndef __APPLE__
+ // OSX doesn't put borders on "help tags"
// Draw a raised border around the edges of the window
surfaceWindow->MoveTo(0, rcClientSize.bottom - 1);
surfaceWindow->PenColour(colourShade.allocated);
@@ -225,6 +239,7 @@ void CallTip::PaintCT(Surface *surfaceWindow) {
surfaceWindow->PenColour(colourLight.allocated);
surfaceWindow->LineTo(0, 0);
surfaceWindow->LineTo(0, rcClientSize.bottom - 1);
+#endif
}
void CallTip::MouseClick(Point pt) {
diff --git a/src/CallTip.h b/src/CallTip.h
index 9848a10af..bdf1123c7 100644
--- a/src/CallTip.h
+++ b/src/CallTip.h
@@ -8,6 +8,10 @@
#ifndef CALLTIP_H
#define CALLTIP_H
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
/**
*/
class CallTip {
@@ -76,4 +80,8 @@ public:
void SetForeBack(const ColourPair &fore, const ColourPair &back);
};
+#ifdef SCI_NAMESPACE
+}
+#endif
+
#endif
diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx
index d7c9c86f4..15db9a72a 100644
--- a/src/CellBuffer.cxx
+++ b/src/CellBuffer.cxx
@@ -18,6 +18,10 @@
#include "Partitioning.h"
#include "CellBuffer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
MarkerHandleSet::MarkerHandleSet() {
root = 0;
}
diff --git a/src/CellBuffer.h b/src/CellBuffer.h
index 9cece4854..e790a8196 100644
--- a/src/CellBuffer.h
+++ b/src/CellBuffer.h
@@ -8,6 +8,10 @@
#ifndef CELLBUFFER_H
#define CELLBUFFER_H
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
/**
* This holds the marker identifier and the marker type to display.
* MarkerHandleNumbers are members of lists.
@@ -228,4 +232,8 @@ public:
void ClearLevels();
};
+#ifdef SCI_NAMESPACE
+}
+#endif
+
#endif
diff --git a/src/ContractionState.cxx b/src/ContractionState.cxx
index 49148317c..b44b4e742 100644
--- a/src/ContractionState.cxx
+++ b/src/ContractionState.cxx
@@ -9,6 +9,10 @@
#include "ContractionState.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
OneLine::OneLine() {
displayLine = 0;
//docLine = 0;
diff --git a/src/ContractionState.h b/src/ContractionState.h
index e15ee3bbe..dbee69db7 100644
--- a/src/ContractionState.h
+++ b/src/ContractionState.h
@@ -8,6 +8,10 @@
#ifndef CONTRACTIONSTATE_H
#define CONTRACTIONSTATE_H
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
/**
*/
class OneLine {
@@ -62,4 +66,8 @@ public:
void ShowAll();
};
+#ifdef SCI_NAMESPACE
+}
+#endif
+
#endif
diff --git a/src/Decoration.cxx b/src/Decoration.cxx
index 6f19119e1..e4ac0e07c 100644
--- a/src/Decoration.cxx
+++ b/src/Decoration.cxx
@@ -17,6 +17,10 @@
#include "RunStyles.h"
#include "Decoration.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
Decoration::Decoration(int indicator_) : next(0), indicator(indicator_) {
}
diff --git a/src/Decoration.h b/src/Decoration.h
index 9f3473a3d..2809641af 100644
--- a/src/Decoration.h
+++ b/src/Decoration.h
@@ -7,6 +7,10 @@
#ifndef DECORATION_H
#define DECORATION_H
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
class Decoration {
public:
Decoration *next;
@@ -53,4 +57,8 @@ public:
int End(int indicator, int position);
};
+#ifdef SCI_NAMESPACE
+}
+#endif
+
#endif
diff --git a/src/Document.cxx b/src/Document.cxx
index 753d325ef..cfcda92be 100644
--- a/src/Document.cxx
+++ b/src/Document.cxx
@@ -23,6 +23,10 @@
#include "Document.h"
#include "RESearch.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
// This is ASCII specific but is safe with chars >= 0x80
static inline bool isspacechar(unsigned char ch) {
return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d));
diff --git a/src/Document.h b/src/Document.h
index 3659f86a4..b9774efe0 100644
--- a/src/Document.h
+++ b/src/Document.h
@@ -8,6 +8,10 @@
#ifndef DOCUMENT_H
#define DOCUMENT_H
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
/**
* A Position is a position within a document between two characters or at the beginning or end.
* Sometimes used as a character index where it identifies the character after the position.
@@ -305,4 +309,8 @@ public:
virtual void NotifyStyleNeeded(Document *doc, void *userData, int endPos) = 0;
};
+#ifdef SCI_NAMESPACE
+}
+#endif
+
#endif
diff --git a/src/DocumentAccessor.cxx b/src/DocumentAccessor.cxx
index e28264f73..b46eeba85 100644
--- a/src/DocumentAccessor.cxx
+++ b/src/DocumentAccessor.cxx
@@ -25,6 +25,10 @@
#include "Decoration.h"
#include "Document.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
DocumentAccessor::~DocumentAccessor() {
}
diff --git a/src/DocumentAccessor.h b/src/DocumentAccessor.h
index 28f676db3..a3a939d0d 100644
--- a/src/DocumentAccessor.h
+++ b/src/DocumentAccessor.h
@@ -6,6 +6,10 @@
// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
class Document;
/**
@@ -66,3 +70,7 @@ public:
int IndentAmount(int line, int *flags, PFNIsCommentLeader pfnIsCommentLeader = 0);
void IndicatorFill(int start, int end, int indicator, int value);
};
+
+#ifdef SCI_NAMESPACE
+}
+#endif
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 0147308ad..46684a7fc 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -34,6 +34,10 @@
#include "Document.h"
#include "Editor.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
/*
return whether this modification represents an operation that
may reasonably be deferred (not done now OR [possibly] at all)
@@ -594,6 +598,10 @@ public:
}
};
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
/**
* Allows to iterate through the lines of a selection.
* Althought it can be called for a stream selection, in most cases
@@ -672,6 +680,10 @@ public:
}
};
+#ifdef SCI_NAMESPACE
+}
+#endif
+
Point Editor::LocationFromPosition(int pos) {
Point pt;
RefreshStyleData();
@@ -5343,6 +5355,14 @@ void Editor::ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, b
else
inDragDrop = ddNone;
}
+#ifdef __APPLE__
+ // we need to additionaly check if the mouse moved before we
+ // decide that we can in fact start a drag session. Currently
+ // only OSX will return anything but true.
+ if (inDragDrop == ddInitial && !Platform::WaitMouseMoved(pt)) {
+ inDragDrop = ddNone;
+ }
+#endif
SetMouseCapture(true);
if (inDragDrop != ddInitial) {
SetDragPosition(invalidPosition);
diff --git a/src/Editor.h b/src/Editor.h
index 0ce6f27fb..a31777611 100644
--- a/src/Editor.h
+++ b/src/Editor.h
@@ -8,6 +8,10 @@
#ifndef EDITOR_H
#define EDITOR_H
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
/**
*/
class Caret {
@@ -585,4 +589,8 @@ public:
}
};
+#ifdef SCI_NAMESPACE
+}
+#endif
+
#endif
diff --git a/src/ExternalLexer.cxx b/src/ExternalLexer.cxx
index acf45bc2d..0344debd7 100644
--- a/src/ExternalLexer.cxx
+++ b/src/ExternalLexer.cxx
@@ -21,6 +21,10 @@
#include "KeyWords.h"
#include "ExternalLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
LexerManager *LexerManager::theInstance = NULL;
//------------------------------------------
diff --git a/src/ExternalLexer.h b/src/ExternalLexer.h
index 23ee0412b..55e127b40 100644
--- a/src/ExternalLexer.h
+++ b/src/ExternalLexer.h
@@ -14,6 +14,10 @@
#define EXT_LEXER_DECL
#endif
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
// External Lexer function definitions...
typedef void (EXT_LEXER_DECL *ExtLexerFunction)(unsigned int lexer, unsigned int startPos, int length, int initStyle,
char *words[], WindowID window, char *props);
@@ -92,4 +96,8 @@ public:
~LMMinder();
};
+#ifdef SCI_NAMESPACE
+}
+#endif
+
#endif
diff --git a/src/Indicator.cxx b/src/Indicator.cxx
index 7624a4a52..139e2b0ea 100644
--- a/src/Indicator.cxx
+++ b/src/Indicator.cxx
@@ -10,6 +10,10 @@
#include "Scintilla.h"
#include "Indicator.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine) {
surface->PenColour(fore.allocated);
int ymid = (rc.bottom + rc.top) / 2;
diff --git a/src/Indicator.h b/src/Indicator.h
index cebc22d80..2081db544 100644
--- a/src/Indicator.h
+++ b/src/Indicator.h
@@ -8,6 +8,10 @@
#ifndef INDICATOR_H
#define INDICATOR_H
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
/**
*/
class Indicator {
@@ -20,4 +24,8 @@ public:
void Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine);
};
+#ifdef SCI_NAMESPACE
+}
+#endif
+
#endif
diff --git a/src/KeyMap.cxx b/src/KeyMap.cxx
index bfa6e2d78..c223d5b59 100644
--- a/src/KeyMap.cxx
+++ b/src/KeyMap.cxx
@@ -11,6 +11,10 @@
#include "KeyMap.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
KeyMap::KeyMap() : kmap(0), len(0), alloc(0) {
for (int i = 0; MapDefault[i].key; i++) {
AssignCmdKey(MapDefault[i].key,
diff --git a/src/KeyMap.h b/src/KeyMap.h
index 364df684f..fd9005de8 100644
--- a/src/KeyMap.h
+++ b/src/KeyMap.h
@@ -8,6 +8,10 @@
#ifndef KEYTOCOMMAND_H
#define KEYTOCOMMAND_H
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
#define SCI_NORM 0
#define SCI_SHIFT SCMOD_SHIFT
#define SCI_CTRL SCMOD_CTRL
@@ -40,4 +44,8 @@ public:
unsigned int Find(int key, int modifiers); // 0 returned on failure
};
+#ifdef SCI_NAMESPACE
+}
+#endif
+
#endif
diff --git a/src/KeyWords.cxx b/src/KeyWords.cxx
index 273b04779..9c65b81d2 100644
--- a/src/KeyWords.cxx
+++ b/src/KeyWords.cxx
@@ -19,6 +19,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
const LexerModule *LexerModule::base = 0;
int LexerModule::nextLanguage = SCLEX_AUTOMATIC+1;
diff --git a/src/LexAPDL.cxx b/src/LexAPDL.cxx
index 1cf263e50..ba6a77ca6 100644
--- a/src/LexAPDL.cxx
+++ b/src/LexAPDL.cxx
@@ -21,6 +21,9 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
static inline bool IsAWordChar(const int ch) {
return (ch < 0x80 && (isalnum(ch) || ch == '_'));
diff --git a/src/LexAU3.cxx b/src/LexAU3.cxx
index 1a260d337..ffd9f71fa 100644
--- a/src/LexAU3.cxx
+++ b/src/LexAU3.cxx
@@ -63,6 +63,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
static inline bool IsTypeCharacter(const int ch)
{
return ch == '$';
diff --git a/src/LexAVE.cxx b/src/LexAVE.cxx
index e30ee7dc9..2b7029b1a 100644
--- a/src/LexAVE.cxx
+++ b/src/LexAVE.cxx
@@ -22,6 +22,9 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
static inline bool IsAWordChar(const int ch) {
diff --git a/src/LexAda.cxx b/src/LexAda.cxx
index 0227ce110..f6c9e7ee7 100644
--- a/src/LexAda.cxx
+++ b/src/LexAda.cxx
@@ -19,6 +19,10 @@
#include "SciLexer.h"
#include "SString.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
/*
* Interface
*/
diff --git a/src/LexAsm.cxx b/src/LexAsm.cxx
index 93e0b3718..9dd4df456 100644
--- a/src/LexAsm.cxx
+++ b/src/LexAsm.cxx
@@ -23,6 +23,9 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
static inline bool IsAWordChar(const int ch) {
return (ch < 0x80) && (isalnum(ch) || ch == '.' ||
diff --git a/src/LexAsn1.cxx b/src/LexAsn1.cxx
index 1600e6329..36f1d5dc2 100644
--- a/src/LexAsn1.cxx
+++ b/src/LexAsn1.cxx
@@ -20,6 +20,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
// Some char test functions
static bool isAsn1Number(int ch)
{
diff --git a/src/LexBaan.cxx b/src/LexBaan.cxx
index 3a36eb8f2..a6847db71 100644
--- a/src/LexBaan.cxx
+++ b/src/LexBaan.cxx
@@ -21,6 +21,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
static inline bool IsAWordChar(const int ch) {
return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_' || ch == '$' || ch == ':');
}
diff --git a/src/LexBash.cxx b/src/LexBash.cxx
index 242985a96..269192500 100644
--- a/src/LexBash.cxx
+++ b/src/LexBash.cxx
@@ -28,6 +28,10 @@
#define HERE_DELIM_MAX 256
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
static inline int translateBashDigit(char ch) {
if (ch >= '0' && ch <= '9') {
return ch - '0';
diff --git a/src/LexBasic.cxx b/src/LexBasic.cxx
index 79ba2b891..1c5d7b425 100644
--- a/src/LexBasic.cxx
+++ b/src/LexBasic.cxx
@@ -31,6 +31,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
/* Bits:
* 1 - whitespace
* 2 - operator
diff --git a/src/LexBullant.cxx b/src/LexBullant.cxx
index 902f89c1e..cc60cd2fc 100644
--- a/src/LexBullant.cxx
+++ b/src/LexBullant.cxx
@@ -15,6 +15,9 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
static int classifyWordBullant(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
char s[100];
diff --git a/src/LexCLW.cxx b/src/LexCLW.cxx
index e28e4b13b..624ef0f2b 100644
--- a/src/LexCLW.cxx
+++ b/src/LexCLW.cxx
@@ -21,6 +21,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
// Is an end of line character
inline bool IsEOL(const int ch) {
diff --git a/src/LexCPP.cxx b/src/LexCPP.cxx
index 51f32430b..bc3177cb3 100644
--- a/src/LexCPP.cxx
+++ b/src/LexCPP.cxx
@@ -20,6 +20,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
#define SET_LOWER "abcdefghijklmnopqrstuvwxyz"
#define SET_UPPER "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#define SET_DIGITS "0123456789"
diff --git a/src/LexCSS.cxx b/src/LexCSS.cxx
index 963a7b3ef..f5c112d6f 100644
--- a/src/LexCSS.cxx
+++ b/src/LexCSS.cxx
@@ -22,6 +22,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
static inline bool IsAWordChar(const unsigned int ch) {
return (isalnum(ch) || ch == '-' || ch == '_' || ch >= 161); // _ is not in fact correct CSS word-character
diff --git a/src/LexCaml.cxx b/src/LexCaml.cxx
index 5f4fad5fb..539eee0de 100644
--- a/src/LexCaml.cxx
+++ b/src/LexCaml.cxx
@@ -42,6 +42,10 @@ static const int baseT[24] = {
0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0,16 /* M - X */
};
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
#ifdef BUILD_AS_EXTERNAL_LEXER
/*
(actually seems to work!)
diff --git a/src/LexCmake.cxx b/src/LexCmake.cxx
index 3d5ee7581..f63eb399f 100644
--- a/src/LexCmake.cxx
+++ b/src/LexCmake.cxx
@@ -19,6 +19,9 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
static bool isCmakeNumber(char ch)
{
diff --git a/src/LexConf.cxx b/src/LexConf.cxx
index c33cdb5ce..969275f92 100644
--- a/src/LexConf.cxx
+++ b/src/LexConf.cxx
@@ -23,6 +23,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
static void ColouriseConfDoc(unsigned int startPos, int length, int, WordList *keywordLists[], Accessor &styler)
{
int state = SCE_CONF_DEFAULT;
diff --git a/src/LexCrontab.cxx b/src/LexCrontab.cxx
index d139bb4f1..62044c370 100644
--- a/src/LexCrontab.cxx
+++ b/src/LexCrontab.cxx
@@ -21,6 +21,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
static void ColouriseNncrontabDoc(unsigned int startPos, int length, int, WordList
*keywordLists[], Accessor &styler)
{
diff --git a/src/LexCsound.cxx b/src/LexCsound.cxx
index 27f7b990a..4162c9b3a 100644
--- a/src/LexCsound.cxx
+++ b/src/LexCsound.cxx
@@ -20,6 +20,9 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
static inline bool IsAWordChar(const int ch) {
return (ch < 0x80) && (isalnum(ch) || ch == '.' ||
diff --git a/src/LexD.cxx b/src/LexD.cxx
index 9103d25e7..95be129d5 100644
--- a/src/LexD.cxx
+++ b/src/LexD.cxx
@@ -21,6 +21,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
/*/ Nested comments require keeping the value of the nesting level for every
position in the document. But since scintilla always styles line by line,
we only need to store one value per line. The non-negative number indicates
diff --git a/src/LexEScript.cxx b/src/LexEScript.cxx
index 49411588a..295aaec53 100644
--- a/src/LexEScript.cxx
+++ b/src/LexEScript.cxx
@@ -19,6 +19,9 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
static inline bool IsAWordChar(const int ch) {
diff --git a/src/LexEiffel.cxx b/src/LexEiffel.cxx
index 4aed7c6af..03dea5e73 100644
--- a/src/LexEiffel.cxx
+++ b/src/LexEiffel.cxx
@@ -20,6 +20,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
static inline bool isEiffelOperator(unsigned int ch) {
// '.' left out as it is used to make up numbers
return ch == '*' || ch == '/' || ch == '\\' || ch == '-' || ch == '+' ||
diff --git a/src/LexErlang.cxx b/src/LexErlang.cxx
index 9444eb950..809dcefe9 100644
--- a/src/LexErlang.cxx
+++ b/src/LexErlang.cxx
@@ -21,6 +21,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
/*
TODO:
o _Param should be a new lexical type
diff --git a/src/LexFlagship.cxx b/src/LexFlagship.cxx
index db0314eb9..baf2941a8 100644
--- a/src/LexFlagship.cxx
+++ b/src/LexFlagship.cxx
@@ -22,6 +22,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
static bool IsFlagShipComment(Accessor &styler, int pos, int len) {
return len>0 && styler[pos]=='\'';
}
diff --git a/src/LexForth.cxx b/src/LexForth.cxx
index 3f128156d..f097b0e00 100644
--- a/src/LexForth.cxx
+++ b/src/LexForth.cxx
@@ -21,6 +21,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
bool is_whitespace(int ch){
return ch == '\n' || ch == '\r' || ch == '\t' || ch == ' ';
}
diff --git a/src/LexFortran.cxx b/src/LexFortran.cxx
index 3ab1116ea..c68c5b62f 100644
--- a/src/LexFortran.cxx
+++ b/src/LexFortran.cxx
@@ -19,6 +19,11 @@
#include "KeyWords.h"
#include "Scintilla.h"
#include "SciLexer.h"
+
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
/***********************************************/
static inline bool IsAWordChar(const int ch) {
return (ch < 0x80) && (isalnum(ch) || ch == '_' || ch == '%');
diff --git a/src/LexGAP.cxx b/src/LexGAP.cxx
index 6878ab76b..25bd33b90 100644
--- a/src/LexGAP.cxx
+++ b/src/LexGAP.cxx
@@ -21,6 +21,9 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
static inline bool IsGAPOperator(char ch) {
if (isalnum(ch)) return false;
diff --git a/src/LexGen.py b/src/LexGen.py
index c4164b78a..26fb3a030 100644
--- a/src/LexGen.py
+++ b/src/LexGen.py
@@ -211,16 +211,17 @@ def RegenerateAll():
# Find all the SciTE properties files
otherProps = ["abbrev.properties", "Embedded.properties", "SciTEGlobal.properties", "SciTE.properties"]
- propFilePaths = glob.glob(root + "scite/src/*.properties")
- propFiles = [os.path.basename(f) for f in propFilePaths if os.path.basename(f) not in otherProps]
- propFiles.sort(ciCompare)
- print propFiles
-
- # Find all the menu command IDs in the SciTE header
- SciTEHeader = file(root + "scite/src/SciTE.h")
- lines = SciTEHeader.read().split("\n")
- SciTEHeader.close()
- ids = [id for id in [l.split()[1] for l in lines if l.startswith("#define")] if id.startswith("IDM_")]
+ if os.path.exists(root + "scite"):
+ propFilePaths = glob.glob(root + "scite/src/*.properties")
+ propFiles = [os.path.basename(f) for f in propFilePaths if os.path.basename(f) not in otherProps]
+ propFiles.sort(ciCompare)
+ print propFiles
+
+ # Find all the menu command IDs in the SciTE header
+ SciTEHeader = file(root + "scite/src/SciTE.h")
+ lines = SciTEHeader.read().split("\n")
+ SciTEHeader.close()
+ ids = [id for id in [l.split()[1] for l in lines if l.startswith("#define")] if id.startswith("IDM_")]
#print ids
Regenerate(root + "scintilla/src/KeyWords.cxx", "//", NATIVE, lexerModules)
@@ -232,10 +233,12 @@ def RegenerateAll():
# Windows).
Regenerate(root + "scintilla/gtk/makefile", "#", LF, lexFiles)
Regenerate(root + "scintilla/gtk/scintilla.mak", "#", NATIVE, lexFiles)
- Regenerate(root + "scite/win32/makefile", "#", NATIVE, lexFiles, propFiles)
- Regenerate(root + "scite/win32/scite.mak", "#", NATIVE, lexFiles, propFiles)
- Regenerate(root + "scite/src/SciTEProps.cxx", "//", NATIVE, lexerProperties, ids)
- Generate(root + "scite/boundscheck/vcproj.gen",
+ Regenerate(root + "scintilla/macosx/makefile", "#", LF, lexFiles)
+ if os.path.exists(root + "scite"):
+ Regenerate(root + "scite/win32/makefile", "#", NATIVE, lexFiles, propFiles)
+ Regenerate(root + "scite/win32/scite.mak", "#", NATIVE, lexFiles, propFiles)
+ Regenerate(root + "scite/src/SciTEProps.cxx", "//", NATIVE, lexerProperties, ids)
+ Generate(root + "scite/boundscheck/vcproj.gen",
root + "scite/boundscheck/SciTE.vcproj", "#", NATIVE, lexFiles)
RegenerateAll()
diff --git a/src/LexGui4Cli.cxx b/src/LexGui4Cli.cxx
index f76fff6cc..1c92de72e 100644
--- a/src/LexGui4Cli.cxx
+++ b/src/LexGui4Cli.cxx
@@ -36,6 +36,10 @@ val SCE_GC_OPERATOR=9
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
#define debug Platform::DebugPrintf
static inline bool IsAWordChar(const int ch) {
diff --git a/src/LexHTML.cxx b/src/LexHTML.cxx
index a816ea188..877f0881a 100644
--- a/src/LexHTML.cxx
+++ b/src/LexHTML.cxx
@@ -20,6 +20,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
#define SCE_HA_JS (SCE_HJA_START - SCE_HJ_START)
#define SCE_HA_VBS (SCE_HBA_START - SCE_HB_START)
#define SCE_HA_PYTHON (SCE_HPA_START - SCE_HP_START)
diff --git a/src/LexHaskell.cxx b/src/LexHaskell.cxx
index 0e4be85c6..da4349245 100644
--- a/src/LexHaskell.cxx
+++ b/src/LexHaskell.cxx
@@ -31,6 +31,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
#ifdef BUILD_AS_EXTERNAL_LEXER
#include "ExternalLexer.h"
diff --git a/src/LexInno.cxx b/src/LexInno.cxx
index 5985df23d..538175096 100644
--- a/src/LexInno.cxx
+++ b/src/LexInno.cxx
@@ -20,6 +20,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
static void ColouriseInnoDoc(unsigned int startPos, int length, int, WordList *keywordLists[], Accessor &styler) {
int state = SCE_INNO_DEFAULT;
char chPrev;
diff --git a/src/LexKix.cxx b/src/LexKix.cxx
index e439d4d1d..06e7c1791 100644
--- a/src/LexKix.cxx
+++ b/src/LexKix.cxx
@@ -20,6 +20,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
// Extended to accept accented characters
static inline bool IsAWordChar(int ch) {
return ch >= 0x80 || isalnum(ch) || ch == '_';
diff --git a/src/LexLisp.cxx b/src/LexLisp.cxx
index 91385f0fd..1072e13a3 100644
--- a/src/LexLisp.cxx
+++ b/src/LexLisp.cxx
@@ -21,6 +21,10 @@
#include "SciLexer.h"
#include "StyleContext.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
#define SCE_LISP_CHARACTER 29
#define SCE_LISP_MACRO 30
#define SCE_LISP_MACRO_DISPATCH 31
diff --git a/src/LexLout.cxx b/src/LexLout.cxx
index 9d1a45a02..492e4ed6d 100644
--- a/src/LexLout.cxx
+++ b/src/LexLout.cxx
@@ -20,6 +20,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
static inline bool IsAWordChar(const int ch) {
return (ch < 0x80) && (isalpha(ch) || ch == '@' || ch == '_');
}
diff --git a/src/LexLua.cxx b/src/LexLua.cxx
index 6dfa8ee1a..63114a976 100644
--- a/src/LexLua.cxx
+++ b/src/LexLua.cxx
@@ -22,6 +22,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
// Extended to accept accented characters
static inline bool IsAWordChar(int ch) {
return ch >= 0x80 ||
diff --git a/src/LexMMIXAL.cxx b/src/LexMMIXAL.cxx
index f44789989..a00f35ca0 100644
--- a/src/LexMMIXAL.cxx
+++ b/src/LexMMIXAL.cxx
@@ -22,6 +22,9 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
static inline bool IsAWordChar(const int ch) {
diff --git a/src/LexMPT.cxx b/src/LexMPT.cxx
index 1058b9b49..93b8caba7 100644
--- a/src/LexMPT.cxx
+++ b/src/LexMPT.cxx
@@ -20,6 +20,10 @@
#include "SciLexer.h"
#include "SString.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
static int GetLotLineState(SString &line) {
if (line.length()) {
// Most of the time the first non-blank character in line determines that line's type
diff --git a/src/LexMSSQL.cxx b/src/LexMSSQL.cxx
index 5f5a562ad..4a3f3bed8 100644
--- a/src/LexMSSQL.cxx
+++ b/src/LexMSSQL.cxx
@@ -19,6 +19,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
#define KW_MSSQL_STATEMENTS 0
#define KW_MSSQL_DATA_TYPES 1
#define KW_MSSQL_SYSTEM_TABLES 2
diff --git a/src/LexMatlab.cxx b/src/LexMatlab.cxx
index 626001cd3..9652a6f60 100644
--- a/src/LexMatlab.cxx
+++ b/src/LexMatlab.cxx
@@ -25,6 +25,9 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
static bool IsMatlabCommentChar(int c) {
return (c == '%') ;
diff --git a/src/LexMetapost.cxx b/src/LexMetapost.cxx
index b7d482c0f..f3fe77d0d 100644
--- a/src/LexMetapost.cxx
+++ b/src/LexMetapost.cxx
@@ -25,6 +25,10 @@
#include "SciLexer.h"
#include "StyleContext.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
// val SCE_METAPOST_DEFAULT = 0
// val SCE_METAPOST_SPECIAL = 1
// val SCE_METAPOST_GROUP = 2
diff --git a/src/LexNsis.cxx b/src/LexNsis.cxx
index b26cf6b3f..93f0cd4d6 100644
--- a/src/LexNsis.cxx
+++ b/src/LexNsis.cxx
@@ -19,6 +19,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
/*
// located in SciLexer.h
#define SCLEX_NSIS 43
diff --git a/src/LexOpal.cxx b/src/LexOpal.cxx
index d1d188998..221f95597 100644
--- a/src/LexOpal.cxx
+++ b/src/LexOpal.cxx
@@ -19,6 +19,10 @@
#include "SciLexer.h"
#include "StyleContext.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
inline static void getRange( unsigned int start, unsigned int end, Accessor & styler, char * s, unsigned int len )
{
unsigned int i = 0;
diff --git a/src/LexOthers.cxx b/src/LexOthers.cxx
index 1f544497a..c4aca0c08 100644
--- a/src/LexOthers.cxx
+++ b/src/LexOthers.cxx
@@ -20,6 +20,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
static bool Is0To9(char ch) {
return (ch >= '0') && (ch <= '9');
}
diff --git a/src/LexPB.cxx b/src/LexPB.cxx
index 7878a6bf8..abc0ddc79 100644
--- a/src/LexPB.cxx
+++ b/src/LexPB.cxx
@@ -48,6 +48,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
static inline bool IsTypeCharacter(const int ch)
{
return ch == '%' || ch == '&' || ch == '@' || ch == '!' || ch == '#' || ch == '$' || ch == '?';
diff --git a/src/LexPOV.cxx b/src/LexPOV.cxx
index 5cc05ce6a..b845b2d47 100644
--- a/src/LexPOV.cxx
+++ b/src/LexPOV.cxx
@@ -29,6 +29,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
static inline bool IsAWordChar(int ch) {
return ch < 0x80 && (isalnum(ch) || ch == '_');
}
diff --git a/src/LexPS.cxx b/src/LexPS.cxx
index 3c75ae554..ff4521769 100644
--- a/src/LexPS.cxx
+++ b/src/LexPS.cxx
@@ -21,6 +21,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
static inline bool IsASelfDelimitingChar(const int ch) {
return (ch == '[' || ch == ']' || ch == '{' || ch == '}' ||
ch == '/' || ch == '<' || ch == '>' ||
diff --git a/src/LexPascal.cxx b/src/LexPascal.cxx
index fdd12c470..0e4576064 100644
--- a/src/LexPascal.cxx
+++ b/src/LexPascal.cxx
@@ -21,6 +21,10 @@
#include "SciLexer.h"
#include "StyleContext.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
static void getRange(unsigned int start,
unsigned int end,
Accessor &styler,
diff --git a/src/LexPerl.cxx b/src/LexPerl.cxx
index 4a42bc29f..bcc74d972 100644
--- a/src/LexPerl.cxx
+++ b/src/LexPerl.cxx
@@ -20,6 +20,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
#define PERLNUM_BINARY 1 // order is significant: 1-4 cannot have a dot
#define PERLNUM_HEX 2
#define PERLNUM_OCTAL 3
diff --git a/src/LexPython.cxx b/src/LexPython.cxx
index 8c924a0e8..85fe7d658 100644
--- a/src/LexPython.cxx
+++ b/src/LexPython.cxx
@@ -20,6 +20,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
enum kwType { kwOther, kwClass, kwDef, kwImport };
static const int indicatorWhitespace = 1;
diff --git a/src/LexRebol.cxx b/src/LexRebol.cxx
index f829c1e36..7139b8dbd 100644
--- a/src/LexRebol.cxx
+++ b/src/LexRebol.cxx
@@ -26,6 +26,9 @@
#include "SciLexer.h"
#include "StyleContext.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
static inline bool IsAWordChar(const int ch) {
return (isalnum(ch) || ch == '?' || ch == '!' || ch == '.' || ch == '\'' || ch == '+' || ch == '-' || ch == '*' || ch == '&' || ch == '|' || ch == '=' || ch == '_' || ch == '~');
diff --git a/src/LexSQL.cxx b/src/LexSQL.cxx
index d8e14b9eb..98ccdca8d 100644
--- a/src/LexSQL.cxx
+++ b/src/LexSQL.cxx
@@ -20,6 +20,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
static inline bool IsAWordChar(int ch) {
return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_');
}
diff --git a/src/LexScriptol.cxx b/src/LexScriptol.cxx
index faaa2d46d..76c38e6b6 100644
--- a/src/LexScriptol.cxx
+++ b/src/LexScriptol.cxx
@@ -17,6 +17,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
static void ClassifyWordSol(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, char *prevWord)
{
char s[100];
diff --git a/src/LexSmalltalk.cxx b/src/LexSmalltalk.cxx
index 6f43ec3b3..265de3803 100644
--- a/src/LexSmalltalk.cxx
+++ b/src/LexSmalltalk.cxx
@@ -19,6 +19,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
/*
| lexTable classificationBlock charClasses |
charClasses := #(#DecDigit #Letter #Special #Upper #BinSel).
diff --git a/src/LexSpecman.cxx b/src/LexSpecman.cxx
index bf5d639a1..093efae75 100644
--- a/src/LexSpecman.cxx
+++ b/src/LexSpecman.cxx
@@ -21,6 +21,9 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
static inline bool IsAWordChar(const int ch) {
return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_' || ch == '\'');
diff --git a/src/LexSpice.cxx b/src/LexSpice.cxx
index 8a1683f05..b2953c001 100644
--- a/src/LexSpice.cxx
+++ b/src/LexSpice.cxx
@@ -19,6 +19,10 @@
#include "SciLexer.h"
#include "SString.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
/*
* Interface
*/
diff --git a/src/LexTADS3.cxx b/src/LexTADS3.cxx
index c9b1d2571..71f2919e7 100644
--- a/src/LexTADS3.cxx
+++ b/src/LexTADS3.cxx
@@ -46,6 +46,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
static const int T3_SINGLE_QUOTE = 1;
static const int T3_INT_EXPRESSION = 2;
static const int T3_INT_EXPRESSION_IN_TAG = 4;
diff --git a/src/LexTCL.cxx b/src/LexTCL.cxx
index c78214116..3c175de2a 100644
--- a/src/LexTCL.cxx
+++ b/src/LexTCL.cxx
@@ -20,6 +20,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
// Extended to accept accented characters
static inline bool IsAWordChar(int ch) {
return ch >= 0x80 ||
diff --git a/src/LexTeX.cxx b/src/LexTeX.cxx
index 65e530adb..55f0d3405 100644
--- a/src/LexTeX.cxx
+++ b/src/LexTeX.cxx
@@ -27,6 +27,10 @@
#include "SciLexer.h"
#include "StyleContext.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
// val SCE_TEX_DEFAULT = 0
// val SCE_TEX_SPECIAL = 1
// val SCE_TEX_GROUP = 2
diff --git a/src/LexVB.cxx b/src/LexVB.cxx
index 0a6a5e4ca..a1f9ec7ae 100644
--- a/src/LexVB.cxx
+++ b/src/LexVB.cxx
@@ -20,6 +20,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
// Internal state, highlighted as number
#define SCE_B_FILENUMBER SCE_B_DEFAULT+100
diff --git a/src/LexVHDL.cxx b/src/LexVHDL.cxx
index 0feef9512..c082cdb92 100644
--- a/src/LexVHDL.cxx
+++ b/src/LexVHDL.cxx
@@ -25,6 +25,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
static void ColouriseVHDLDoc(
unsigned int startPos,
int length,
diff --git a/src/LexVerilog.cxx b/src/LexVerilog.cxx
index 43ef7eb37..165537346 100644
--- a/src/LexVerilog.cxx
+++ b/src/LexVerilog.cxx
@@ -21,6 +21,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
static inline bool IsAWordChar(const int ch) {
return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_' || ch == '\'');
}
diff --git a/src/LexYAML.cxx b/src/LexYAML.cxx
index e3053f814..0edd78691 100644
--- a/src/LexYAML.cxx
+++ b/src/LexYAML.cxx
@@ -20,6 +20,10 @@
#include "Scintilla.h"
#include "SciLexer.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
static const char * const yamlWordListDesc[] = {
"Keywords",
0
diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx
index 6ded13c73..ab0511654 100644
--- a/src/LineMarker.cxx
+++ b/src/LineMarker.cxx
@@ -13,6 +13,10 @@
#include "XPM.h"
#include "LineMarker.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
void LineMarker::RefreshColourPalette(Palette &pal, bool want) {
pal.WantFind(fore, want);
pal.WantFind(back, want);
diff --git a/src/LineMarker.h b/src/LineMarker.h
index 8ebdce491..3cb4139f0 100644
--- a/src/LineMarker.h
+++ b/src/LineMarker.h
@@ -8,6 +8,10 @@
#ifndef LINEMARKER_H
#define LINEMARKER_H
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
/**
*/
class LineMarker {
@@ -51,4 +55,8 @@ public:
void Draw(Surface *surface, PRectangle &rc, Font &fontForCharacter);
};
+#ifdef SCI_NAMESPACE
+}
+#endif
+
#endif
diff --git a/src/PropSet.cxx b/src/PropSet.cxx
index 26b6afa4b..3b142b978 100644
--- a/src/PropSet.cxx
+++ b/src/PropSet.cxx
@@ -15,6 +15,10 @@
#include "PropSet.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
// The comparison and case changing functions here assume ASCII
// or extended ASCII such as the normal Windows code page.
diff --git a/src/RESearch.cxx b/src/RESearch.cxx
index 6dc5941bb..b1b226a05 100644
--- a/src/RESearch.cxx
+++ b/src/RESearch.cxx
@@ -206,6 +206,10 @@
#pragma warning(disable: 4514)
#endif
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
#define OKP 1
#define NOP 0
diff --git a/src/RESearch.h b/src/RESearch.h
index befd36790..0944fc398 100644
--- a/src/RESearch.h
+++ b/src/RESearch.h
@@ -9,6 +9,10 @@
#ifndef RESEARCH_H
#define RESEARCH_H
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
/*
* The following defines are not meant to be changeable.
* They are for readability only.
@@ -63,5 +67,9 @@ private:
}
};
+#ifdef SCI_NAMESPACE
+}
+#endif
+
#endif
diff --git a/src/RunStyles.cxx b/src/RunStyles.cxx
index da7cba2f9..286734e9b 100644
--- a/src/RunStyles.cxx
+++ b/src/RunStyles.cxx
@@ -16,6 +16,10 @@
#include "Partitioning.h"
#include "RunStyles.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
// Find the first run at a position
int RunStyles::RunFromPosition(int position) {
int run = starts->PartitionFromPosition(position);
diff --git a/src/RunStyles.h b/src/RunStyles.h
index 009bb6739..f3f9fe314 100644
--- a/src/RunStyles.h
+++ b/src/RunStyles.h
@@ -7,6 +7,10 @@
/// Styling buffer using one element for each run rather than using
/// a filled buffer.
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
class RunStyles {
public:
Partitioning *starts;
@@ -30,3 +34,7 @@ public:
void DeleteAll();
void DeleteRange(int position, int deleteLength);
};
+
+#ifdef SCI_NAMESPACE
+}
+#endif
diff --git a/src/SVector.h b/src/SVector.h
index c8edb513b..9f56da528 100644
--- a/src/SVector.h
+++ b/src/SVector.h
@@ -8,6 +8,10 @@
#ifndef SVECTOR_H
#define SVECTOR_H
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
/**
* A simple expandable integer vector.
* Storage not allocated for elements until an element is used.
@@ -124,4 +128,8 @@ public:
}
};
+#ifdef SCI_NAMESPACE
+}
+#endif
+
#endif
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx
index 52a0e2c2c..e0ac652fb 100644
--- a/src/ScintillaBase.cxx
+++ b/src/ScintillaBase.cxx
@@ -40,6 +40,10 @@
#include "Editor.h"
#include "ScintillaBase.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
ScintillaBase::ScintillaBase() {
displayPopupMenu = true;
listType = 0;
diff --git a/src/ScintillaBase.h b/src/ScintillaBase.h
index cb85b55b5..0554d9457 100644
--- a/src/ScintillaBase.h
+++ b/src/ScintillaBase.h
@@ -8,6 +8,10 @@
#ifndef SCINTILLABASE_H
#define SCINTILLABASE_H
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
/**
*/
class ScintillaBase : public Editor {
@@ -90,4 +94,8 @@ public:
virtual sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
};
+#ifdef SCI_NAMESPACE
+}
+#endif
+
#endif
diff --git a/src/Style.cxx b/src/Style.cxx
index f01aee082..ad081a66d 100644
--- a/src/Style.cxx
+++ b/src/Style.cxx
@@ -12,6 +12,10 @@
#include "Scintilla.h"
#include "Style.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
Style::Style() {
aliasOfDefaultFont = true;
Clear(ColourDesired(0, 0, 0), ColourDesired(0xff, 0xff, 0xff),
diff --git a/src/Style.h b/src/Style.h
index c0f7eca26..1caecaee7 100644
--- a/src/Style.h
+++ b/src/Style.h
@@ -8,6 +8,10 @@
#ifndef STYLE_H
#define STYLE_H
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
/**
*/
class Style {
@@ -53,4 +57,8 @@ public:
bool IsProtected() const { return !(changeable && visible);};
};
+#ifdef SCI_NAMESPACE
+}
+#endif
+
#endif
diff --git a/src/StyleContext.cxx b/src/StyleContext.cxx
index d9da0edc4..4a1f71622 100644
--- a/src/StyleContext.cxx
+++ b/src/StyleContext.cxx
@@ -16,6 +16,10 @@
#include "Accessor.h"
#include "StyleContext.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
static void getRange(unsigned int start,
unsigned int end,
Accessor &styler,
diff --git a/src/StyleContext.h b/src/StyleContext.h
index a670867ce..463aab462 100644
--- a/src/StyleContext.h
+++ b/src/StyleContext.h
@@ -5,6 +5,10 @@
// Copyright 1998-2004 by Neil Hodgson <neilh@scintilla.org>
// This file is in the public domain.
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
// All languages handled so far can treat all characters >= 0x80 as one class
// which just continues the current token or starts an identifier if in default.
// DBCS treated specially as the second character can be < 0x80 and hence
@@ -148,6 +152,10 @@ public:
void GetCurrentLowered(char *s, unsigned int len);
};
+#ifdef SCI_NAMESPACE
+}
+#endif
+
inline bool IsASpace(unsigned int ch) {
return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d));
}
diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx
index 071171e68..8f51fd5b9 100644
--- a/src/ViewStyle.cxx
+++ b/src/ViewStyle.cxx
@@ -19,6 +19,10 @@
#include "Style.h"
#include "ViewStyle.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
MarginStyle::MarginStyle() :
style(SC_MARGIN_SYMBOL), width(0), mask(0), sensitive(false) {
}
diff --git a/src/ViewStyle.h b/src/ViewStyle.h
index 61ebe85ee..39adf81e8 100644
--- a/src/ViewStyle.h
+++ b/src/ViewStyle.h
@@ -8,6 +8,10 @@
#ifndef VIEWSTYLE_H
#define VIEWSTYLE_H
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
/**
*/
class MarginStyle {
@@ -108,4 +112,8 @@ public:
bool ProtectionActive() const;
};
+#ifdef SCI_NAMESPACE
+}
+#endif
+
#endif
diff --git a/src/WindowAccessor.cxx b/src/WindowAccessor.cxx
index 8132b584e..8093300bc 100644
--- a/src/WindowAccessor.cxx
+++ b/src/WindowAccessor.cxx
@@ -17,6 +17,10 @@
#include "WindowAccessor.h"
#include "Scintilla.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
WindowAccessor::~WindowAccessor() {
}
diff --git a/src/XPM.cxx b/src/XPM.cxx
index 36e7994f4..7fc05bb9b 100644
--- a/src/XPM.cxx
+++ b/src/XPM.cxx
@@ -12,6 +12,10 @@
#include "XPM.h"
+#ifdef SCI_NAMESPACE
+using namespace Scintilla;
+#endif
+
static const char *NextField(const char *s) {
// In case there are leading spaces in the string
while (*s && *s == ' ') {
diff --git a/src/XPM.h b/src/XPM.h
index 4d3da28d3..0ee68c072 100644
--- a/src/XPM.h
+++ b/src/XPM.h
@@ -8,6 +8,10 @@
#ifndef XPM_H
#define XPM_H
+#ifdef SCI_NAMESPACE
+namespace Scintilla {
+#endif
+
/**
* Hold a pixmap in XPM format.
*/
@@ -69,4 +73,8 @@ public:
int GetWidth();
};
+#ifdef SCI_NAMESPACE
+}
+#endif
+
#endif