aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LexOthers.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2003-03-30 08:36:20 +0000
committernyamatongwe <unknown>2003-03-30 08:36:20 +0000
commit13084ad03ac99d4ad1c2d4b5a28df348bca5979d (patch)
treeeb4ba35ed0b5a65f060892ceb45a834ac8023771 /src/LexOthers.cxx
parentafd051d22aacb1dd1f502929e029ed89afe1beaa (diff)
downloadscintilla-mirror-13084ad03ac99d4ad1c2d4b5a28df348bca5979d.tar.gz
More selective about GCC message format, expecting number after first
':' unless ':' followed by '/' or '\' as used on Windows for paths.
Diffstat (limited to 'src/LexOthers.cxx')
-rw-r--r--src/LexOthers.cxx23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/LexOthers.cxx b/src/LexOthers.cxx
index c8b45b3f8..6d537c9b6 100644
--- a/src/LexOthers.cxx
+++ b/src/LexOthers.cxx
@@ -361,6 +361,7 @@ static void ColouriseErrorListLine(
// unsigned int startLine,
unsigned int endPos,
Accessor &styler) {
+ const int unRecognized = 99;
if (lineBuffer[0] == '>') {
// Command or return status
styler.ColourTo(endPos, SCE_ERR_CMD);
@@ -425,9 +426,13 @@ static void ColouriseErrorListLine(
if ((i+1) < lengthLine)
chNext = lineBuffer[i+1];
if (state == 0) {
- if ((ch == ':') && Is0To9(chNext)) {
+ if (ch == ':') {
// May be GCC
- state = 1;
+ if ((chNext != '\\') && (chNext != '/')) {
+ // This check is not completely accurate as may be on
+ // GTK+ with a file name that includes ':'.
+ state = 1;
+ }
} else if ((ch == '(') && Is1To9(chNext)) {
// May be Microsoft
// Check againt '0' often removes phone numbers
@@ -436,36 +441,36 @@ static void ColouriseErrorListLine(
// May be CTags
state = 20;
}
- } else if ((state == 1) && Is1To9(ch)) {
- state = 2;
+ } else if (state == 1) {
+ state = Is1To9(ch) ? 2 : unRecognized;
} else if (state == 2) {
if (ch == ':') {
state = 3; // :9.*: is GCC
break;
} else if (!Is0To9(ch)) {
- state = 99;
+ state = unRecognized;
}
} else if (state == 10) {
- state = Is0To9(ch) ? 11 : 99;
+ state = Is0To9(ch) ? 11 : unRecognized;
} else if (state == 11) {
if (ch == ',') {
state = 14;
} else if (ch == ')') {
state = 12;
} else if ((ch != ' ') && !Is0To9(ch)) {
- state = 99;
+ state = unRecognized;
}
} else if (state == 12) {
if ((ch == ' ') && (chNext == ':'))
state = 13;
else
- state = 99;
+ state = unRecognized;
} else if (state == 14) {
if (ch == ')') {
state = 15;
break;
} else if ((ch != ' ') && !Is0To9(ch)) {
- state = 99;
+ state = unRecognized;
}
} else if (state == 20) {
if ((lineBuffer[i-1] == '\t') &&