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/LexScriptol.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/LexScriptol.cxx')
| -rw-r--r-- | lexers/LexScriptol.cxx | 24 | 
1 files changed, 12 insertions, 12 deletions
| diff --git a/lexers/LexScriptol.cxx b/lexers/LexScriptol.cxx index 694755b06..9c9d9c4c0 100644 --- a/lexers/LexScriptol.cxx +++ b/lexers/LexScriptol.cxx @@ -25,11 +25,11 @@  using namespace Scintilla;  #endif -static void ClassifyWordSol(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, char *prevWord) +static void ClassifyWordSol(Sci_PositionU start, Sci_PositionU end, WordList &keywords, Accessor &styler, char *prevWord)  {      char s[100] = "";      bool wordIsNumber = isdigit(styler[start]) != 0; -    for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) +    for (Sci_PositionU i = 0; i < end - start + 1 && i < 30; i++)       {             s[i] = styler[start + i];             s[i + 1] = '\0'; @@ -38,7 +38,7 @@ static void ClassifyWordSol(unsigned int start, unsigned int end, WordList &keyw      if (0 == strcmp(prevWord, "class"))       chAttr = SCE_SCRIPTOL_CLASSNAME;      else if (wordIsNumber)                    chAttr = SCE_SCRIPTOL_NUMBER;      else if (keywords.InList(s))              chAttr = SCE_SCRIPTOL_KEYWORD; -    else for (unsigned int i = 0; i < end - start + 1; i++)  // test dotted idents +    else for (Sci_PositionU i = 0; i < end - start + 1; i++)  // test dotted idents      {          if (styler[start + i] == '.')          { @@ -50,7 +50,7 @@ static void ClassifyWordSol(unsigned int start, unsigned int end, WordList &keyw      strcpy(prevWord, s);  } -static bool IsSolComment(Accessor &styler, int pos, int len) +static bool IsSolComment(Accessor &styler, Sci_Position pos, Sci_Position len)  {     if(len > 0)     { @@ -81,7 +81,7 @@ static bool IsSolWordStart(char ch)  } -static int GetSolStringState(Accessor &styler, int i, int *nextIndex) +static int GetSolStringState(Accessor &styler, Sci_Position i, Sci_Position *nextIndex)  {  	char ch = styler.SafeGetCharAt(i);  	char chNext = styler.SafeGetCharAt(i + 1); @@ -113,12 +113,12 @@ static void ColouriseSolDoc(Sci_PositionU startPos, Sci_Position length, int ini                              WordList *keywordlists[], Accessor &styler)   { -	int lengthDoc = startPos + length; +	Sci_Position lengthDoc = startPos + length;          char stringType = '\"';  	if (startPos > 0)          { -            int lineCurrent = styler.GetLine(startPos); +            Sci_Position lineCurrent = styler.GetLine(startPos);              if (lineCurrent > 0)              {                startPos = styler.LineStart(lineCurrent-1); @@ -137,12 +137,12 @@ static void ColouriseSolDoc(Sci_PositionU startPos, Sci_Position length, int ini  	int state = initStyle & 31; -	int nextIndex = 0; +	Sci_Position nextIndex = 0;          char chPrev  = ' ';          char chPrev2 = ' ';          char chNext  = styler[startPos];  	styler.StartSegment(startPos); -	for (int i = startPos; i < lengthDoc; i++) +	for (Sci_Position i = startPos; i < lengthDoc; i++)          {         char ch = chNext; @@ -320,9 +320,9 @@ static void ColouriseSolDoc(Sci_PositionU startPos, Sci_Position length, int ini  static void FoldSolDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,  						   WordList *[], Accessor &styler)   { -	int lengthDoc = startPos + length; +	Sci_Position lengthDoc = startPos + length; -	int lineCurrent = styler.GetLine(startPos); +	Sci_Position lineCurrent = styler.GetLine(startPos);  	if (startPos > 0)          {            if (lineCurrent > 0) @@ -341,7 +341,7 @@ static void FoldSolDoc(Sci_PositionU startPos, Sci_Position length, int initStyl          if (state == SCE_SCRIPTOL_TRIPLE)               indentCurrent |= SC_FOLDLEVELWHITEFLAG;  	char chNext = styler[startPos]; -	for (int i = startPos; i < lengthDoc; i++) +	for (Sci_Position i = startPos; i < lengthDoc; i++)           {  		char ch = chNext;  		chNext = styler.SafeGetCharAt(i + 1); | 
