aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LexPython.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2000-04-04 13:35:59 +0000
committernyamatongwe <devnull@localhost>2000-04-04 13:35:59 +0000
commitcc54b6b2ba9362b9b148b9b256e0a37974c47a53 (patch)
tree3dced34d6c9f802d7e075554cea761616ce69c8b /src/LexPython.cxx
parent3032c371bd9231f097226869e80bf56543ae2cab (diff)
downloadscintilla-mirror-cc54b6b2ba9362b9b148b9b256e0a37974c47a53.tar.gz
Avoid lots of warnings from Borland C++.
Changed name of interface class defined in Accessor.h to Accessor.
Diffstat (limited to 'src/LexPython.cxx')
-rw-r--r--src/LexPython.cxx18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/LexPython.cxx b/src/LexPython.cxx
index fcaa541ac..51d9791d9 100644
--- a/src/LexPython.cxx
+++ b/src/LexPython.cxx
@@ -17,7 +17,7 @@
#include "Scintilla.h"
#include "SciLexer.h"
-static void classifyWordPy(unsigned int start, unsigned int end, WordList &keywords, BufferAccess &styler, char *prevWord) {
+static void classifyWordPy(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, char *prevWord) {
char s[100];
bool wordIsNumber = isdigit(styler[start]);
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
@@ -37,12 +37,12 @@ static void classifyWordPy(unsigned int start, unsigned int end, WordList &keywo
strcpy(prevWord, s);
}
-static bool IsPyComment(BufferAccess &styler, int pos, int len) {
+static bool IsPyComment(Accessor &styler, int pos, int len) {
return len>0 && styler[pos]=='#';
}
static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,
- WordList *keywordlists[], BufferAccess &styler) {
+ WordList *keywordlists[], Accessor &styler) {
// Python uses a different mask because bad indentation is marked by oring with 32
styler.StartAt(startPos, 127);
@@ -71,15 +71,19 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,
for (int i = startPos; i <= lengthDoc; i++) {
if (atStartLine) {
+ char chFlags;
+ char chBad = static_cast<char>(64);
+ char chGood = static_cast<char>(0);
if (whingeLevel == 1) {
- styler.SetFlags((spaceFlags & wsInconsistent) ? 64 : 0, state);
+ chFlags = (spaceFlags & wsInconsistent) ? chBad : chGood;
} else if (whingeLevel == 2) {
- styler.SetFlags((spaceFlags & wsSpaceTab) ? 64 : 0, state);
+ chFlags = (spaceFlags & wsSpaceTab) ? chBad : chGood;
} else if (whingeLevel == 3) {
- styler.SetFlags((spaceFlags & wsSpace) ? 64 : 0, state);
+ chFlags = (spaceFlags & wsSpace) ? chBad : chGood;
} else if (whingeLevel == 4) {
- styler.SetFlags((spaceFlags & wsTab) ? 64 : 0, state);
+ chFlags = (spaceFlags & wsTab) ? chBad : chGood;
}
+ styler.SetFlags(chFlags, static_cast<char>(state));
atStartLine = false;
}