aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexModula.cxx
diff options
context:
space:
mode:
authorJoe Mueller <unknown>2015-07-30 14:35:17 +1000
committerJoe Mueller <unknown>2015-07-30 14:35:17 +1000
commit58471e908a3b74b27379bb19a13d62cd8d4476b0 (patch)
tree8f61293f34d008fea20584c631d23e58b3fe53aa /lexers/LexModula.cxx
parent2270ab97445c6f12bd0fddb273ab617fdb421594 (diff)
downloadscintilla-mirror-58471e908a3b74b27379bb19a13d62cd8d4476b0.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/LexModula.cxx')
-rw-r--r--lexers/LexModula.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/lexers/LexModula.cxx b/lexers/LexModula.cxx
index f2014d0fe..c71cdd0ce 100644
--- a/lexers/LexModula.cxx
+++ b/lexers/LexModula.cxx
@@ -79,7 +79,7 @@ static inline unsigned IsOperator( StyleContext & sc, WordList & op ) {
return 0;
}
-static inline bool IsEOL( Accessor &styler, unsigned curPos ) {
+static inline bool IsEOL( Accessor &styler, Sci_PositionU curPos ) {
unsigned ch = styler.SafeGetCharAt( curPos );
if( ( ch == '\r' && styler.SafeGetCharAt( curPos + 1 ) == '\n' ) ||
( ch == '\n' ) ) {
@@ -90,7 +90,7 @@ static inline bool IsEOL( Accessor &styler, unsigned curPos ) {
static inline bool checkStatement(
Accessor &styler,
- int &curPos,
+ Sci_Position &curPos,
const char *stt, bool spaceAfter = true ) {
int len = static_cast<int>(strlen( stt ));
int i;
@@ -110,7 +110,7 @@ static inline bool checkStatement(
static inline bool checkEndSemicolon(
Accessor &styler,
- int &curPos, int endPos )
+ Sci_Position &curPos, Sci_Position endPos )
{
const char *stt = "END";
int len = static_cast<int>(strlen( stt ));
@@ -134,9 +134,9 @@ static inline bool checkEndSemicolon(
static inline bool checkKeyIdentOper(
Accessor &styler,
- int &curPos, int endPos,
+ Sci_Position &curPos, Sci_Position endPos,
const char *stt, const char etk ) {
- int newPos = curPos;
+ Sci_Position newPos = curPos;
if( ! checkStatement( styler, newPos, stt ) )
return false;
newPos++;
@@ -179,12 +179,12 @@ static void FoldModulaDoc( Sci_PositionU startPos,
int , WordList *[],
Accessor &styler)
{
- int curLine = styler.GetLine(startPos);
+ Sci_Position curLine = styler.GetLine(startPos);
int curLevel = SC_FOLDLEVELBASE;
- int endPos = startPos + length;
+ Sci_Position endPos = startPos + length;
if( curLine > 0 )
curLevel = styler.LevelAt( curLine - 1 ) >> 16;
- int curPos = startPos;
+ Sci_Position curPos = startPos;
int style = styler.StyleAt( curPos );
int visChars = 0;
int nextLevel = curLevel;
@@ -250,9 +250,9 @@ static void FoldModulaDoc( Sci_PositionU startPos,
nextLevel++;
else
if( checkKeyIdentOper( styler, curPos, endPos, "END", ';' ) ) {
- int cln = curLine;
+ Sci_Position cln = curLine;
int clv_old = curLevel;
- int pos;
+ Sci_Position pos;
char ch;
int clv_new;
while( cln > 0 ) {
@@ -342,7 +342,7 @@ static void ColouriseModulaDoc( Sci_PositionU startPos,
char buf[BUFLEN];
int i, kl;
- int charPos = 0;
+ Sci_Position charPos = 0;
StyleContext sc( startPos, length, initStyle, styler );