From: Ralph Corderoy Date: Fri, 28 Oct 2016 22:51:41 +0000 (+0100) Subject: Replace printf("...\n") with puts("..."). X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/a5a1425258ffb1f72e853b6adc6ff0ae58c636bd?hp=0298e050ec1f14cd590771612ad5a88d0bc9e9de Replace printf("...\n") with puts("..."). --- diff --git a/sbr/print_help.c b/sbr/print_help.c index 5374b6b9..25082400 100644 --- a/sbr/print_help.c +++ b/sbr/print_help.c @@ -20,7 +20,7 @@ print_help (char *str, struct swit *swp, int print_context) printf ("Usage: %s\n", str); /* print all the switches */ - printf (" switches are:\n"); + puts(" switches are:"); print_sw (ALL, swp, "-", stdout); /* diff --git a/sbr/read_switch.c b/sbr/read_switch.c index bb24dd4c..8553001a 100644 --- a/sbr/read_switch.c +++ b/sbr/read_switch.c @@ -32,7 +32,7 @@ read_switch (const char *prompt, const struct swit *ansp) } *cp = '\0'; if (ansbuf[0] == '?' || cp == ansbuf) { - printf ("Options are:\n"); + puts("Options are:"); for (ap = ansp; ap->sw; ap++) printf (" %s\n", ap->sw); continue; diff --git a/sbr/read_switch_multiword.c b/sbr/read_switch_multiword.c index f653a7fe..582e11f9 100644 --- a/sbr/read_switch_multiword.c +++ b/sbr/read_switch_multiword.c @@ -74,7 +74,7 @@ read_switch_multiword (const char *prompt, const struct swit *ansp) } *cp = '\0'; if (ansbuf[0] == '?' || cp == ansbuf) { - printf ("Options are:\n"); + puts("Options are:"); print_sw (ALL, ansp, "", stdout); continue; } diff --git a/sbr/read_switch_multiword_via_readline.c b/sbr/read_switch_multiword_via_readline.c index 8696c57f..2c6912ba 100644 --- a/sbr/read_switch_multiword_via_readline.c +++ b/sbr/read_switch_multiword_via_readline.c @@ -43,7 +43,7 @@ read_switch_multiword_via_readline(char *prompt, struct swit *ansp) return NULL; if (ans[0] == '?' || ans[0] == '\0') { - printf("Options are:\n"); + puts("Options are:"); print_sw(ALL, ansp, "", stdout); free(ans); continue; diff --git a/uip/ali.c b/uip/ali.c index 47b590da..4d73afa7 100644 --- a/uip/ali.c +++ b/uip/ali.c @@ -161,7 +161,7 @@ print_aka (char *p, int list, int margin) char c; if (p == NULL) { - printf ("\n"); + puts(""); return; } diff --git a/uip/folder.c b/uip/folder.c index 7e00a812..423ef7b3 100644 --- a/uip/folder.c +++ b/uip/folder.c @@ -582,7 +582,7 @@ print_folders (void) if (fi[i].others) printf (";%*s (others)", curprinted ? 0 : curmsgdigits + 6, ""); - printf (".\n"); + puts("."); } } diff --git a/uip/install-mh.c b/uip/install-mh.c index 70865337..09d1f9df 100644 --- a/uip/install-mh.c +++ b/uip/install-mh.c @@ -143,7 +143,7 @@ main (int argc, char **argv) } } else { if (autof) - printf ("I'm going to create the standard nmh path for you.\n"); + puts("I'm going to create the standard nmh path for you."); else cp = concat ("Do you want the standard nmh path \"", mypath, "/", "Mail\"? ", NULL); @@ -174,7 +174,7 @@ query: if (makedir (pathname) == 0) adios (NULL, "unable to create %s", pathname); } else { - printf ("[Using existing directory]\n"); + puts("[Using existing directory]"); } /* diff --git a/uip/mhlistsbr.c b/uip/mhlistsbr.c index f5459cd4..1dda09b1 100644 --- a/uip/mhlistsbr.c +++ b/uip/mhlistsbr.c @@ -365,7 +365,7 @@ list_partial (CT ct, int toplevel, int realsize, int verbose, int debug, printf ("\t [message %s, part %d", p->pm_partid, p->pm_partno); if (p->pm_maxno) printf (" of %d", p->pm_maxno); - printf ("]\n"); + puts("]"); } return OK; @@ -411,7 +411,7 @@ list_external (CT ct, int toplevel, int realsize, int verbose, int debug, printf ("\t permission=\"%s\"\n", e->eb_permission); if (e->eb_flags == NOTOK) - printf ("\t [service unavailable]\n"); + puts("\t [service unavailable]"); } diff --git a/uip/pick.c b/uip/pick.c index 9b2e0cde..09fd7cd9 100644 --- a/uip/pick.c +++ b/uip/pick.c @@ -324,6 +324,6 @@ static void putzero_done (int status) { if (listsw && status && !isatty (fileno (stdout))) - printf ("0\n"); + puts("0"); exit (status); } diff --git a/uip/post.c b/uip/post.c index 553a2258..fca85f7b 100644 --- a/uip/post.c +++ b/uip/post.c @@ -750,7 +750,7 @@ main (int argc, char **argv) if (partno) printf ("Partial Message #%s Processed\n", partno); else - printf ("Message Processed\n"); + puts("Message Processed"); } done (0); @@ -785,7 +785,7 @@ putfmt (char *name, char *str, int *eai, FILE *out) If it does, enable EAI support. */ if (contains8bit(str, NULL)) { if (verbose) { - printf ("EAI/SMTPUTF8 enabled\n"); + puts("EAI/SMTPUTF8 enabled"); } /* Enable SMTPUTF8. */ @@ -1572,7 +1572,7 @@ do_addresses (int bccque, int talk) for (lp = localaddrs.m_next; lp; lp = lp->m_next) if (lp->m_bcc ? bccque : !bccque) { if (talk && !state) - printf (" -- Local Recipients --\n"); + puts(" -- Local Recipients --"); do_an_address (lp, talk); state++; } @@ -1581,7 +1581,7 @@ do_addresses (int bccque, int talk) for (lp = uuaddrs.m_next; lp; lp = lp->m_next) if (lp->m_bcc ? bccque : !bccque) { if (talk && !state) - printf (" -- UUCP Recipients --\n"); + puts(" -- UUCP Recipients --"); do_an_address (lp, talk); state++; } @@ -1590,7 +1590,7 @@ do_addresses (int bccque, int talk) for (lp = netaddrs.m_next; lp; lp = lp->m_next) if (lp->m_bcc ? bccque : !bccque) { if (talk && !state) - printf (" -- Network Recipients --\n"); + puts(" -- Network Recipients --"); do_an_address (lp, talk); state++; } @@ -1623,7 +1623,7 @@ post (char *file, int bccque, int talk, int eai, char *envelope, printf (" -- Posting for %s Recipients --\n", bccque ? "Blind" : "Sighted"); else - printf (" -- Posting for All Recipients --\n"); + puts(" -- Posting for All Recipients --"); } sigon (); @@ -1699,7 +1699,7 @@ post (char *file, int bccque, int talk, int eai, char *envelope, printf (" -- %s Recipient Copies Posted --\n", bccque ? "Blind" : "Sighted"); else - printf (" -- Recipient Copies Posted --\n"); + puts(" -- Recipient Copies Posted --"); } fflush (stdout); @@ -1731,25 +1731,25 @@ verify_all_addresses (int talk, int eai, char *envelope, int oauth_flag, } if (talk && !whomsw) - printf (" -- Address Verification --\n"); + puts(" -- Address Verification --"); if (talk && localaddrs.m_next) - printf (" -- Local Recipients --\n"); + puts(" -- Local Recipients --"); for (lp = localaddrs.m_next; lp; lp = lp->m_next) do_an_address (lp, talk); if (talk && uuaddrs.m_next) - printf (" -- UUCP Recipients --\n"); + puts(" -- UUCP Recipients --"); for (lp = uuaddrs.m_next; lp; lp = lp->m_next) do_an_address (lp, talk); if (talk && netaddrs.m_next) - printf (" -- Network Recipients --\n"); + puts(" -- Network Recipients --"); for (lp = netaddrs.m_next; lp; lp = lp->m_next) do_an_address (lp, talk); chkadr (); if (talk && !whomsw) - printf (" -- Address Verification Successful --\n"); + puts(" -- Address Verification Successful --"); if (!whomsw || checksw) sm_end (DONE); @@ -1801,7 +1801,7 @@ do_an_address (struct mailname *lp, int talk) lp->m_type != UUCPHOST ? lp->m_path : NULL)) { case RP_OK: if (talk) - printf ("address ok\n"); + puts("address ok"); break; case RP_NO: @@ -1911,11 +1911,11 @@ p_refile (char *file) return; if (verbose) - printf (" -- Filing Folder Copies --\n"); + puts(" -- Filing Folder Copies --"); for (i = 0; i < fccind; i++) fcc (file, fccfold[i]); if (verbose) - printf (" -- Folder Copies Filed --\n"); + puts(" -- Folder Copies Filed --"); } @@ -1970,7 +1970,7 @@ fcc (char *file, char *folder) pidstatus (status, verbose ? stdout : stderr, NULL); } else { if (verbose) - printf ("folder ok\n"); + puts("folder ok"); } } diff --git a/uip/prompter.c b/uip/prompter.c index f5332e46..8b758139 100644 --- a/uip/prompter.c +++ b/uip/prompter.c @@ -251,7 +251,7 @@ abort: break; fprintf (out, "--------\n"); if (field[0] == 0 || !prepend) - printf ("--------\n"); + puts("--------"); if (field[0]) { if (prepend && body) { printf ("\n--------Enter initial text\n\n"); @@ -298,7 +298,7 @@ abort: m_getfld_state_destroy (&gstate); if (body) - printf ("--------\n"); + puts("--------"); fflush (stdout); fclose (in);