* EECS Cory 11/70 Version 7.0
* 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.
static char *SccsId
= "@(#)c.local.c 2.1 %G%";
* Locate the user's mailbox file (ie, the place where new, unread
* mail is queued). At Cory, it is in /usr/spool/mail/name.
cp
= copy("/usr/spool/mail/", mailname
);
* Get rid of the queued mail.
close(creat(mailname
, 0666));
* Mail file lock / unlock.
* Insignificant on Cory version 7, since /usr/spool/mail not
* Discover user login name.
if (uid
== getuid() && (np
= getenv("USER")) != NOSTR
) {
return(getname(uid
, namebuf
));
* Discover user name from uid. Uses the fancy hashed passwd
* data base available only on Cory Unix.
struct passwd
*getpwuid();
if (gp
== (struct passwd
*) 0)
strcpy(namebuf
, gp
->pw_name
);
struct passwd
*getpwnam();
if ((gp
= getpwnam(name
)) == (struct passwd
*) 0)