mirror of
https://github.com/reactos/reactos.git
synced 2025-04-19 20:19:26 +00:00
[XCOPY] Sync with Wine Staging 2.9. CORE-13362
373604f xcopy: Avoid using isdigit() for WCHARs. svn path=/trunk/; revision=74772
This commit is contained in:
parent
70740f2a14
commit
6b4d06cee9
2 changed files with 11 additions and 6 deletions
|
@ -648,7 +648,7 @@ cleanup:
|
||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
XCOPY_ParseCommandLine - Parses the command line
|
XCOPY_ParseCommandLine - Parses the command line
|
||||||
========================================================================= */
|
========================================================================= */
|
||||||
static BOOL is_whitespace(WCHAR c)
|
static inline BOOL is_whitespace(WCHAR c)
|
||||||
{
|
{
|
||||||
return c == ' ' || c == '\t';
|
return c == ' ' || c == '\t';
|
||||||
}
|
}
|
||||||
|
@ -659,6 +659,11 @@ static WCHAR *skip_whitespace(WCHAR *p)
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline BOOL is_digit(WCHAR c)
|
||||||
|
{
|
||||||
|
return c >= '0' && c <= '9';
|
||||||
|
}
|
||||||
|
|
||||||
/* Windows XCOPY uses a simplified command line parsing algorithm
|
/* Windows XCOPY uses a simplified command line parsing algorithm
|
||||||
that lacks the escaped-quote logic of build_argv(), because
|
that lacks the escaped-quote logic of build_argv(), because
|
||||||
literal double quotes are illegal in any of its arguments.
|
literal double quotes are illegal in any of its arguments.
|
||||||
|
@ -775,7 +780,7 @@ static int XCOPY_ParseCommandLine(WCHAR *suppliedsource,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* D can be /D or /D: */
|
/* D can be /D or /D: */
|
||||||
case 'D': if (word[2]==':' && isdigit(word[3])) {
|
case 'D': if (word[2]==':' && is_digit(word[3])) {
|
||||||
SYSTEMTIME st;
|
SYSTEMTIME st;
|
||||||
WCHAR *pos = &word[3];
|
WCHAR *pos = &word[3];
|
||||||
BOOL isError = FALSE;
|
BOOL isError = FALSE;
|
||||||
|
@ -786,18 +791,18 @@ static int XCOPY_ParseCommandLine(WCHAR *suppliedsource,
|
||||||
* It is hardcoded to month-day-year.
|
* It is hardcoded to month-day-year.
|
||||||
*/
|
*/
|
||||||
st.wMonth = _wtol(pos);
|
st.wMonth = _wtol(pos);
|
||||||
while (*pos && isdigit(*pos)) pos++;
|
while (*pos && is_digit(*pos)) pos++;
|
||||||
if (*pos++ != '-') isError = TRUE;
|
if (*pos++ != '-') isError = TRUE;
|
||||||
|
|
||||||
if (!isError) {
|
if (!isError) {
|
||||||
st.wDay = _wtol(pos);
|
st.wDay = _wtol(pos);
|
||||||
while (*pos && isdigit(*pos)) pos++;
|
while (*pos && is_digit(*pos)) pos++;
|
||||||
if (*pos++ != '-') isError = TRUE;
|
if (*pos++ != '-') isError = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isError) {
|
if (!isError) {
|
||||||
st.wYear = _wtol(pos);
|
st.wYear = _wtol(pos);
|
||||||
while (*pos && isdigit(*pos)) pos++;
|
while (*pos && is_digit(*pos)) pos++;
|
||||||
if (st.wYear < 100) st.wYear+=2000;
|
if (st.wYear < 100) st.wYear+=2000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -232,7 +232,7 @@ reactos/base/applications/cmdutils/schtasks # Synced to WineStaging-1.9.14
|
||||||
reactos/base/applications/cmdutils/taskkill # Synced to WineStaging-1.9.11
|
reactos/base/applications/cmdutils/taskkill # Synced to WineStaging-1.9.11
|
||||||
reactos/base/applications/cmdutils/wmic # Synced to WineStaging-2.2
|
reactos/base/applications/cmdutils/wmic # Synced to WineStaging-2.2
|
||||||
reactos/base/applications/cmdutils/wscript # Synced to WineStaging-1.9.16
|
reactos/base/applications/cmdutils/wscript # Synced to WineStaging-1.9.16
|
||||||
reactos/base/applications/cmdutils/xcopy # Synced to WineStaging-1.9.11
|
reactos/base/applications/cmdutils/xcopy # Synced to WineStaging-2.9
|
||||||
reactos/base/applications/games/winmine # Synced to WineStaging-1.9.16 with our own resources.
|
reactos/base/applications/games/winmine # Synced to WineStaging-1.9.16 with our own resources.
|
||||||
reactos/base/applications/extrac32 # Synced to WineStaging-1.9.11
|
reactos/base/applications/extrac32 # Synced to WineStaging-1.9.11
|
||||||
reactos/base/applications/iexplore # Synced to WineStaging-1.9.11
|
reactos/base/applications/iexplore # Synced to WineStaging-1.9.11
|
||||||
|
|
Loading…
Reference in a new issue