]> diplodocus.org Git - nmh/blobdiff - uip/mhical.c
Print pointers in debug with C99's `%p' rather than `0x%x'.
[nmh] / uip / mhical.c
index 67ba90da57f3b67dec3ce8da1c14e08496baa6a8..1567d3af26997db190229cf4598709712a1ce1b3 100644 (file)
@@ -56,6 +56,7 @@ DEFINE_SWITCH_ARRAY(MHICAL, switches);
 #undef X
 
 vevent vevents = { NULL, NULL, NULL};
+int parser_status = 0;
 
 int
 main (int argc, char *argv[]) {
@@ -236,7 +237,7 @@ main (int argc, char *argv[]) {
         free (outfile);
     }
 
-    return 0;
+    return parser_status;
 }
 
 /*
@@ -713,7 +714,7 @@ display (FILE *file, contentline *clines, char *nfs) {
     }
 
     /* Don't call on the END:VCALENDAR line. */
-    if (clines->next) {
+    if (clines  &&  clines->next) {
       (void) fmt_scan (fmt, buffer, INT_MAX, dat, NULL);
       fputs (charstring_buffer (buffer), file);
       fmt_free (fmt, 1);