- if ((mf & UUCPOK) || (mf & MMDFOK)) {
- if (notifysw & NT_MAIL) {
- 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))
- printf (" and ");
- if (mf & MMDFOK)
- printf ("%s%s", mf & MMDFOLD ? "old" : "new",
- mf & UUCPOK ? " Internet" : "");
- printf (" mail waiting");
- } else {
- notifysw = 0;
- }
- status = 0;
- }
- else {
- if (notifysw & NT_NMAI)
- printf (personal ? "You don't %s%s" : "%s doesn't %s",
- personal ? "" : user, "have any mail waiting");
- else
- notifysw = 0;
-
- status = 1;
+ if (empty) {
+ if (personal) {
+ fputs("You don't have any mail waiting", stdout);
+ } else {
+ printf("%s doesn't have any mail waiting", user);
+ }
+ } else {
+ char *kind = st.st_mtime < st.st_atime ? "old" : "new";
+ if (personal) {
+ printf("You have %s mail waiting", kind);
+ } else {
+ printf("%s has %s mail waiting", user, kind);
+ }