Annotation of researchv10no/lbin/mailx/v9.local.c, revision 1.1.1.1

1.1       root        1: /*     Copyright (c) 1984 AT&T */
                      2: /*       All Rights Reserved   */
                      3: 
                      4: /*     THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T     */
                      5: /*     The copyright notice above does not evidence any        */
                      6: /*     actual or intended publication of such source code.     */
                      7: 
                      8: #ident "@(#)mailx:usg.local.c  1.2"
                      9: #
                     10: 
                     11: /*
                     12:  * mailx -- a modified version of a University of California at Berkeley
                     13:  *     mail program
                     14:  *
                     15:  * Local routines that are installation dependent.
                     16:  */
                     17: 
                     18: #include "rcv.h"
                     19: 
                     20: 
                     21: /*
                     22:  * Locate the user's mailbox file (ie, the place where new, unread
                     23:  * mail is queued).  In Standard UNIX, it is in /usr/mail/name.
                     24:  */
                     25: 
                     26: void
                     27: findmail()
                     28: {
                     29:        register char *cp;
                     30: 
                     31:        cp = copy(MAILROOT, mailname);
                     32:        copy(myname, cp);
                     33:        if (isdir(mailname)) {
                     34:                stradd(mailname, '/');
                     35:                strcat(mailname, myname);
                     36:        }
                     37: }
                     38: 
                     39: /*
                     40:  * Discover user login name.
                     41:  */
                     42: 
                     43: username(uid, namebuf)
                     44:        char namebuf[];
                     45: {
                     46:        register char *np;
                     47: 
                     48:        if (uid == getuid() && (np = getenv("LOGNAME")) != NOSTR) {
                     49:                strncpy(namebuf, np, PATHSIZE);
                     50:                return(0);
                     51:        }
                     52:        if( getname(uid, namebuf) == -1) {
                     53:                printf("Failure finding password file entry for uid %d\n",uid);
                     54:                return(-1);
                     55:        }
                     56:        else
                     57:                return(1);
                     58: }
                     59: 
                     60: char *
                     61: maildomain()
                     62: {
                     63:        return(MYDOMAIN);
                     64: }
                     65: 
                     66: #ifndef USG
                     67: long
                     68: ulimit(x,y)
                     69: {
                     70:        return(_NFILE); /* hack */
                     71: }
                     72: #endif

unix.superglobalmegacorp.com

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