X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/94f8f9eb1b71847a08ccb7f6c7b5f1bfebb44c10..623ae60ba9a0b24a7c28e7150a0e4b8e6a21b5fc:/uip/folder.c?ds=inline diff --git a/uip/folder.c b/uip/folder.c index c077f7c2..10c9290a 100644 --- a/uip/folder.c +++ b/uip/folder.c @@ -118,8 +118,7 @@ main (int argc, char **argv) * If program was invoked with name ending * in `s', then add switch `-all'. */ - if (argv[0][strlen (argv[0]) - 1] == 's') - all = 1; + all = has_suffix_c(argv[0], 's'); arguments = getarguments (invo_name, argc, argv, 1); argp = arguments; @@ -307,14 +306,14 @@ main (int argc, char **argv) /* Listing the folder stack */ if (listsw) { - printf ("%s", argfolder ? argfolder : getfolder (1)); + fputs(argfolder ? argfolder : getfolder (1), stdout); if ((cp = context_find (stack))) { dp = mh_xstrdup(cp); for (ap = brkstring (dp, " ", "\n"); *ap; ap++) printf (" %s", *ap); free (dp); } - printf ("\n"); + putchar('\n'); if (!printsw) done (0); @@ -547,7 +546,7 @@ print_folders (void) if (all || fshort || ftotal < 1) { for (i = 0; i < total_folders; i++) { if (fshort) { - printf ("%s\n", fi[i].name); + puts(fi[i].name); continue; } @@ -583,7 +582,7 @@ print_folders (void) if (fi[i].others) printf (";%*s (others)", curprinted ? 0 : curmsgdigits + 6, ""); - printf (".\n"); + puts("."); } } @@ -592,7 +591,7 @@ print_folders (void) */ if (ftotal > 0 || (all && !fshort && ftotal >= 0)) { if (all) - printf ("\n"); + putchar('\n'); printf ("TOTAL = %d message%c in %d folder%s.\n", total_msgs, total_msgs != 1 ? 's' : ' ', total_folders, total_folders != 1 ? "s" : "");