Annotation of 40BSD/cmd/ucbmail/v7.local.c, revision 1.1.1.1

1.1       root        1: #
                      2: 
                      3: /*
                      4:  * Mail -- a mail program
                      5:  *
                      6:  * Version 7
                      7:  *
                      8:  * Local routines that are installation dependent.
                      9:  */
                     10: 
                     11: #include "rcv.h"
                     12: 
                     13: /*
                     14:  * Locate the user's mailbox file (ie, the place where new, unread
                     15:  * mail is queued).  In Version 7, it is in /usr/spool/mail/name.
                     16:  */
                     17: 
                     18: findmail()
                     19: {
                     20:        register char *cp;
                     21: 
                     22:        cp = copy("/usr/spool/mail/", mailname);
                     23:        copy(myname, cp);
                     24:        if (isdir(mailname)) {
                     25:                stradd(mailname, '/');
                     26:                strcat(mailname, myname);
                     27:        }
                     28: }
                     29: 
                     30: /*
                     31:  * Get rid of the queued mail.
                     32:  */
                     33: 
                     34: demail()
                     35: {
                     36: 
                     37:        remove(mailname);
                     38: }
                     39: 
                     40: /*
                     41:  * Discover user login name.
                     42:  */
                     43: 
                     44: username(uid, namebuf)
                     45:        char namebuf[];
                     46: {
                     47:        register char *np;
                     48: 
                     49:        if (uid == getuid() && (np = getenv("USER")) != NOSTR) {
                     50:                strncpy(namebuf, np, 9);
                     51:                return(0);
                     52:        }
                     53:        return(getname(uid, namebuf));
                     54: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.