diff options
-rw-r--r-- | lexers/LexBaan.cxx | 2 | ||||
-rw-r--r-- | lexers/LexFortran.cxx | 8 | ||||
-rw-r--r-- | lexers/LexGui4Cli.cxx | 2 | ||||
-rw-r--r-- | lexers/LexHex.cxx | 4 | ||||
-rw-r--r-- | lexers/LexLaTeX.cxx | 2 | ||||
-rw-r--r-- | lexers/LexMySQL.cxx | 2 | ||||
-rw-r--r-- | lexers/LexOScript.cxx | 2 | ||||
-rw-r--r-- | lexers/LexPython.cxx | 6 | ||||
-rw-r--r-- | lexers/LexRuby.cxx | 2 | ||||
-rw-r--r-- | lexers/LexRust.cxx | 2 | ||||
-rw-r--r-- | lexers/LexTeX.cxx | 2 | ||||
-rw-r--r-- | lexlib/SparseState.h | 18 |
12 files changed, 27 insertions, 25 deletions
diff --git a/lexers/LexBaan.cxx b/lexers/LexBaan.cxx index 23e221918..394c4074e 100644 --- a/lexers/LexBaan.cxx +++ b/lexers/LexBaan.cxx @@ -131,7 +131,7 @@ static inline bool IsAnOperator(int ch) { return false; } -static inline int IsAnyOtherIdentifier(char *s, int sLength) { +static inline int IsAnyOtherIdentifier(char *s, Sci_Position sLength) { /* IsAnyOtherIdentifier uses standard templates used in baan. The matching template is shown as comments just above the return condition. diff --git a/lexers/LexFortran.cxx b/lexers/LexFortran.cxx index 7d2141f3d..fdfb22886 100644 --- a/lexers/LexFortran.cxx +++ b/lexers/LexFortran.cxx @@ -362,7 +362,7 @@ static void CheckBackComLines(Accessor &styler, bool isFixFormat, Sci_Position l } Sci_Position lineC = lineCurrent - nComL + 1; - unsigned int iStart; + Sci_PositionU iStart; if (lineC <= 0) { lineC = 0; iStart = nComL - lineCurrent; @@ -373,11 +373,11 @@ static void CheckBackComLines(Accessor &styler, bool isFixFormat, Sci_Position l bool levChanged = false; int lev = styler.LevelAt(lineC) & SC_FOLDLEVELNUMBERMASK; - for (unsigned int i=iStart; i<=nComL; i++) { + for (Sci_PositionU i=iStart; i<=nComL; i++) { if (comL[i] && (!comL[i-1] || nComCol[i] != nComCol[i-1])) { bool increase = true; - unsigned int until = i + nComL; - for (unsigned int j=i+1; j<=until; j++) { + Sci_PositionU until = i + nComL; + for (Sci_PositionU j=i+1; j<=until; j++) { if (!comL[j] || nComCol[j] != nComCol[i]) { increase = false; break; diff --git a/lexers/LexGui4Cli.cxx b/lexers/LexGui4Cli.cxx index c1625160a..d4be71b92 100644 --- a/lexers/LexGui4Cli.cxx +++ b/lexers/LexGui4Cli.cxx @@ -68,7 +68,7 @@ inline bool isGCOperator(int ch) #define isFoldPoint(x) ((styler.LevelAt(x) & SC_FOLDLEVELNUMBERMASK) == 1024) static void colorFirstWord(WordList *keywordlists[], Accessor &styler, - StyleContext *sc, char *buff, Sci_Position length, int) + StyleContext *sc, char *buff, Sci_Position length, Sci_Position) { Sci_Position c = 0; while (sc->More() && isSpaceOrNL(sc->ch)) diff --git a/lexers/LexHex.cxx b/lexers/LexHex.cxx index d549881cb..449454471 100644 --- a/lexers/LexHex.cxx +++ b/lexers/LexHex.cxx @@ -651,7 +651,9 @@ static void ColouriseSrecDoc(Sci_PositionU startPos, Sci_Position length, int in while (sc.More()) { Sci_PositionU recStartPos; - int byteCount, reqByteCount, addrFieldSize, addrFieldType, dataFieldSize, dataFieldType; + Sci_Position reqByteCount; + Sci_Position dataFieldSize; + int byteCount, addrFieldSize, addrFieldType, dataFieldType; int cs1, cs2; switch (sc.state) { diff --git a/lexers/LexLaTeX.cxx b/lexers/LexLaTeX.cxx index 612ef486a..c657623b3 100644 --- a/lexers/LexLaTeX.cxx +++ b/lexers/LexLaTeX.cxx @@ -42,7 +42,7 @@ struct latexFoldSave { for (int i = 0; i < 8; ++i) openBegins[i] = save.openBegins[i]; } int openBegins[8]; - int structLev; + Sci_Position structLev; }; class LexerLaTeX : public LexerBase { diff --git a/lexers/LexMySQL.cxx b/lexers/LexMySQL.cxx index 703b24daf..03cf106e6 100644 --- a/lexers/LexMySQL.cxx +++ b/lexers/LexMySQL.cxx @@ -55,7 +55,7 @@ static inline bool IsANumberChar(int ch) { */ static void CheckForKeyword(StyleContext& sc, WordList* keywordlists[], int activeState) { - int length = sc.LengthCurrent() + 1; // +1 for the next char + Sci_Position length = sc.LengthCurrent() + 1; // +1 for the next char char* s = new char[length]; sc.GetCurrentLowered(s, length); if (keywordlists[0]->InList(s)) diff --git a/lexers/LexOScript.cxx b/lexers/LexOScript.cxx index ee2dddd6f..24b85b700 100644 --- a/lexers/LexOScript.cxx +++ b/lexers/LexOScript.cxx @@ -464,7 +464,7 @@ static void FoldOScriptDoc(Sci_PositionU startPos, Sci_Position length, int init char chNext = styler[startPos]; int styleNext = styler.StyleAt(startPos); int style = initStyle; - int lastStart = 0; + Sci_Position lastStart = 0; for (Sci_Position i = startPos; i < endPos; i++) { char ch = chNext; diff --git a/lexers/LexPython.cxx b/lexers/LexPython.cxx index 567c44d05..a768b4086 100644 --- a/lexers/LexPython.cxx +++ b/lexers/LexPython.cxx @@ -342,7 +342,7 @@ class LexerPython : public DefaultLexer { OptionSetPython osPython; enum { ssIdentifier }; SubStyles subStyles; - std::map<int, std::vector<SingleFStringExpState> > ftripleStateAtEol; + std::map<Sci_Position, std::vector<SingleFStringExpState> > ftripleStateAtEol; public: explicit LexerPython() : DefaultLexer(lexicalClasses, ELEMENTS(lexicalClasses)), @@ -466,7 +466,7 @@ void LexerPython::ProcessLineEnd(StyleContext &sc, std::vector<SingleFStringExpS } } if (!fstringStateStack.empty()) { - std::pair<int, std::vector<SingleFStringExpState> > val; + std::pair<Sci_Position, std::vector<SingleFStringExpState> > val; val.first = sc.currentLine; val.second = fstringStateStack; @@ -529,7 +529,7 @@ void SCI_METHOD LexerPython::Lex(Sci_PositionU startPos, Sci_Position length, in } // Set up fstate stack from last line and remove any subsequent ftriple at eol states - std::map<int, std::vector<SingleFStringExpState> >::iterator it; + std::map<Sci_Position, std::vector<SingleFStringExpState> >::iterator it; it = ftripleStateAtEol.find(lineCurrent - 1); if (it != ftripleStateAtEol.end() && !it->second.empty()) { fstringStateStack = it->second; diff --git a/lexers/LexRuby.cxx b/lexers/LexRuby.cxx index 42f30fd2a..d990f1b45 100644 --- a/lexers/LexRuby.cxx +++ b/lexers/LexRuby.cxx @@ -346,7 +346,7 @@ static bool RE_CanFollowKeyword(const char *keyword) { // Look at chars up to but not including endPos // Don't look at styles in case we're looking forward -static int skipWhitespace(Sci_Position startPos, +static Sci_Position skipWhitespace(Sci_Position startPos, Sci_Position endPos, Accessor &styler) { for (Sci_Position i = startPos; i < endPos; i++) { diff --git a/lexers/LexRust.cxx b/lexers/LexRust.cxx index ff5e816ba..5e8a4d167 100644 --- a/lexers/LexRust.cxx +++ b/lexers/LexRust.cxx @@ -214,7 +214,7 @@ static void ScanIdentifier(Accessor& styler, Sci_Position& pos, WordList *keywor styler.ColourTo(pos - 1, SCE_RUST_MACRO); } else { char s[MAX_RUST_IDENT_CHARS + 1]; - int len = pos - start; + Sci_Position len = pos - start; len = len > MAX_RUST_IDENT_CHARS ? MAX_RUST_IDENT_CHARS : len; GrabString(s, styler, start, len); bool keyword = false; diff --git a/lexers/LexTeX.cxx b/lexers/LexTeX.cxx index 001416051..36cfe12cc 100644 --- a/lexers/LexTeX.cxx +++ b/lexers/LexTeX.cxx @@ -297,7 +297,7 @@ static inline bool isWordChar(int ch) { return ((ch >= 'a') && (ch <= 'z')) || ((ch >= 'A') && (ch <= 'Z')); } -static int ParseTeXCommand(Sci_PositionU pos, Accessor &styler, char *command) +static Sci_Position ParseTeXCommand(Sci_PositionU pos, Accessor &styler, char *command) { Sci_Position length=0; char ch=styler.SafeGetCharAt(pos+1); diff --git a/lexlib/SparseState.h b/lexlib/SparseState.h index e767d6710..22f58baef 100644 --- a/lexlib/SparseState.h +++ b/lexlib/SparseState.h @@ -17,9 +17,9 @@ namespace Scintilla { template <typename T> class SparseState { struct State { - int position; + Sci_Position position; T value; - State(int position_, T value_) : position(position_), value(value_) { + State(Sci_Position position_, T value_) : position(position_), value(value_) { } inline bool operator<(const State &other) const { return position < other.position; @@ -28,26 +28,26 @@ class SparseState { return (position == other.position) && (value == other.value); } }; - int positionFirst; + Sci_Position positionFirst; typedef std::vector<State> stateVector; stateVector states; - typename stateVector::iterator Find(int position) { + typename stateVector::iterator Find(Sci_Position position) { State searchValue(position, T()); return std::lower_bound(states.begin(), states.end(), searchValue); } public: - explicit SparseState(int positionFirst_=-1) { + explicit SparseState(Sci_Position positionFirst_=-1) { positionFirst = positionFirst_; } - void Set(int position, T value) { + void Set(Sci_Position position, T value) { Delete(position); if (states.empty() || (value != states[states.size()-1].value)) { states.push_back(State(position, value)); } } - T ValueAt(int position) { + T ValueAt(Sci_Position position) { if (states.empty()) return T(); if (position < states[0].position) @@ -62,7 +62,7 @@ public: return low->value; } } - bool Delete(int position) { + bool Delete(Sci_Position position) { typename stateVector::iterator low = Find(position); if (low != states.end()) { states.erase(low, states.end()); @@ -75,7 +75,7 @@ public: } // Returns true if Merge caused a significant change - bool Merge(const SparseState<T> &other, int ignoreAfter) { + bool Merge(const SparseState<T> &other, Sci_Position ignoreAfter) { // Changes caused beyond ignoreAfter are not significant Delete(ignoreAfter+1); |