home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Applications / Moscow ML 1.31 / source code / mosml / e_mac / e_getenv.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-09-11  |  294 b   |  21 lines  |  [TEXT/CWIE]

  1. /* e_getenv.c */
  2. /* 11Sep95  e */
  3.  
  4. #include <stdlib.h>
  5. #include <Resources.h>
  6.  
  7. char *e_getenv(const char *name)
  8. {
  9.   Handle h;
  10.   Str255 buf;
  11.  
  12.   c_to_p( name, buf );
  13.   h = GetNamedResource( 'ENV ', buf );
  14.   if( h == NULL ) return NULL;
  15.   MoveHHi(h);
  16.   HLock(h);
  17.   return (char *)*h;
  18. }
  19.  
  20. /* end */
  21.