aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/SciLexer.h2
-rw-r--r--include/Scintilla.iface2
-rw-r--r--src/LexOthers.cxx19
3 files changed, 21 insertions, 2 deletions
diff --git a/include/SciLexer.h b/include/SciLexer.h
index 2115aae1a..5e4ad6c34 100644
--- a/include/SciLexer.h
+++ b/include/SciLexer.h
@@ -279,6 +279,8 @@
#define SCE_ERR_DIFF_DELETION 12
#define SCE_ERR_DIFF_MESSAGE 13
#define SCE_ERR_PHP 14
+#define SCE_ERR_ELF 15
+#define SCE_ERR_IFC 16
#define SCE_BAT_DEFAULT 0
#define SCE_BAT_COMMENT 1
#define SCE_BAT_WORD 2
diff --git a/include/Scintilla.iface b/include/Scintilla.iface
index f91749a6e..bcd10f9b1 100644
--- a/include/Scintilla.iface
+++ b/include/Scintilla.iface
@@ -1811,6 +1811,8 @@ val SCE_ERR_DIFF_ADDITION=11
val SCE_ERR_DIFF_DELETION=12
val SCE_ERR_DIFF_MESSAGE=13
val SCE_ERR_PHP=14
+val SCE_ERR_ELF=15
+val SCE_ERR_IFC=16
# Lexical states for SCLEX_BATCH
lex Batch=SCLEX_BATCH SCE_BAT_
val SCE_BAT_DEFAULT=0
diff --git a/src/LexOthers.cxx b/src/LexOthers.cxx
index 67457f0ee..54ecb6c9d 100644
--- a/src/LexOthers.cxx
+++ b/src/LexOthers.cxx
@@ -343,6 +343,10 @@ static void ColouriseMakeDoc(unsigned int startPos, int length, int, WordList *[
}
}
+static bool strstart(char *haystack, char *needle) {
+ return strncmp(haystack, needle, strlen(needle)) == 0;
+}
+
static void ColouriseErrorListLine(
char *lineBuffer,
unsigned int lengthLine,
@@ -367,10 +371,17 @@ static void ColouriseErrorListLine(
styler.ColourTo(endPos, SCE_ERR_PYTHON);
} else if (strstr(lineBuffer, " in ") && strstr(lineBuffer, " on line ")) {
styler.ColourTo(endPos, SCE_ERR_PHP);
- } else if (0 == strncmp(lineBuffer, "Error ", strlen("Error "))) {
+ } else if ((strstart(lineBuffer, "Error ") ||
+ strstart(lineBuffer, "Warning ")) &&
+ strstr(lineBuffer, " at (") &&
+ strstr(lineBuffer, ") : ") &&
+ (strstr(lineBuffer, " at (") < strstr(lineBuffer, ") : "))) {
+ // Intel Fortran Compiler error/warning message
+ styler.ColourTo(endPos, SCE_ERR_IFC);
+ } else if (strstart(lineBuffer, "Error ")) {
// Borland error message
styler.ColourTo(endPos, SCE_ERR_BORLAND);
- } else if (0 == strncmp(lineBuffer, "Warning ", strlen("Warning "))) {
+ } else if (strstart(lineBuffer, "Warning ")) {
// Borland warning message
styler.ColourTo(endPos, SCE_ERR_BORLAND);
} else if (strstr(lineBuffer, "at line " ) &&
@@ -389,6 +400,10 @@ static void ColouriseErrorListLine(
strstr(lineBuffer, ":line ")) {
// A .NET traceback
styler.ColourTo(endPos, SCE_ERR_NET);
+ } else if (strstart(lineBuffer, "Line ") &&
+ strstr(lineBuffer, ", file ")) {
+ // Essential Lahey Fortran error message
+ styler.ColourTo(endPos, SCE_ERR_ELF);
} else {
// Look for GCC <filename>:<line>:message
// Look for Microsoft <filename>(line)message