* Local routines that are installation dependent.
static char *SccsId
= "@(#)cc.local.c 1.1 %G%";
* Locate the user's mailbox file (ie, the place where new, unread
* mail is queued). At Computer Center, it is in /usr/mail/name.
cp
= copy("/usr/mail/", mailname
);
* Get rid of the queued mail.
* This is essentially "mail -n > /dev/null &"
for (p
= SIGHUP
; p
<= SIGQUIT
; p
++)
execl(MAIL
, "mail", "-n", 0);
* Get the value of an environment variable.
if (equal(name
, "SHELL"))
if (!equal(name
, "HOME"))
* Mail file lock / unlock.
* Not implemented in this version.
* Discover user login name.
return(getname(uid
, namebuf
));
* Unix routine to do an "fopen" on file descriptor
* The mode has to be repeated because you can't query its
for (iop
= _iob
; iop
->_flag
&(_IOREAD
|_IOWRT
); iop
++)