From 1045079482453424f8320de99639390e3020eb72 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Tue, 12 Aug 2003 19:18:21 +0000 Subject: adjust for changes to the parsing api. split the menu into its own file. --- plugins/menu/fifo_menu.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'plugins/menu/fifo_menu.c') diff --git a/plugins/menu/fifo_menu.c b/plugins/menu/fifo_menu.c index cb35579e..c096a9d3 100644 --- a/plugins/menu/fifo_menu.c +++ b/plugins/menu/fifo_menu.c @@ -101,6 +101,7 @@ void fifo_menu_handler(int fd, void *d) { num_realloc); if (num_read == 0) { /* eof */ + ObParseInst *i; xmlDocPtr doc; xmlNodePtr node; @@ -109,16 +110,15 @@ void fifo_menu_handler(int fd, void *d) { FIFO_MENU_DATA(menu)->buf[FIFO_MENU_DATA(menu)->buflen] = '\0'; - doc = xmlParseMemory(FIFO_MENU_DATA(menu)->buf, - FIFO_MENU_DATA(menu)->buflen); + i = parse_startup(); + + if (parse_load_mem(FIFO_MENU_DATA(menu)->buf, + FIFO_MENU_DATA(menu)->buflen, + "fifo_menu", &doc, &node)) + parse_menu_full(i, doc, node, menu, FALSE); + + parse_shutdown(i); - node = xmlDocGetRootElement(doc); - - if (node && - !xmlStrcasecmp(node->name, (const xmlChar*) "fifo_menu")) { - parse_menu_full(doc, node, menu, FALSE); - } - fifo_menu_clean_up(menu); event_remove_fd(FIFO_MENU_DATA(menu)->handler->fd); -- cgit v1.2.3