home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / LIBSRC.ZOO / libsrc / local / getwd.c < prev    next >
Text File  |  1992-02-16  |  318b  |  20 lines

  1. #define INCL_DOSFILEMGR
  2. #include <os2.h>
  3.  
  4. ULONG Dos32QueryCurrentDir() asm ("Dos32QueryCurrentDir");
  5.  
  6. char *getwd (char pathname[])
  7. {
  8.    ULONG count = 2048;
  9.    ULONG rc;
  10.  
  11.    rc = Dos32QueryCurrentDir (0, (PBYTE)&pathname[0], &count);
  12.  
  13.    if (rc)
  14.       return (NULL);
  15.  
  16.    return (&pathname[0]);
  17. }
  18.  
  19.  
  20.