Revision: 3199 http://geany.svn.sourceforge.net/geany/?rev=3199&view=rev Author: ntrel Date: 2008-11-10 17:03:11 +0000 (Mon, 10 Nov 2008)
Log Message: ----------- Group Conf symbol list tags by section.
Modified Paths: -------------- trunk/ChangeLog trunk/tagmanager/conf.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-11-10 16:58:33 UTC (rev 3198) +++ trunk/ChangeLog 2008-11-10 17:03:11 UTC (rev 3199) @@ -18,6 +18,8 @@ Free tag list straight after use, instead of next time the list is generated. Use TMTag pointer tree model column instead of line number. + * tagmanager/conf.c: + Group Conf symbol list tags by section.
2008-11-08 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/tagmanager/conf.c =================================================================== --- trunk/tagmanager/conf.c 2008-11-10 16:58:33 UTC (rev 3198) +++ trunk/tagmanager/conf.c 2008-11-10 17:03:11 UTC (rev 3199) @@ -23,8 +23,8 @@ * DATA DEFINITIONS */ typedef enum { - K_NAMESPACE, - K_MACRO + K_SECTION, + K_KEY } confKind;
static kindOption ConfKinds [] = { @@ -45,6 +45,7 @@ static void findConfTags (void) { vString *name = vStringNew (); + vString *scope = vStringNew (); const unsigned char *line;
while ((line = fileReadLine ()) != NULL) @@ -67,7 +68,10 @@ ++cp; } vStringTerminate (name); - makeSimpleTag (name, ConfKinds, K_NAMESPACE); + makeSimpleTag (name, ConfKinds, K_SECTION); + /* remember section name */ + vStringCopy (scope, name); + vStringTerminate (scope); vStringClear (name); continue; } @@ -86,7 +90,13 @@ while (isspace ((int) *cp)) ++cp; if (*cp == '=') - makeSimpleTag (name, ConfKinds, K_MACRO); + { + if (vStringLength (scope) > 0) + makeSimpleScopedTag (name, ConfKinds, K_KEY, + "section", vStringValue(scope), NULL); + else + makeSimpleTag (name, ConfKinds, K_KEY); + } vStringClear (name); } else if (isspace ((int) *cp)) @@ -99,6 +109,7 @@ } } vStringDelete (name); + vStringDelete (scope); }
extern parserDefinition* ConfParser (void)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.