https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3edf37e269749ca6fb55f…
commit 3edf37e269749ca6fb55f3e6b037c42bf7a09d20
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sun Dec 1 19:38:13 2019 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sun Dec 1 19:38:13 2019 +0100
[TAPI32] Sync with Wine Staging 4.18. CORE-16441
---
dll/win32/tapi32/assisted.c | 8 ++------
dll/win32/tapi32/line.c | 14 +++++++-------
dll/win32/tapi32/precomp.h | 4 +---
media/doc/README.WINE | 2 +-
4 files changed, 11 insertions(+), 17 deletions(-)
diff --git a/dll/win32/tapi32/assisted.c b/dll/win32/tapi32/assisted.c
index 57c24e81874..3ae4c7cac8c 100644
--- a/dll/win32/tapi32/assisted.c
+++ b/dll/win32/tapi32/assisted.c
@@ -19,9 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
-#include "wine/port.h"
-
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
@@ -30,7 +27,6 @@
#include "winreg.h"
#include "objbase.h"
#include "tapi.h"
-#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(tapi);
@@ -65,7 +61,7 @@ DWORD WINAPI tapiGetLocationInfoW(LPWSTR countrycode, LPWSTR citycode)
if(!RegQueryValueExW(hkey, currentidW, 0, &type, (LPBYTE) &currid,
&valsize) &&
type == REG_DWORD) {
/* find a subkey called Location1, Location2... */
- sprintfW( szlockey, locationW, currid);
+ swprintf( szlockey, locationW, currid);
if( !RegOpenKeyW( hkey, szlockey, &hsubkey)) {
if( citycode) {
bufsize=sizeof(buf);
@@ -79,7 +75,7 @@ DWORD WINAPI tapiGetLocationInfoW(LPWSTR countrycode, LPWSTR citycode)
bufsize=sizeof(buf);
if( !RegQueryValueExW( hsubkey, countryW, 0, &type, buf,
&bufsize) &&
type == REG_DWORD)
- snprintfW( countrycode, 8, fmtW, *(LPDWORD) buf );
+ swprintf( countrycode, fmtW, *(LPDWORD) buf );
else
countrycode[0] = '\0';
}
diff --git a/dll/win32/tapi32/line.c b/dll/win32/tapi32/line.c
index c0e25ba4d8a..17fecf36242 100644
--- a/dll/win32/tapi32/line.c
+++ b/dll/win32/tapi32/line.c
@@ -24,6 +24,7 @@
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
+#include "wine/winternl.h"
#include "wingdi.h"
#include "winreg.h"
#include "winnls.h"
@@ -31,7 +32,6 @@
#include "objbase.h"
#include "tapi.h"
#include "wine/debug.h"
-#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(tapi);
@@ -538,7 +538,7 @@ DWORD WINAPI lineGetCountryW(DWORD id, DWORD version,
LPLINECOUNTRYLIST list)
HKEY hsubkey;
if (RegEnumKeyW(hkey, i, subkey_name, max_subkey_len) != ERROR_SUCCESS)
continue;
- if (id && (atoiW(subkey_name) != id)) continue;
+ if (id && (wcstol(subkey_name, NULL, 10) != id)) continue;
if (RegOpenKeyW(hkey, subkey_name, &hsubkey) != ERROR_SUCCESS) continue;
RegQueryValueExW(hsubkey, international_ruleW, NULL, NULL, NULL, &size_int);
@@ -565,7 +565,7 @@ DWORD WINAPI lineGetCountryW(DWORD id, DWORD version,
LPLINECOUNTRYLIST list)
list->dwUsedSize += len + sizeof(LINECOUNTRYENTRY);
if (id) i = 0;
- entry[i].dwCountryID = atoiW(subkey_name);
+ entry[i].dwCountryID = wcstol(subkey_name, NULL, 10);
size = sizeof(DWORD);
RegQueryValueExW(hsubkey, country_codeW, NULL, NULL, (BYTE
*)&entry[i].dwCountryCode, &size);
entry[i].dwNextCountryID = 0;
@@ -845,7 +845,7 @@ DWORD WINAPI lineGetTranslateCapsA(HLINEAPP hLineApp, DWORD
dwAPIVersion,
== ERROR_SUCCESS){
DWORD size_val;
i++;
- if( strncasecmp(loc_key_name, "location", 8) ||
+ if( _strnicmp(loc_key_name, "location", 8) ||
(RegOpenKeyA(hkLocations, loc_key_name, &hsubkey)
!= ERROR_SUCCESS))
continue;
@@ -907,7 +907,7 @@ DWORD WINAPI lineGetTranslateCapsA(HLINEAPP hLineApp, DWORD
dwAPIVersion,
ERROR_SUCCESS){
DWORD size_val;
i++;
- if( strncasecmp(card_key_name, "card", 4) || ERROR_SUCCESS !=
+ if( _strnicmp(card_key_name, "card", 4) || ERROR_SUCCESS !=
(RegOpenKeyA(hkCards, card_key_name, &hsubkey) ))
continue;
numcards++;
@@ -984,7 +984,7 @@ DWORD WINAPI lineGetTranslateCapsA(HLINEAPP hLineApp, DWORD
dwAPIVersion,
== ERROR_SUCCESS){
DWORD size_val;
i++;
- if( strncasecmp(loc_key_name, "location", 8) ||
+ if( _strnicmp(loc_key_name, "location", 8) ||
(RegOpenKeyA(hkLocations, loc_key_name, &hsubkey)
!= ERROR_SUCCESS))
continue;
@@ -1077,7 +1077,7 @@ DWORD WINAPI lineGetTranslateCapsA(HLINEAPP hLineApp, DWORD
dwAPIVersion,
ERROR_SUCCESS){
DWORD size_val;
i++;
- if( strncasecmp(card_key_name, "card", 4) ||
+ if( _strnicmp(card_key_name, "card", 4) ||
(RegOpenKeyA(hkCards, card_key_name, &hsubkey) !=
ERROR_SUCCESS))
continue;
size_val=sizeof(DWORD);
diff --git a/dll/win32/tapi32/precomp.h b/dll/win32/tapi32/precomp.h
index e51c67ba010..d057ccd4343 100644
--- a/dll/win32/tapi32/precomp.h
+++ b/dll/win32/tapi32/precomp.h
@@ -2,8 +2,6 @@
#ifndef _TAPI32_PCH_
#define _TAPI32_PCH_
-#include <wine/config.h>
-
#include <stdarg.h>
#define WIN32_NO_STATUS
@@ -13,10 +11,10 @@
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
+#include <winnls.h>
#include <objbase.h>
#include <tapi.h>
-#include <wine/unicode.h>
#include <wine/debug.h>
#endif /* !_TAPI32_PCH_ */
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index f74f8825b21..4d6dd61c7b3 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -184,7 +184,7 @@ dll/win32/stdole32.tlb # Synced to WineStaging-3.3
dll/win32/sti # Synced to WineStaging-4.18
dll/win32/sxs # Synced to WineStaging-4.18
dll/win32/t2embed # Synced to WineStaging-4.18
-dll/win32/tapi32 # Synced to WineStaging-3.3
+dll/win32/tapi32 # Synced to WineStaging-4.18
dll/win32/traffic # Synced to WineStaging-3.3
dll/win32/twain_32 # Synced to WineStaging-3.3
dll/win32/updspapi # Synced to WineStaging-3.3