Fix file type detection for parsers using regexp code with non-standard file type extensions.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2058 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
26f6490c41
commit
e6fb5a8ac8
@ -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,
|
||||
|
@ -66,7 +66,7 @@ static void setInputFileName (const char *const fileName)
|
||||
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,6 +84,9 @@ static void setSourceFileParameters (vString *const fileName)
|
||||
TagFile.max.file = vStringLength (fileName);
|
||||
|
||||
File.source.isHeader = isIncludeFile (vStringValue (fileName));
|
||||
if (language != -1)
|
||||
File.source.language = language;
|
||||
else
|
||||
File.source.language = getFileLanguage (vStringValue (fileName));
|
||||
}
|
||||
|
||||
@ -98,7 +101,7 @@ static boolean setSourceFileName (vString *const fileName)
|
||||
else
|
||||
pathName = combinePathAndFile (vStringValue (File.path),
|
||||
vStringValue (fileName));
|
||||
setSourceFileParameters (pathName);
|
||||
setSourceFileParameters (pathName, -1);
|
||||
result = TRUE;
|
||||
}
|
||||
return result;
|
||||
@ -270,7 +273,7 @@ extern boolean fileOpen (const char *const fileName, const langType language)
|
||||
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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user