From: Ralph Corderoy Date: Sat, 13 May 2017 17:39:06 +0000 (+0100) Subject: uip/folder.c: Rewrite plural test to common form. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/de237d4dc2cafee55bd50a15fbeb2d7a880a87cf?ds=sidebyside;hp=665dfc96f45c47ecfae79f1baa2c29dabe5a2ded uip/folder.c: Rewrite plural test to common form. The common form is a choice between "" and "s". This one occurrence was using " " and "s" so either output was a fixed width. Alter the printf(3) format string from `%s' to `%1s' to provide that instead. Allows the new code to be altered by an upcoming `plural' change. --- diff --git a/uip/folder.c b/uip/folder.c index 23aea0b7..68e9182d 100644 --- a/uip/folder.c +++ b/uip/folder.c @@ -568,9 +568,9 @@ print_folders (void) nummsgdigits, "no", fi[i].others ? lowmsgdigits + hghmsgdigits + 5 : 0, ""); } else { - printf ("has %*d message%s (%*d-%*d)", + printf ("has %*d message%1s (%*d-%*d)", nummsgdigits, fi[i].nummsg, - (fi[i].nummsg == 1) ? " " : "s", + (fi[i].nummsg == 1) ? "" : "s", lowmsgdigits, fi[i].lowmsg, hghmsgdigits, fi[i].hghmsg); if (fi[i].curmsg >= fi[i].lowmsg && fi[i].curmsg <= fi[i].hghmsg) {