home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume1 / 8712 / mkmf / 2 / src / getcwp.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-07-13  |  483 b   |  24 lines

  1. /* $Header: getcwp.c,v 1.1 85/03/14 16:58:54 nicklin Exp $ */
  2.  
  3. /*
  4.  * Author: Peter J. Nicklin
  5.  */
  6.  
  7. /*
  8.  * getcwp() returns the pathname of the current working project. If the
  9.  * PROJECT environment variable is undefined or a null string, null is
  10.  * returned.
  11.  */
  12. #include "null.h"
  13.  
  14. char *
  15. getcwp()
  16. {
  17.     extern char *_PROJECT;        /* project root directory pathname */
  18.     void getproject();        /* get PROJECT environment variable */
  19.  
  20.     if (_PROJECT == NULL)
  21.         getproject();
  22.     return(_PROJECT);
  23. }
  24.