From 30d9bae5f4c35c23f85b4468cc89f9cd0dafc497 Mon Sep 17 00:00:00 2001 From: deva Date: Wed, 19 Mar 2008 10:52:11 +0000 Subject: Merge with local code. --- server/src/macro_parser.cc | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'server/src/macro_parser.cc') diff --git a/server/src/macro_parser.cc b/server/src/macro_parser.cc index 62c74ca..9161613 100644 --- a/server/src/macro_parser.cc +++ b/server/src/macro_parser.cc @@ -70,13 +70,6 @@ static void start_hndl(void *p, const char *el, const char **attr) // Do something reasonable with them... - if(name == "macro") { - // printf("Macro %s %s\n", attributes["name"].c_str(), attributes["resume"].c_str()); - parser->macro->name = attributes["name"]; - parser->macro->format = attributes["resume"]; - // return; - } - if(name == "include") { Macro inc; @@ -91,6 +84,15 @@ static void start_hndl(void *p, const char *el, const char **attr) return; // Don't do further parsing of this tag. } + if(name == "macro") { + + parser->macro->name = attributes["name"]; + parser->macro->version = attributes["version"]; + parser->macro->format = attributes["resume"]; + + return; // Don't do further parsing of this tag. + } + Widget widget; widget.type = name; @@ -107,11 +109,11 @@ static void start_hndl(void *p, const char *el, const char **attr) std::map< std::string, std::string >::iterator i = attributes.begin(); while(i != attributes.end()) { - WidgetProperty prop; - prop.name = i->first; - prop.value = i->second; - - wp->properties.push_back(prop); + // WidgetProperty prop; + // prop.name = i->first; + // prop.value = i->second; + // wp->properties.push_back(prop); + wp->properties[i->first] = i->second; i++; } -- cgit v1.2.3