From: utzoo!decvax!harpo!floyd!vax135!ariel!orion!lime!burdvax!puder Newsgroups: net.emacs Title: mod to loadst.c to do new-mail notification Article-I.D.: burdvax.542 Posted: Mon Feb 7 21:21:08 1983 Received: Wed Feb 9 05:57:57 1983 Since Herb told you that it was easy, I thought I'd make it even easier. Here is an excerpt with lots of context (starting around line 72 (56%)) from loadst.c that shows how we have changed it here. I have also re-ordered the elements of the display, but the significant change is the line after my comment where the atime is compared to the mtime. time (&now); nowt = localtime (&now); lseek (kmem, (long) nl[0].n_value, 0); read (kmem, avenrun, sizeof (avenrun)); printf ("%d:%02d%s %s%.2f", nowt -> tm_hour == 0 ? 12 : nowt ->tm_hour>12 ? nowt->tm_hour-12 : nowt->tm_hour, nowt -> tm_min, nowt -> tm_hour>=12 ? "pm" : "am", ((stat (mail, &st)>=0 && st.st_size) ? /* also, is it new mail? * kop 2/2/83 */ ( st.st_atime <= st.st_mtime ? "New mail " : "Mail " ) : "" ), avenrun[0] ); lseek(kmem, (long)nl[X_CPTIME].n_value, 0); read(kmem, s.time, sizeof s.time); lseek(kmem, (long)nl[X_DKXFER].n_value, 0); read(kmem, s.xfer, sizeof s.xfer); etime = 0; Karl Puder burdvax!puder SDC-aBC, R & D Paoli, Pa. (215)648-7555