update for HEAD-2003091401
[reactos.git] / subsys / system / cmd / dir.c
index fc579fb..a743d0a 100644 (file)
@@ -703,12 +703,11 @@ GetUserDiskFreeSpace(LPCTSTR lpRoot,
   hInstance = LoadLibrary(_T("KERNEL32"));
   if (hInstance != NULL)
     {
-#ifndef UNICODE
-      pGetFreeDiskSpaceEx = GetProcAddress(hInstance,
-                                          "GetDiskFreeSpaceExA");
+      pGetFreeDiskSpaceEx = (PGETFREEDISKSPACEEX)GetProcAddress(hInstance,
+#ifdef _UNICODE
+                                                               _T("GetDiskFreeSpaceExW"));
 #else
-      pGetFreeDiskSpaceEx = GetProcAddress(hInstance,
-                                          "GetDiskFreeSpaceExW");
+                                                               _T("GetDiskFreeSpaceExA"));
 #endif
       if (pGetFreeDiskSpaceEx != NULL)
        {
@@ -719,10 +718,10 @@ GetUserDiskFreeSpace(LPCTSTR lpRoot,
     }
 
   GetDiskFreeSpace(lpRoot,
-                 &dwSecPerCl,
-                 &dwBytPerSec,
-                 &dwFreeCl,
-                 &dwTotCl);
+                  &dwSecPerCl,
+                  &dwBytPerSec,
+                  &dwFreeCl,
+                  &dwTotCl);
 
   lpFreeSpace->QuadPart = dwSecPerCl * dwBytPerSec * dwFreeCl;
 }
@@ -757,8 +756,6 @@ PrintSummary(LPTSTR szPath,
   ConvertULargeInteger (bytes, buffer, sizeof(buffer));
   ConOutPrintf (_T("  %15s byte%c\n"),
                 buffer, bytes.QuadPart == 1 ? _T(' ') : _T('s'));
-  ConOutPrintf (_T("  %I64u byte%c\n"),
-                bytes.QuadPart, bytes.QuadPart == 1 ? _T(' ') : _T('s'));
 
   if (IncLine (pLine, dwFlags))
     return 1;
@@ -992,7 +989,7 @@ DirList (LPTSTR szPath, LPTSTR szFilespec, LPINT pLine, DWORD dwFlags)
                                /* print file size */
                                if (file.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
                                {
-                                       ConOutPrintf ("%-14s", "<DIR>");
+                                       ConOutPrintf (_T("%-14s"), _T("<DIR>"));
                                        dircount++;
                                }
                                else
@@ -1015,7 +1012,7 @@ DirList (LPTSTR szPath, LPTSTR szFilespec, LPINT pLine, DWORD dwFlags)
                                }
 
                                /* print long filename */
-                               ConOutPrintf (" %s\n", file.cFileName);
+                               ConOutPrintf (_T(" %s\n"), file.cFileName);
                        }
 
                        if (IncLine (pLine, dwFlags))
@@ -1095,10 +1092,10 @@ DirRead (LPTSTR szPath, LPTSTR szFilespec, LPINT pLine, DWORD dwFlags)
 
                        if ((dwFlags & DIR_BARE) == 0)
                        {
-                               ConOutPrintf ("\n");
+                               ConOutPrintf (_T("\n"));
                                if (IncLine (pLine, dwFlags) != 0)
                                        return 1;
-                               ConOutPrintf ("\n");
+                               ConOutPrintf (_T("\n"));
                                if (IncLine (pLine, dwFlags) != 0)
                                        return 1;
                        }
@@ -1193,7 +1190,7 @@ INT CommandDir (LPTSTR first, LPTSTR rest)
 
        /* default to current directory */
        if (!param)
-               param = ".";
+               param = _T(".");
 
        /* parse the directory info */
        if (DirParsePathspec (param, szPath, szFilespec))