diff options
Diffstat (limited to 'cite.c')
-rw-r--r-- | cite.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -33,8 +33,10 @@ static void print_times(Movie *movie) printf("</ul>\n"); } -static void print_movie(Movie *movie) +static void print_movie(Movie *movie, int hide_fr) { + if (hide_fr && strcmp(movie->nationality, "France") == 0) + return; if (movie->og_title[0] != '\0') printf("<h2>%s</h2>\n", movie->og_title); else @@ -155,7 +157,7 @@ static int append_movie_times(Movie *movie, const xmlNode *node) int main(int argc, char **argv) { - if (argc != 2) + if (argc != 3) return 1; xmlDoc *const document = xmlReadFile(argv[1], NULL, 0); if (document == NULL) { @@ -184,7 +186,7 @@ int main(int argc, char **argv) print_style(); printf("<h1><a href=\"http://www.citebd.org/spip.php?film2912\">cinéma de la cité</a></h1>\n"); for (Movie *movie = movies; movie->id != 0; movie++) - print_movie(movie); + print_movie(movie, atoi(argv[2])); xmlFreeDoc(document); xmlCleanupParser(); return 0; |