diff options
author | nyamatongwe <unknown> | 2003-03-12 10:45:42 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2003-03-12 10:45:42 +0000 |
commit | 9c5ce702bf1ce27d8e8c688458fab4355c659881 (patch) | |
tree | e44ff124749967de221982cf464ab6d847901558 /src | |
parent | 2cab17e2b4ae79692537121d4d2cb46b4e420f85 (diff) | |
download | scintilla-mirror-9c5ce702bf1ce27d8e8c688458fab4355c659881.tar.gz |
Patch from Pedro Guerreiro for decoding error messages from Lahey and
Intel Fortran compilaers.
Diffstat (limited to 'src')
-rw-r--r-- | src/LexOthers.cxx | 19 |
1 files changed, 17 insertions, 2 deletions
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 |