diff --git a/channel/channelapp/source/xml.c b/channel/channelapp/source/xml.c index e71c5c1..ae47709 100644 --- a/channel/channelapp/source/xml.c +++ b/channel/channelapp/source/xml.c @@ -32,23 +32,26 @@ static inline char *_xmldup(const char *str) { return pstrdup(str); } -static char *_get_cdata(mxml_node_t *node) { +static char *_get_cdata(struct mxml_node_t *node) { if (!node) return NULL; - // mxml_node_t *n = node->child; + /* + 'invalid use of incomplete typedef 'mxml_node_t' + */ + struct mxml_node_t *n = *node->child; - // while (n) { - // if (n->type == MXML_OPAQUE) - // return n->value.opaque; + while (n) { + if (n->type == MXML_OPAQUE) + return n->value.opaque; - // n = mxmlWalkNext(n, node, MXML_NO_DESCEND); - // } + n = mxmlWalkNext(n, node, MXML_NO_DESCEND); + } return NULL; } -static char *_get_elem_cdata(mxml_node_t *node, const char *element) { +static char *_get_elem_cdata(mxml_node_t **node, const char *element) { if (!node) return NULL; diff --git a/channel/channelapp/source/xml.h b/channel/channelapp/source/xml.h index e6774c4..16c5100 100644 --- a/channel/channelapp/source/xml.h +++ b/channel/channelapp/source/xml.h @@ -1,12 +1,29 @@ #ifndef _XML_H_ #define _XML_H_ + + #include #include #include "font.h" +/* +* struct mxml_node_s /**** An XML node. @private@ ****/ +// { +// mxml_type_t type; /* Node type */ +// struct mxml_node_s *next; /* Next node under same parent */ +// struct mxml_node_s *prev; /* Previous node under same parent */ +// struct mxml_node_s *parent; /* Parent node */ +// struct mxml_node_s *child; /* First child node */ +// struct mxml_node_s *last_child; /* Last child node */ +// mxml_value_t value; /* Node value */ +// int ref_count; /* Use count */ +// void *user_data; /* User data */ +// }; + + #define NO_COLOR 0x0DEADF00 typedef struct {