* EECS Cory 11/70 Version 6.9.
* Local routines that are installation dependent.
* All fiddlers please note: if you make careful note of
* what you change here, I will incorporate your changes and
* you won't have to remake them each release.
* Locate the user's mailbox file (ie, the place where new, unread
* mail is queued). At Cory, it is in /usr/mail/name.
cp
= copy("/usr/mail/", mailname
);
* Get rid of the queued mail.
* This is essential "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.
* Insignificant in version 6.
* 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
++)