X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/f475d48680eb8bb0b6543efab9057eba2773666e..4548a3ecc4248a1d4:/uip/prompter.c?ds=sidebyside diff --git a/uip/prompter.c b/uip/prompter.c index a016c1f1..6b540dbc 100644 --- a/uip/prompter.c +++ b/uip/prompter.c @@ -109,10 +109,10 @@ main (int argc, char **argv) snprintf (buffer, sizeof(buffer), "%s [switches] file", invo_name); print_help (buffer, switches, 1); - done (1); + done (0); case VERSIONSW: print_version(invo_name); - done (1); + done (0); case ERASESW: if (!(erasep = *argp++) || *erasep == '-') @@ -209,7 +209,8 @@ main (int argc, char **argv) * Loop through the lines of the draft skeleton. */ for (state = FLD;;) { - switch (state = m_getfld (state, name, field, sizeof(field), in)) { + int fieldsz = sizeof field; + switch (state = m_getfld (state, name, field, &fieldsz, in)) { case FLD: case FLDEOF: case FLDPLUS: @@ -226,8 +227,8 @@ main (int argc, char **argv) printf ("%s:%s", name, field); fprintf (out, "%s:%s", name, field); while (state == FLDPLUS) { - state = - m_getfld (state, name, field, sizeof(field), in); + fieldsz = sizeof field; + state = m_getfld (state, name, field, &fieldsz, in); printf ("%s", field); fprintf (out, "%s", field); } @@ -293,7 +294,8 @@ abort: if (!rapid && !sigint) printf ("%s", field); } while (state == BODY && - (state = m_getfld (state, name, field, sizeof(field), in))); + (fieldsz = sizeof field, + state = m_getfld (state, name, field, &fieldsz, in))); if (prepend || !body) break; else @@ -396,6 +398,8 @@ getln (char *buffer, int n) static void intrser (int i) { + NMH_UNUSED (i); + if (wtuser) longjmp (sigenv, NOTOK); sigint++;