diff options
author | XhmikosR <xhmikosr@gmail.com> | 2015-08-04 00:52:40 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2015-08-04 09:29:48 +0300 |
commit | af3a1a1dbfbf017e6a192a89c55f92238010336c (patch) | |
tree | 71083fac10b3561a2877f98e6c4587dc62087cda /scintilla/lexers/LexSQL.cxx | |
parent | 26e3e3c2440c5fa2cbbe080bfc228687bec8574a (diff) | |
download | notepad2-mod-af3a1a1dbfbf017e6a192a89c55f92238010336c.zip notepad2-mod-af3a1a1dbfbf017e6a192a89c55f92238010336c.tar.gz notepad2-mod-af3a1a1dbfbf017e6a192a89c55f92238010336c.tar.bz2 |
Update Scintilla to 3.6.0.
Diffstat (limited to 'scintilla/lexers/LexSQL.cxx')
-rw-r--r-- | scintilla/lexers/LexSQL.cxx | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/scintilla/lexers/LexSQL.cxx b/scintilla/lexers/LexSQL.cxx index a2314c5..442c3d4 100644 --- a/scintilla/lexers/LexSQL.cxx +++ b/scintilla/lexers/LexSQL.cxx @@ -66,7 +66,7 @@ typedef unsigned int sql_state_t; class SQLStates {
public :
- void Set(int lineNumber, unsigned short int sqlStatesLine) {
+ void Set(Sci_Position lineNumber, unsigned short int sqlStatesLine) {
sqlStatement.Set(lineNumber, sqlStatesLine);
}
@@ -214,7 +214,7 @@ public : return (sqlStatesLine & MASK_INTO_CREATE_VIEW_AS_STATEMENT) != 0;
}
- sql_state_t ForLine(int lineNumber) {
+ sql_state_t ForLine(Sci_Position lineNumber) {
return sqlStatement.ValueAt(lineNumber);
}
@@ -328,7 +328,7 @@ public : return osSQL.DescribeProperty(name);
}
- int SCI_METHOD PropertySet(const char *key, const char *val) {
+ Sci_Position SCI_METHOD PropertySet(const char *key, const char *val) {
if (osSQL.PropertySet(&options, key, val)) {
return 0;
}
@@ -339,9 +339,9 @@ public : return osSQL.DescribeWordListSets();
}
- int SCI_METHOD WordListSet(int n, const char *wl);
- 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);
+ Sci_Position SCI_METHOD WordListSet(int n, const char *wl);
+ void SCI_METHOD Lex(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess);
+ void SCI_METHOD Fold(Sci_PositionU startPos, Sci_Position lengthDoc, int initStyle, IDocument *pAccess);
void * SCI_METHOD PrivateCall(int, void *) {
return 0;
@@ -372,10 +372,10 @@ private: }
}
- bool IsCommentLine (int line, LexAccessor &styler) {
- int pos = styler.LineStart(line);
- int eol_pos = styler.LineStart(line + 1) - 1;
- for (int i = pos; i + 1 < eol_pos; i++) {
+ bool IsCommentLine (Sci_Position line, LexAccessor &styler) {
+ Sci_Position pos = styler.LineStart(line);
+ Sci_Position eol_pos = styler.LineStart(line + 1) - 1;
+ for (Sci_Position i = pos; i + 1 < eol_pos; i++) {
int style = styler.StyleAt(i);
// MySQL needs -- comments to be followed by space or control char
if (style == SCE_SQL_COMMENTLINE && styler.Match(i, "--"))
@@ -400,7 +400,7 @@ private: WordList kw_user4;
};
-int SCI_METHOD LexerSQL::WordListSet(int n, const char *wl) {
+Sci_Position SCI_METHOD LexerSQL::WordListSet(int n, const char *wl) {
WordList *wordListN = 0;
switch (n) {
case 0:
@@ -427,7 +427,7 @@ int SCI_METHOD LexerSQL::WordListSet(int n, const char *wl) { case 7:
wordListN = &kw_user4;
}
- int firstModification = -1;
+ Sci_Position firstModification = -1;
if (wordListN) {
WordList wlNew;
wlNew.Set(wl);
@@ -439,11 +439,11 @@ int SCI_METHOD LexerSQL::WordListSet(int n, const char *wl) { return firstModification;
}
-void SCI_METHOD LexerSQL::Lex(unsigned int startPos, int length, int initStyle, IDocument *pAccess) {
+void SCI_METHOD LexerSQL::Lex(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {
LexAccessor styler(pAccess);
StyleContext sc(startPos, length, initStyle, styler);
int styleBeforeDCKeyword = SCE_SQL_DEFAULT;
- int offset = 0;
+ Sci_Position offset = 0;
for (; sc.More(); sc.Forward(), offset++) {
// Determine if the current state should terminate.
@@ -561,7 +561,7 @@ void SCI_METHOD LexerSQL::Lex(unsigned int startPos, int length, int initStyle, // Locate the unique Q operator character
sc.Complete();
char qOperator = 0x00;
- for (int styleStartPos = sc.currentPos; styleStartPos > 0; --styleStartPos) {
+ for (Sci_Position styleStartPos = sc.currentPos; styleStartPos > 0; --styleStartPos) {
if (styler.StyleAt(styleStartPos - 1) != SCE_SQL_QOPERATOR) {
qOperator = styler.SafeGetCharAt(styleStartPos + 2);
break;
@@ -628,18 +628,18 @@ void SCI_METHOD LexerSQL::Lex(unsigned int startPos, int length, int initStyle, sc.Complete();
}
-void SCI_METHOD LexerSQL::Fold(unsigned int startPos, int length, int initStyle, IDocument *pAccess) {
+void SCI_METHOD LexerSQL::Fold(Sci_PositionU startPos, Sci_Position length, int initStyle, IDocument *pAccess) {
if (!options.fold)
return;
LexAccessor styler(pAccess);
- unsigned int endPos = startPos + length;
+ Sci_PositionU endPos = startPos + length;
int visibleChars = 0;
- int lineCurrent = styler.GetLine(startPos);
+ Sci_Position lineCurrent = styler.GetLine(startPos);
int levelCurrent = SC_FOLDLEVELBASE;
if (lineCurrent > 0) {
// Backtrack to previous line in case need to fix its fold status for folding block of single-line comments (i.e. '--').
- int lastNLPos = -1;
+ Sci_Position lastNLPos = -1;
// And keep going back until we find an operator ';' followed
// by white-space and/or comments. This will improve folding.
while (--startPos > 0) {
@@ -649,7 +649,7 @@ void SCI_METHOD LexerSQL::Fold(unsigned int startPos, int length, int initStyle, } else if (ch == ';' &&
styler.StyleAt(startPos) == SCE_SQL_OPERATOR) {
bool isAllClear = true;
- for (int tempPos = startPos + 1;
+ for (Sci_Position tempPos = startPos + 1;
tempPos < lastNLPos;
++tempPos) {
int tempStyle = styler.StyleAt(tempPos);
@@ -672,7 +672,7 @@ void SCI_METHOD LexerSQL::Fold(unsigned int startPos, int length, int initStyle, // And because folding ends at ';', keep going until we find one
// Otherwise if create ... view ... as is split over multiple
// lines the folding won't always update immediately.
- unsigned int docLength = styler.Length();
+ Sci_PositionU docLength = styler.Length();
for (; endPos < docLength; ++endPos) {
if (styler.SafeGetCharAt(endPos) == ';') {
break;
@@ -692,7 +692,7 @@ void SCI_METHOD LexerSQL::Fold(unsigned int startPos, int length, int initStyle, if (!options.foldOnlyBegin) {
sqlStatesCurrentLine = sqlStates.ForLine(lineCurrent);
}
- for (unsigned int i = startPos; i < endPos; i++) {
+ for (Sci_PositionU i = startPos; i < endPos; i++) {
char ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
int stylePrev = style;
|