Revision: 2135 http://geany.svn.sourceforge.net/geany/?rev=2135&view=rev Author: eht16 Date: 2007-12-30 07:20:22 -0800 (Sun, 30 Dec 2007)
Log Message: ----------- Don't parse in comments and fix wrong creation of tags including non-tag characters(e.g. '=' sign).
Modified Paths: -------------- trunk/ChangeLog trunk/tagmanager/basic.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-12-28 17:35:58 UTC (rev 2134) +++ trunk/ChangeLog 2007-12-30 15:20:22 UTC (rev 2135) @@ -1,3 +1,10 @@ +2007-12-30 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * tagmanager/basic.c: + Don't parse in comments and fix wrong creation of tags including + non-tag characters(e.g. '=' sign). + + 2007-12-28 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* plugins/filebrowser.c:
Modified: trunk/tagmanager/basic.c =================================================================== --- trunk/tagmanager/basic.c 2007-12-28 17:35:58 UTC (rev 2134) +++ trunk/tagmanager/basic.c 2007-12-30 15:20:22 UTC (rev 2135) @@ -105,7 +105,7 @@ pos++; }
- for (; *pos && !isspace (*pos) && *pos != '(' && *pos != ','; pos++) + for (; *pos && !isspace (*pos) && *pos != '(' && *pos != ',' && *pos != '='; pos++) vStringPut (name, *pos); vStringTerminate (name); makeSimpleTag (name, BasicKinds, kind); @@ -113,13 +113,21 @@ // if the line contains a ',', we have multiple declarations while (*pos && strchr (pos, ',')) { - while (*pos != ',') // skip all we don't need(e.g. "..., new_array(5), " we skip "(5)") + // skip all we don't need(e.g. "..., new_array(5), " we skip "(5)") + while (*pos != ',' && *pos != ''') pos++; + + if (*pos == ''') + return 0; // break if we are in a comment + while (isspace (*pos) || *pos == ',') pos++;
+ if (*pos == ''') + return 0; // break if we are in a comment + vStringClear (name); - for (; *pos && !isspace (*pos) && *pos != '(' && *pos != ','; pos++) + for (; *pos && !isspace (*pos) && *pos != '(' && *pos != ',' && *pos != '='; pos++) vStringPut (name, *pos); vStringTerminate (name); makeSimpleTag (name, BasicKinds, kind);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.