Annotation of 43BSD/contrib/mkmf/src/getproject.c, revision 1.1

1.1     ! root        1: /* $Header: getproject.c,v 1.1 85/03/14 16:59:01 nicklin Exp $ */
        !             2: 
        !             3: /*
        !             4:  * Author: Peter J. Nicklin
        !             5:  */
        !             6: 
        !             7: /*
        !             8:  * getproject() saves the contents of the PROJECT environment variable.
        !             9:  * If the PROJECT variable is undefined or a null string, null is returned.
        !            10:  */
        !            11: #include "null.h"
        !            12: 
        !            13: char *_PROJECT = NULL;                 /* project root directory pathname */
        !            14: 
        !            15: void
        !            16: getproject()
        !            17: {
        !            18:        register char *pv;              /* ptr to start of PROJECT variable */
        !            19:        char *getenv();                 /* get environment variable */
        !            20:        char *strsav();                 /* save a string somewhere */
        !            21: 
        !            22:        if ((pv = getenv("PROJECT")) != NULL && *pv != '\0')
        !            23:                _PROJECT = strsav(pv);
        !            24: }

unix.superglobalmegacorp.com

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