aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LexHTML.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2000-04-04 13:35:59 +0000
committernyamatongwe <devnull@localhost>2000-04-04 13:35:59 +0000
commitcc54b6b2ba9362b9b148b9b256e0a37974c47a53 (patch)
tree3dced34d6c9f802d7e075554cea761616ce69c8b /src/LexHTML.cxx
parent3032c371bd9231f097226869e80bf56543ae2cab (diff)
downloadscintilla-mirror-cc54b6b2ba9362b9b148b9b256e0a37974c47a53.tar.gz
Avoid lots of warnings from Borland C++.
Changed name of interface class defined in Accessor.h to Accessor.
Diffstat (limited to 'src/LexHTML.cxx')
-rw-r--r--src/LexHTML.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/LexHTML.cxx b/src/LexHTML.cxx
index 490bed6ee..87bb29335 100644
--- a/src/LexHTML.cxx
+++ b/src/LexHTML.cxx
@@ -18,11 +18,11 @@
#include "SciLexer.h"
enum { eScriptNone, eScriptJS, eScriptVBS, eScriptPython };
-static int segIsScriptingIndicator(BufferAccess &styler, unsigned int start, unsigned int end, int prevValue) {
+static int segIsScriptingIndicator(Accessor &styler, unsigned int start, unsigned int end, int prevValue) {
char s[100];
s[0] = '\0';
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
- s[i] = tolower(styler[start + i]);
+ s[i] = static_cast<char>(tolower(styler[start + i]));
s[i + 1] = '\0';
}
//Platform::DebugPrintf("Scripting indicator [%s]\n", s);
@@ -38,7 +38,7 @@ static int segIsScriptingIndicator(BufferAccess &styler, unsigned int start, uns
return prevValue;
}
-static void classifyAttribHTML(unsigned int start, unsigned int end, WordList &keywords, BufferAccess &styler) {
+static void classifyAttribHTML(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.') ||
(styler[start] == '-') || (styler[start] == '#');
char chAttr = SCE_H_ATTRIBUTEUNKNOWN;
@@ -48,7 +48,7 @@ static void classifyAttribHTML(unsigned int start, unsigned int end, WordList &k
char s[100];
s[0] = '\0';
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
- s[i] = tolower(styler[start + i]);
+ s[i] = static_cast<char>(tolower(styler[start + i]));
s[i + 1] = '\0';
}
if (keywords.InList(s))
@@ -58,14 +58,14 @@ static void classifyAttribHTML(unsigned int start, unsigned int end, WordList &k
}
static int classifyTagHTML(unsigned int start, unsigned int end,
- WordList &keywords, BufferAccess &styler) {
+ WordList &keywords, Accessor &styler) {
char s[100];
// Copy after the '<'
unsigned int i = 0;
for (unsigned int cPos=start; cPos <= end && i < 30; cPos++) {
char ch = styler[cPos];
if (ch != '<')
- s[i++] = tolower(ch);
+ s[i++] = static_cast<char>(tolower(ch));
}
s[i] = '\0';
char chAttr = SCE_H_TAGUNKNOWN;
@@ -86,7 +86,7 @@ static int classifyTagHTML(unsigned int start, unsigned int end,
}
static void classifyWordHTJS(unsigned int start, unsigned int end,
- WordList &keywords, BufferAccess &styler) {
+ WordList &keywords, Accessor &styler) {
char s[100];
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.');
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
@@ -104,7 +104,7 @@ static void classifyWordHTJS(unsigned int start, unsigned int end,
}
static void classifyWordHTJSA(unsigned int start, unsigned int end,
- WordList &keywords, BufferAccess &styler) {
+ WordList &keywords, Accessor &styler) {
char s[100];
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.');
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
@@ -121,11 +121,11 @@ static void classifyWordHTJSA(unsigned int start, unsigned int end,
styler.ColourTo(end, chAttr);
}
-static int classifyWordHTVB(unsigned int start, unsigned int end, WordList &keywords, BufferAccess &styler) {
+static int classifyWordHTVB(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
char s[100];
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.');
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
- s[i] = tolower(styler[start + i]);
+ s[i] = static_cast<char>(tolower(styler[start + i]));
s[i + 1] = '\0';
}
char chAttr = SCE_HB_IDENTIFIER;
@@ -145,11 +145,11 @@ static int classifyWordHTVB(unsigned int start, unsigned int end, WordList &keyw
return SCE_HB_DEFAULT;
}
-static int classifyWordHTVBA(unsigned int start, unsigned int end, WordList &keywords, BufferAccess &styler) {
+static int classifyWordHTVBA(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
char s[100];
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.');
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
- s[i] = tolower(styler[start + i]);
+ s[i] = static_cast<char>(tolower(styler[start + i]));
s[i + 1] = '\0';
}
char chAttr = SCE_HBA_IDENTIFIER;
@@ -169,7 +169,7 @@ static int classifyWordHTVBA(unsigned int start, unsigned int end, WordList &key
return SCE_HBA_DEFAULT;
}
-static void classifyWordHTPy(unsigned int start, unsigned int end, WordList &keywords, BufferAccess &styler, char *prevWord) {
+static void classifyWordHTPy(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, char *prevWord) {
char s[100];
bool wordIsNumber = isdigit(styler[start]);
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
@@ -189,7 +189,7 @@ static void classifyWordHTPy(unsigned int start, unsigned int end, WordList &key
strcpy(prevWord, s);
}
-static void classifyWordHTPyA(unsigned int start, unsigned int end, WordList &keywords, BufferAccess &styler, char *prevWord) {
+static void classifyWordHTPyA(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, char *prevWord) {
char s[100];
bool wordIsNumber = isdigit(styler[start]);
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
@@ -226,7 +226,7 @@ static bool isLineEnd(char ch) {
}
static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
- BufferAccess &styler) {
+ Accessor &styler) {
WordList &keywords=*keywordlists[0];
WordList &keywords2=*keywordlists[1];