// Note; (1) This file will be called each time 
//           when ch is invoked as a safe shell.
//################################################################
//  DO NOT MODIFY THIS PART OF CODE
string_t chhome_, tmp_;
chhome_ = getenv("CHHOME");
//  DO NOT MODIFY THE CODE ABOVE

//if(_prompt != NULL) { // interactive mode 
//  printf("Message from your system administrator goes here\n"); 
//  license 
//}

/***** OS dependent stuff goes here *****/
#if defined(_LINUX_)
  putenv(stradd("LD_LIBRARY_PATH=", chhome_, "/extern/lib:"));
#elif defined(_DARWIN_)
  putenv(stradd("DYLD_LIBRARY_PATH=", chhome_, "/extern/lib:"));
  if(atof(`uname -r`) < 5.0) /* 10.0.X */
  {
    putenv("DYLD_FORCE_FLAT_NAMESPACE=1");
    putenv("DYLD_INSERT_LIBRARIES=/usr/lib/libncurses.dylib");
  }
#elif defined(_SUN_) || defined(_SOLARIS_)
  tmp_ = stradd("LIBPATH=", chhome_, "/extern/lib:");
  tmp_ = stradd(tmp_,"/usr/openwin/lib:");
  putenv(tmp_);
  tmp_ = stradd("LD_LIBRARY_PATH=","/usr/openwin/lib:");
  tmp_ = stradd(tmp_,"/opt/SUNWmotif/lib:/usr/lib:");
  putenv(tmp_);
#elif defined(_HPUX_)
  tmp_ = stradd("SHLIB_PATH=", chhome_, "/extern/lib:");
  //tmp_ = stradd(tmp_,"/usr/lib:/usr/lib/X11R6:");
  putenv(tmp_);
#endif

#if strlen(_home)==1 /* root / */
#pragma import stradd(_home, ".chsrc");
#else
#pragma import stradd(_home, "/.chsrc");
#endif
