diff options
author | Nick White <arch@njw.me.uk> | 2007-05-03 17:51:44 +0000 |
---|---|---|
committer | Nick White <arch@njw.me.uk> | 2007-05-03 17:51:44 +0000 |
commit | 9bd6f8ef5cb773e7c3eb06f39d85bd5b94c037ec (patch) | |
tree | 33f4b05cb99451030f229ef26ab2b6c6e2605bc4 /src/tocxml.c | |
parent | f811c2d4823f95d7e90f25e0e7a98e5c5abcf3e2 (diff) |
Added a script to ease releases, improved cli interface
Added the script prepare-release.sh
Modified and added options to allow easy downloading of single
issues and media files
Moved functions outputting to the command line to cli.c
Added a verbose flag
git-archimport-id: getht@sv.gnu.org/getht--mainline--0.1--patch-24
Diffstat (limited to 'src/tocxml.c')
-rw-r--r-- | src/tocxml.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/tocxml.c b/src/tocxml.c index 3740326..5fc7166 100644 --- a/src/tocxml.c +++ b/src/tocxml.c @@ -28,15 +28,15 @@ #include "issue.h" #include "getht.h" -iss ** parsetoc(char *filepath, int * iss_no, int * latest); -int parseissue(xmlDocPtr file, xmlNodePtr node, iss * cur_issue, int * latest); +iss ** parsetoc(char *filepath, int * iss_no); +int parseissue(xmlDocPtr file, xmlNodePtr node, iss * cur_issue); void parsesection(xmlDocPtr file, xmlNodePtr node, sec * cur_section); void tokenise_hyphons(char to_token[10], int * first, int * last); int no_of_issues; -iss ** parsetoc(char *filepath, int * iss_no, int * latest) +iss ** parsetoc(char *filepath, int * iss_no) /* starts parsing of xml to issue structure */ { xmlDocPtr file; @@ -78,7 +78,7 @@ iss ** parsetoc(char *filepath, int * iss_no, int * latest) &(issue[no_of_issues]->date.lastmonth)); /* parse the issue */ - parseissue(file, cnode, issue[no_of_issues], latest); + parseissue(file, cnode, issue[no_of_issues]); } cnode = cnode->next; } @@ -95,15 +95,12 @@ iss ** parsetoc(char *filepath, int * iss_no, int * latest) return issue; } -int parseissue(xmlDocPtr file, xmlNodePtr node, iss * cur_issue, int * latest) +int parseissue(xmlDocPtr file, xmlNodePtr node, iss * cur_issue) /* parses issue from xml, saving in cur_issue structure */ { strncpy(cur_issue->title, (char *) xmlGetProp(node, "title"), STR_MAX); strncpy(cur_issue->preview_uri, (char *) xmlGetProp(node, "coverlink"), STR_MAX); - if(xmlGetProp(node, "current") && *latest==-1) - *latest = no_of_issues; - node = node->xmlChildrenNode; while(node != NULL){ |