home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume6
/
shadow-2.pt2
/
mail.c
< prev
next >
Wrap
C/C++ Source or Header
|
1989-02-03
|
450b
|
27 lines
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include "config.h"
extern char mail[];
#ifdef MAILCHECK
void mailcheck ()
{
struct stat statbuf;
char *mailbox;
if (mailbox = strchr (mail, '='))
mailbox++;
else
return;
if (stat (mailbox, &statbuf) == -1 || statbuf.st_size == 0)
puts ("No mail.");
else if (statbuf.st_atime > statbuf.st_mtime)
puts ("You have mail.");
else
puts ("You have new mail.");
}
#endif