cmd: Use the wcsrev function instead of reimplementing it.

This commit is contained in:
Alex Henrie 2022-11-03 19:30:31 -06:00 committed by Alexandre Julliard
parent 6ee8f819cf
commit 212e319dce

View file

@ -49,25 +49,6 @@ static BOOL orderReverse, orderGroupDirs, orderGroupDirsReverse, orderByCol;
static BOOL paged_mode, recurse, wide, bare, lower, shortname, usernames, separator;
static ULONG showattrs, attrsbits;
/*****************************************************************************
* WCMD_strrev
*
* Reverse a WCHARacter string in-place (strrev() is not available under unixen :-( ).
*/
static WCHAR * WCMD_strrev (WCHAR *buff) {
int r, i;
WCHAR b;
r = lstrlenW (buff);
for (i=0; i<r/2; i++) {
b = buff[i];
buff[i] = buff[r-i-1];
buff[r-i-1] = b;
}
return (buff);
}
/*****************************************************************************
* WCMD_filesize64
*
@ -92,7 +73,7 @@ static WCHAR * WCMD_filesize64 (ULONGLONG n) {
*p = '\0';
n = q;
} while (n != 0);
WCMD_strrev (buff);
wcsrev(buff);
return buff;
}