aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexMSSQL.cxx
diff options
context:
space:
mode:
authorJoe Mueller <devnull@localhost>2015-07-30 14:35:17 +1000
committerJoe Mueller <devnull@localhost>2015-07-30 14:35:17 +1000
commit96229bb5f01e86efe382523e1ee79ff23bdcc8e0 (patch)
tree5aa3c8becad92a397b02445001383e188070f287 /lexers/LexMSSQL.cxx
parent7604a6b2a98fc2250408368eb51f8f6827d888c8 (diff)
downloadscintilla-mirror-96229bb5f01e86efe382523e1ee79ff23bdcc8e0.tar.gz
Use Sci_Position / Sci_PositionU for variables in lexers that represent
positions and line numbers and may be widened to 64-bits in a future release.
Diffstat (limited to 'lexers/LexMSSQL.cxx')
-rw-r--r--lexers/LexMSSQL.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/lexers/LexMSSQL.cxx b/lexers/LexMSSQL.cxx
index 71a9e62e4..fa86db694 100644
--- a/lexers/LexMSSQL.cxx
+++ b/lexers/LexMSSQL.cxx
@@ -35,8 +35,8 @@ using namespace Scintilla;
#define KW_MSSQL_STORED_PROCEDURES 5
#define KW_MSSQL_OPERATORS 6
-static char classifyWordSQL(unsigned int start,
- unsigned int end,
+static char classifyWordSQL(Sci_PositionU start,
+ Sci_PositionU end,
WordList *keywordlists[],
Accessor &styler,
unsigned int actualState,
@@ -52,7 +52,7 @@ static char classifyWordSQL(unsigned int start,
WordList &kwStoredProcedures = *keywordlists[KW_MSSQL_STORED_PROCEDURES];
WordList &kwOperators = *keywordlists[KW_MSSQL_OPERATORS];
- for (unsigned int i = 0; i < end - start + 1 && i < 128; i++) {
+ for (Sci_PositionU i = 0; i < end - start + 1 && i < 128; i++) {
s[i] = static_cast<char>(tolower(styler[start + i]));
s[i + 1] = '\0';
}
@@ -108,7 +108,7 @@ static void ColouriseMSSQLDoc(Sci_PositionU startPos, Sci_Position length,
styler.StartAt(startPos);
bool fold = styler.GetPropertyInt("fold") != 0;
- int lineCurrent = styler.GetLine(startPos);
+ Sci_Position lineCurrent = styler.GetLine(startPos);
int spaceFlags = 0;
int state = initStyle;
@@ -116,8 +116,8 @@ static void ColouriseMSSQLDoc(Sci_PositionU startPos, Sci_Position length,
char chPrev = ' ';
char chNext = styler[startPos];
styler.StartSegment(startPos);
- unsigned int lengthDoc = startPos + length;
- for (unsigned int i = startPos; i < lengthDoc; i++) {
+ Sci_PositionU lengthDoc = startPos + length;
+ for (Sci_PositionU i = startPos; i < lengthDoc; i++) {
char ch = chNext;
chNext = styler.SafeGetCharAt(i + 1);
@@ -280,15 +280,15 @@ static void ColouriseMSSQLDoc(Sci_PositionU startPos, Sci_Position length,
static void FoldMSSQLDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) {
bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
- 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 levelPrev = styler.LevelAt(lineCurrent) & SC_FOLDLEVELNUMBERMASK;
int levelCurrent = levelPrev;
char chNext = styler[startPos];
bool inComment = (styler.StyleAt(startPos-1) == SCE_MSSQL_COMMENT);
char s[10] = "";
- 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 style = styler.StyleAt(i);
@@ -304,7 +304,7 @@ static void FoldMSSQLDoc(Sci_PositionU startPos, Sci_Position length, int, WordL
if (style == SCE_MSSQL_STATEMENT) {
// Folding between begin or case and end
if (ch == 'b' || ch == 'B' || ch == 'c' || ch == 'C' || ch == 'e' || ch == 'E') {
- for (unsigned int j = 0; j < 5; j++) {
+ for (Sci_PositionU j = 0; j < 5; j++) {
if (!iswordchar(styler[i + j])) {
break;
}