X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/87e0228a43ba73eac409f2f0d7f75f3b6148adfc..47e4d2685ab31e71336a7806fdc3dcd2a107f60f:/uip/prompter.c diff --git a/uip/prompter.c b/uip/prompter.c index 164ff52a..35092296 100644 --- a/uip/prompter.c +++ b/uip/prompter.c @@ -1,6 +1,4 @@ - -/* - * prompter.c -- simple prompting editor front-end +/* prompter.c -- simple prompting editor front-end * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for @@ -71,7 +69,7 @@ main (int argc, char **argv) int body = 1, prepend = 1, rapid = 0; int doteof = 0, fdi, fdo, i, state; char *cp, *drft = NULL, *erasep = NULL; - char *killp = NULL, name[NAMESZ], field[BUFSIZ]; + char *killp = NULL, name[NAMESZ], field[NMH_BUFSIZ]; char buffer[BUFSIZ]; char **arguments, **argp; FILE *in, *out; @@ -214,7 +212,7 @@ main (int argc, char **argv) while (state == FLDPLUS) { fieldsz = sizeof field; state = m_getfld (&gstate, name, field, &fieldsz, in); - printf ("%s", field); + fputs(field, stdout); fputs(field, out); } } else { @@ -269,7 +267,7 @@ abort: do { fputs(field, out); if (!rapid && !sigint) - printf ("%s", field); + fputs(field, stdout); } while (state == BODY && (fieldsz = sizeof field, state = m_getfld (&gstate, name, field, &fieldsz, in)));