+ // reload loop
+ do {
+
+ // reopen input file on reload
+ if(noreload == 0 && reload > 0) {
+ if(file) {
+ input = fopen(file,"r");
+ if(!input) {
+ fprintf(stderr, "%s: %s: %s\n", argv[0], file, strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+ } else {
+ fprintf(stderr, "%s: %s\n", argv[0], "no input file");
+ exit(EXIT_FAILURE);
+ }
+ }
+
+ // load deck object from input
+ deck_t *deck;
+ deck = markdown_load(input);
+
+ // close file
+ fclose(input);