X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/52a236230220232fd632b5aa88eb9bb31dba346e..f345b9b480296b4b6a8469d6221752893c5d1420:/uip/msgchk.c diff --git a/uip/msgchk.c b/uip/msgchk.c index af280f59..49e758f0 100644 --- a/uip/msgchk.c +++ b/uip/msgchk.c @@ -85,13 +85,7 @@ main (int argc, char **argv) char **argp, **arguments, *vec[MAXVEC]; struct passwd *pw; -#ifdef LOCALE - setlocale(LC_ALL, ""); -#endif - invo_name = r1bindex (argv[0], '/'); - - /* read user profile/context */ - context_read(); + if (nmh_init(argv[0], 1)) { return 1; } mts_init (invo_name); @@ -285,7 +279,10 @@ checkmail (char *user, char *home, int datesw, int notifysw, int personal) if ((mf & UUCPOK) || (mf & MMDFOK)) { if (notifysw & NT_MAIL) { - printf (personal ? "You have " : "%s has ", user); + if (personal) + printf ("You have "); + else + printf ("%s has ", user); if (mf & UUCPOK) printf ("%s old-style bell", mf & UUCPOLD ? "old" : "new"); if ((mf & UUCPOK) && (mf & MMDFOK)) @@ -340,7 +337,11 @@ remotemail (char *host, char *port, char *user, char *proxy, int notifysw, if (nmsgs) { if (notifysw & NT_MAIL) { - printf (personal ? "You have " : "%s has ", user); + if (personal) + printf ("You have "); + else + printf ("%s has ", user); + printf ("%d message%s (%d bytes)", nmsgs, nmsgs != 1 ? "s" : "", nbytes); }