home *** CD-ROM | disk | FTP | other *** search
/ Power CD-ROM!! 7 / POWERCD7.ISO / prgmming / clipper / environ.c < prev    next >
C/C++ Source or Header  |  1993-10-14  |  1KB  |  59 lines

  1. /*
  2.  * GT CLIPPER STANDARD HEADER
  3.  *
  4.  * File......: environ.c
  5.  * Author....: Andy M Leighton
  6.  * BBS.......: The Dark Knight Returns
  7.  * Net/Node..: 050/069
  8.  * User Name.: Andy Leighton
  9.  * Date......: $Date$
  10.  * Revision..: $Revision$
  11.  *
  12.  * This is an original work by Andy Leighton and is placed in the
  13.  * public domain.
  14.  *
  15.  * Modification history:
  16.  * ---------------------
  17.  *
  18.  * $Log$
  19.  *
  20.  */
  21.  
  22. /*
  23.  *  $DOC$
  24.  *  $FUNCNAME$
  25.  *      GT_ENVIRON()
  26.  *  $CATEGORY$
  27.  *      Environment
  28.  *  $ONELINER$
  29.  *      Returns a command line parameter
  30.  *  $SYNTAX$
  31.  *      GT_environ(<nPos>) --> cVar
  32.  *  $ARGUMENTS$
  33.  *      <nPos>  -   The position in the environment list
  34.  *  $RETURNS$
  35.  *      cVar    -   The environment variable
  36.  *  $DESCRIPTION$
  37.  *     Get an environment variable specified by it's position in the
  38.  *     environ table by reading the C startup variables
  39.  *  $EXAMPLES$
  40.  *      local i
  41.  *
  42.  *      for i := 0 to GT_EnvCount()
  43.  *          ? GT_Environ(i)
  44.  *      next
  45.  *  $CAVEATS$
  46.  *      Does not check <nPos> is a valid position in the list.
  47.  *  $END$
  48.  */
  49.  
  50. #include "extend.h"
  51.  
  52. extern char **environ;
  53.  
  54. CLIPPER
  55. GT_environ()
  56. {
  57.   _retc(environ[_parni(1)]);
  58. }
  59.