aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexPLM.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/LexPLM.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/LexPLM.cxx')
-rw-r--r--lexers/LexPLM.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/lexers/LexPLM.cxx b/lexers/LexPLM.cxx
index 3783508b9..e306685d6 100644
--- a/lexers/LexPLM.cxx
+++ b/lexers/LexPLM.cxx
@@ -24,12 +24,12 @@
using namespace Scintilla;
#endif
-static void GetRange(unsigned int start,
- unsigned int end,
+static void GetRange(Sci_PositionU start,
+ Sci_PositionU end,
Accessor &styler,
char *s,
- unsigned int len) {
- unsigned int i = 0;
+ Sci_PositionU len) {
+ Sci_PositionU i = 0;
while ((i < end - start + 1) && (i < len-1)) {
s[i] = static_cast<char>(tolower(styler[start + i]));
i++;
@@ -43,13 +43,13 @@ static void ColourisePlmDoc(Sci_PositionU startPos,
WordList *keywordlists[],
Accessor &styler)
{
- unsigned int endPos = startPos + length;
+ Sci_PositionU endPos = startPos + length;
int state = initStyle;
styler.StartAt(startPos);
styler.StartSegment(startPos);
- for (unsigned int i = startPos; i < endPos; i++) {
+ for (Sci_PositionU i = startPos; i < endPos; i++) {
char ch = styler.SafeGetCharAt(i);
char chNext = styler.SafeGetCharAt(i + 1);
@@ -99,7 +99,7 @@ static void ColourisePlmDoc(Sci_PositionU startPos,
if (!isdigit(ch) && !isalpha(ch) && ch != '$') {
// Get the entire identifier.
char word[1024];
- int segmentStart = styler.GetStartSegment();
+ Sci_Position segmentStart = styler.GetStartSegment();
GetRange(segmentStart, i - 1, styler, word, sizeof(word));
i--;
@@ -133,17 +133,17 @@ static void FoldPlmDoc(Sci_PositionU startPos,
{
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];
int styleNext = styler.StyleAt(startPos);
int style = initStyle;
- int startKeyword = 0;
+ Sci_Position startKeyword = 0;
- 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;