diff options
author | Nick White <arch@njw.me.uk> | 2007-03-11 01:34:48 +0000 |
---|---|---|
committer | Nick White <arch@njw.me.uk> | 2007-03-11 01:34:48 +0000 |
commit | de890670aaab99edd839713d4185b77f6ba08d81 (patch) | |
tree | 8874cf9c1bbc3755ed642c58954355458797048b /tocxml.c | |
parent | 5ba9d63365c8f5d7fb55459baec1a6b8df1e394c (diff) |
Changed cover handling to same as section
Cover is now just section 0.
Avoids unnecessary code duplication, and is no less functional.
git-archimport-id: getht@sv.gnu.org/getht--mainline--0.1--patch-18
Diffstat (limited to 'tocxml.c')
-rw-r--r-- | tocxml.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -102,7 +102,7 @@ iss ** parsetoc(char *filepath, int * iss_no, int * latest) cnode = cnode->next; } } - node = node->next; + node = node->next; } xmlFreeDoc(file); @@ -128,12 +128,8 @@ int parseissue(xmlDocPtr file, xmlNodePtr node, iss * cur_issue, int * latest) node = node->xmlChildrenNode; while(node != NULL){ - if(!xmlStrcmp(node->name, (const xmlChar *) "cover")) - { - cur_section = &(cur_issue->cover); - parsesection(file, node, cur_section); - } - else if(!xmlStrncmp(node->name, (char *) "section",7)) + if(!xmlStrncmp(node->name, (char *) "section",7) || + !xmlStrcmp(node->name, (const xmlChar *) "cover")) { no_of_sections++; cur_section = &(cur_issue->section[no_of_sections]); |