From c0392425fbc024084da9c626fa47814a34eba3e7 Mon Sep 17 00:00:00 2001 From: deva Date: Fri, 24 Jul 2009 13:58:25 +0000 Subject: 'fixed' output to handle new macro naming/versioning scheme --- server/src/macrotool_dump.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'server/src') diff --git a/server/src/macrotool_dump.cc b/server/src/macrotool_dump.cc index 920d4b6..3f9cfd7 100644 --- a/server/src/macrotool_dump.cc +++ b/server/src/macrotool_dump.cc @@ -71,14 +71,14 @@ static std::map macroList() std::vector macrofiles = getMacros(); std::vector::iterator mfs = macrofiles.begin(); while(mfs != macrofiles.end()) { - std::string name = mfs->substr(0, mfs->length() - 4); + //std::string name = mfs->substr(0, mfs->length() - 4); MacroParser parser(Conf::xml_basedir + "/macros/" + *mfs); parser.parse(); Macro *macro = parser.getMacro(); - std::string key = name;// + macro->attributes["version"]; - macros[key].name = name; + std::string key = macro->attributes["name"];// + "-" + macro->attributes["version"]; + macros[key].name = macro->attributes["name"]; macros[key].file = *mfs; macros[key].title = macro->window.attributes["caption"]; macros[key].version = macro->attributes["version"]; @@ -134,7 +134,7 @@ static void dump_macros() printcolumn(ms->second.version, version_sz); printcolumn(ms->second.file, file_sz); printcolumn(ms->second.title, title_sz); - + std::set::iterator ts = ms->second.templates.begin(); while(ts != ms->second.templates.end()) { if(ts != ms->second.templates.begin()) printf(", "); -- cgit v1.2.3