diff options
Diffstat (limited to 'lexers/LexTCMD.cxx')
-rw-r--r-- | lexers/LexTCMD.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lexers/LexTCMD.cxx b/lexers/LexTCMD.cxx index 7d86db2bc..150ceb32b 100644 --- a/lexers/LexTCMD.cxx +++ b/lexers/LexTCMD.cxx @@ -33,7 +33,7 @@ static bool IsAlphabetic(int ch) { return IsASCII(ch) && isalpha(ch); } -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')); } @@ -92,12 +92,12 @@ static unsigned int GetBatchVarLen( char *wordBuffer ) } -static void ColouriseTCMDLine( char *lineBuffer, unsigned int lengthLine, unsigned int startLine, unsigned int endPos, WordList *keywordlists[], Accessor &styler) +static void ColouriseTCMDLine( char *lineBuffer, Sci_PositionU lengthLine, Sci_PositionU startLine, Sci_PositionU endPos, WordList *keywordlists[], Accessor &styler) { - unsigned int offset = 0; // Line Buffer Offset + Sci_PositionU offset = 0; // Line Buffer Offset char wordBuffer[260]; // Word Buffer - large to catch long paths - unsigned int wbl; // Word Buffer Length - unsigned int wbo; // Word Buffer Offset - also Special Keyword Buffer Length + Sci_PositionU wbl; // Word Buffer Length + Sci_PositionU wbo; // Word Buffer Offset - also Special Keyword Buffer Length WordList &keywords = *keywordlists[0]; // Internal Commands // WordList &keywords2 = *keywordlists[1]; // Aliases (optional) bool isDelayedExpansion = 1; // !var! @@ -252,7 +252,7 @@ static void ColouriseTCMDLine( char *lineBuffer, unsigned int lengthLine, unsign // no further Regular Keyword Checking continueProcessing = false; sKeywordFound = true; - wbo = (unsigned int)strlen( sKeywordBuffer ); + wbo = (Sci_PositionU)strlen( sKeywordBuffer ); // Colorize Special Keyword as Regular Keyword styler.ColourTo(startLine + offset - 1 - (wbl - wbo), SCE_TCMD_WORD); @@ -401,15 +401,15 @@ ColorizeArg: styler.ColourTo(endPos, SCE_TCMD_DEFAULT); } -static void ColouriseTCMDDoc(Sci_PositionU startPos, Sci_Position length, int /*initStyle*/, WordList *keywordlists[], Accessor &styler) +static void ColouriseTCMDDoc( Sci_PositionU startPos, Sci_Position length, int /*initStyle*/, WordList *keywordlists[], Accessor &styler ) { char lineBuffer[16384]; 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 @@ -436,16 +436,16 @@ static void StrUpr(char *s) { // Folding support (for DO, IFF, SWITCH, TEXT, and command groups) static void FoldTCMDDoc(Sci_PositionU startPos, Sci_Position length, int, WordList *[], Accessor &styler) { - int line = styler.GetLine(startPos); + Sci_Position line = styler.GetLine(startPos); int level = styler.LevelAt(line); int levelIndent = 0; - unsigned int endPos = startPos + length; + Sci_PositionU endPos = startPos + length; char s[16] = ""; char chPrev = styler.SafeGetCharAt(startPos - 1); // Scan for ( and ) - for (unsigned int i = startPos; i < endPos; i++) { + for (Sci_PositionU i = startPos; i < endPos; i++) { int c = styler.SafeGetCharAt(i, '\n'); int style = styler.StyleAt(i); @@ -461,7 +461,7 @@ static void FoldTCMDDoc(Sci_PositionU startPos, Sci_Position length, int, WordLi } if (( bLineStart ) && ( style == SCE_TCMD_WORD )) { - for (unsigned int j = 0; j < 10; j++) { + for (Sci_PositionU j = 0; j < 10; j++) { if (!iswordchar(styler[i + j])) { break; } |