diff options
author | nyamatongwe <unknown> | 2003-05-14 13:14:10 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2003-05-14 13:14:10 +0000 |
commit | 4175162c475d94d00d513edc01995b6157ede84e (patch) | |
tree | 7cfc51bf2be058cef570e6d2bc99840ac3c0d7d8 | |
parent | 716323e8037ba39592a2934ac3156de67e1b97a8 (diff) | |
download | scintilla-mirror-4175162c475d94d00d513edc01995b6157ede84e.tar.gz |
Moved lmNull into LexOthers.cxx as there was a report that the current
location trips a bug in MSVC 7.1.
-rw-r--r-- | src/KeyWords.cxx | 23 | ||||
-rw-r--r-- | src/LexOthers.cxx | 11 |
2 files changed, 17 insertions, 17 deletions
diff --git a/src/KeyWords.cxx b/src/KeyWords.cxx index c278c7ca1..3002c7d45 100644 --- a/src/KeyWords.cxx +++ b/src/KeyWords.cxx @@ -25,10 +25,10 @@ int LexerModule::nextLanguage = SCLEX_AUTOMATIC+1; LexerModule::LexerModule(int language_, LexerFunction fnLexer_, const char *languageName_, LexerFunction fnFolder_, const char * const wordListDescriptions_[]) : - language(language_), - fnLexer(fnLexer_), - fnFolder(fnFolder_), - wordListDescriptions(wordListDescriptions_), + language(language_), + fnLexer(fnLexer_), + fnFolder(fnFolder_), + wordListDescriptions(wordListDescriptions_), languageName(languageName_) { next = base; base = this; @@ -62,7 +62,7 @@ const char * LexerModule::GetWordListDescription(int index) const { return wordListDescriptions[index]; } } - + const LexerModule *LexerModule::Find(int language) { const LexerModule *lm = base; while (lm) { @@ -112,18 +112,6 @@ void LexerModule::Fold(unsigned int startPos, int lengthDoc, int initStyle, } } -static void ColouriseNullDoc(unsigned int startPos, int length, int, WordList *[], - Accessor &styler) { - // Null language means all style bytes are 0 so just mark the end - no need to fill in. - if (length > 0) { - styler.StartAt(startPos + length - 1); - styler.StartSegment(startPos + length - 1); - styler.ColourTo(startPos + length - 1, 0); - } -} - -LexerModule lmNull(SCLEX_NULL, ColouriseNullDoc, "null"); - // Alternative historical name for Scintilla_LinkLexers int wxForceScintillaLexers(void) { return Scintilla_LinkLexers(); @@ -170,6 +158,7 @@ int Scintilla_LinkLexers() { LINK_LEXER(lmMake); LINK_LEXER(lmErrorList); LINK_LEXER(lmLatex); + LINK_LEXER(lmNull); LINK_LEXER(lmPascal); LINK_LEXER(lmPerl); LINK_LEXER(lmPOV); diff --git a/src/LexOthers.cxx b/src/LexOthers.cxx index 6d537c9b6..45e2d5154 100644 --- a/src/LexOthers.cxx +++ b/src/LexOthers.cxx @@ -626,9 +626,20 @@ static const char * const emptyWordListDesc[] = { 0 }; +static void ColouriseNullDoc(unsigned int startPos, int length, int, WordList *[], + Accessor &styler) { + // Null language means all style bytes are 0 so just mark the end - no need to fill in. + if (length > 0) { + styler.StartAt(startPos + length - 1); + styler.StartSegment(startPos + length - 1); + styler.ColourTo(startPos + length - 1, 0); + } +} + LexerModule lmBatch(SCLEX_BATCH, ColouriseBatchDoc, "batch", 0, batchWordListDesc); LexerModule lmDiff(SCLEX_DIFF, ColouriseDiffDoc, "diff", 0, emptyWordListDesc); LexerModule lmProps(SCLEX_PROPERTIES, ColourisePropsDoc, "props", 0, emptyWordListDesc); LexerModule lmMake(SCLEX_MAKEFILE, ColouriseMakeDoc, "makefile", 0, emptyWordListDesc); LexerModule lmErrorList(SCLEX_ERRORLIST, ColouriseErrorListDoc, "errorlist", 0, emptyWordListDesc); LexerModule lmLatex(SCLEX_LATEX, ColouriseLatexDoc, "latex", 0, emptyWordListDesc); +LexerModule lmNull(SCLEX_NULL, ColouriseNullDoc, "null"); |