diff options
Diffstat (limited to 'lexlib')
| -rw-r--r-- | lexlib/Accessor.cxx | 2 | ||||
| -rw-r--r-- | lexlib/CharacterSet.cxx | 2 | ||||
| -rw-r--r-- | lexlib/LexAccessor.h | 20 | ||||
| -rw-r--r-- | lexlib/LexerBase.cxx | 2 | ||||
| -rw-r--r-- | lexlib/LexerModule.cxx | 14 | ||||
| -rw-r--r-- | lexlib/LexerModule.h | 9 | ||||
| -rw-r--r-- | lexlib/LexerNoExceptions.cxx | 2 | ||||
| -rw-r--r-- | lexlib/LexerSimple.cxx | 2 | ||||
| -rw-r--r-- | lexlib/StyleContext.cxx | 2 | ||||
| -rw-r--r-- | lexlib/StyleContext.h | 4 | ||||
| -rw-r--r-- | lexlib/WordList.cxx | 2 | 
11 files changed, 18 insertions, 43 deletions
| diff --git a/lexlib/Accessor.cxx b/lexlib/Accessor.cxx index 61661626f..f67737d4d 100644 --- a/lexlib/Accessor.cxx +++ b/lexlib/Accessor.cxx @@ -8,9 +8,9 @@  #include <stdlib.h>  #include <string.h>  #include <stdio.h> -#include <ctype.h>  #include <stdarg.h>  #include <assert.h> +#include <ctype.h>  #include "ILexer.h"  #include "Scintilla.h" diff --git a/lexlib/CharacterSet.cxx b/lexlib/CharacterSet.cxx index 2f41df116..0ab2cc0cc 100644 --- a/lexlib/CharacterSet.cxx +++ b/lexlib/CharacterSet.cxx @@ -9,8 +9,8 @@  #include <stdlib.h>  #include <string.h>  #include <stdio.h> -#include <ctype.h>  #include <assert.h> +#include <ctype.h>  #include "CharacterSet.h" diff --git a/lexlib/LexAccessor.h b/lexlib/LexAccessor.h index 45a3a0a93..35e15726c 100644 --- a/lexlib/LexAccessor.h +++ b/lexlib/LexAccessor.h @@ -29,11 +29,8 @@ private:  	int codePage;  	enum EncodingType encodingType;  	int lenDoc; -	int mask;  	char styleBuf[bufferSize];  	int validLen; -	char chFlags; -	char chWhile;  	unsigned int startSeg;  	int startPosStyling;  	int documentVersion; @@ -58,7 +55,7 @@ public:  		codePage(pAccess->CodePage()),  		encodingType(enc8bit),  		lenDoc(pAccess->Length()), -		mask(127), validLen(0), chFlags(0), chWhile(0), +		validLen(0),  		startSeg(0), startPosStyling(0),  		documentVersion(pAccess->Version()) {  		switch (codePage) { @@ -111,7 +108,7 @@ public:  		return true;  	}  	char StyleAt(int position) const { -		return static_cast<char>(pAccess->StyleAt(position) & mask); +		return static_cast<char>(pAccess->StyleAt(position));  	}  	int GetLine(int position) const {  		return pAccess->LineFromPosition(position); @@ -152,16 +149,10 @@ public:  		return pAccess->SetLineState(line, state);  	}  	// Style setting -	void StartAt(unsigned int start, char chMask=31) { -		// Store the mask specified for use with StyleAt. -		mask = chMask; -		pAccess->StartStyling(start, chMask); +	void StartAt(unsigned int start) { +		pAccess->StartStyling(start, '\377');  		startPosStyling = start;  	} -	void SetFlags(char chFlags_, char chWhile_) { -		chFlags = chFlags_; -		chWhile = chWhile_; -	}  	unsigned int GetStartSegment() const {  		return startSeg;  	} @@ -182,9 +173,6 @@ public:  				// Too big for buffer so send directly  				pAccess->SetStyleFor(pos - startSeg + 1, static_cast<char>(chAttr));  			} else { -				if (chAttr != chWhile) -					chFlags = 0; -				chAttr = static_cast<char>(chAttr | chFlags);  				for (unsigned int i = startSeg; i <= pos; i++) {  					assert((startPosStyling + validLen) < Length());  					styleBuf[validLen++] = static_cast<char>(chAttr); diff --git a/lexlib/LexerBase.cxx b/lexlib/LexerBase.cxx index 0e86562bf..bbef3f159 100644 --- a/lexlib/LexerBase.cxx +++ b/lexlib/LexerBase.cxx @@ -8,9 +8,9 @@  #include <stdlib.h>  #include <string.h>  #include <stdio.h> -#include <ctype.h>  #include <stdarg.h>  #include <assert.h> +#include <ctype.h>  #include "ILexer.h"  #include "Scintilla.h" diff --git a/lexlib/LexerModule.cxx b/lexlib/LexerModule.cxx index c77b31775..6cefbee77 100644 --- a/lexlib/LexerModule.cxx +++ b/lexlib/LexerModule.cxx @@ -8,9 +8,9 @@  #include <stdlib.h>  #include <string.h>  #include <stdio.h> -#include <ctype.h>  #include <stdarg.h>  #include <assert.h> +#include <ctype.h>  #include <string> @@ -34,28 +34,24 @@ LexerModule::LexerModule(int language_,  	LexerFunction fnLexer_,  	const char *languageName_,  	LexerFunction fnFolder_, -        const char *const wordListDescriptions_[], -	int styleBits_) : +        const char *const wordListDescriptions_[]) :  	language(language_),  	fnLexer(fnLexer_),  	fnFolder(fnFolder_),  	fnFactory(0),  	wordListDescriptions(wordListDescriptions_), -	styleBits(styleBits_),  	languageName(languageName_) {  }  LexerModule::LexerModule(int language_,  	LexerFactoryFunction fnFactory_,  	const char *languageName_, -	const char * const wordListDescriptions_[], -	int styleBits_) : +	const char * const wordListDescriptions_[]) :  	language(language_),  	fnLexer(0),  	fnFolder(0),  	fnFactory(fnFactory_),  	wordListDescriptions(wordListDescriptions_), -	styleBits(styleBits_),  	languageName(languageName_) {  } @@ -82,10 +78,6 @@ const char *LexerModule::GetWordListDescription(int index) const {  	}  } -int LexerModule::GetStyleBitsNeeded() const { -	return styleBits; -} -  ILexer *LexerModule::Create() const {  	if (fnFactory)  		return fnFactory(); diff --git a/lexlib/LexerModule.h b/lexlib/LexerModule.h index 35fa30c69..ee092e68f 100644 --- a/lexlib/LexerModule.h +++ b/lexlib/LexerModule.h @@ -31,7 +31,6 @@ protected:  	LexerFunction fnFolder;  	LexerFactoryFunction fnFactory;  	const char * const * wordListDescriptions; -	int styleBits;  public:  	const char *languageName; @@ -39,13 +38,11 @@ public:  		LexerFunction fnLexer_,  		const char *languageName_=0,  		LexerFunction fnFolder_=0, -		const char * const wordListDescriptions_[] = NULL, -		int styleBits_=5); +		const char * const wordListDescriptions_[] = NULL);  	LexerModule(int language_,  		LexerFactoryFunction fnFactory_,  		const char *languageName_, -		const char * const wordListDescriptions_[] = NULL, -		int styleBits_=8); +		const char * const wordListDescriptions_[] = NULL);  	virtual ~LexerModule() {  	}  	int GetLanguage() const { return language; } @@ -54,8 +51,6 @@ public:  	int GetNumWordLists() const;  	const char *GetWordListDescription(int index) const; -	int GetStyleBitsNeeded() const; -  	ILexer *Create() const;  	virtual void Lex(unsigned int startPos, int length, int initStyle, diff --git a/lexlib/LexerNoExceptions.cxx b/lexlib/LexerNoExceptions.cxx index 5f31f2268..9ebae2af0 100644 --- a/lexlib/LexerNoExceptions.cxx +++ b/lexlib/LexerNoExceptions.cxx @@ -8,9 +8,9 @@  #include <stdlib.h>  #include <string.h>  #include <stdio.h> -#include <ctype.h>  #include <stdarg.h>  #include <assert.h> +#include <ctype.h>  #include "ILexer.h"  #include "Scintilla.h" diff --git a/lexlib/LexerSimple.cxx b/lexlib/LexerSimple.cxx index 5489ab886..4d0e178ca 100644 --- a/lexlib/LexerSimple.cxx +++ b/lexlib/LexerSimple.cxx @@ -8,9 +8,9 @@  #include <stdlib.h>  #include <string.h>  #include <stdio.h> -#include <ctype.h>  #include <stdarg.h>  #include <assert.h> +#include <ctype.h>  #include <string> diff --git a/lexlib/StyleContext.cxx b/lexlib/StyleContext.cxx index ec0c5047c..9429c5ba8 100644 --- a/lexlib/StyleContext.cxx +++ b/lexlib/StyleContext.cxx @@ -8,8 +8,8 @@  #include <stdlib.h>  #include <string.h>  #include <stdio.h> -#include <ctype.h>  #include <assert.h> +#include <ctype.h>  #include "ILexer.h" diff --git a/lexlib/StyleContext.h b/lexlib/StyleContext.h index 9b5ce5dff..837386cef 100644 --- a/lexlib/StyleContext.h +++ b/lexlib/StyleContext.h @@ -66,7 +66,7 @@ public:  	int widthNext;  	StyleContext(unsigned int startPos, unsigned int length, -                        int initStyle, LexAccessor &styler_, char chMask=31) : +                        int initStyle, LexAccessor &styler_, char chMask='\377') :  		styler(styler_),  		multiByteAccess(0),  		endPos(startPos + length), @@ -86,7 +86,7 @@ public:  		if (styler.Encoding() != enc8bit) {  			multiByteAccess = styler.MultiByteAccess();  		} -		styler.StartAt(startPos, chMask); +		styler.StartAt(startPos /*, chMask*/);  		styler.StartSegment(startPos);  		currentLine = styler.GetLine(startPos);  		lineStartNext = styler.LineStart(currentLine+1); diff --git a/lexlib/WordList.cxx b/lexlib/WordList.cxx index 10b6fe349..68b384a95 100644 --- a/lexlib/WordList.cxx +++ b/lexlib/WordList.cxx @@ -8,8 +8,8 @@  #include <stdlib.h>  #include <string.h>  #include <stdio.h> -#include <ctype.h>  #include <stdarg.h> +#include <ctype.h>  #include <algorithm> | 
