From 9d3eff3c67b5642e0e67c7e28061c3ec0c3701e6 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 22 Dec 2011 10:16:51 +1100 Subject: Replace _strupr with portable code. --- lexers/LexTCMD.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lexers/LexTCMD.cxx b/lexers/LexTCMD.cxx index ed3fe3652..ed747da87 100644 --- a/lexers/LexTCMD.cxx +++ b/lexers/LexTCMD.cxx @@ -430,6 +430,14 @@ static void ColouriseTCMDDoc( unsigned int startPos, int length, int /*initStyle } } +// Convert string to upper case +static void StrUpr(char *s) { + while (*s) { + *s = MakeUpperCase(*s); + s++; + } +} + // Folding support (for DO, IFF, SWITCH, TEXT, and command groups) static void FoldTCMDDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) { @@ -466,7 +474,7 @@ static void FoldTCMDDoc(unsigned int startPos, int length, int, WordList *[], Ac s[j + 1] = '\0'; } - _strupr( s ); + StrUpr( s ); if ((strcmp(s, "DO") == 0) || (strcmp(s, "IFF") == 0) || (strcmp(s, "SWITCH") == 0) || (strcmp(s, "TEXT") == 0)) { levelIndent++; } else if ((strcmp(s, "ENDDO") == 0) || (strcmp(s, "ENDIFF") == 0) || (strcmp(s, "ENDSWITCH") == 0) || (strcmp(s, "ENDTEXT") == 0)) { -- cgit v1.2.3