diff --git a/reactos/subsys/system/cmd/cmd.c b/reactos/subsys/system/cmd/cmd.c
index 3c4edfb6901..ec3c065f788 100644
--- a/reactos/subsys/system/cmd/cmd.c
+++ b/reactos/subsys/system/cmd/cmd.c
@@ -176,10 +176,45 @@ WORD wDefColor; /* default color */
#endif
/*
- * is character a delimeter when used on first word?
+ * convert
+ *
+ * insert commas into a number
+ */
+INT
+ConvertULargeInteger (ULARGE_INTEGER num, LPTSTR des, INT len, BOOL bPutSeperator)
+{
+ TCHAR temp[32];
+ INT c = 0;
+ INT n = 0;
+
+ if (num.QuadPart == 0)
+ {
+ des[0] = _T('0');
+ des[1] = _T('\0');
+ n = 1;
+ }
+ else
+ {
+ temp[31] = 0;
+ while (num.QuadPart > 0)
+ {
+ if ((((c + 1) % (nNumberGroups + 1)) == 0) && (bPutSeperator))
+ temp[30 - c++] = cThousandSeparator;
+ temp[30 - c++] = (TCHAR)(num.QuadPart % 10) + _T('0');
+ num.QuadPart /= 10;
+ }
+
+ for (n = 0; n <= c; n++)
+ des[n] = temp[31 - c + n];
+ }
+
+ return n;
+}
+
+/*
+ * is character a delimeter when used on first word?
*
*/
-
static BOOL IsDelimiter (TCHAR c)
{
return (c == _T('/') || c == _T('=') || c == _T('\0') || _istspace (c));
diff --git a/reactos/subsys/system/cmd/cmd.h b/reactos/subsys/system/cmd/cmd.h
index fe23b5ab011..b8b2fd6b5f4 100644
--- a/reactos/subsys/system/cmd/cmd.h
+++ b/reactos/subsys/system/cmd/cmd.h
@@ -93,6 +93,7 @@ INT cmd_cls (LPTSTR, LPTSTR);
/* Prototypes for CMD.C */
+INT ConvertULargeInteger (ULARGE_INTEGER num, LPTSTR des, INT len, BOOL bPutSeperator);
VOID ParseCommandLine (LPTSTR);
LPCTSTR GetEnvVarOrSpecial ( LPCTSTR varName );
VOID AddBreakHandler (VOID);
diff --git a/reactos/subsys/system/cmd/cmd.xml b/reactos/subsys/system/cmd/cmd.xml
index 4a341b0fb54..a36da9fa6a1 100644
--- a/reactos/subsys/system/cmd/cmd.xml
+++ b/reactos/subsys/system/cmd/cmd.xml
@@ -5,59 +5,61 @@
0x0501
precomp.h
- alias.c
- attrib.c
- batch.c
- beep.c
- call.c
- chcp.c
- choice.c
- cls.c
- cmd.c
- cmdinput.c
- cmdtable.c
- color.c
- console.c
- copy.c
- date.c
- del.c
- delay.c
- dir.c
- dirstack.c
- echo.c
- error.c
- filecomp.c
- for.c
- free.c
- goto.c
- history.c
- if.c
- internal.c
- label.c
- locale.c
- memory.c
- misc.c
- move.c
- msgbox.c
- path.c
- pause.c
- prompt.c
- redir.c
- ren.c
- screen.c
- set.c
- shift.c
- start.c
- strtoclr.c
- time.c
- timer.c
- title.c
- type.c
- ver.c
- verify.c
- vol.c
- where.c
- window.c
+
+ alias.c
+ attrib.c
+ batch.c
+ beep.c
+ call.c
+ chcp.c
+ choice.c
+ cls.c
+ cmd.c
+ cmdinput.c
+ cmdtable.c
+ color.c
+ console.c
+ copy.c
+ date.c
+ del.c
+ delay.c
+ dir.c
+ dirstack.c
+ echo.c
+ error.c
+ filecomp.c
+ for.c
+ free.c
+ goto.c
+ history.c
+ if.c
+ internal.c
+ label.c
+ locale.c
+ memory.c
+ misc.c
+ move.c
+ msgbox.c
+ path.c
+ pause.c
+ prompt.c
+ redir.c
+ ren.c
+ screen.c
+ set.c
+ shift.c
+ start.c
+ strtoclr.c
+ time.c
+ timer.c
+ title.c
+ type.c
+ ver.c
+ verify.c
+ vol.c
+ where.c
+ window.c
+
include/wine
diff --git a/reactos/subsys/system/cmd/copy.c b/reactos/subsys/system/cmd/copy.c
index a8dbbf53e2f..a54b8751d84 100644
--- a/reactos/subsys/system/cmd/copy.c
+++ b/reactos/subsys/system/cmd/copy.c
@@ -324,7 +324,7 @@ copy (TCHAR source[MAX_PATH],
}
-static INT Overwrite (LPTSTR fn)
+static INT CopyOverwrite (LPTSTR fn)
{
/*ask the user if they want to override*/
TCHAR szMsg[RC_STRING_MAX_SIZE];
@@ -844,7 +844,7 @@ INT cmd_copy (LPTSTR cmd, LPTSTR param)
/* Handle any overriding / prompting that needs to be done */
if(((!(dwFlags & COPY_NO_PROMPT) && IsExistingFile (tmpDestPath)) || dwFlags & COPY_PROMPT) && !bTouch)
- nOverwrite = Overwrite(tmpDestPath);
+ nOverwrite = CopyOverwrite(tmpDestPath);
if(nOverwrite == PROMPT_NO || nOverwrite == PROMPT_BREAK)
continue;
if(nOverwrite == PROMPT_ALL || (nOverwrite == PROMPT_YES && bAppend))
diff --git a/reactos/subsys/system/cmd/dir.c b/reactos/subsys/system/cmd/dir.c
index 233fca01f75..e2437847351 100644
--- a/reactos/subsys/system/cmd/dir.c
+++ b/reactos/subsys/system/cmd/dir.c
@@ -982,38 +982,6 @@ ConvertULong (ULONG num, LPTSTR des, INT len)
}
#endif
-static INT
-ConvertULargeInteger (ULARGE_INTEGER num, LPTSTR des, INT len, BOOL bPutSeperator)
-{
- TCHAR temp[32];
- INT c = 0;
- INT n = 0;
-
- if (num.QuadPart == 0)
- {
- des[0] = _T('0');
- des[1] = _T('\0');
- n = 1;
- }
- else
- {
- temp[31] = 0;
- while (num.QuadPart > 0)
- {
- if ((((c + 1) % (nNumberGroups + 1)) == 0) && (bPutSeperator))
- temp[30 - c++] = cThousandSeparator;
- temp[30 - c++] = (TCHAR)(num.QuadPart % 10) + _T('0');
- num.QuadPart /= 10;
- }
-
- for (n = 0; n <= c; n++)
- des[n] = temp[31 - c + n];
- }
-
- return n;
-}
-
-
static VOID
DirPrintFileDateTime(TCHAR *lpDate,
TCHAR *lpTime,
diff --git a/reactos/subsys/system/cmd/free.c b/reactos/subsys/system/cmd/free.c
index 2eba7d12332..f739cd3522f 100644
--- a/reactos/subsys/system/cmd/free.c
+++ b/reactos/subsys/system/cmd/free.c
@@ -16,45 +16,6 @@
#ifdef INCLUDE_CMD_FREE
-
-/*
- * convert
- *
- * insert commas into a number
- */
-
-static INT
-ConvertULargeInteger (ULARGE_INTEGER num, LPTSTR des, INT len)
-{
- TCHAR temp[32];
- INT c = 0;
- INT n = 0;
-
- if (num.QuadPart == 0)
- {
- des[0] = _T('0');
- des[1] = _T('\0');
- n = 1;
- }
- else
- {
- temp[31] = 0;
- while (num.QuadPart > 0)
- {
- if (((c + 1) % (nNumberGroups + 1)) == 0)
- temp[30 - c++] = cThousandSeparator;
- temp[30 - c++] = (TCHAR)(num.QuadPart % 10) + _T('0');
- num.QuadPart /= 10;
- }
-
- for (n = 0; n <= c; n++)
- des[n] = temp[31 - c + n];
- }
-
- return n;
-}
-
-
static VOID
PrintDiskInfo (LPTSTR szDisk)
{
@@ -112,13 +73,13 @@ PrintDiskInfo (LPTSTR szDisk)
}
uliSize.QuadPart = dwSecPerCl * dwBytPerSec * dwTotCl;
- ConvertULargeInteger (uliSize, szTotal, 40);
+ ConvertULargeInteger (uliSize, szTotal, 40, TRUE);
uliSize.QuadPart = dwSecPerCl * dwBytPerSec * (dwTotCl - dwFreeCl);
- ConvertULargeInteger (uliSize, szUsed, 40);
+ ConvertULargeInteger (uliSize, szUsed, 40, TRUE);
uliSize.QuadPart = dwSecPerCl * dwBytPerSec * dwFreeCl;
- ConvertULargeInteger (uliSize, szFree, 40);
+ ConvertULargeInteger (uliSize, szFree, 40, TRUE);
LoadString(CMD_ModuleHandle, STRING_FREE_HELP1, szMsg, RC_STRING_MAX_SIZE);
diff --git a/reactos/subsys/system/cmd/move.c b/reactos/subsys/system/cmd/move.c
index 9d6916d327c..fe3e942f81a 100644
--- a/reactos/subsys/system/cmd/move.c
+++ b/reactos/subsys/system/cmd/move.c
@@ -53,7 +53,7 @@ enum
MOVE_PATHS_ON_DIF_VOL = 0x080 /* source and destination paths are on different volume */
};
-static INT Overwrite (LPTSTR fn)
+static INT MoveOverwrite (LPTSTR fn)
{
/*ask the user if they want to override*/
TCHAR szMsg[RC_STRING_MAX_SIZE];
@@ -412,7 +412,7 @@ INT cmd_move (LPTSTR cmd, LPTSTR param)
continue;
if(!(dwFlags & MOVE_OVER_YES) &&
(dwMoveStatusFlags & MOVE_DEST_EXISTS))
- nOverwrite = Overwrite (szFullDestPath);
+ nOverwrite = MoveOverwrite (szFullDestPath);
if (nOverwrite == PROMPT_NO || nOverwrite == PROMPT_BREAK)
continue;
if (nOverwrite == PROMPT_ALL)