home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / prof_c / 08file / pwd.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-08-11  |  383 b   |  32 lines

  1. /*
  2.  *    pwd -- print (display actually) the current directory pathname
  3.  */
  4.  
  5. #include <stdio.h>
  6. #include <direct.h>
  7. #include <local\std.h>
  8.  
  9. main()
  10. {
  11.     char *path;
  12.  
  13.     if ((path = getcwd(NULL, MAXPATH)) == NULL) {
  14.         perror("Error getting current directory");
  15.         exit(1);
  16.     }
  17.     printf("%s\n", path);
  18.     exit(0);
  19. }
  20.  
  21. _setargv()
  22. {
  23. }
  24.  
  25. _setenvp()
  26. {
  27. }
  28.  
  29. _nullcheck()
  30. {
  31. }
  32.