Added binary and unicode file i/o support to msvcrt.
[reactos.git] / reactos / lib / msvcrt / direct / getdcwd.c
index e6e719e..bbf79fd 100644 (file)
@@ -1,44 +1,19 @@
 #include <windows.h>
 #include <msvcrt/direct.h>
 
-char* _getdcwd (int nDrive, char* caBuffer, int nBufLen)
+char* _getdcwd(int nDrive, char* caBuffer, int nBufLen)
 {
-       int i =0;
-       int dr = _getdrive();
-       
-       if ( nDrive < 1 || nDrive > 26 )
-               return NULL;
-       
-       if ( dr != nDrive )
-               _chdrive(nDrive);
-       
-       i = GetCurrentDirectoryA(nBufLen,caBuffer);
-       if ( i  == nBufLen )
-               return NULL;
-       
-       if ( dr != nDrive )
-               _chdrive(dr);
-       
-       return caBuffer;
-}
+    int i =0;
+    int dr = _getdrive();
 
-wchar_t* _wgetdcwd (int nDrive, wchar_t* caBuffer, int nBufLen)
-{
-       int i =0;
-       int dr = _getdrive();
-       
-       if ( nDrive < 1 || nDrive > 26 )
-               return NULL;
-       
-       if ( dr != nDrive )
-               _chdrive(nDrive);
-       
-       i = GetCurrentDirectoryW(nBufLen,caBuffer);
-       if ( i  == nBufLen )
-               return NULL;
-       
-       if ( dr != nDrive )
-               _chdrive(dr);
-       
-       return caBuffer;
+    if (nDrive < 1 || nDrive > 26)
+        return NULL;
+    if (dr != nDrive)
+        _chdrive(nDrive);
+    i = GetCurrentDirectoryA(nBufLen, caBuffer);
+    if (i  == nBufLen)
+        return NULL;
+    if (dr != nDrive)
+        _chdrive(dr);
+    return caBuffer;
 }