X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/177f020f122827214159c46dcfe7ded1e3c8d1c3..29db9a64a:/uip/mhical.c?ds=sidebyside diff --git a/uip/mhical.c b/uip/mhical.c index 594a452b..650b9821 100644 --- a/uip/mhical.c +++ b/uip/mhical.c @@ -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; } /* @@ -809,7 +810,7 @@ fold (char *line, int uses_cr) { #endif charstring_push_back_chars (folded_line, cp, char_len, 1); - remaining -= char_len > 0 ? char_len : 1; + remaining -= max(char_len, 1); /* remaining must be > 0 to pass the loop condition above, so if it's not > 1, it is == 1. */ @@ -824,7 +825,7 @@ fold (char *line, int uses_cr) { } } - cp += char_len > 0 ? char_len : 1; + cp += max(char_len, 1); } free (line);