diff options
author | Joe Mueller <unknown> | 2015-07-30 14:35:17 +1000 |
---|---|---|
committer | Joe Mueller <unknown> | 2015-07-30 14:35:17 +1000 |
commit | 58471e908a3b74b27379bb19a13d62cd8d4476b0 (patch) | |
tree | 8f61293f34d008fea20584c631d23e58b3fe53aa /lexers/LexMake.cxx | |
parent | 2270ab97445c6f12bd0fddb273ab617fdb421594 (diff) | |
download | scintilla-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/LexMake.cxx')
-rw-r--r-- | lexers/LexMake.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lexers/LexMake.cxx b/lexers/LexMake.cxx index 7af782acf..9e8dadf1b 100644 --- a/lexers/LexMake.cxx +++ b/lexers/LexMake.cxx @@ -27,20 +27,20 @@ using namespace Scintilla; #endif -static inline bool AtEOL(Accessor &styler, unsigned int i) { +static inline bool AtEOL(Accessor &styler, Sci_PositionU i) { return (styler[i] == '\n') || ((styler[i] == '\r') && (styler.SafeGetCharAt(i + 1) != '\n')); } static void ColouriseMakeLine( char *lineBuffer, - unsigned int lengthLine, - unsigned int startLine, - unsigned int endPos, + Sci_PositionU lengthLine, + Sci_PositionU startLine, + Sci_PositionU endPos, Accessor &styler) { - unsigned int i = 0; - int lastNonSpace = -1; + Sci_PositionU i = 0; + Sci_Position lastNonSpace = -1; unsigned int state = SCE_MAKE_DEFAULT; bool bSpecial = false; @@ -120,9 +120,9 @@ static void ColouriseMakeDoc(Sci_PositionU startPos, Sci_Position length, int, W char lineBuffer[1024]; styler.StartAt(startPos); styler.StartSegment(startPos); - unsigned int linePos = 0; - unsigned int startLine = startPos; - for (unsigned int i = startPos; i < startPos + length; i++) { + Sci_PositionU linePos = 0; + Sci_PositionU startLine = startPos; + for (Sci_PositionU i = startPos; i < startPos + length; i++) { lineBuffer[linePos++] = styler[i]; if (AtEOL(styler, i) || (linePos >= sizeof(lineBuffer) - 1)) { // End of line (or of line buffer) met, colourise it |