]> diplodocus.org Git - nmh/commitdiff
Replace printf("...\n") with puts("...").
authorRalph Corderoy <ralph@inputplus.co.uk>
Fri, 28 Oct 2016 22:51:41 +0000 (23:51 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sun, 30 Oct 2016 15:17:11 +0000 (15:17 +0000)
sbr/print_help.c
sbr/read_switch.c
sbr/read_switch_multiword.c
sbr/read_switch_multiword_via_readline.c
uip/ali.c
uip/folder.c
uip/install-mh.c
uip/mhlistsbr.c
uip/pick.c
uip/post.c
uip/prompter.c

index 5374b6b..2508240 100644 (file)
@@ -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);
 
     /*
index bb24dd4..8553001 100644 (file)
@@ -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;
index f653a7f..582e11f 100644 (file)
@@ -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;
        }
index 8696c57..2c6912b 100644 (file)
@@ -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;
index 47b590d..4d73afa 100644 (file)
--- 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 ("<empty>\n");
+       puts("<empty>");
        return;
     }
 
index 7e00a81..423ef7b 100644 (file)
@@ -582,7 +582,7 @@ print_folders (void)
 
            if (fi[i].others)
                printf (";%*s (others)", curprinted ? 0 : curmsgdigits + 6, "");
-           printf (".\n");
+           puts(".");
        }
     }
 
index 7086533..09d1f9d 100644 (file)
@@ -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]");
     }
 
     /*
index f5459cd..1dda09b 100644 (file)
@@ -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]");
 
     }
 
index 9b2e0cd..09fd7cd 100644 (file)
@@ -324,6 +324,6 @@ static void
 putzero_done (int status)
 {
     if (listsw && status && !isatty (fileno (stdout)))
-       printf ("0\n");
+       puts("0");
     exit (status);
 }
index 553a225..fca85f7 100644 (file)
@@ -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");
            }
     }
 
index f5332e4..8b75813 100644 (file)
@@ -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);