summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cli.c9
-rw-r--r--src/mediaxml.c2
2 files changed, 9 insertions, 2 deletions
diff --git a/src/cli.c b/src/cli.c
index 51ba380..56ccc9d 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -33,6 +33,8 @@ void list_issues(iss ** issue, int no_of_issues, int verbose)
{
printf("[%i]\t", iss_no);
printf("%s\n", issue[iss_no]->title);
+ if(verbose >= 2)
+ printf("Year: %i; Months: %i - %i\n",issue[iss_no]->date.year,issue[iss_no]->date.firstmonth,issue[iss_no]->date.lastmonth);
if(verbose >= 1)
{
for(sec_no=0; sec_no<=issue[iss_no]->no_of_sections; sec_no++)
@@ -65,6 +67,8 @@ void list_media(iss ** issue, int no_of_issues, int verbose)
if(issue[iss_no]->no_of_media >= 0)
{
printf("%s\n", issue[iss_no]->title);
+ if(verbose >= 2)
+ printf("Year: %i; Months: %i - %i\n",issue[iss_no]->date.year,issue[iss_no]->date.firstmonth,issue[iss_no]->date.lastmonth);
for(med_no=0; med_no <= (issue[iss_no]->no_of_media); med_no++, med_global++)
{
printf("[%i]\t", med_global);
@@ -72,8 +76,11 @@ void list_media(iss ** issue, int no_of_issues, int verbose)
if(verbose >= 1)
{
printf("\t%s\n", issue[iss_no]->media[med_no]->uri);
- if(verbose >=2 && issue[iss_no]->media[med_no]->comment[0]!='\0')
+ if(verbose >=2)
+ {
+ if(issue[iss_no]->media[med_no]->comment[0]!='\0')
printf("\t%s\n", issue[iss_no]->media[med_no]->comment);
+ }
}
}
}
diff --git a/src/mediaxml.c b/src/mediaxml.c
index bcb2da1..02c2cad 100644
--- a/src/mediaxml.c
+++ b/src/mediaxml.c
@@ -240,7 +240,7 @@ iss ** parsemedia(char * filepath, iss ** issue, int * no_of_issues)
xmlFreeDoc(media_file);
- issuesort(issue, no_of_issues);
+ issuesort(issue, *no_of_issues);
return issue;
}