mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 05:52:57 +00:00
[REACTOS] Use the ISO C and C++ conformant names: _wcsicmp, _stricmp
Stop using non-conforming wcsicmp, stricmp, strcasecmp
This commit is contained in:
parent
fb9571ee3c
commit
e4930be4ff
87 changed files with 293 additions and 293 deletions
|
@ -399,12 +399,12 @@ GetPrinterDataExA(HANDLE hPrinter, LPCSTR pKeyName, LPCSTR pValueName, LPDWORD p
|
|||
}
|
||||
else if (*pType == REG_NONE)
|
||||
{
|
||||
if (cbUnicodeData == sizeof(OSVERSIONINFOW) && wcsicmp(pwszValueName, SPLREG_OS_VERSION) == 0)
|
||||
if (cbUnicodeData == sizeof(OSVERSIONINFOW) && _wcsicmp(pwszValueName, SPLREG_OS_VERSION) == 0)
|
||||
{
|
||||
// This is a Unicode OSVERSIONINFOW structure that needs to be converted to an ANSI OSVERSIONINFOA.
|
||||
*pcbNeeded = sizeof(OSVERSIONINFOA);
|
||||
}
|
||||
else if (cbUnicodeData == sizeof(OSVERSIONINFOEXW) && wcsicmp(pwszValueName, SPLREG_OS_VERSIONEX) == 0)
|
||||
else if (cbUnicodeData == sizeof(OSVERSIONINFOEXW) && _wcsicmp(pwszValueName, SPLREG_OS_VERSIONEX) == 0)
|
||||
{
|
||||
// This is a Unicode OSVERSIONINFOEXW structure that needs to be converted to an ANSI OSVERSIONINFOEXA.
|
||||
*pcbNeeded = sizeof(OSVERSIONINFOEXA);
|
||||
|
|
|
@ -3600,7 +3600,7 @@ StartDocDlgW( HANDLE hPrinter, DOCINFOW *doc )
|
|||
}
|
||||
|
||||
GetPrinterW(hPrinter, 5, (LPBYTE)pi5, len, &len);
|
||||
if (!pi5->pPortName || wcsicmp(pi5->pPortName, FILE_Port))
|
||||
if (!pi5->pPortName || _wcsicmp(pi5->pPortName, FILE_Port))
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, pi5);
|
||||
return NULL;
|
||||
|
@ -3608,7 +3608,7 @@ StartDocDlgW( HANDLE hPrinter, DOCINFOW *doc )
|
|||
HeapFree(GetProcessHeap(), 0, pi5);
|
||||
}
|
||||
|
||||
if (doc->lpszOutput == NULL || !wcsicmp(doc->lpszOutput, FILE_Port))
|
||||
if (doc->lpszOutput == NULL || !_wcsicmp(doc->lpszOutput, FILE_Port))
|
||||
{
|
||||
LPWSTR name;
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ DoesPortExist(PCWSTR pwszPortName)
|
|||
for (i = 0; i < dwReturned; i++)
|
||||
{
|
||||
// Check if this existing port matches our queried one.
|
||||
if (wcsicmp(p->pName, pwszPortName) == 0)
|
||||
if (_wcsicmp(p->pName, pwszPortName) == 0)
|
||||
{
|
||||
bReturnValue = TRUE;
|
||||
goto Cleanup;
|
||||
|
|
|
@ -424,7 +424,7 @@ static DWORD get_type_from_name(LPCWSTR name)
|
|||
if (!_wcsnicmp(name, portname_COM, ARRAY_SIZE(portname_COM) -1))
|
||||
return PORT_IS_COM;
|
||||
|
||||
if (!wcsicmp(name, portname_FILE))
|
||||
if (!_wcsicmp(name, portname_FILE))
|
||||
return PORT_IS_FILE;
|
||||
|
||||
if (name[0] == '/')
|
||||
|
|
|
@ -206,7 +206,7 @@ OpenPrintProcessor(PWSTR pPrinterName, PPRINTPROCESSOROPENDATA pPrintProcessorOp
|
|||
pHandle = DllAllocSplMem(sizeof(WINPRINT_HANDLE));
|
||||
|
||||
// Check what datatype was given.
|
||||
if (wcsicmp(pPrintProcessorOpenData->pDatatype, L"RAW") == 0)
|
||||
if (_wcsicmp(pPrintProcessorOpenData->pDatatype, L"RAW") == 0)
|
||||
{
|
||||
pHandle->Datatype = RAW;
|
||||
}
|
||||
|
|
|
@ -205,7 +205,7 @@ InitializeGlobalJobList(void)
|
|||
if (!IS_VALID_JOB_ID(dwJobID))
|
||||
continue;
|
||||
|
||||
if (wcsicmp(p, L".SHD") != 0)
|
||||
if (_wcsicmp(p, L".SHD") != 0)
|
||||
continue;
|
||||
|
||||
// This shadow file has a valid name. Construct the full path and try to load it.
|
||||
|
|
|
@ -83,17 +83,17 @@ _LocalGetPrintServerHandleData(PCWSTR pValueName, PDWORD pType, PBYTE pData, DWO
|
|||
{
|
||||
DWORD dwErrorCode;
|
||||
|
||||
if (wcsicmp(pValueName, SPLREG_DEFAULT_SPOOL_DIRECTORY) == 0 ||
|
||||
wcsicmp(pValueName, SPLREG_PORT_THREAD_PRIORITY) == 0 ||
|
||||
wcsicmp(pValueName, SPLREG_SCHEDULER_THREAD_PRIORITY) == 0 ||
|
||||
wcsicmp(pValueName, SPLREG_BEEP_ENABLED) == 0 ||
|
||||
wcsicmp(pValueName, SPLREG_ALLOW_USER_MANAGEFORMS) == 0)
|
||||
if (_wcsicmp(pValueName, SPLREG_DEFAULT_SPOOL_DIRECTORY) == 0 ||
|
||||
_wcsicmp(pValueName, SPLREG_PORT_THREAD_PRIORITY) == 0 ||
|
||||
_wcsicmp(pValueName, SPLREG_SCHEDULER_THREAD_PRIORITY) == 0 ||
|
||||
_wcsicmp(pValueName, SPLREG_BEEP_ENABLED) == 0 ||
|
||||
_wcsicmp(pValueName, SPLREG_ALLOW_USER_MANAGEFORMS) == 0)
|
||||
{
|
||||
*pcbNeeded = nSize;
|
||||
return (DWORD)RegQueryValueExW(hPrintersKey, pValueName, NULL, pType, pData, pcbNeeded);
|
||||
}
|
||||
else if (wcsicmp(pValueName, SPLREG_PORT_THREAD_PRIORITY_DEFAULT) == 0 ||
|
||||
wcsicmp(pValueName, SPLREG_SCHEDULER_THREAD_PRIORITY_DEFAULT) == 0)
|
||||
else if (_wcsicmp(pValueName, SPLREG_PORT_THREAD_PRIORITY_DEFAULT) == 0 ||
|
||||
_wcsicmp(pValueName, SPLREG_SCHEDULER_THREAD_PRIORITY_DEFAULT) == 0)
|
||||
{
|
||||
// Store a DWORD value as REG_NONE.
|
||||
*pType = REG_NONE;
|
||||
|
@ -105,12 +105,12 @@ _LocalGetPrintServerHandleData(PCWSTR pValueName, PDWORD pType, PBYTE pData, DWO
|
|||
*((PDWORD)pData) = 0;
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
else if (wcsicmp(pValueName, SPLREG_NET_POPUP) == 0 ||
|
||||
wcsicmp(pValueName, SPLREG_RETRY_POPUP) == 0 ||
|
||||
wcsicmp(pValueName, SPLREG_NET_POPUP_TO_COMPUTER) == 0 ||
|
||||
wcsicmp(pValueName, SPLREG_EVENT_LOG) == 0 ||
|
||||
wcsicmp(pValueName, SPLREG_RESTART_JOB_ON_POOL_ERROR) == 0 ||
|
||||
wcsicmp(pValueName, SPLREG_RESTART_JOB_ON_POOL_ENABLED) == 0)
|
||||
else if (_wcsicmp(pValueName, SPLREG_NET_POPUP) == 0 ||
|
||||
_wcsicmp(pValueName, SPLREG_RETRY_POPUP) == 0 ||
|
||||
_wcsicmp(pValueName, SPLREG_NET_POPUP_TO_COMPUTER) == 0 ||
|
||||
_wcsicmp(pValueName, SPLREG_EVENT_LOG) == 0 ||
|
||||
_wcsicmp(pValueName, SPLREG_RESTART_JOB_ON_POOL_ERROR) == 0 ||
|
||||
_wcsicmp(pValueName, SPLREG_RESTART_JOB_ON_POOL_ENABLED) == 0)
|
||||
{
|
||||
HKEY hKey;
|
||||
|
||||
|
@ -126,7 +126,7 @@ _LocalGetPrintServerHandleData(PCWSTR pValueName, PDWORD pType, PBYTE pData, DWO
|
|||
RegCloseKey(hKey);
|
||||
return dwErrorCode;
|
||||
}
|
||||
else if (wcsicmp(pValueName, SPLREG_MAJOR_VERSION) == 0)
|
||||
else if (_wcsicmp(pValueName, SPLREG_MAJOR_VERSION) == 0)
|
||||
{
|
||||
// Store a DWORD value as REG_NONE.
|
||||
*pType = REG_NONE;
|
||||
|
@ -138,7 +138,7 @@ _LocalGetPrintServerHandleData(PCWSTR pValueName, PDWORD pType, PBYTE pData, DWO
|
|||
*((PDWORD)pData) = dwSpoolerMajorVersion;
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
else if (wcsicmp(pValueName, SPLREG_MINOR_VERSION) == 0)
|
||||
else if (_wcsicmp(pValueName, SPLREG_MINOR_VERSION) == 0)
|
||||
{
|
||||
// Store a DWORD value as REG_NONE.
|
||||
*pType = REG_NONE;
|
||||
|
@ -150,7 +150,7 @@ _LocalGetPrintServerHandleData(PCWSTR pValueName, PDWORD pType, PBYTE pData, DWO
|
|||
*((PDWORD)pData) = dwSpoolerMinorVersion;
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
else if (wcsicmp(pValueName, SPLREG_ARCHITECTURE) == 0)
|
||||
else if (_wcsicmp(pValueName, SPLREG_ARCHITECTURE) == 0)
|
||||
{
|
||||
// Store a string as REG_NONE with the length of the environment name string.
|
||||
*pType = REG_NONE;
|
||||
|
@ -162,7 +162,7 @@ _LocalGetPrintServerHandleData(PCWSTR pValueName, PDWORD pType, PBYTE pData, DWO
|
|||
CopyMemory(pData, wszCurrentEnvironment, cbCurrentEnvironment);
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
else if (wcsicmp(pValueName, SPLREG_OS_VERSION) == 0)
|
||||
else if (_wcsicmp(pValueName, SPLREG_OS_VERSION) == 0)
|
||||
{
|
||||
POSVERSIONINFOW pInfo = (POSVERSIONINFOW)pData;
|
||||
|
||||
|
@ -177,7 +177,7 @@ _LocalGetPrintServerHandleData(PCWSTR pValueName, PDWORD pType, PBYTE pData, DWO
|
|||
GetVersionExW(pInfo);
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
else if (wcsicmp(pValueName, SPLREG_OS_VERSIONEX) == 0)
|
||||
else if (_wcsicmp(pValueName, SPLREG_OS_VERSIONEX) == 0)
|
||||
{
|
||||
POSVERSIONINFOEXW pInfo = (POSVERSIONINFOEXW)pData;
|
||||
|
||||
|
@ -192,7 +192,7 @@ _LocalGetPrintServerHandleData(PCWSTR pValueName, PDWORD pType, PBYTE pData, DWO
|
|||
GetVersionExW((POSVERSIONINFOW)pInfo);
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
else if (wcsicmp(pValueName, SPLREG_DS_PRESENT) == 0)
|
||||
else if (_wcsicmp(pValueName, SPLREG_DS_PRESENT) == 0)
|
||||
{
|
||||
PDSROLE_PRIMARY_DOMAIN_INFO_BASIC pInfo;
|
||||
|
||||
|
@ -215,7 +215,7 @@ _LocalGetPrintServerHandleData(PCWSTR pValueName, PDWORD pType, PBYTE pData, DWO
|
|||
DsRoleFreeMemory(pInfo);
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
else if (wcsicmp(pValueName, SPLREG_DS_PRESENT_FOR_USER) == 0)
|
||||
else if (_wcsicmp(pValueName, SPLREG_DS_PRESENT_FOR_USER) == 0)
|
||||
{
|
||||
DWORD cch;
|
||||
PWSTR p;
|
||||
|
@ -258,7 +258,7 @@ _LocalGetPrintServerHandleData(PCWSTR pValueName, PDWORD pType, PBYTE pData, DWO
|
|||
*((PDWORD)pData) = (wcscmp(wszUserSam, wszComputerName) != 0);
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
else if (wcsicmp(pValueName, SPLREG_REMOTE_FAX) == 0)
|
||||
else if (_wcsicmp(pValueName, SPLREG_REMOTE_FAX) == 0)
|
||||
{
|
||||
// Store a DWORD value as REG_NONE.
|
||||
*pType = REG_NONE;
|
||||
|
@ -270,7 +270,7 @@ _LocalGetPrintServerHandleData(PCWSTR pValueName, PDWORD pType, PBYTE pData, DWO
|
|||
*((PDWORD)pData) = 1;
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
else if (wcsicmp(pValueName, SPLREG_DNS_MACHINE_NAME) == 0)
|
||||
else if (_wcsicmp(pValueName, SPLREG_DNS_MACHINE_NAME) == 0)
|
||||
{
|
||||
DWORD cchDnsName = 0;
|
||||
|
||||
|
@ -405,21 +405,21 @@ _LocalSetPrintServerHandleData(PCWSTR pValueName, DWORD Type, PBYTE pData, DWORD
|
|||
{
|
||||
DWORD dwErrorCode;
|
||||
|
||||
if (wcsicmp(pValueName, SPLREG_DEFAULT_SPOOL_DIRECTORY) == 0 ||
|
||||
wcsicmp(pValueName, SPLREG_PORT_THREAD_PRIORITY) == 0 ||
|
||||
wcsicmp(pValueName, SPLREG_SCHEDULER_THREAD_PRIORITY) == 0 ||
|
||||
wcsicmp(pValueName, SPLREG_BEEP_ENABLED) == 0 ||
|
||||
wcsicmp(pValueName, SPLREG_ALLOW_USER_MANAGEFORMS) == 0)
|
||||
if (_wcsicmp(pValueName, SPLREG_DEFAULT_SPOOL_DIRECTORY) == 0 ||
|
||||
_wcsicmp(pValueName, SPLREG_PORT_THREAD_PRIORITY) == 0 ||
|
||||
_wcsicmp(pValueName, SPLREG_SCHEDULER_THREAD_PRIORITY) == 0 ||
|
||||
_wcsicmp(pValueName, SPLREG_BEEP_ENABLED) == 0 ||
|
||||
_wcsicmp(pValueName, SPLREG_ALLOW_USER_MANAGEFORMS) == 0)
|
||||
{
|
||||
return (DWORD)RegSetValueExW(hPrintersKey, pValueName, 0, Type, pData, cbData);
|
||||
}
|
||||
else if (wcsicmp(pValueName, SPLREG_NET_POPUP) == 0 ||
|
||||
wcsicmp(pValueName, SPLREG_RETRY_POPUP) == 0 ||
|
||||
wcsicmp(pValueName, SPLREG_NET_POPUP_TO_COMPUTER) == 0 ||
|
||||
wcsicmp(pValueName, SPLREG_EVENT_LOG) == 0 ||
|
||||
wcsicmp(pValueName, SPLREG_RESTART_JOB_ON_POOL_ERROR) == 0 ||
|
||||
wcsicmp(pValueName, SPLREG_RESTART_JOB_ON_POOL_ENABLED) == 0 ||
|
||||
wcsicmp(pValueName, L"NoRemotePrinterDrivers") == 0)
|
||||
else if (_wcsicmp(pValueName, SPLREG_NET_POPUP) == 0 ||
|
||||
_wcsicmp(pValueName, SPLREG_RETRY_POPUP) == 0 ||
|
||||
_wcsicmp(pValueName, SPLREG_NET_POPUP_TO_COMPUTER) == 0 ||
|
||||
_wcsicmp(pValueName, SPLREG_EVENT_LOG) == 0 ||
|
||||
_wcsicmp(pValueName, SPLREG_RESTART_JOB_ON_POOL_ERROR) == 0 ||
|
||||
_wcsicmp(pValueName, SPLREG_RESTART_JOB_ON_POOL_ENABLED) == 0 ||
|
||||
_wcsicmp(pValueName, L"NoRemotePrinterDrivers") == 0)
|
||||
{
|
||||
HKEY hKey;
|
||||
|
||||
|
@ -434,7 +434,7 @@ _LocalSetPrintServerHandleData(PCWSTR pValueName, DWORD Type, PBYTE pData, DWORD
|
|||
RegCloseKey(hKey);
|
||||
return dwErrorCode;
|
||||
}
|
||||
else if (wcsicmp(pValueName, SPLREG_WEBSHAREMGMT) == 0)
|
||||
else if (_wcsicmp(pValueName, SPLREG_WEBSHAREMGMT) == 0)
|
||||
{
|
||||
WARN("Attempting to set WebShareMgmt, which is based on IIS and therefore not supported. Returning fake success!\n");
|
||||
return ERROR_SUCCESS;
|
||||
|
|
|
@ -93,7 +93,7 @@ _PrinterListCompareRoutine(PVOID FirstStruct, PVOID SecondStruct)
|
|||
PLOCAL_PRINTER A = (PLOCAL_PRINTER)FirstStruct;
|
||||
PLOCAL_PRINTER B = (PLOCAL_PRINTER)SecondStruct;
|
||||
|
||||
return wcsicmp(A->pwszPrinterName, B->pwszPrinterName);
|
||||
return _wcsicmp(A->pwszPrinterName, B->pwszPrinterName);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -406,7 +406,7 @@ _LocalEnumPrintersCheckName(DWORD Flags, PCWSTR Name, PWSTR pwszComputerName, PD
|
|||
// Print Provider Name or the local Computer Name.
|
||||
|
||||
// Compare with the Print Provider Name.
|
||||
if (wcsicmp(Name, wszPrintProviderInfo[0]) == 0)
|
||||
if (_wcsicmp(Name, wszPrintProviderInfo[0]) == 0)
|
||||
return ERROR_SUCCESS;
|
||||
|
||||
// Dismiss anything else.
|
||||
|
|
|
@ -89,7 +89,7 @@ FindDatatype(const PLOCAL_PRINT_PROCESSOR pPrintProcessor, PCWSTR pwszDatatype)
|
|||
|
||||
for (i = 0; i < pPrintProcessor->dwDatatypeCount; i++)
|
||||
{
|
||||
if (wcsicmp(pCurrentDatatype->pName, pwszDatatype) == 0)
|
||||
if (_wcsicmp(pCurrentDatatype->pName, pwszDatatype) == 0)
|
||||
return TRUE;
|
||||
|
||||
++pCurrentDatatype;
|
||||
|
@ -113,7 +113,7 @@ FindPrintProcessor(PCWSTR pwszName)
|
|||
{
|
||||
pPrintProcessor = CONTAINING_RECORD(pEntry, LOCAL_PRINT_PROCESSOR, Entry);
|
||||
|
||||
if (wcsicmp(pPrintProcessor->pwszName, pwszName) == 0)
|
||||
if (_wcsicmp(pPrintProcessor->pwszName, pwszName) == 0)
|
||||
return pPrintProcessor;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue