home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c072 / 1.ddi / PRG5_10B.C < prev    next >
Encoding:
C/C++ Source or Header  |  1987-09-19  |  506 b   |  24 lines

  1. /*Program 5_10b - Display the Environment
  2.    by Stephen R. Davis, 1987
  3.  
  4.   Display the entire current environment.  Use the environment
  5.   pointer passed to us in main().
  6. */
  7.  
  8. #include <stdio.h>
  9.  
  10. /*Main - dump the environment on the screen*/
  11. void main (argc, argv, envptr)
  12.      unsigned argc;
  13.      char *argv[];
  14.      char *envptr[];
  15. {
  16.      unsigned count;
  17.  
  18.      count = 0;
  19.      while (*envptr[0]) {
  20.           printf ("entry %d: %s\n", count++, envptr[0]);
  21.           envptr++;
  22.      }
  23. }
  24.