From dc176dedf04383e1dd140e6ca8536d9b54a6d77f Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 12 Jun 2019 09:41:05 +0200 Subject: [PATCH] msctf: Build with msvcrt. Signed-off-by: Alexandre Julliard --- dlls/msctf/Makefile.in | 2 ++ dlls/msctf/categorymgr.c | 19 +++++++------------ dlls/msctf/compartmentmgr.c | 4 ---- dlls/msctf/context.c | 4 ---- dlls/msctf/documentmgr.c | 4 ---- dlls/msctf/inputprocessor.c | 28 ++++++++++++---------------- dlls/msctf/msctf.c | 2 -- dlls/msctf/range.c | 4 ---- dlls/msctf/threadmgr.c | 4 ---- 9 files changed, 21 insertions(+), 50 deletions(-) diff --git a/dlls/msctf/Makefile.in b/dlls/msctf/Makefile.in index 25bd3d035dc..a3c7e0c6fad 100644 --- a/dlls/msctf/Makefile.in +++ b/dlls/msctf/Makefile.in @@ -1,6 +1,8 @@ MODULE = msctf.dll IMPORTS = uuid ole32 oleaut32 user32 advapi32 +EXTRADLLFLAGS = -mno-cygwin + C_SRCS = \ categorymgr.c \ compartmentmgr.c \ diff --git a/dlls/msctf/categorymgr.c b/dlls/msctf/categorymgr.c index ad43833d621..f0ff896b3dd 100644 --- a/dlls/msctf/categorymgr.c +++ b/dlls/msctf/categorymgr.c @@ -18,8 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #define COBJMACROS @@ -33,7 +31,6 @@ #include "winerror.h" #include "objbase.h" -#include "wine/unicode.h" #include "msctf.h" #include "msctf_internal.h" @@ -115,7 +112,7 @@ static HRESULT WINAPI CategoryMgr_RegisterCategory ( ITfCategoryMgr *iface, TRACE("(%p) %s %s %s\n",This,debugstr_guid(rclsid), debugstr_guid(rcatid), debugstr_guid(rguid)); StringFromGUID2(rclsid, buf, 39); - sprintfW(fullkey,fmt,szwSystemTIPKey,buf); + swprintf(fullkey,ARRAY_SIZE(fullkey),fmt,szwSystemTIPKey,buf); if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,fullkey, 0, KEY_READ | KEY_WRITE, &tipkey ) != ERROR_SUCCESS) @@ -123,7 +120,7 @@ static HRESULT WINAPI CategoryMgr_RegisterCategory ( ITfCategoryMgr *iface, StringFromGUID2(rcatid, buf, 39); StringFromGUID2(rguid, buf2, 39); - sprintfW(fullkey,fmt2,ctg,ctg,buf,buf2); + swprintf(fullkey,ARRAY_SIZE(fullkey),fmt2,ctg,ctg,buf,buf2); res = RegCreateKeyExW(tipkey, fullkey, 0, NULL, 0, KEY_READ | KEY_WRITE, NULL, &catkey, NULL); @@ -131,7 +128,7 @@ static HRESULT WINAPI CategoryMgr_RegisterCategory ( ITfCategoryMgr *iface, if (!res) { - sprintfW(fullkey,fmt2,ctg,itm,buf2,buf); + swprintf(fullkey,ARRAY_SIZE(fullkey),fmt2,ctg,itm,buf2,buf); res = RegCreateKeyExW(tipkey, fullkey, 0, NULL, 0, KEY_READ | KEY_WRITE, NULL, &itmkey, NULL); @@ -163,7 +160,7 @@ static HRESULT WINAPI CategoryMgr_UnregisterCategory ( ITfCategoryMgr *iface, TRACE("(%p) %s %s %s\n",This,debugstr_guid(rclsid), debugstr_guid(rcatid), debugstr_guid(rguid)); StringFromGUID2(rclsid, buf, 39); - sprintfW(fullkey,fmt,szwSystemTIPKey,buf); + swprintf(fullkey,ARRAY_SIZE(fullkey),fmt,szwSystemTIPKey,buf); if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,fullkey, 0, KEY_READ | KEY_WRITE, &tipkey ) != ERROR_SUCCESS) @@ -171,11 +168,9 @@ static HRESULT WINAPI CategoryMgr_UnregisterCategory ( ITfCategoryMgr *iface, StringFromGUID2(rcatid, buf, 39); StringFromGUID2(rguid, buf2, 39); - sprintfW(fullkey,fmt2,ctg,ctg,buf,buf2); - - sprintfW(fullkey,fmt2,ctg,itm,buf2,buf); + swprintf(fullkey,ARRAY_SIZE(fullkey),fmt2,ctg,ctg,buf,buf2); RegDeleteTreeW(tipkey, fullkey); - sprintfW(fullkey,fmt2,ctg,itm,buf2,buf); + swprintf(fullkey,ARRAY_SIZE(fullkey),fmt2,ctg,itm,buf2,buf); RegDeleteTreeW(tipkey, fullkey); RegCloseKey(tipkey); @@ -216,7 +211,7 @@ static HRESULT WINAPI CategoryMgr_FindClosestCategory ( ITfCategoryMgr *iface, return E_INVALIDARG; StringFromGUID2(rguid, buf, 39); - sprintfW(fullkey,fmt,szwSystemTIPKey,buf,buf); + swprintf(fullkey,ARRAY_SIZE(fullkey),fmt,szwSystemTIPKey,buf,buf); *pcatid = GUID_NULL; if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,fullkey, 0, KEY_READ, &key ) != diff --git a/dlls/msctf/compartmentmgr.c b/dlls/msctf/compartmentmgr.c index 4fe7b82f94f..4cc25f3f9ab 100644 --- a/dlls/msctf/compartmentmgr.c +++ b/dlls/msctf/compartmentmgr.c @@ -18,8 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #define COBJMACROS @@ -35,8 +33,6 @@ #include "oleauto.h" #include "olectl.h" -#include "wine/unicode.h" - #include "msctf.h" #include "msctf_internal.h" diff --git a/dlls/msctf/context.c b/dlls/msctf/context.c index ff67d384565..85e3c5b5b06 100644 --- a/dlls/msctf/context.c +++ b/dlls/msctf/context.c @@ -18,8 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #define COBJMACROS @@ -34,8 +32,6 @@ #include "objbase.h" #include "olectl.h" -#include "wine/unicode.h" - #include "msctf.h" #include "msctf_internal.h" diff --git a/dlls/msctf/documentmgr.c b/dlls/msctf/documentmgr.c index 9fa6b0f0ddf..dd49cd022fa 100644 --- a/dlls/msctf/documentmgr.c +++ b/dlls/msctf/documentmgr.c @@ -18,8 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #define COBJMACROS @@ -33,8 +31,6 @@ #include "winerror.h" #include "objbase.h" -#include "wine/unicode.h" - #include "msctf.h" #include "msctf_internal.h" diff --git a/dlls/msctf/inputprocessor.c b/dlls/msctf/inputprocessor.c index fdeba38b377..7cb59f94460 100644 --- a/dlls/msctf/inputprocessor.c +++ b/dlls/msctf/inputprocessor.c @@ -18,8 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #define COBJMACROS @@ -34,8 +32,6 @@ #include "objbase.h" #include "olectl.h" -#include "wine/unicode.h" - #include "msctf.h" #include "msctf_internal.h" @@ -230,7 +226,7 @@ static void add_userkey( REFCLSID rclsid, LANGID langid, StringFromGUID2(rclsid, buf, 39); StringFromGUID2(guidProfile, buf2, 39); - sprintfW(fullkey,szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2); + swprintf(fullkey,ARRAY_SIZE(fullkey),szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2); res = RegCreateKeyExW(HKEY_CURRENT_USER,fullkey, 0, NULL, 0, KEY_READ | KEY_WRITE, NULL, &key, &disposition); @@ -303,7 +299,7 @@ static HRESULT WINAPI InputProcessorProfiles_Register( TRACE("(%p) %s\n",This,debugstr_guid(rclsid)); StringFromGUID2(rclsid, buf, 39); - sprintfW(fullkey,szwTipfmt,szwSystemTIPKey,buf); + swprintf(fullkey,ARRAY_SIZE(fullkey),szwTipfmt,szwSystemTIPKey,buf); if (RegCreateKeyExW(HKEY_LOCAL_MACHINE,fullkey, 0, NULL, 0, KEY_READ | KEY_WRITE, NULL, &tipkey, NULL) != ERROR_SUCCESS) @@ -324,7 +320,7 @@ static HRESULT WINAPI InputProcessorProfiles_Unregister( TRACE("(%p) %s\n",This,debugstr_guid(rclsid)); StringFromGUID2(rclsid, buf, 39); - sprintfW(fullkey,szwTipfmt,szwSystemTIPKey,buf); + swprintf(fullkey,ARRAY_SIZE(fullkey),szwTipfmt,szwSystemTIPKey,buf); RegDeleteTreeW(HKEY_LOCAL_MACHINE, fullkey); RegDeleteTreeW(HKEY_CURRENT_USER, fullkey); @@ -355,14 +351,14 @@ static HRESULT WINAPI InputProcessorProfiles_AddLanguageProfile( debugstr_wn(pchIconFile,cchFile),uIconIndex); StringFromGUID2(rclsid, buf, 39); - sprintfW(fullkey,szwTipfmt,szwSystemTIPKey,buf); + swprintf(fullkey,ARRAY_SIZE(fullkey),szwTipfmt,szwSystemTIPKey,buf); if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,fullkey, 0, KEY_READ | KEY_WRITE, &tipkey ) != ERROR_SUCCESS) return E_FAIL; StringFromGUID2(guidProfile, buf, 39); - sprintfW(fullkey,fmt2,szwLngp,langid,buf); + swprintf(fullkey,ARRAY_SIZE(fullkey),fmt2,szwLngp,langid,buf); res = RegCreateKeyExW(tipkey,fullkey, 0, NULL, 0, KEY_READ | KEY_WRITE, NULL, &fmtkey, &disposition); @@ -421,7 +417,7 @@ static HRESULT WINAPI InputProcessorProfiles_GetDefaultLanguageProfile( return E_INVALIDARG; StringFromGUID2(catid, buf, 39); - sprintfW(fullkey, szwDefaultFmt, szwSystemCTFKey, szwAssemblies, langid, buf); + swprintf(fullkey, ARRAY_SIZE(fullkey), szwDefaultFmt, szwSystemCTFKey, szwAssemblies, langid, buf); if (RegOpenKeyExW(HKEY_CURRENT_USER, fullkey, 0, KEY_READ | KEY_WRITE, &hkey ) != ERROR_SUCCESS) @@ -480,7 +476,7 @@ static HRESULT WINAPI InputProcessorProfiles_SetDefaultLanguageProfile( return E_FAIL; StringFromGUID2(&catid, buf, 39); - sprintfW(fullkey, szwDefaultFmt, szwSystemCTFKey, szwAssemblies, langid, buf); + swprintf(fullkey, ARRAY_SIZE(fullkey), szwDefaultFmt, szwSystemCTFKey, szwAssemblies, langid, buf); if (RegCreateKeyExW(HKEY_CURRENT_USER, fullkey, 0, NULL, 0, KEY_READ | KEY_WRITE, NULL, &hkey, NULL ) != ERROR_SUCCESS) @@ -644,7 +640,7 @@ static HRESULT WINAPI InputProcessorProfiles_EnableLanguageProfile( StringFromGUID2(rclsid, buf, 39); StringFromGUID2(guidProfile, buf2, 39); - sprintfW(fullkey,szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2); + swprintf(fullkey,ARRAY_SIZE(fullkey),szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2); res = RegOpenKeyExW(HKEY_CURRENT_USER, fullkey, 0, KEY_READ | KEY_WRITE, &key); @@ -677,7 +673,7 @@ static HRESULT WINAPI InputProcessorProfiles_IsEnabledLanguageProfile( StringFromGUID2(rclsid, buf, 39); StringFromGUID2(guidProfile, buf2, 39); - sprintfW(fullkey,szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2); + swprintf(fullkey,ARRAY_SIZE(fullkey),szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2); res = RegOpenKeyExW(HKEY_CURRENT_USER, fullkey, 0, KEY_READ | KEY_WRITE, &key); @@ -721,7 +717,7 @@ static HRESULT WINAPI InputProcessorProfiles_EnableLanguageProfileByDefault( StringFromGUID2(rclsid, buf, 39); StringFromGUID2(guidProfile, buf2, 39); - sprintfW(fullkey,szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2); + swprintf(fullkey,ARRAY_SIZE(fullkey),szwFullLangfmt,szwSystemTIPKey,buf,szwLngp,langid,buf2); res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, fullkey, 0, KEY_READ | KEY_WRITE, &key); @@ -1191,7 +1187,7 @@ static INT next_LanguageProfile(EnumTfLanguageProfiles *This, CLSID clsid, TF_LA if (This->langkey == NULL) { - sprintfW(fullkey,fmt,This->szwCurrentClsid,szwLngp,This->langid); + swprintf(fullkey,ARRAY_SIZE(fullkey),fmt,This->szwCurrentClsid,szwLngp,This->langid); res = RegOpenKeyExW(This->tipkey, fullkey, 0, KEY_READ | KEY_WRITE, &This->langkey); if (res) { @@ -1315,7 +1311,7 @@ static HRESULT WINAPI EnumTfLanguageProfiles_Clone( IEnumTfLanguageProfiles *ifa WCHAR fullkey[168]; static const WCHAR fmt[] = {'%','s','\\','%','s','\\','0','x','%','0','8','x',0}; - sprintfW(fullkey,fmt,This->szwCurrentClsid,szwLngp,This->langid); + swprintf(fullkey,ARRAY_SIZE(fullkey),fmt,This->szwCurrentClsid,szwLngp,This->langid); res = RegOpenKeyExW(new_This->tipkey, fullkey, 0, KEY_READ | KEY_WRITE, &This->langkey); new_This->lang_index = This->lang_index; } diff --git a/dlls/msctf/msctf.c b/dlls/msctf/msctf.c index a19eaa1d338..c6e3a2ca597 100644 --- a/dlls/msctf/msctf.c +++ b/dlls/msctf/msctf.c @@ -18,8 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #include diff --git a/dlls/msctf/range.c b/dlls/msctf/range.c index dca8983efdb..c4eee2501fb 100644 --- a/dlls/msctf/range.c +++ b/dlls/msctf/range.c @@ -18,8 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #define COBJMACROS @@ -33,8 +31,6 @@ #include "winerror.h" #include "objbase.h" -#include "wine/unicode.h" - #include "msctf.h" #include "msctf_internal.h" diff --git a/dlls/msctf/threadmgr.c b/dlls/msctf/threadmgr.c index 5338e7271c5..a9fcb5cd15c 100644 --- a/dlls/msctf/threadmgr.c +++ b/dlls/msctf/threadmgr.c @@ -18,8 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #define COBJMACROS @@ -34,8 +32,6 @@ #include "objbase.h" #include "olectl.h" -#include "wine/unicode.h" - #include "msctf.h" #include "msctf_internal.h"