mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 02:43:38 +00:00
cmd: Use towlower()/towupper() for WCHARs.
Found with Coccinelle.
This commit is contained in:
parent
75488b303b
commit
91de94ab99
|
@ -3496,7 +3496,7 @@ void WCMD_setshow_default (const WCHAR *args) {
|
|||
/* Restore old directory if drive letter would change, and
|
||||
CD x:\directory /D (or pushd c:\directory) not supplied */
|
||||
if ((wcsstr(quals, L"/D") == NULL) &&
|
||||
(param1[1] == ':') && (toupper(param1[0]) != toupper(cwd[0]))) {
|
||||
(param1[1] == ':') && (towupper(param1[0]) != towupper(cwd[0]))) {
|
||||
SetCurrentDirectoryW(cwd);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -328,10 +328,7 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le
|
|||
}
|
||||
|
||||
/* /L convers all names to lower case */
|
||||
if (lower) {
|
||||
WCHAR *p = fd[i].cFileName;
|
||||
while ( (*p = tolower(*p)) ) ++p;
|
||||
}
|
||||
if (lower) wcslwr( fd[i].cFileName );
|
||||
|
||||
/* /Q gets file ownership information */
|
||||
if (usernames) {
|
||||
|
@ -558,8 +555,7 @@ void WCMD_directory (WCHAR *args)
|
|||
|
||||
/* Prefill quals with (uppercased) DIRCMD env var */
|
||||
if (GetEnvironmentVariableW(L"DIRCMD", string, ARRAY_SIZE(string))) {
|
||||
p = string;
|
||||
while ( (*p = toupper(*p)) ) ++p;
|
||||
wcsupr( string );
|
||||
lstrcatW(string,quals);
|
||||
lstrcpyW(quals, string);
|
||||
}
|
||||
|
@ -827,7 +823,7 @@ void WCMD_directory (WCHAR *args)
|
|||
|
||||
/* Output disk free (trailer) and volume information (header) if the drive
|
||||
letter changes */
|
||||
if (lastDrive != toupper(thisEntry->dirName[0])) {
|
||||
if (lastDrive != towupper(thisEntry->dirName[0])) {
|
||||
|
||||
/* Trailer Information */
|
||||
if (lastDrive != '?') {
|
||||
|
@ -835,7 +831,7 @@ void WCMD_directory (WCHAR *args)
|
|||
WCMD_dir_trailer(prevEntry->dirName[0]);
|
||||
}
|
||||
|
||||
lastDrive = toupper(thisEntry->dirName[0]);
|
||||
lastDrive = towupper(thisEntry->dirName[0]);
|
||||
|
||||
if (!bare) {
|
||||
WCHAR drive[3];
|
||||
|
|
|
@ -347,7 +347,7 @@ static void WCMD_show_prompt (BOOL newLine) {
|
|||
}
|
||||
else {
|
||||
p++;
|
||||
switch (toupper(*p)) {
|
||||
switch (towupper(*p)) {
|
||||
case '$':
|
||||
*q++ = '$';
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue