diff --git a/dlls/comctl32/comctl32undoc.c b/dlls/comctl32/comctl32undoc.c index d091d7b3707..5850435189f 100644 --- a/dlls/comctl32/comctl32undoc.c +++ b/dlls/comctl32/comctl32undoc.c @@ -20,12 +20,12 @@ #include "winbase.h" #include "winerror.h" +#include "wine/unicode.h" #include "objbase.h" #include "commctrl.h" -#include "crtdll.h" #include "debugtools.h" -DEFAULT_DEBUG_CHANNEL(commctrl) +DEFAULT_DEBUG_CHANNEL(commctrl); extern HANDLE COMCTL32_hHeap; /* handle to the private heap */ @@ -2128,7 +2128,7 @@ INT WINAPI COMCTL32_StrCSpnA( LPCSTR lpStr, LPCSTR lpSet) { * */ LPWSTR WINAPI COMCTL32_StrChrW( LPCWSTR lpStart, WORD wMatch) { - return CRTDLL_wcschr(lpStart, wMatch); + return strchrW(lpStart, wMatch); } /************************************************************************** @@ -2152,7 +2152,7 @@ INT WINAPI COMCTL32_StrCmpNIA( LPCSTR lpStr1, LPCSTR lpStr2, int nChar) { * */ INT WINAPI COMCTL32_StrCmpNW( LPCWSTR lpStr1, LPCWSTR lpStr2, int nChar) { - return CRTDLL_wcsncmp(lpStr1, lpStr2, nChar); + return strncmpW(lpStr1, lpStr2, nChar); } /************************************************************************** @@ -2193,7 +2193,7 @@ LPSTR WINAPI COMCTL32_StrStrA( LPCSTR lpFirst, LPCSTR lpSrch) { * */ LPWSTR WINAPI COMCTL32_StrStrW( LPCWSTR lpFirst, LPCWSTR lpSrch) { - return CRTDLL_wcsstr(lpFirst, lpSrch); + return strstrW(lpFirst, lpSrch); } /************************************************************************** @@ -2209,7 +2209,7 @@ INT WINAPI COMCTL32_StrSpnW( LPWSTR lpStr, LPWSTR lpSet) { /* while(*lpLoop) { if lpLoop++; } */ for(; (*lpLoop != 0); lpLoop++) - if( CRTDLL_wcschr(lpSet, *(WORD*)lpLoop)) + if( strchrW(lpSet, *(WORD*)lpLoop)) return (INT)(lpLoop-lpStr); return (INT)(lpLoop-lpStr); diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c index 8fae402c392..91d6f9a30fa 100644 --- a/dlls/ntdll/reg.c +++ b/dlls/ntdll/reg.c @@ -11,10 +11,10 @@ #include "debugtools.h" #include "winreg.h" #include "winerror.h" +#include "wine/unicode.h" #include "file.h" #include "server.h" #include "ntddk.h" -#include "crtdll.h" #include "ntdll_misc.h" DEFAULT_DEBUG_CHANNEL(ntdll); @@ -64,19 +64,19 @@ static BOOLEAN _NtKeyToWinKey( *KeyHandle = ObjectAttributes->RootDirectory; } else if((ObjectName->Length > (len=lstrlenW(KeyPath_HKLM))) - && (0==CRTDLL__wcsnicmp(ObjectName->Buffer,KeyPath_HKLM,len))) + && (0==strncmpiW(ObjectName->Buffer,KeyPath_HKLM,len))) { *KeyHandle = HKEY_LOCAL_MACHINE; } else if((ObjectName->Length > (len=lstrlenW(KeyPath_HKU))) - && (0==CRTDLL__wcsnicmp(ObjectName->Buffer,KeyPath_HKU,len))) + && (0==strncmpiW(ObjectName->Buffer,KeyPath_HKU,len))) { *KeyHandle = HKEY_USERS; } else if((ObjectName->Length > (len=lstrlenW(KeyPath_HCR))) - && (0==CRTDLL__wcsnicmp(ObjectName->Buffer,KeyPath_HCR,len))) + && (0==strncmpiW(ObjectName->Buffer,KeyPath_HCR,len))) { *KeyHandle = HKEY_CLASSES_ROOT; } else if((ObjectName->Length > (len=lstrlenW(KeyPath_HCC))) - && (0==CRTDLL__wcsnicmp(ObjectName->Buffer,KeyPath_HCC,len))) + && (0==strncmpiW(ObjectName->Buffer,KeyPath_HCC,len))) { *KeyHandle = HKEY_CURRENT_CONFIG; } else diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c index 7fbf4e04d69..2c6f5411501 100644 --- a/dlls/ole32/datacache.c +++ b/dlls/ole32/datacache.c @@ -38,6 +38,7 @@ #include "crtdll.h" #include "wine/obj_oleview.h" #include "wine/obj_cache.h" +#include "wine/unicode.h" #include "ole2.h" #include "debugtools.h" @@ -680,8 +681,8 @@ static BOOL DataCache_IsPresentationStream(const STATSTG *elem) return (elem->type == STGTY_STREAM) && (elem->cbSize.s.LowPart >= sizeof(PresentationDataHeader)) - && (CRTDLL_wcslen(name) == 11) - && (CRTDLL_wcsncmp(name, OlePres, 8) == 0) + && (strlenW(name) == 11) + && (strncmpW(name, OlePres, 8) == 0) && CRTDLL_iswdigit(name[8]) && CRTDLL_iswdigit(name[9]) && CRTDLL_iswdigit(name[10]); diff --git a/dlls/ole32/ole2nls.c b/dlls/ole32/ole2nls.c index d0721223d9e..1a98a15b59c 100644 --- a/dlls/ole32/ole2nls.c +++ b/dlls/ole32/ole2nls.c @@ -20,7 +20,6 @@ #include "winreg.h" #include "winerror.h" #include "debugtools.h" -#include "crtdll.h" #include "main.h" DEFAULT_DEBUG_CHANNEL(ole); diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c index 6373a8c46c2..59f17e6d2c5 100644 --- a/dlls/shell32/shellord.c +++ b/dlls/shell32/shellord.c @@ -13,7 +13,6 @@ #include "winnls.h" #include "winversion.h" #include "heap.h" -#include "crtdll.h" #include "shellapi.h" #include "shlobj.h" diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index a3e01a117cc..114dab94846 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -10,16 +10,16 @@ #include "winnls.h" #include "winversion.h" #include "winreg.h" -#include "crtdll.h" #include "shlobj.h" #include "shell32_main.h" #include "windef.h" #include "options.h" #include "wine/undocshell.h" +#include "wine/unicode.h" #include "shlwapi.h" -DEFAULT_DEBUG_CHANNEL(shell) +DEFAULT_DEBUG_CHANNEL(shell); /* Combining and Constructing paths @@ -128,28 +128,28 @@ LPWSTR WINAPI PathCombineW( if (!lpszFile || !lpszFile[0] || (lpszFile[0]==(WCHAR)'.' && !lpszFile[1]) ) { - CRTDLL_wcscpy(szDest,lpszDir); + strcpyW(szDest,lpszDir); return szDest; } /* if lpszFile is a complete path don't care about lpszDir */ if (PathGetDriveNumberW(lpszFile) != -1) { - CRTDLL_wcscpy(szDest,lpszFile); + strcpyW(szDest,lpszFile); } else if (lpszFile[0] == (WCHAR)'\\' ) { - CRTDLL_wcscpy(sTemp,lpszDir); + strcpyW(sTemp,lpszDir); PathStripToRootW(sTemp); - CRTDLL_wcscat(sTemp,lpszFile); - CRTDLL_wcscpy(szDest,sTemp); + strcatW(sTemp,lpszFile); + strcpyW(szDest,sTemp); } else { - CRTDLL_wcscpy(sTemp,lpszDir); + strcpyW(sTemp,lpszDir); PathAddBackslashW(sTemp); - CRTDLL_wcscat(sTemp,lpszFile); - CRTDLL_wcscpy(szDest,sTemp); + strcatW(sTemp,lpszFile); + strcpyW(szDest,sTemp); } return szDest; } @@ -196,7 +196,7 @@ LPWSTR WINAPI PathAddBackslashW(LPWSTR lpszPath) int len; TRACE("%p->%s\n",lpszPath,debugstr_w(lpszPath)); - len = CRTDLL_wcslen(lpszPath); + len = strlenW(lpszPath); if (len && lpszPath[len-1]!=(WCHAR)'\\') { lpszPath[len] = (WCHAR)'\\'; @@ -468,12 +468,12 @@ int WINAPI PathGetDriveNumberA(LPCSTR lpszPath) */ int WINAPI PathGetDriveNumberW(LPCWSTR lpszPath) { - int chr = CRTDLL_towlower(lpszPath[0]); + int chr = tolowerW(lpszPath[0]); TRACE ("%s\n",debugstr_w(lpszPath)); if (!lpszPath || lpszPath[1]!=':' || chr < 'a' || chr > 'z') return -1; - return tolower(lpszPath[0]) - 'a' ; + return tolowerW(lpszPath[0]) - 'a' ; } /************************************************************************* @@ -854,10 +854,10 @@ LPWSTR WINAPI PathRemoveBlanksW(LPWSTR str) while (*x==' ') x++; if (x!=str) - CRTDLL_wcscpy(str,x); + strcpyW(str,x); if (!*str) return str; - x=str+CRTDLL_wcslen(str)-1; + x=str+strlenW(str)-1; while (*x==' ') x--; if (*x==' ') @@ -931,7 +931,7 @@ VOID WINAPI PathUnquoteSpacesA(LPSTR str) */ VOID WINAPI PathUnquoteSpacesW(LPWSTR str) { - DWORD len = CRTDLL_wcslen(str); + DWORD len = strlenW(str); TRACE("%s\n",debugstr_w(str)); @@ -940,7 +940,7 @@ VOID WINAPI PathUnquoteSpacesW(LPWSTR str) if (str[len-1]!='"') return; str[len-1]='\0'; - CRTDLL_wcscpy(str,str+1); + strcpyW(str,str+1); return; } @@ -977,7 +977,7 @@ int WINAPI PathParseIconLocationA(LPSTR lpszPath) */ int WINAPI PathParseIconLocationW(LPWSTR lpszPath) { - LPWSTR lpstrComma = CRTDLL_wcschr(lpszPath, ','); + LPWSTR lpstrComma = strchrW(lpszPath, ','); FIXME("%s stub\n", debugstr_w(lpszPath)); @@ -1170,7 +1170,7 @@ BOOL WINAPI PathIsExeW (LPCWSTR lpszPath) TRACE("path=%s\n",debugstr_w(lpszPath)); for(i=0; lpszExtensions[i]; i++) - if (!CRTDLL__wcsicmp(lpszExtension,lpszExtensions[i])) return TRUE; + if (!strcmpiW(lpszExtension,lpszExtensions[i])) return TRUE; return FALSE; } @@ -1313,7 +1313,7 @@ static BOOL PathMatchSingleMaskW(LPCWSTR name, LPCWSTR mask) } while (*name++); return 0; } - if (CRTDLL_towupper(*mask)!=CRTDLL_towupper(*name) && *mask!='?') return 0; + if (toupperW(*mask)!=toupperW(*name) && *mask!='?') return 0; name++; mask++; } @@ -1428,7 +1428,7 @@ BOOL WINAPI PathIsSameRootW(LPCWSTR lpszPath1, LPCWSTR lpszPath2) if (PathIsRelativeW(lpszPath1) || PathIsRelativeW(lpszPath2)) return FALSE; /* usual path */ - if ( CRTDLL_towupper(lpszPath1[0])==CRTDLL_towupper(lpszPath2[0]) && + if ( toupperW(lpszPath1[0])==toupperW(lpszPath2[0]) && lpszPath1[1]==':' && lpszPath2[1]==':' && lpszPath1[2]=='\\' && lpszPath2[2]=='\\') return TRUE; @@ -1503,14 +1503,14 @@ BOOL WINAPI PathIsURLW(LPCWSTR lpstrPath) if(!lpstrPath) return FALSE; /* get protocol */ - lpstrRes = CRTDLL_wcschr(lpstrPath,':'); + lpstrRes = strchrW(lpstrPath,':'); if(!lpstrRes) return FALSE; iSize = lpstrRes - lpstrPath; while(SupportedProtocol[i]) { - if (iSize == CRTDLL_wcslen(SupportedProtocol[i])) - if(!CRTDLL__wcsnicmp(lpstrPath, SupportedProtocol[i], iSize)); + if (iSize == strlenW(SupportedProtocol[i])) + if(!strncmpiW(lpstrPath, SupportedProtocol[i], iSize)); return TRUE; i++; } diff --git a/dlls/shell32/shellreg.c b/dlls/shell32/shellreg.c index 9ca6f8d0259..450f0386dd6 100644 --- a/dlls/shell32/shellreg.c +++ b/dlls/shell32/shellreg.c @@ -9,7 +9,6 @@ #include "winnls.h" #include "winversion.h" #include "heap.h" -#include "crtdll.h" #include "shellapi.h" #include "shlobj.h" diff --git a/dlls/shell32/shellstring.c b/dlls/shell32/shellstring.c index b67f5b22b3b..746c93c7641 100644 --- a/dlls/shell32/shellstring.c +++ b/dlls/shell32/shellstring.c @@ -7,11 +7,11 @@ #include "winerror.h" #include "debugtools.h" #include "winversion.h" -#include "crtdll.h" #include "heap.h" #include "shellapi.h" #include "wine/undocshell.h" +#include "wine/unicode.h" DEFAULT_DEBUG_CHANNEL(shell); @@ -137,7 +137,7 @@ LPSTR WINAPI StrChrA (LPCSTR str, INT c) LPWSTR WINAPI StrChrW (LPWSTR str, WCHAR x ) { TRACE("%s 0x%04x\n",debugstr_w(str),x); - return CRTDLL_wcschr(str, x); + return strchrW(str, x); } /************************************************************************* @@ -155,7 +155,7 @@ INT WINAPI StrCmpNA ( LPCSTR str1, LPCSTR str2, INT len) INT WINAPI StrCmpNW ( LPCWSTR wstr1, LPCWSTR wstr2, INT len) { TRACE("%s %s %i stub\n", debugstr_w(wstr1),debugstr_w(wstr2),len); - return CRTDLL_wcsncmp(wstr1, wstr2, len); + return strncmpW(wstr1, wstr2, len); } /************************************************************************* @@ -173,7 +173,7 @@ int WINAPI StrCmpNIA ( LPCSTR str1, LPCSTR str2, int len) int WINAPI StrCmpNIW ( LPCWSTR wstr1, LPCWSTR wstr2, int len) { TRACE("%s %s %i stub\n", debugstr_w(wstr1),debugstr_w(wstr2),len); - return CRTDLL__wcsnicmp(wstr1, wstr2, len); + return strncmpiW(wstr1, wstr2, len); } /************************************************************************* @@ -229,7 +229,7 @@ LPWSTR WINAPI StrStrIW(LPCWSTR lpFirst, LPCWSTR lpSrch) while (*lpFirst) { LPCWSTR p1 = lpFirst, p2 = lpSrch; - while (*p1 && *p2 && CRTDLL_towupper(*p1) == CRTDLL_towupper(*p2)) { p1++; p2++; } + while (*p1 && *p2 && toupperW(*p1) == toupperW(*p2)) { p1++; p2++; } if (!*p2) return (LPWSTR)lpFirst; lpFirst++; } diff --git a/dlls/version/info.c b/dlls/version/info.c index 6f68156646a..5b2cfb49188 100644 --- a/dlls/version/info.c +++ b/dlls/version/info.c @@ -12,9 +12,9 @@ #include "winreg.h" #include "winver.h" #include "wine/winestring.h" +#include "wine/unicode.h" #include "winerror.h" #include "heap.h" -#include "crtdll.h" #include "debugtools.h" DEFAULT_DEBUG_CHANNEL(ver) @@ -404,7 +404,7 @@ static VS_VERSION_INFO_STRUCT32 *VersionInfo32_FindChild( VS_VERSION_INFO_STRUCT while ( (DWORD)child < (DWORD)info + info->wLength ) { - if ( !CRTDLL__wcsnicmp( child->szKey, szKey, cbKey ) ) + if ( !strncmpiW( child->szKey, szKey, cbKey ) ) return child; child = VersionInfo32_Next( child ); diff --git a/loader/pe_resource.c b/loader/pe_resource.c index 4379d3309fd..29f13c68387 100644 --- a/loader/pe_resource.c +++ b/loader/pe_resource.c @@ -13,6 +13,7 @@ #include #include #include "wine/winestring.h" +#include "wine/unicode.h" #include "windef.h" #include "winnls.h" #include "pe_image.h" @@ -22,7 +23,6 @@ #include "process.h" #include "stackframe.h" #include "neexe.h" -#include "crtdll.h" #include "debugtools.h" /********************************************************************** @@ -72,7 +72,7 @@ PIMAGE_RESOURCE_DIRECTORY GetResDirEntryW(PIMAGE_RESOURCE_DIRECTORY resdirptr, entryTable[entrynum].u1.s.NameOffset); if(namelen != str->Length) continue; - if(CRTDLL__wcsnicmp(name,str->NameString,str->Length)==0) + if(strncmpiW(name,str->NameString,str->Length)==0) return (PIMAGE_RESOURCE_DIRECTORY) ( root + entryTable[entrynum].u2.s.OffsetToDirectory); diff --git a/ole/ole2nls.c b/ole/ole2nls.c index 2f17ea1f721..bc65ddfc6ba 100644 --- a/ole/ole2nls.c +++ b/ole/ole2nls.c @@ -14,6 +14,7 @@ #include "windef.h" #include "wingdi.h" #include "winuser.h" +#include "wine/unicode.h" #include "heap.h" #include "options.h" #include "winver.h" @@ -21,7 +22,6 @@ #include "winreg.h" #include "winerror.h" #include "debugtools.h" -#include "crtdll.h" #include "main.h" DEFAULT_DEBUG_CHANNEL(ole); @@ -2939,8 +2939,7 @@ UINT WINAPI CompareStringW(DWORD lcid, DWORD fdwStyle, l1 = (l1==-1)?lstrlenW(s1):l1; l2 = (l2==-1)?lstrlenW(s2):l2; len = l1