Skip to content
This repository has been archived by the owner on Aug 12, 2018. It is now read-only.

Commit

Permalink
Update Scintilla to [c818dc].
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Dec 17, 2013
1 parent 0b28887 commit eb5cd83
Show file tree
Hide file tree
Showing 43 changed files with 161 additions and 130 deletions.
17 changes: 17 additions & 0 deletions scintilla/doc/ScintillaHistory.html
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,23 @@ <h3>
Icons</a> Copyright(C) 1998 by Dean S. Jones<br />
</li>
</ul>
<h3>
<a href="http://prdownloads.sourceforge.net/scintilla/scite338.zip?download">Release 3.3.8</a>
</h3>
<ul>
<li>
Released 12 December 2013.
</li>
<li>
C++ lexer fixes bug where keyword followed immediately by quoted string continued
keyword style.
<a href="http://sourceforge.net/p/scintilla/bugs/1564/">Bug #1564</a>.
</li>
<li>
Fix hotspot clicking where area was off by half a character width.
<a href="http://sourceforge.net/p/scintilla/bugs/1562/">Bug #1562</a>.
</li>
</ul>
<h3>
<a href="http://prdownloads.sourceforge.net/scintilla/scite337.zip?download">Release 3.3.7</a>
</h3>
Expand Down
1 change: 0 additions & 1 deletion scintilla/include/SciLexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -1569,7 +1569,6 @@
#define SCE_COFFEESCRIPT_GLOBALCLASS 19
#define SCE_COFFEESCRIPT_STRINGRAW 20
#define SCE_COFFEESCRIPT_TRIPLEVERBATIM 21
#define SCE_COFFEESCRIPT_HASHQUOTEDSTRING 22
#define SCE_COFFEESCRIPT_COMMENTBLOCK 22
#define SCE_COFFEESCRIPT_VERBOSE_REGEX 23
#define SCE_COFFEESCRIPT_VERBOSE_REGEX_COMMENT 24
Expand Down
4 changes: 2 additions & 2 deletions scintilla/include/Scintilla.h
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,8 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SC_PRINT_COLOURONWHITEDEFAULTBG 4
#define SCI_SETPRINTCOLOURMODE 2148
#define SCI_GETPRINTCOLOURMODE 2149
#define SCFIND_WHOLEWORD 2
#define SCFIND_MATCHCASE 4
#define SCFIND_WHOLEWORD 0x2
#define SCFIND_MATCHCASE 0x4
#define SCFIND_WORDSTART 0x00100000
#define SCFIND_REGEXP 0x00200000
#define SCFIND_POSIX 0x00400000
Expand Down
8 changes: 5 additions & 3 deletions scintilla/lexers/LexCPP.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ class LexerCPP : public ILexerWithSubStyles {
enum { ssIdentifier, ssDocKeyword };
SubStyles subStyles;
public:
LexerCPP(bool caseSensitive_) :
explicit LexerCPP(bool caseSensitive_) :
caseSensitive(caseSensitive_),
setWord(CharacterSet::setAlphaNum, "._", 0x80, true),
setNegationOp(CharacterSet::setNone, "!"),
Expand Down Expand Up @@ -376,7 +376,7 @@ class LexerCPP : public ILexerWithSubStyles {

int SCI_METHOD LineEndTypesSupported() {
return SC_LINE_END_TYPE_UNICODE;
};
}

int SCI_METHOD AllocateSubStyles(int styleBase, int numberStyles) {
return subStyles.Allocate(styleBase, numberStyles);
Expand Down Expand Up @@ -485,7 +485,7 @@ int SCI_METHOD LexerCPP::WordListSet(int n, const char *wl) {
// Functor used to truncate history
struct After {
int line;
After(int line_) : line(line_) {}
explicit After(int line_) : line(line_) {}
bool operator()(PPDefinition &p) const {
return p.line > line;
}
Expand Down Expand Up @@ -683,6 +683,8 @@ void SCI_METHOD LexerCPP::Lex(unsigned int startPos, int length, int initStyle,
sc.ChangeState((raw ? SCE_C_STRINGRAW : SCE_C_STRING)|activitySet);
else
sc.ChangeState(SCE_C_CHARACTER|activitySet);
} else {
sc.SetState(SCE_C_DEFAULT | activitySet);
}
} else {
sc.SetState(SCE_C_DEFAULT|activitySet);
Expand Down
2 changes: 1 addition & 1 deletion scintilla/lexers/LexCoffeeScript.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ static void ColouriseCoffeeScriptDoc(unsigned int startPos, int length, int init
sc.SetState(SCE_COFFEESCRIPT_COMMENTBLOCK);
sc.Forward();
sc.Forward();

} else {
sc.SetState(SCE_COFFEESCRIPT_COMMENTLINE);
}
Expand Down
12 changes: 6 additions & 6 deletions scintilla/lexers/LexHTML.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,9 @@ static void classifyWordHTJS(unsigned int start, unsigned int end,
static int classifyWordHTVB(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, script_mode inScriptType) {
char chAttr = SCE_HB_IDENTIFIER;
bool wordIsNumber = IsADigit(styler[start]) || (styler[start] == '.');
if (wordIsNumber)
if (wordIsNumber) {
chAttr = SCE_HB_NUMBER;
else {
} else {
char s[100];
GetTextSegment(styler, start, end, s, sizeof(s));
if (keywords.InList(s)) {
Expand Down Expand Up @@ -385,9 +385,9 @@ static void classifyWordHTPy(unsigned int start, unsigned int end, WordList &key
static void classifyWordHTPHP(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
char chAttr = SCE_HPHP_DEFAULT;
bool wordIsNumber = IsADigit(styler[start]) || (styler[start] == '.' && start+1 <= end && IsADigit(styler[start+1]));
if (wordIsNumber)
if (wordIsNumber) {
chAttr = SCE_HPHP_NUMBER;
else {
} else {
char s[100];
GetTextSegment(styler, start, end, s, sizeof(s));
if (keywords.InList(s))
Expand Down Expand Up @@ -823,14 +823,14 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty
if (isMako && ch == '#' && chNext == '#') {
makoComment = 1;
}

// handle end of Mako comment line
else if (isMako && makoComment && (ch == '\r' || ch == '\n')) {
makoComment = 0;
styler.ColourTo(i, SCE_HP_COMMENTLINE);
state = SCE_HP_DEFAULT;
}

// Allow falling through to mako handling code if newline is going to end a block
if (((ch == '\r' && chNext != '\n') || (ch == '\n')) &&
(!isMako || (0 != strcmp(makoBlockType, "%")))) {
Expand Down
3 changes: 2 additions & 1 deletion scintilla/lexers/LexOthers.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1037,8 +1037,9 @@ static int RecogniseErrorListLine(const char *lineBuffer, unsigned int lengthLin
!CompareCaseInsensitive(word, "fatal") || !CompareCaseInsensitive(word, "catastrophic") ||
!CompareCaseInsensitive(word, "note") || !CompareCaseInsensitive(word, "remark")) {
state = stMsVc;
} else
} else {
state = stUnrecognized;
}
} else {
state = stUnrecognized;
}
Expand Down
2 changes: 1 addition & 1 deletion scintilla/lexers/LexPerl.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ void SCI_METHOD LexerPerl::Lex(unsigned int startPos, int length, int initStyle,
}
switch (HereDoc.Quote) {
case '\'':
st_new = SCE_PL_HERE_Q ;
st_new = SCE_PL_HERE_Q;
break;
case '"' :
st_new = SCE_PL_HERE_QQ;
Expand Down
2 changes: 1 addition & 1 deletion scintilla/lexers/LexSQL.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ void SCI_METHOD LexerSQL::Fold(unsigned int startPos, int length, int initStyle,
break;
}
}

int levelNext = levelCurrent;
char chNext = styler[startPos];
int styleNext = styler.StyleAt(startPos);
Expand Down
2 changes: 1 addition & 1 deletion scintilla/lexlib/Accessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Scintilla {
#endif

enum { wsSpace = 1, wsTab = 2, wsSpaceTab = 4, wsInconsistent=8};
enum { wsSpace=1, wsTab=2, wsSpaceTab=4, wsInconsistent=8 };

class Accessor;
class WordList;
Expand Down
6 changes: 3 additions & 3 deletions scintilla/lexlib/LexAccessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ class LexAccessor {
}

public:
LexAccessor(IDocument *pAccess_) :
explicit LexAccessor(IDocument *pAccess_) :
pAccess(pAccess_), startPos(extremePosition), endPos(0),
codePage(pAccess->CodePage()),
codePage(pAccess->CodePage()),
encodingType(enc8bit),
lenDoc(pAccess->Length()),
mask(127), validLen(0), chFlags(0), chWhile(0),
startSeg(0), startPosStyling(0),
startSeg(0), startPosStyling(0),
documentVersion(pAccess->Version()) {
switch (codePage) {
case 65001:
Expand Down
2 changes: 1 addition & 1 deletion scintilla/lexlib/LexerModule.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const char *LexerModule::GetWordListDescription(int index) const {
return "";
} else {
return wordListDescriptions[index];
}
}
}

int LexerModule::GetStyleBitsNeeded() const {
Expand Down
2 changes: 1 addition & 1 deletion scintilla/lexlib/LexerSimple.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class LexerSimple : public LexerBase {
const LexerModule *module;
std::string wordLists;
public:
LexerSimple(const LexerModule *module_);
explicit LexerSimple(const LexerModule *module_);
const char * SCI_METHOD DescribeWordListSets();
void SCI_METHOD Lex(unsigned int startPos, int lengthDoc, int initStyle, IDocument *pAccess);
void SCI_METHOD Fold(unsigned int startPos, int lengthDoc, int initStyle, IDocument *pAccess);
Expand Down
2 changes: 1 addition & 1 deletion scintilla/lexlib/PropSetSimple.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void PropSetSimple::Set(const char *keyVal) {
endVal++;
const char *eqAt = strchr(keyVal, '=');
if (eqAt) {
Set(keyVal, eqAt + 1, static_cast<int>(eqAt-keyVal),
Set(keyVal, eqAt + 1, static_cast<int>(eqAt-keyVal),
static_cast<int>(endVal - eqAt - 1));
} else if (*keyVal) { // No '=' so assume '=1'
Set(keyVal, "1", static_cast<int>(endVal-keyVal), 1);
Expand Down
2 changes: 1 addition & 1 deletion scintilla/lexlib/SparseState.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class SparseState {
}

public:
SparseState(int positionFirst_=-1) {
explicit SparseState(int positionFirst_=-1) {
positionFirst = positionFirst_;
}
void Set(int position, T value) {
Expand Down
4 changes: 2 additions & 2 deletions scintilla/lexlib/StyleContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class StyleContext {
IDocumentWithLineEnd *multiByteAccess;
unsigned int endPos;
unsigned int lengthDocument;

// Used for optimizing GetRelativeCharacter
unsigned int posRelative;
unsigned int currentPosLastRelative;
Expand All @@ -43,7 +43,7 @@ class StyleContext {
chNext = static_cast<unsigned char>(styler.SafeGetCharAt(currentPos+width, 0));
widthNext = 1;
}
// End of line determined from line end position, allowing CR, LF,
// End of line determined from line end position, allowing CR, LF,
// CRLF and Unicode line ends as set by document.
if (currentLine < lineDocEnd)
atLineEnd = static_cast<int>(currentPos) >= (lineStartNext-1);
Expand Down
2 changes: 1 addition & 1 deletion scintilla/lexlib/SubStyles.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class WordClassifier {

public:

WordClassifier(int baseStyle_) : baseStyle(baseStyle_), firstStyle(0), lenStyles(0) {
explicit WordClassifier(int baseStyle_) : baseStyle(baseStyle_), firstStyle(0), lenStyles(0) {
}

void Allocate(int firstStyle_, int lenStyles_) {
Expand Down
2 changes: 1 addition & 1 deletion scintilla/lexlib/WordList.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ WordList::WordList(bool onlyLineEnds_) :
words(0), list(0), len(0), onlyLineEnds(onlyLineEnds_) {
}

WordList::~WordList() {
WordList::~WordList() {
Clear();
}

Expand Down
2 changes: 1 addition & 1 deletion scintilla/lexlib/WordList.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class WordList {
bool onlyLineEnds; ///< Delimited by any white space or only line ends
int starts[256];
public:
WordList(bool onlyLineEnds_ = false);
explicit WordList(bool onlyLineEnds_ = false);
~WordList();
operator bool() const;
bool operator!=(const WordList &other) const;
Expand Down
2 changes: 1 addition & 1 deletion scintilla/src/AutoComplete.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class AutoComplete {

/// The list string contains a sequence of words separated by the separator character
void SetList(const char *list);

/// Return the position of the currently selected list item
int GetSelection() const;

Expand Down
2 changes: 1 addition & 1 deletion scintilla/src/CaseConvert.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ void SetupConversions(enum CaseConversion conversion) {
int upper = symmetricCaseConversionRanges[i++];
int length = symmetricCaseConversionRanges[i++];
int pitch = symmetricCaseConversionRanges[i++];
for (int j=0;j<length*pitch;j+=pitch) {
for (int j=0; j<length*pitch; j+=pitch) {
AddSymmetric(conversion, lower+j, upper+j);
}
}
Expand Down
4 changes: 2 additions & 2 deletions scintilla/src/CellBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class PerLine {
public:
virtual ~PerLine() {}
virtual void Init()=0;
virtual void InsertLine(int)=0;
virtual void RemoveLine(int)=0;
virtual void InsertLine(int line)=0;
virtual void RemoveLine(int line)=0;
};

/**
Expand Down
2 changes: 1 addition & 1 deletion scintilla/src/Decoration.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Decoration {
RunStyles rs;
int indicator;

Decoration(int indicator_);
explicit Decoration(int indicator_);
~Decoration();

bool Empty() const;
Expand Down
8 changes: 4 additions & 4 deletions scintilla/src/Document.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ bool Document::InsertString(int position, const char *s, int insertLength) {
int SCI_METHOD Document::AddData(char *data, int length) {
try {
int position = Length();
InsertString(position,data, length);
InsertString(position, data, length);
} catch (std::bad_alloc &) {
return SC_STATUS_BADALLOC;
} catch (...) {
Expand Down Expand Up @@ -1892,7 +1892,7 @@ void SCI_METHOD Document::DecorationFillRange(int position, int value, int fillL

bool Document::AddWatcher(DocWatcher *watcher, void *userData) {
WatcherWithUserData wwud(watcher, userData);
std::vector<WatcherWithUserData>::iterator it =
std::vector<WatcherWithUserData>::iterator it =
std::find(watchers.begin(), watchers.end(), wwud);
if (it != watchers.end())
return false;
Expand All @@ -1901,7 +1901,7 @@ bool Document::AddWatcher(DocWatcher *watcher, void *userData) {
}

bool Document::RemoveWatcher(DocWatcher *watcher, void *userData) {
std::vector<WatcherWithUserData>::iterator it =
std::vector<WatcherWithUserData>::iterator it =
std::find(watchers.begin(), watchers.end(), WatcherWithUserData(watcher, userData));
if (it != watchers.end()) {
watchers.erase(it);
Expand Down Expand Up @@ -2103,7 +2103,7 @@ int Document::BraceMatch(int position, int /*maxReStyle*/) {
*/
class BuiltinRegex : public RegexSearchBase {
public:
BuiltinRegex(CharClassify *charClassTable) : search(charClassTable) {}
explicit BuiltinRegex(CharClassify *charClassTable) : search(charClassTable) {}

virtual ~BuiltinRegex() {
}
Expand Down
14 changes: 7 additions & 7 deletions scintilla/src/Document.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Range {
Position start;
Position end;

Range(Position pos=0) :
explicit Range(Position pos=0) :
start(pos), end(pos) {
}
Range(Position start_, Position end_) :
Expand Down Expand Up @@ -165,7 +165,7 @@ class LexInterface {
ILexer *instance;
bool performingStyle; ///< Prevent reentrance
public:
LexInterface(Document *pdoc_) : pdoc(pdoc_), instance(0), performingStyle(false) {
explicit LexInterface(Document *pdoc_) : pdoc(pdoc_), instance(0), performingStyle(false) {
}
virtual ~LexInterface() {
}
Expand Down Expand Up @@ -443,12 +443,12 @@ class UndoGroup {
*/
class DocModification {
public:
int modificationType;
int modificationType;
int position;
int length;
int linesAdded; /**< Negative if lines deleted. */
const char *text; /**< Only valid for changes to text, not for changes to style. */
int line;
int length;
int linesAdded; /**< Negative if lines deleted. */
const char *text; /**< Only valid for changes to text, not for changes to style. */
int line;
int foldLevelNow;
int foldLevelPrev;
int annotationLinesAdded;
Expand Down
Loading

0 comments on commit eb5cd83

Please sign in to comment.