From b94ef47d739451590dea3317b056e330db115daa Mon Sep 17 00:00:00 2001 From: Joshua Peisach Date: Wed, 22 May 2024 17:29:12 -0400 Subject: [PATCH] Fix channelapp code with newer versions of mxml Fields became private. They need to be accessed using public methods. --- channel/channelapp/source/xml.c | 11 ++++------- channel/channelapp/source/xml.h | 15 --------------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/channel/channelapp/source/xml.c b/channel/channelapp/source/xml.c index ae47709..3da0bd3 100644 --- a/channel/channelapp/source/xml.c +++ b/channel/channelapp/source/xml.c @@ -32,18 +32,15 @@ static inline char *_xmldup(const char *str) { return pstrdup(str); } -static char *_get_cdata(struct mxml_node_t *node) { +static char *_get_cdata(mxml_node_t* node) { if (!node) return NULL; - /* - 'invalid use of incomplete typedef 'mxml_node_t' - */ - struct mxml_node_t *n = *node->child; + mxml_node_t *n = mxmlGetFirstChild(node); while (n) { - if (n->type == MXML_OPAQUE) - return n->value.opaque; + if (mxmlGetType(n) == MXML_OPAQUE) + return mxmlGetOpaque(n); n = mxmlWalkNext(n, node, MXML_NO_DESCEND); } diff --git a/channel/channelapp/source/xml.h b/channel/channelapp/source/xml.h index 16c5100..d51d62c 100644 --- a/channel/channelapp/source/xml.h +++ b/channel/channelapp/source/xml.h @@ -9,21 +9,6 @@ #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 {