Fixed recognition of Python scripts having "#\!/usr/bin/python" as first line [Bug #1764148].

git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@597 c5d04d22-be80-434c-894e-aa346cc9e8e8
This commit is contained in:
dhiebert 2007-07-31 05:35:30 +00:00
parent c3a5a4b577
commit 368573ede4
3 changed files with 5 additions and 0 deletions

1
NEWS
View File

@ -39,6 +39,7 @@ ctags-@VERSION@ (@DATE@)
* Fixed crashes involving '/' [Verilog, Bug #1743330].
* Fixed compilation problem on MinGW [Bug #1517424].
* Fixed generation of HTML-formatted man page [Bug #1645864].
* Fixed recognition of Python scripts having '#!/usr/bin/python' as first line [Bug #1764148].
ctags-5.6 (Mon May 29 2006)
* Reformatted code for independence of tab stop setting.

2
Test/bug1764148 Executable file
View File

@ -0,0 +1,2 @@
#!/usr/bin/python
def PyFunc(msg): print msg

View File

@ -154,6 +154,8 @@ static langType getInterpreterLanguage (const char *const fileName)
const char *const cmd = lastSlash != NULL ? lastSlash+1 : line+2;
vString* const interpreter = determineInterpreter (cmd);
result = getExtensionLanguage (vStringValue (interpreter));
if (result == LANG_IGNORE)
result = getNamedLanguage (vStringValue (interpreter));
vStringDelete (interpreter);
}
vStringDelete (vLine);