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: }

Defined functions

getproject defined in line 15; used 2 times

Defined variables

_PROJECT defined in line 13; used 1 times
  • in line 23
Last modified: 1985-07-03
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 560
Valid CSS Valid XHTML 1.0 Strict