diff options
author | Nick White <arch@njw.me.uk> | 2007-04-30 08:34:43 +0000 |
---|---|---|
committer | Nick White <arch@njw.me.uk> | 2007-04-30 08:34:43 +0000 |
commit | 1edf37e3b0ad7b0556ba0902b5880044933ced66 (patch) | |
tree | 13447080a2c59a6345fa26301e365fcbb7b8ad4d /tocxml.c | |
parent | 1f0a1fd57bd1dbddab4ad189a721fbe67f59ca3a (diff) |
Removed last of static issue array code, added sorting
Removed defined constants from issue.h previously used to
determine size of static arrays
Removed unused separate show media structure function
Remove clean media & clean issue functions
Added issue sorting code
git-archimport-id: getht@sv.gnu.org/getht--mainline--0.1--patch-22
Diffstat (limited to 'tocxml.c')
-rw-r--r-- | tocxml.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -50,7 +50,6 @@ iss ** parsetoc(char *filepath, int * iss_no, int * latest) no_of_issues = -1; iss ** issue = NULL; - //iss ** tmp = NULL; int year; @@ -66,7 +65,7 @@ iss ** parsetoc(char *filepath, int * iss_no, int * latest) if(!xmlStrncmp(cnode->name,(char *) "issue",5)) { /* assign memory for the new issue */ - issue = assignnew_iss(&no_of_issues, issue); + issue = assignnew_iss(issue, &no_of_issues); /* setup issue globals */ issue[no_of_issues]->no_of_media = -1; @@ -91,6 +90,8 @@ iss ** parsetoc(char *filepath, int * iss_no, int * latest) *iss_no = no_of_issues; + issuesort(issue, no_of_issues); + return issue; } @@ -111,7 +112,7 @@ int parseissue(xmlDocPtr file, xmlNodePtr node, iss * cur_issue, int * latest) { /* assign memory for new section */ cur_issue->section = - assignnew_sec(&(cur_issue->no_of_sections), cur_issue->section); + assignnew_sec(cur_issue->section, &(cur_issue->no_of_sections)); /* setup section globals */ cur_issue->section[cur_issue->no_of_sections]->no_of_items = -1; @@ -153,7 +154,7 @@ void parsesection(xmlDocPtr file, xmlNodePtr node, sec * cur_section) { /* assign memory for new item */ cur_section->item = - assignnew_it( &(cur_section->no_of_items), cur_section->item); + assignnew_it( cur_section->item, &(cur_section->no_of_items)); cur_item = cur_section->item[cur_section->no_of_items]; |