Revision: 2058 http://geany.svn.sourceforge.net/geany/?rev=2058&view=rev Author: eht16 Date: 2007-11-19 06:34:02 -0800 (Mon, 19 Nov 2007)
Log Message: ----------- Fix file type detection for parsers using regexp code with non-standard file type extensions.
Modified Paths: -------------- trunk/ChangeLog trunk/tagmanager/read.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-11-18 18:24:23 UTC (rev 2057) +++ trunk/ChangeLog 2007-11-19 14:34:02 UTC (rev 2058) @@ -1,3 +1,9 @@ +2007-11-19 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * tagmanager/read.c: Fix file type detection for parsers using regexp + code with non-standard file type extensions. + + 2007-11-18 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* doc/geany.html, doc/geany.txt, src/keyfile.c, src/plugindata.h,
Modified: trunk/tagmanager/read.c =================================================================== --- trunk/tagmanager/read.c 2007-11-18 18:24:23 UTC (rev 2057) +++ trunk/tagmanager/read.c 2007-11-19 14:34:02 UTC (rev 2058) @@ -66,7 +66,7 @@ vStringNCopyS (File.path, fileName, length); } } -static void setSourceFileParameters (vString *const fileName) +static void setSourceFileParameters (vString *const fileName, const langType language) { if (File.source.name != NULL) vStringDelete (File.source.name); @@ -84,7 +84,10 @@ TagFile.max.file = vStringLength (fileName);
File.source.isHeader = isIncludeFile (vStringValue (fileName)); - File.source.language = getFileLanguage (vStringValue (fileName)); + if (language != -1) + File.source.language = language; + else + File.source.language = getFileLanguage (vStringValue (fileName)); }
static boolean setSourceFileName (vString *const fileName) @@ -98,7 +101,7 @@ else pathName = combinePathAndFile (vStringValue (File.path), vStringValue (fileName)); - setSourceFileParameters (pathName); + setSourceFileParameters (pathName, -1); result = TRUE; } return result; @@ -270,7 +273,7 @@ if (File.line != NULL) vStringClear (File.line);
- setSourceFileParameters (vStringNewInit (fileName)); + setSourceFileParameters (vStringNewInit (fileName), language); File.source.lineNumber = 0L;
verbose ("OPENING %s as %s language %sfile\n", fileName,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.