From 072dfb57e3037db3a35d3290625b7ea51ad39902 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 25 Sep 2000 23:30:56 +0000 Subject: [PATCH] Removed inclusion of wine/winestring.h from winbase.h and added it to the C files that need it. --- controls/listbox.c | 8 ++++---- controls/menu.c | 1 + dlls/advapi32/registry.c | 1 + dlls/advapi32/security.c | 1 + dlls/advapi32/service.c | 1 + dlls/comctl32/datetime.c | 1 + dlls/comctl32/header.c | 1 + dlls/comctl32/rebar.c | 7 +++++-- dlls/comctl32/status.c | 1 + dlls/comctl32/toolbar.c | 1 + dlls/comctl32/treeview.c | 1 + dlls/commdlg/filedlg.c | 1 + dlls/commdlg/filedlg95.c | 1 + dlls/commdlg/filedlgbrowser.c | 4 ++-- dlls/commdlg/finddlg32.c | 1 + dlls/commdlg/fontdlg.c | 1 + dlls/crtdll/mbstring.c | 1 + dlls/kernel/format_msg.c | 1 + dlls/mpr/wnet.c | 1 + dlls/msacm/driver.c | 1 + dlls/msacm/filter.c | 1 + dlls/msacm/format.c | 1 + dlls/msacm/internal.c | 2 +- dlls/msvideo/msvideo_main.c | 4 ++-- dlls/ole32/clipboard.c | 1 + dlls/ole32/compobj.c | 1 + dlls/ole32/filemoniker.c | 1 + dlls/ole32/ole2.c | 2 ++ dlls/ole32/storage32.c | 1 + dlls/oleaut32/typelib.c | 1 + dlls/shell32/shellpath.c | 1 + dlls/shell32/shv_item_cmenu.c | 4 ++-- dlls/shlwapi/path.c | 1 + dlls/ttydrv/graphics.c | 1 + dlls/version/info.c | 2 +- dlls/winmm/joystick.c | 1 + dlls/winmm/mmsystem.c | 1 + files/dos_fs.c | 21 ++++++++++++++------- files/profile.c | 1 + graphics/metafiledrv/text.c | 3 ++- graphics/win16drv/font.c | 3 ++- graphics/win16drv/text.c | 3 ++- include/winbase.h | 1 - loader/module.c | 1 + loader/ne/convert.c | 1 + loader/ne/resource.c | 4 ++-- memory/atom.c | 5 +++-- memory/environ.c | 4 ++-- memory/registry.c | 1 + memory/virtual.c | 1 + misc/cdrom.c | 1 + misc/comm.c | 8 ++++---- misc/cpu.c | 18 +++++++++--------- misc/main.c | 8 ++++---- misc/version.c | 1 + ole/ole2nls.c | 1 + scheduler/event.c | 1 + scheduler/mutex.c | 1 + scheduler/semaphore.c | 1 + scheduler/timer.c | 1 + win32/console.c | 1 + windows/clipboard.c | 1 + windows/defwnd.c | 1 + windows/dialog.c | 1 + windows/input.c | 1 + windows/msgbox.c | 1 + windows/sysparams.c | 1 + windows/user.c | 2 +- 68 files changed, 112 insertions(+), 49 deletions(-) diff --git a/controls/listbox.c b/controls/listbox.c index d270314fbc1..4358c79124a 100644 --- a/controls/listbox.c +++ b/controls/listbox.c @@ -843,20 +843,20 @@ static INT LISTBOX_FindString( WND *wnd, LB_DESCR *descr, INT start, #define CHECK_DRIVE(item) \ if ((item)->str[0] == '[') \ { \ - if (!lstrncmpiA( str, (item)->str+1, len )) return i; \ - if (((item)->str[1] == '-') && !lstrncmpiA(str,(item)->str+2,len)) \ + if (!strncasecmp( str, (item)->str+1, len )) return i; \ + if (((item)->str[1] == '-') && !strncasecmp(str,(item)->str+2,len)) \ return i; \ } INT len = strlen(str); for (i = start + 1; i < descr->nb_items; i++, item++) { - if (!lstrncmpiA( str, item->str, len )) return i; + if (!strncasecmp( str, item->str, len )) return i; CHECK_DRIVE(item); } for (i = 0, item = descr->items; i <= start; i++, item++) { - if (!lstrncmpiA( str, item->str, len )) return i; + if (!strncasecmp( str, item->str, len )) return i; CHECK_DRIVE(item); } #undef CHECK_DRIVE diff --git a/controls/menu.c b/controls/menu.c index ea2bc555a25..c5360432825 100644 --- a/controls/menu.c +++ b/controls/menu.c @@ -21,6 +21,7 @@ #include "wingdi.h" #include "wine/winbase16.h" #include "wine/winuser16.h" +#include "wine/winestring.h" #include "win.h" #include "task.h" #include "heap.h" diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c index ecc28a5a10e..2fe167860a1 100644 --- a/dlls/advapi32/registry.c +++ b/dlls/advapi32/registry.c @@ -21,6 +21,7 @@ #include "winerror.h" #include "wine/winbase16.h" #include "wine/unicode.h" +#include "wine/winestring.h" #include "heap.h" #include "server.h" #include "debugtools.h" diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c index 424b9aca969..7dbaf7bdeff 100644 --- a/dlls/advapi32/security.c +++ b/dlls/advapi32/security.c @@ -6,6 +6,7 @@ #include "windef.h" #include "winerror.h" +#include "wine/winestring.h" #include "heap.h" #include "ntddk.h" #include "ntsecapi.h" diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c index 56ca6a4c931..ecb425fd546 100644 --- a/dlls/advapi32/service.c +++ b/dlls/advapi32/service.c @@ -11,6 +11,7 @@ #include "winerror.h" #include "winreg.h" #include "wine/unicode.h" +#include "wine/winestring.h" #include "heap.h" #include "debugtools.h" diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c index 6d984d78c6b..b58b3bbbda5 100644 --- a/dlls/comctl32/datetime.c +++ b/dlls/comctl32/datetime.c @@ -18,6 +18,7 @@ #include "winbase.h" #include "wingdi.h" +#include "wine/winestring.h" #include "commctrl.h" #include "debugtools.h" diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c index 2a868c552ee..3906ac68415 100644 --- a/dlls/comctl32/header.c +++ b/dlls/comctl32/header.c @@ -23,6 +23,7 @@ #include "winbase.h" #include "wine/unicode.h" +#include "wine/winestring.h" #include "commctrl.h" #include "debugtools.h" diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c index 95be700e004..bc0e0f2be18 100644 --- a/dlls/comctl32/rebar.c +++ b/dlls/comctl32/rebar.c @@ -23,6 +23,7 @@ #include "winbase.h" #include "wingdi.h" #include "wine/unicode.h" +#include "wine/winestring.h" #include "commctrl.h" #include "debugtools.h" @@ -1512,8 +1513,10 @@ REBAR_SetBarInfo (HWND hwnd, WPARAM wParam, LPARAM lParam) if (lpInfo->fMask & RBIM_IMAGELIST) { infoPtr->himl = lpInfo->himl; if (infoPtr->himl) { - ImageList_GetIconSize (infoPtr->himl, &infoPtr->imageSize.cx, - &infoPtr->imageSize.cy); + INT cx, cy; + ImageList_GetIconSize (infoPtr->himl, &cx, &cy); + infoPtr->imageSize.cx = cx; + infoPtr->imageSize.cy = cy; } else { infoPtr->imageSize.cx = 0; diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c index d71555a4258..41028250d43 100644 --- a/dlls/comctl32/status.c +++ b/dlls/comctl32/status.c @@ -12,6 +12,7 @@ #include "winbase.h" #include "wine/unicode.h" +#include "wine/winestring.h" #include "commctrl.h" #include "debugtools.h" diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 5ab586f9c96..16d78f85224 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -34,6 +34,7 @@ #include "wingdi.h" #include "winuser.h" #include "wine/unicode.h" +#include "wine/winestring.h" #include "commctrl.h" #include "imagelist.h" #include "cache.h" diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 35fde6ff094..19e6a61c356 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -29,6 +29,7 @@ #include #include "winbase.h" #include "wingdi.h" +#include "wine/winestring.h" #include "commctrl.h" #include "comctl32.h" #include "debugtools.h" diff --git a/dlls/commdlg/filedlg.c b/dlls/commdlg/filedlg.c index 83d8a48e269..d45b07858ce 100644 --- a/dlls/commdlg/filedlg.c +++ b/dlls/commdlg/filedlg.c @@ -14,6 +14,7 @@ #include "wine/winbase16.h" #include "wine/winuser16.h" #include "wine/unicode.h" +#include "wine/winestring.h" #include "ldt.h" #include "heap.h" #include "commdlg.h" diff --git a/dlls/commdlg/filedlg95.c b/dlls/commdlg/filedlg95.c index 599ae562edb..b091083fbeb 100644 --- a/dlls/commdlg/filedlg95.c +++ b/dlls/commdlg/filedlg95.c @@ -26,6 +26,7 @@ #include "winbase.h" #include "ntddk.h" +#include "wine/winestring.h" #include "ldt.h" #include "heap.h" #include "commdlg.h" diff --git a/dlls/commdlg/filedlgbrowser.c b/dlls/commdlg/filedlgbrowser.c index 0c26c928829..3549c1180a4 100644 --- a/dlls/commdlg/filedlgbrowser.c +++ b/dlls/commdlg/filedlgbrowser.c @@ -10,14 +10,14 @@ #include "windef.h" #include "wingdi.h" #include "winuser.h" +#include "wine/winestring.h" #include "heap.h" #include "shlguid.h" #include "wine/obj_dataobject.h" #include "debugtools.h" #include "cdlg.h" -#include "wine/undocshell.h" -DEFAULT_DEBUG_CHANNEL(commdlg) +DEFAULT_DEBUG_CHANNEL(commdlg); /************************************************************************** * Structure diff --git a/dlls/commdlg/finddlg32.c b/dlls/commdlg/finddlg32.c index a6da9a21c01..82fab835e85 100644 --- a/dlls/commdlg/finddlg32.c +++ b/dlls/commdlg/finddlg32.c @@ -9,6 +9,7 @@ #include "windef.h" #include "wingdi.h" #include "winuser.h" +#include "wine/winestring.h" #include "commdlg.h" #include "cderr.h" #include "dlgs.h" diff --git a/dlls/commdlg/fontdlg.c b/dlls/commdlg/fontdlg.c index d698789d91b..92edc987b12 100644 --- a/dlls/commdlg/fontdlg.c +++ b/dlls/commdlg/fontdlg.c @@ -14,6 +14,7 @@ #include "wingdi.h" #include "wine/winbase16.h" #include "wine/winuser16.h" +#include "wine/winestring.h" #include "ldt.h" #include "heap.h" #include "commdlg.h" diff --git a/dlls/crtdll/mbstring.c b/dlls/crtdll/mbstring.c index 71e0db35616..4927d21d193 100644 --- a/dlls/crtdll/mbstring.c +++ b/dlls/crtdll/mbstring.c @@ -6,6 +6,7 @@ #include "windef.h" #include "winbase.h" +#include "winnls.h" #include "crtdll.h" diff --git a/dlls/kernel/format_msg.c b/dlls/kernel/format_msg.c index eab792227fc..316f78a9694 100644 --- a/dlls/kernel/format_msg.c +++ b/dlls/kernel/format_msg.c @@ -14,6 +14,7 @@ #include "winerror.h" #include "winnls.h" #include "wine/unicode.h" +#include "wine/winestring.h" #include "heap.h" #include "debugtools.h" diff --git a/dlls/mpr/wnet.c b/dlls/mpr/wnet.c index 66c534ccbbb..a44dd40b72d 100644 --- a/dlls/mpr/wnet.c +++ b/dlls/mpr/wnet.c @@ -9,6 +9,7 @@ #include #include "winbase.h" +#include "wine/winestring.h" #include "winnetwk.h" #include "drive.h" #include "heap.h" diff --git a/dlls/msacm/driver.c b/dlls/msacm/driver.c index 574dbd6ed6d..abca6696460 100644 --- a/dlls/msacm/driver.c +++ b/dlls/msacm/driver.c @@ -14,6 +14,7 @@ #include "windef.h" #include "wingdi.h" #include "winuser.h" +#include "wine/winestring.h" #include "debugtools.h" #include "heap.h" #include "mmsystem.h" diff --git a/dlls/msacm/filter.c b/dlls/msacm/filter.c index 10723909b47..54613be8f88 100644 --- a/dlls/msacm/filter.c +++ b/dlls/msacm/filter.c @@ -8,6 +8,7 @@ #include "winbase.h" #include "winerror.h" +#include "wine/winestring.h" #include "mmsystem.h" #include "msacm.h" #include "msacmdrv.h" diff --git a/dlls/msacm/format.c b/dlls/msacm/format.c index 6b8cdeace8e..8d28e47166f 100644 --- a/dlls/msacm/format.c +++ b/dlls/msacm/format.c @@ -12,6 +12,7 @@ #include "windef.h" #include "wingdi.h" #include "winuser.h" +#include "wine/winestring.h" #include "debugtools.h" #include "mmsystem.h" #include "msacm.h" diff --git a/dlls/msacm/internal.c b/dlls/msacm/internal.c index 8c8c51aae1a..2479368294c 100644 --- a/dlls/msacm/internal.c +++ b/dlls/msacm/internal.c @@ -81,7 +81,7 @@ void MSACM_RegisterAllDrivers(void) if (GetPrivateProfileSectionA("drivers32", pszBuffer, dwBufferLength, "system.ini")) { char* s = pszBuffer; while (*s) { - if (!lstrncmpiA("MSACM.", s, 6)) { + if (!strncasecmp("MSACM.", s, 6)) { char *s2 = s; while (*s2 != '\0' && *s2 != '=') s2++; if (*s2) { diff --git a/dlls/msvideo/msvideo_main.c b/dlls/msvideo/msvideo_main.c index 4fe0b845927..2dccfc47fbc 100644 --- a/dlls/msvideo/msvideo_main.c +++ b/dlls/msvideo/msvideo_main.c @@ -71,7 +71,7 @@ BOOL VFWAPI ICInfo( if (GetPrivateProfileStringA("drivers32",NULL,NULL,buf,2000,"system.ini")) { char *s = buf; while (*s) { - if (!lstrncmpiA(type,s,4)) { + if (!strncasecmp(type,s,4)) { if(!fccHandler--) { lpicinfo->fccHandler = mmioStringToFOURCCA(s+5,0); return TRUE; @@ -280,7 +280,7 @@ HIC VFWAPI ICLocate( if (GetPrivateProfileSectionA("drivers32",pszBuffer,1024,"system.ini")) { char* s = pszBuffer; while (*s) { - if (!lstrncmpiA(type,s,5)) { + if (!strncasecmp(type,s,5)) { char *s2 = s; while (*s2 != '\0' && *s2 != '.') s2++; if (*s2) { diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c index ef433027dab..7d244a7ee8f 100644 --- a/dlls/ole32/clipboard.c +++ b/dlls/ole32/clipboard.c @@ -51,6 +51,7 @@ #include "winuser.h" #include "winbase.h" #include "winerror.h" +#include "wine/winestring.h" #include "ole2.h" #include "debugtools.h" #include "olestd.h" diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index f25953bce27..864966ffc00 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -18,6 +18,7 @@ #include "wingdi.h" #include "wine/winbase16.h" #include "winerror.h" +#include "wine/winestring.h" #include "wownt32.h" #include "ole2ver.h" #include "debugtools.h" diff --git a/dlls/ole32/filemoniker.c b/dlls/ole32/filemoniker.c index 17aaaa38630..7aa9f9f4c36 100644 --- a/dlls/ole32/filemoniker.c +++ b/dlls/ole32/filemoniker.c @@ -8,6 +8,7 @@ #include "winbase.h" #include "winerror.h" #include "wine/unicode.h" +#include "wine/winestring.h" #include "debugtools.h" #include "objbase.h" #include "wine/obj_storage.h" diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c index e3372a2c27a..1cdfd4e3ee4 100644 --- a/dlls/ole32/ole2.c +++ b/dlls/ole32/ole2.c @@ -12,6 +12,7 @@ #include #include "windef.h" +#include "winbase.h" #include "wingdi.h" #include "winuser.h" #include "winerror.h" @@ -20,6 +21,7 @@ #include "wine/obj_clientserver.h" #include "wine/winbase16.h" #include "wine/wingdi16.h" +#include "wine/winestring.h" #include "debugtools.h" #include "ole2ver.h" #include "winreg.h" diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 52828da7346..aa729f5849b 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -18,6 +18,7 @@ #include "winbase.h" /* for lstrlenW() and the likes */ #include "winnls.h" #include "wine/unicode.h" +#include "wine/winestring.h" #include "debugtools.h" #include "storage32.h" diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 4a0718cf153..52f0f9ba809 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -31,6 +31,7 @@ #include "winerror.h" #include "winreg.h" /* for HKEY_LOCAL_MACHINE */ #include "winnls.h" /* for PRIMARYLANGID */ +#include "wine/winestring.h" #include "heap.h" #include "wine/obj_base.h" #include "debugtools.h" diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index 9fe7c30ac5d..9943a269da4 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -14,6 +14,7 @@ #include "shell32_main.h" #include "windef.h" #include "options.h" +#include "wine/winestring.h" #include "wine/undocshell.h" #include "wine/unicode.h" #include "shlwapi.h" diff --git a/dlls/shell32/shv_item_cmenu.c b/dlls/shell32/shv_item_cmenu.c index 66232bcef61..dda43bb97c1 100644 --- a/dlls/shell32/shv_item_cmenu.c +++ b/dlls/shell32/shv_item_cmenu.c @@ -10,6 +10,7 @@ #include "pidl.h" #include "shlguid.h" +#include "wine/winestring.h" #include "wine/obj_base.h" #include "wine/obj_contextmenu.h" #include "wine/obj_shellbrowser.h" @@ -18,9 +19,8 @@ #include "shell32_main.h" #include "shellfolder.h" -#include "shell.h" /* DROPFILESTRUCT */ -DEFAULT_DEBUG_CHANNEL(shell) +DEFAULT_DEBUG_CHANNEL(shell); /************************************************************************** * IContextMenu Implementation diff --git a/dlls/shlwapi/path.c b/dlls/shlwapi/path.c index 89533eca594..40225a00e63 100644 --- a/dlls/shlwapi/path.c +++ b/dlls/shlwapi/path.c @@ -8,6 +8,7 @@ #include "winerror.h" #include "wine/unicode.h" #include "wine/undocshell.h" +#include "wine/winestring.h" #include "shlwapi.h" #include "debugtools.h" diff --git a/dlls/ttydrv/graphics.c b/dlls/ttydrv/graphics.c index 049bd88222a..7e404e47d8c 100644 --- a/dlls/ttydrv/graphics.c +++ b/dlls/ttydrv/graphics.c @@ -6,6 +6,7 @@ #include "config.h" +#include "wine/winestring.h" #include "dc.h" #include "heap.h" #include "debugtools.h" diff --git a/dlls/version/info.c b/dlls/version/info.c index 185e5b1808d..ffc06d0e2dd 100644 --- a/dlls/version/info.c +++ b/dlls/version/info.c @@ -384,7 +384,7 @@ static VS_VERSION_INFO_STRUCT16 *VersionInfo16_FindChild( VS_VERSION_INFO_STRUCT while ( (DWORD)child < (DWORD)info + info->wLength ) { - if ( !lstrncmpiA( child->szKey, szKey, cbKey ) ) + if ( !strncasecmp( child->szKey, szKey, cbKey ) ) return child; if (!(child->wLength)) return NULL; diff --git a/dlls/winmm/joystick.c b/dlls/winmm/joystick.c index ed89597035b..4a68060b834 100644 --- a/dlls/winmm/joystick.c +++ b/dlls/winmm/joystick.c @@ -18,6 +18,7 @@ #include "winbase.h" #include "wingdi.h" #include "winuser.h" +#include "wine/winestring.h" #include "winemm.h" #include "debugtools.h" diff --git a/dlls/winmm/mmsystem.c b/dlls/winmm/mmsystem.c index 40487058e78..eb73cd00cbc 100644 --- a/dlls/winmm/mmsystem.c +++ b/dlls/winmm/mmsystem.c @@ -24,6 +24,7 @@ #include "wingdi.h" #include "wine/winbase16.h" #include "wine/winuser16.h" +#include "wine/winestring.h" #include "heap.h" #include "winemm.h" #include "syslevel.h" diff --git a/files/dos_fs.c b/files/dos_fs.c index d7a6bcdd5f9..73d9954ffa3 100644 --- a/files/dos_fs.c +++ b/files/dos_fs.c @@ -25,6 +25,7 @@ #include "ntddk.h" #include "wine/winbase16.h" #include "wine/unicode.h" +#include "wine/winestring.h" #include "winerror.h" #include "drive.h" #include "file.h" @@ -609,7 +610,7 @@ BOOL DOSFS_FindUnixName( LPCSTR path, LPCSTR name, LPSTR long_buf, } else { - if (!lstrncmpiA( long_name, name, len )) break; + if (!strncasecmp( long_name, name, len )) break; } } if (dos_name[0]) @@ -660,7 +661,7 @@ const DOS_DEVICE *DOSFS_GetDevice( const char *name ) for (i = 0; i < sizeof(DOSFS_Devices)/sizeof(DOSFS_Devices[0]); i++) { const char *dev = DOSFS_Devices[i].name; - if (!lstrncmpiA( dev, name, strlen(dev) )) + if (!strncasecmp( dev, name, strlen(dev) )) { p = name + strlen( dev ); if (!*p || (*p == '.')) return &DOSFS_Devices[i]; @@ -711,7 +712,7 @@ HFILE DOSFS_OpenDevice( const char *name, DWORD access ) for (i = 0; i < sizeof(DOSFS_Devices)/sizeof(DOSFS_Devices[0]); i++) { const char *dev = DOSFS_Devices[i].name; - if (!lstrncmpiA( dev, name, strlen(dev) )) + if (!strncasecmp( dev, name, strlen(dev) )) { p = name + strlen( dev ); if (!*p || (*p == '.')) { @@ -1606,8 +1607,11 @@ HANDLE WINAPI FindFirstFileExW( dataW->ftLastWriteTime = dataA.ftLastWriteTime; dataW->nFileSizeHigh = dataA.nFileSizeHigh; dataW->nFileSizeLow = dataA.nFileSizeLow; - lstrcpyAtoW( dataW->cFileName, dataA.cFileName ); - lstrcpyAtoW( dataW->cAlternateFileName, dataA.cAlternateFileName ); + MultiByteToWideChar( CP_ACP, 0, dataA.cFileName, -1, + dataW->cFileName, sizeof(dataW->cFileName)/sizeof(WCHAR) ); + MultiByteToWideChar( CP_ACP, 0, dataA.cAlternateFileName, -1, + dataW->cAlternateFileName, + sizeof(dataW->cAlternateFileName)/sizeof(WCHAR) ); } break; default: @@ -1670,8 +1674,11 @@ BOOL WINAPI FindNextFileW( HANDLE handle, WIN32_FIND_DATAW *data ) data->ftLastWriteTime = dataA.ftLastWriteTime; data->nFileSizeHigh = dataA.nFileSizeHigh; data->nFileSizeLow = dataA.nFileSizeLow; - lstrcpyAtoW( data->cFileName, dataA.cFileName ); - lstrcpyAtoW( data->cAlternateFileName, dataA.cAlternateFileName ); + MultiByteToWideChar( CP_ACP, 0, dataA.cFileName, -1, + data->cFileName, sizeof(data->cFileName)/sizeof(WCHAR) ); + MultiByteToWideChar( CP_ACP, 0, dataA.cAlternateFileName, -1, + data->cAlternateFileName, + sizeof(data->cAlternateFileName)/sizeof(WCHAR) ); return TRUE; } diff --git a/files/profile.c b/files/profile.c index bdbd121de21..d9d50ab8b52 100644 --- a/files/profile.c +++ b/files/profile.c @@ -17,6 +17,7 @@ #include "winbase.h" #include "winerror.h" #include "wine/winbase16.h" +#include "wine/winestring.h" #include "windef.h" #include "winnls.h" #include "winreg.h" diff --git a/graphics/metafiledrv/text.c b/graphics/metafiledrv/text.c index 16e6624186c..ed13b225731 100644 --- a/graphics/metafiledrv/text.c +++ b/graphics/metafiledrv/text.c @@ -8,11 +8,12 @@ #include #include "windef.h" +#include "wine/winestring.h" #include "metafiledrv.h" #include "debugtools.h" #include "heap.h" -DEFAULT_DEBUG_CHANNEL(metafile) +DEFAULT_DEBUG_CHANNEL(metafile); /****************************************************************** diff --git a/graphics/win16drv/font.c b/graphics/win16drv/font.c index 7bfa514c691..770ccf303a5 100644 --- a/graphics/win16drv/font.c +++ b/graphics/win16drv/font.c @@ -7,6 +7,7 @@ #include #include "wine/winbase16.h" +#include "wine/winestring.h" #include "win16drv.h" #include "module.h" #include "font.h" @@ -14,7 +15,7 @@ #include "dc.h" #include "debugtools.h" -DEFAULT_DEBUG_CHANNEL(win16drv) +DEFAULT_DEBUG_CHANNEL(win16drv); /*********************************************************************** diff --git a/graphics/win16drv/text.c b/graphics/win16drv/text.c index d9374cd5ca8..9b496dcfb83 100644 --- a/graphics/win16drv/text.c +++ b/graphics/win16drv/text.c @@ -11,8 +11,9 @@ #include "gdi.h" #include "debugtools.h" #include "winbase.h" +#include "wine/winestring.h" -DEFAULT_DEBUG_CHANNEL(win16drv) +DEFAULT_DEBUG_CHANNEL(win16drv); /*********************************************************************** * WIN16DRV_ExtTextOut diff --git a/include/winbase.h b/include/winbase.h index 82343f5dea0..7555348eb9c 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -3,7 +3,6 @@ #include "basetsd.h" #include "winnt.h" -#include "wine/winestring.h" #include "pshpack1.h" diff --git a/loader/module.c b/loader/module.c index 4ce12021c4f..cc641efb5bf 100644 --- a/loader/module.c +++ b/loader/module.c @@ -12,6 +12,7 @@ #include #include #include "wine/winbase16.h" +#include "wine/winestring.h" #include "winerror.h" #include "heap.h" #include "neexe.h" diff --git a/loader/ne/convert.c b/loader/ne/convert.c index 0db74d23c11..6e8038e4d13 100644 --- a/loader/ne/convert.c +++ b/loader/ne/convert.c @@ -9,6 +9,7 @@ #include "wingdi.h" #include "wine/winuser16.h" #include "wine/unicode.h" +#include "wine/winestring.h" #include "module.h" #include "debugtools.h" diff --git a/loader/ne/resource.c b/loader/ne/resource.c index 0a8cc23b9dc..7bc1d25778b 100644 --- a/loader/ne/resource.c +++ b/loader/ne/resource.c @@ -117,7 +117,7 @@ NE_TYPEINFO *NE_FindTypeSection( LPBYTE pResTab, if (!(pTypeInfo->type_id & 0x8000)) { BYTE *p = pResTab + pTypeInfo->type_id; - if ((*p == len) && !lstrncmpiA( p+1, str, len )) + if ((*p == len) && !strncasecmp( p+1, str, len )) { TRACE(" Found type '%s'\n", str ); return pTypeInfo; @@ -164,7 +164,7 @@ NE_NAMEINFO *NE_FindResourceFromType( LPBYTE pResTab, { if (pNameInfo->id & 0x8000) continue; p = pResTab + pNameInfo->id; - if ((*p == len) && !lstrncmpiA( p+1, str, len )) + if ((*p == len) && !strncasecmp( p+1, str, len )) return pNameInfo; } } diff --git a/memory/atom.c b/memory/atom.c index ee5c473904f..2d634241aa6 100644 --- a/memory/atom.c +++ b/memory/atom.c @@ -17,6 +17,7 @@ #include #include "windef.h" +#include "winnls.h" #include "wine/winbase16.h" #include "wine/unicode.h" #include "winerror.h" @@ -258,7 +259,7 @@ ATOM WINAPI AddAtom16( LPCSTR str ) { entryPtr = ATOM_MakePtr( entry ); if ((entryPtr->length == len) && - (!lstrncmpiA( entryPtr->str, buffer, len ))) + (!strncasecmp( entryPtr->str, buffer, len ))) { entryPtr->refCount++; TRACE("-- existing 0x%x\n", entry); @@ -347,7 +348,7 @@ ATOM WINAPI FindAtom16( LPCSTR str ) { ATOMENTRY * entryPtr = ATOM_MakePtr( entry ); if ((entryPtr->length == len) && - (!lstrncmpiA( entryPtr->str, str, len ))) + (!strncasecmp( entryPtr->str, str, len ))) { TRACE("-- found %x\n", entry); return HANDLETOATOM( entry ); diff --git a/memory/environ.c b/memory/environ.c index 7353b951136..380c8d839b8 100644 --- a/memory/environ.c +++ b/memory/environ.c @@ -95,7 +95,7 @@ static LPCSTR ENV_FindVariable( LPCSTR env, LPCSTR name, INT len ) { while (*env) { - if (!lstrncmpiA( name, env, len ) && (env[len] == '=')) + if (!strncasecmp( name, env, len ) && (env[len] == '=')) return env + len + 1; env += strlen(env) + 1; } @@ -284,7 +284,7 @@ BOOL WINAPI SetEnvironmentVariableA( LPCSTR name, LPCSTR value ) len = strlen(name); while (*p) { - if (!lstrncmpiA( name, p, len ) && (p[len] == '=')) break; + if (!strncasecmp( name, p, len ) && (p[len] == '=')) break; p += strlen(p) + 1; } if (!value && !*p) goto done; /* Value to remove doesn't exist */ diff --git a/memory/registry.c b/memory/registry.c index ecc28a5a10e..2fe167860a1 100644 --- a/memory/registry.c +++ b/memory/registry.c @@ -21,6 +21,7 @@ #include "winerror.h" #include "wine/winbase16.h" #include "wine/unicode.h" +#include "wine/winestring.h" #include "heap.h" #include "server.h" #include "debugtools.h" diff --git a/memory/virtual.c b/memory/virtual.c index 4d108e1aa47..97e5db603d0 100644 --- a/memory/virtual.c +++ b/memory/virtual.c @@ -20,6 +20,7 @@ #ifdef HAVE_SYS_MMAN_H #include #endif +#include "winnls.h" #include "winbase.h" #include "wine/exception.h" #include "wine/unicode.h" diff --git a/misc/cdrom.c b/misc/cdrom.c index b517845994d..adc7337c3fe 100644 --- a/misc/cdrom.c +++ b/misc/cdrom.c @@ -17,6 +17,7 @@ #include "drive.h" #include "debugtools.h" #include "winbase.h" +#include "wine/winestring.h" DEFAULT_DEBUG_CHANNEL(cdrom); diff --git a/misc/comm.c b/misc/comm.c index 1d91cc24ea5..c792be84ed9 100644 --- a/misc/comm.c +++ b/misc/comm.c @@ -359,7 +359,7 @@ BOOL16 WINAPI BuildCommDCB16(LPCSTR device, LPDCB16 lpdcb) TRACE("(%s), ptr %p\n", device, lpdcb); - if (!lstrncmpiA(device,"COM",3)) { + if (!strncasecmp(device,"COM",3)) { port = device[3] - '0'; @@ -456,7 +456,7 @@ INT16 WINAPI OpenComm16(LPCSTR device,UINT16 cbInQueue,UINT16 cbOutQueue) if (port-- == 0) ERR("BUG ! COM0 or LPT0 don't exist !\n"); - if (!lstrncmpiA(device,"COM",3)) { + if (!strncasecmp(device,"COM",3)) { TRACE("%s = %s\n", device, COM[port].devicename); @@ -519,7 +519,7 @@ INT16 WINAPI OpenComm16(LPCSTR device,UINT16 cbInQueue,UINT16 cbOutQueue) } } else - if (!lstrncmpiA(device,"LPT",3)) { + if (!strncasecmp(device,"LPT",3)) { if (!ValidLPTPort(port)) return IE_BADID; @@ -1478,7 +1478,7 @@ BOOL WINAPI BuildCommDCBAndTimeoutsA(LPCSTR device, LPDCB lpdcb, TRACE("(%s,%p,%p)\n",device,lpdcb,lptimeouts); - if (!lstrncmpiA(device,"COM",3)) { + if (!strncasecmp(device,"COM",3)) { port=device[3]-'0'; if (port--==0) { ERR("BUG! COM0 can't exists!.\n"); diff --git a/misc/cpu.c b/misc/cpu.c index eb27bfac46d..29eb6a6b661 100644 --- a/misc/cpu.c +++ b/misc/cpu.c @@ -102,7 +102,7 @@ VOID WINAPI GetSystemInfo( *s='\0'; /* 2.1 method */ - if (!lstrncmpiA(line, "cpu family",strlen("cpu family"))) { + if (!strncasecmp(line, "cpu family",strlen("cpu family"))) { if (isdigit (value[0])) { switch (value[0] - '0') { case 3: cachedsi.dwProcessorType = PROCESSOR_INTEL_386; @@ -128,7 +128,7 @@ VOID WINAPI GetSystemInfo( continue; } /* old 2.0 method */ - if (!lstrncmpiA(line, "cpu",strlen("cpu"))) { + if (!strncasecmp(line, "cpu",strlen("cpu"))) { if ( isdigit (value[0]) && value[1] == '8' && value[2] == '6' && value[3] == 0 ) { @@ -155,19 +155,19 @@ VOID WINAPI GetSystemInfo( RegSetValueExA(xhkey,"Identifier",0,REG_SZ,buf,strlen(buf)); continue; } - if (!lstrncmpiA(line,"fdiv_bug",strlen("fdiv_bug"))) { - if (!lstrncmpiA(value,"yes",3)) + if (!strncasecmp(line,"fdiv_bug",strlen("fdiv_bug"))) { + if (!strncasecmp(value,"yes",3)) PF[PF_FLOATING_POINT_PRECISION_ERRATA] = TRUE; continue; } - if (!lstrncmpiA(line,"fpu",strlen("fpu"))) { - if (!lstrncmpiA(value,"no",2)) + if (!strncasecmp(line,"fpu",strlen("fpu"))) { + if (!strncasecmp(value,"no",2)) PF[PF_FLOATING_POINT_EMULATED] = TRUE; continue; } - if (!lstrncmpiA(line,"processor",strlen("processor"))) { + if (!strncasecmp(line,"processor",strlen("processor"))) { /* processor number counts up...*/ int x; @@ -183,13 +183,13 @@ VOID WINAPI GetSystemInfo( RegCloseKey(xhkey); RegCreateKey16(hkey,buf,&xhkey); } - if (!lstrncmpiA(line,"stepping",strlen("stepping"))) { + if (!strncasecmp(line,"stepping",strlen("stepping"))) { int x; if (sscanf(value,"%d",&x)) cachedsi.wProcessorRevision = x; } - if (!lstrncmpiA(line,"flags",strlen("flags"))) { + if (!strncasecmp(line,"flags",strlen("flags"))) { if (strstr(value,"cx8")) PF[PF_COMPARE_EXCHANGE_DOUBLE] = TRUE; if (strstr(value,"mmx")) diff --git a/misc/main.c b/misc/main.c index 3a51ea1e9fe..6233840eaf8 100644 --- a/misc/main.c +++ b/misc/main.c @@ -61,7 +61,7 @@ void MAIN_ParseDebugOptions( const char *arg ) int j; for(j=0; j #include #include "winerror.h" +#include "winnls.h" #include "wine/unicode.h" #include "syslevel.h" #include "server.h" diff --git a/scheduler/mutex.c b/scheduler/mutex.c index c0d3a69df95..0816d8d2a13 100644 --- a/scheduler/mutex.c +++ b/scheduler/mutex.c @@ -7,6 +7,7 @@ #include #include #include "winerror.h" +#include "winnls.h" #include "wine/unicode.h" #include "server.h" diff --git a/scheduler/semaphore.c b/scheduler/semaphore.c index 650802665e7..0a5fee4e506 100644 --- a/scheduler/semaphore.c +++ b/scheduler/semaphore.c @@ -7,6 +7,7 @@ #include #include #include "winerror.h" +#include "winnls.h" #include "wine/unicode.h" #include "server.h" diff --git a/scheduler/timer.c b/scheduler/timer.c index fe8020e4e6f..5fc851fb53b 100644 --- a/scheduler/timer.c +++ b/scheduler/timer.c @@ -7,6 +7,7 @@ #include #include #include "winerror.h" +#include "winnls.h" #include "wine/unicode.h" #include "file.h" /* for FILETIME routines */ #include "server.h" diff --git a/win32/console.c b/win32/console.c index 643169e655a..7306f5493eb 100644 --- a/win32/console.c +++ b/win32/console.c @@ -39,6 +39,7 @@ #include "windef.h" #include "wingdi.h" #include "wine/winuser16.h" +#include "wine/winestring.h" #include "wine/keyboard16.h" #include "thread.h" #include "file.h" diff --git a/windows/clipboard.c b/windows/clipboard.c index bb449674480..0e9456203bf 100644 --- a/windows/clipboard.c +++ b/windows/clipboard.c @@ -28,6 +28,7 @@ #include "winuser.h" #include "wine/winuser16.h" #include "wine/winbase16.h" +#include "wine/winestring.h" #include "heap.h" #include "message.h" #include "task.h" diff --git a/windows/defwnd.c b/windows/defwnd.c index 5a7fc7eec03..c963586b20f 100644 --- a/windows/defwnd.c +++ b/windows/defwnd.c @@ -23,6 +23,7 @@ #include "winnls.h" #include "wine/unicode.h" #include "wine/winuser16.h" +#include "wine/winestring.h" DEFAULT_DEBUG_CHANNEL(win); diff --git a/windows/dialog.c b/windows/dialog.c index 560e5818867..dd8545b106c 100644 --- a/windows/dialog.c +++ b/windows/dialog.c @@ -17,6 +17,7 @@ #include "wine/winuser16.h" #include "wine/winbase16.h" #include "wine/unicode.h" +#include "wine/winestring.h" #include "dialog.h" #include "drive.h" #include "heap.h" diff --git a/windows/input.c b/windows/input.c index b8c6d4144a6..1030dbf3c08 100644 --- a/windows/input.c +++ b/windows/input.c @@ -20,6 +20,7 @@ #include "winuser.h" #include "wine/winbase16.h" #include "wine/winuser16.h" +#include "wine/winestring.h" #include "wine/keyboard16.h" #include "win.h" #include "heap.h" diff --git a/windows/msgbox.c b/windows/msgbox.c index a5598804989..6e54b1cbfb2 100644 --- a/windows/msgbox.c +++ b/windows/msgbox.c @@ -10,6 +10,7 @@ #include "wingdi.h" #include "wine/winbase16.h" #include "wine/winuser16.h" +#include "wine/winestring.h" #include "dlgs.h" #include "heap.h" #include "ldt.h" diff --git a/windows/sysparams.c b/windows/sysparams.c index c26989fb23a..41e4ad34636 100644 --- a/windows/sysparams.c +++ b/windows/sysparams.c @@ -12,6 +12,7 @@ #include "wingdi.h" #include "winreg.h" #include "wine/winuser16.h" +#include "wine/winestring.h" #include "winerror.h" #include "keyboard.h" diff --git a/windows/user.c b/windows/user.c index 3eea645d00f..fd0592265f1 100644 --- a/windows/user.c +++ b/windows/user.c @@ -10,6 +10,7 @@ #include "windef.h" #include "wingdi.h" #include "winuser.h" +#include "wine/winestring.h" #include "heap.h" #include "user.h" #include "task.h" @@ -24,7 +25,6 @@ #include "message.h" #include "module.h" #include "miscemu.h" -#include "shell.h" #include "sysmetrics.h" #include "callback.h" #include "local.h"