diff --git a/reactos/dll/win32/kernel32/include/kernel32.h b/reactos/dll/win32/kernel32/include/kernel32.h index e2c836881b3..dad3f12904f 100644 --- a/reactos/dll/win32/kernel32/include/kernel32.h +++ b/reactos/dll/win32/kernel32/include/kernel32.h @@ -8,6 +8,9 @@ #define actctx 202 #define resource 203 #define kernel32session 204 +#define comm 205 +#define profile 206 +#define nls 207 #if DBG @@ -27,6 +30,7 @@ #define debugstr_a #define debugstr_w +#define debugstr_wn #define wine_dbgstr_w #define debugstr_guid @@ -61,6 +65,9 @@ #define FIELD_OFFSET(type,fld) ((LONG)&(((type *)0)->fld)) #endif +#define __TRY _SEH2_TRY +#define __EXCEPT_PAGE_FAULT _SEH2_EXCEPT(_SEH2_GetExceptionCode() == STATUS_ACCESS_VIOLATION) +#define __ENDTRY _SEH2_END /* Undocumented CreateProcess flag */ #define STARTF_SHELLPRIVATE 0x400 @@ -159,7 +166,7 @@ DWORD FilenameU2A_FitOrFail(LPSTR DestA, INT destLen, PUNICODE_STRING SourceU); #define HeapAlloc RtlAllocateHeap #define HeapReAlloc RtlReAllocateHeap #define HeapFree RtlFreeHeap -#define _lread (_readfun)_hread +#define _lread(a, b, c) (long)(_hread(a, b, (long)c)) PLARGE_INTEGER WINAPI diff --git a/reactos/dll/win32/kernel32/k32.h b/reactos/dll/win32/kernel32/k32.h index a293de38707..8a812383a12 100644 --- a/reactos/dll/win32/kernel32/k32.h +++ b/reactos/dll/win32/kernel32/k32.h @@ -14,6 +14,7 @@ /* PSDK/NDK Headers */ #define WIN32_NO_STATUS #include +#include #include #include #include @@ -49,16 +50,9 @@ #include #include -/* C Headers */ -//#include -//#include -//#include -//#include - /* DDK Driver Headers */ #include #include -//#include /* Internal Kernel32 Header */ #include "include/kernel32.h" diff --git a/reactos/dll/win32/kernel32/wine/actctx.c b/reactos/dll/win32/kernel32/wine/actctx.c index a0c98304fca..7eb91a90c4c 100644 --- a/reactos/dll/win32/kernel32/wine/actctx.c +++ b/reactos/dll/win32/kernel32/wine/actctx.c @@ -13,6 +13,7 @@ /* synched with wine 1.1.26 */ #include + #define NDEBUG #include DEBUG_CHANNEL(actctx); diff --git a/reactos/dll/win32/kernel32/wine/comm.c b/reactos/dll/win32/kernel32/wine/comm.c index 5fb76ac948d..3e6f20d2f0a 100644 --- a/reactos/dll/win32/kernel32/wine/comm.c +++ b/reactos/dll/win32/kernel32/wine/comm.c @@ -18,21 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -//#include "config.h" -//#include "wine/port.h" - -#include -#include -#include - -#define NONAMELESSUNION -#define NONAMELESSSTRUCT -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winioctl.h" -#include "winternl.h" -//#include "ddk/ntddser.h" +#include typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS; #undef SERIAL_LSRMST_ESCAPE @@ -55,14 +41,9 @@ typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS; #undef IOCTL_SERIAL_LSRMST_INSERT #include -#include "wine/unicode.h" - -#include "wine/debug.h" - -#define HeapAlloc RtlAllocateHeap -#define HeapReAlloc RtlReAllocateHeap -#define HeapFree RtlFreeHeap -WINE_DEFAULT_DEBUG_CHANNEL(comm); +#define NDEBUG +#include +DEBUG_CHANNEL(comm); /*********************************************************************** * COMM_Parse* (Internal) diff --git a/reactos/dll/win32/kernel32/wine/lzexpand.c b/reactos/dll/win32/kernel32/wine/lzexpand.c index eb4b4d2e0f9..94ac68b7c7a 100644 --- a/reactos/dll/win32/kernel32/wine/lzexpand.c +++ b/reactos/dll/win32/kernel32/wine/lzexpand.c @@ -32,33 +32,19 @@ * o Check whether the return values are correct * */ -//#include + +#include + +#define NDEBUG +#include +DEBUG_CHANNEL(kernel32file); + #define HFILE_ERROR ((HFILE)-1) -//#include "config.h" -#include -#include -#include -#include -#include -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "windef.h" -#include "winbase.h" #include "lzexpand.h" -#include "wine/unicode.h" -#include "wine/debug.h" -#include "winternl.h" -#define HeapAlloc RtlAllocateHeap -#define HeapReAlloc RtlReAllocateHeap -#define HeapFree RtlFreeHeap -#define _lread(a, b, c) (long)(_hread(a, b, (long)c)) #define _lwrite(a, b, c) (long)(_hwrite(a, b, (long)c)) -WINE_DEFAULT_DEBUG_CHANNEL(file); - + /* The readahead length of the decompressor. Reading single bytes * using _lread() would be SLOW. */ diff --git a/reactos/dll/win32/kernel32/wine/muldiv.c b/reactos/dll/win32/kernel32/wine/muldiv.c index 45a1b872421..fa0b81b54f9 100644 --- a/reactos/dll/win32/kernel32/wine/muldiv.c +++ b/reactos/dll/win32/kernel32/wine/muldiv.c @@ -11,7 +11,6 @@ #include - /*********************************************************************** * MulDiv (KERNEL32.@) * RETURNS diff --git a/reactos/dll/win32/kernel32/wine/profile.c b/reactos/dll/win32/kernel32/wine/profile.c index 560d74afbb7..98d198da420 100644 --- a/reactos/dll/win32/kernel32/wine/profile.c +++ b/reactos/dll/win32/kernel32/wine/profile.c @@ -19,25 +19,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -//#include "config.h" -//#include "wine/port.h" +#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "winnls.h" -#include "winerror.h" -#include "winternl.h" -#include "wine/unicode.h" -#include "wine/library.h" -#include "wine/debug.h" - -#define HeapAlloc RtlAllocateHeap -#define HeapReAlloc RtlReAllocateHeap -#define HeapFree RtlFreeHeap -WINE_DEFAULT_DEBUG_CHANNEL(profile); +#define NDEBUG +#include +DEBUG_CHANNEL(profile); static const char bom_utf8[] = {0xEF,0xBB,0xBF}; @@ -277,7 +263,7 @@ static inline int PROFILE_isspaceW(WCHAR c) return isspaceW(c) || c == 0x1a; } -static inline ENCODING PROFILE_DetectTextEncoding(const void * buffer, int * len) +static inline ENCODING PROFILE_DetectTextEncoding(void * buffer, int * len) { int flags = IS_TEXT_UNICODE_SIGNATURE | IS_TEXT_UNICODE_REVERSE_SIGNATURE | @@ -484,7 +470,7 @@ static PROFILESECTION *PROFILE_Load(HANDLE hFile, ENCODING * pEncoding) prev_key = key; TRACE("New key: name=%s, value=%s\n", - debugstr_w(key->name), key->value ? debugstr_w(key->value) : "(none)"); + debugstr_w(key->name), key->value ? debugstr_w(key->value) : L"(none)"); } } if (szFile != pBuffer) diff --git a/reactos/dll/win32/kernel32/wine/res.c b/reactos/dll/win32/kernel32/wine/res.c index ca1ce238661..b5faf211b0e 100644 --- a/reactos/dll/win32/kernel32/wine/res.c +++ b/reactos/dll/win32/kernel32/wine/res.c @@ -20,30 +20,13 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -//#include "config.h" -//#include "wine/port.h" +#include -#include +#include -#define NONAMELESSUNION -#define NONAMELESSSTRUCT -#include "ntstatus.h" -#define WIN32_NO_STATUS -#include "windef.h" -#include "winbase.h" -#include "winternl.h" -#include "wine/debug.h" -#include "wine/exception.h" -#include "wine/unicode.h" -#include "wine/list.h" - -#define HeapAlloc RtlAllocateHeap -#define HeapReAlloc RtlReAllocateHeap -#define HeapFree RtlFreeHeap -WINE_DEFAULT_DEBUG_CHANNEL(resource); - -/* we don't want to include winuser.h just for this */ -#define IS_INTRESOURCE(x) (((ULONG_PTR)(x) >> 16) == 0) +#define NDEBUG +#include +DEBUG_CHANNEL(resource); /* retrieve the resource name to pass to the ntdll functions */ static NTSTATUS get_res_nameA( LPCSTR name, UNICODE_STRING *str ) @@ -94,7 +77,7 @@ static HRSRC find_resourceA( HMODULE hModule, LPCSTR type, LPCSTR name, WORD lan NTSTATUS status; UNICODE_STRING nameW, typeW; LDR_RESOURCE_INFO info; - const IMAGE_RESOURCE_DATA_ENTRY *entry = NULL; + IMAGE_RESOURCE_DATA_ENTRY *entry = NULL; nameW.Buffer = NULL; typeW.Buffer = NULL; @@ -128,7 +111,7 @@ static HRSRC find_resourceW( HMODULE hModule, LPCWSTR type, LPCWSTR name, WORD l NTSTATUS status; UNICODE_STRING nameW, typeW; LDR_RESOURCE_INFO info; - const IMAGE_RESOURCE_DATA_ENTRY *entry = NULL; + IMAGE_RESOURCE_DATA_ENTRY *entry = NULL; nameW.Buffer = typeW.Buffer = NULL; @@ -206,7 +189,7 @@ BOOL WINAPI EnumResourceTypesA( HMODULE hmod, ENUMRESTYPEPROCA lpfun, LONG_PTR l LPSTR type = NULL; DWORD len = 0, newlen; NTSTATUS status; - const IMAGE_RESOURCE_DIRECTORY *resdir; + IMAGE_RESOURCE_DIRECTORY *resdir; const IMAGE_RESOURCE_DIRECTORY_ENTRY *et; const IMAGE_RESOURCE_DIR_STRING_U *str; @@ -222,9 +205,9 @@ BOOL WINAPI EnumResourceTypesA( HMODULE hmod, ENUMRESTYPEPROCA lpfun, LONG_PTR l et = (const IMAGE_RESOURCE_DIRECTORY_ENTRY *)(resdir + 1); for (i = 0; i < resdir->NumberOfNamedEntries+resdir->NumberOfIdEntries; i++) { - if (et[i].u1.s1.NameIsString) + if (et[i].NameIsString) { - str = (const IMAGE_RESOURCE_DIR_STRING_U *)((const BYTE *)resdir + et[i].u1.s1.NameOffset); + str = (const IMAGE_RESOURCE_DIR_STRING_U *)((const BYTE *)resdir + et[i].NameOffset); newlen = WideCharToMultiByte( CP_ACP, 0, str->NameString, str->Length, NULL, 0, NULL, NULL); if (newlen + 1 > len) { @@ -238,7 +221,7 @@ BOOL WINAPI EnumResourceTypesA( HMODULE hmod, ENUMRESTYPEPROCA lpfun, LONG_PTR l } else { - ret = lpfun( hmod, UIntToPtr(et[i].u1.Id), lparam ); + ret = lpfun( hmod, UIntToPtr(et[i].Id), lparam ); } if (!ret) break; } @@ -256,7 +239,7 @@ BOOL WINAPI EnumResourceTypesW( HMODULE hmod, ENUMRESTYPEPROCW lpfun, LONG_PTR l BOOL ret = FALSE; LPWSTR type = NULL; NTSTATUS status; - const IMAGE_RESOURCE_DIRECTORY *resdir; + IMAGE_RESOURCE_DIRECTORY *resdir; const IMAGE_RESOURCE_DIRECTORY_ENTRY *et; const IMAGE_RESOURCE_DIR_STRING_U *str; @@ -272,9 +255,9 @@ BOOL WINAPI EnumResourceTypesW( HMODULE hmod, ENUMRESTYPEPROCW lpfun, LONG_PTR l et = (const IMAGE_RESOURCE_DIRECTORY_ENTRY *)(resdir + 1); for (i = 0; i < resdir->NumberOfNamedEntries + resdir->NumberOfIdEntries; i++) { - if (et[i].u1.s1.NameIsString) + if (et[i].NameIsString) { - str = (const IMAGE_RESOURCE_DIR_STRING_U *)((const BYTE *)resdir + et[i].u1.s1.NameOffset); + str = (const IMAGE_RESOURCE_DIR_STRING_U *)((const BYTE *)resdir + et[i].NameOffset); if (str->Length + 1 > len) { len = str->Length + 1; @@ -287,7 +270,7 @@ BOOL WINAPI EnumResourceTypesW( HMODULE hmod, ENUMRESTYPEPROCW lpfun, LONG_PTR l } else { - ret = lpfun( hmod, UIntToPtr(et[i].u1.Id), lparam ); + ret = lpfun( hmod, UIntToPtr(et[i].Id), lparam ); } if (!ret) break; } @@ -308,7 +291,7 @@ BOOL WINAPI EnumResourceNamesA( HMODULE hmod, LPCSTR type, ENUMRESNAMEPROCA lpfu NTSTATUS status; UNICODE_STRING typeW; LDR_RESOURCE_INFO info; - const IMAGE_RESOURCE_DIRECTORY *basedir, *resdir; + IMAGE_RESOURCE_DIRECTORY *basedir, *resdir; const IMAGE_RESOURCE_DIRECTORY_ENTRY *et; const IMAGE_RESOURCE_DIR_STRING_U *str; @@ -329,9 +312,9 @@ BOOL WINAPI EnumResourceNamesA( HMODULE hmod, LPCSTR type, ENUMRESNAMEPROCA lpfu { for (i = 0; i < resdir->NumberOfNamedEntries+resdir->NumberOfIdEntries; i++) { - if (et[i].u1.s1.NameIsString) + if (et[i].NameIsString) { - str = (const IMAGE_RESOURCE_DIR_STRING_U *)((const BYTE *)basedir + et[i].u1.s1.NameOffset); + str = (const IMAGE_RESOURCE_DIR_STRING_U *)((const BYTE *)basedir + et[i].NameOffset); newlen = WideCharToMultiByte(CP_ACP, 0, str->NameString, str->Length, NULL, 0, NULL, NULL); if (newlen + 1 > len) { @@ -349,7 +332,7 @@ BOOL WINAPI EnumResourceNamesA( HMODULE hmod, LPCSTR type, ENUMRESNAMEPROCA lpfu } else { - ret = lpfun( hmod, type, UIntToPtr(et[i].u1.Id), lparam ); + ret = lpfun( hmod, type, UIntToPtr(et[i].Id), lparam ); } if (!ret) break; } @@ -380,7 +363,7 @@ BOOL WINAPI EnumResourceNamesW( HMODULE hmod, LPCWSTR type, ENUMRESNAMEPROCW lpf NTSTATUS status; UNICODE_STRING typeW; LDR_RESOURCE_INFO info; - const IMAGE_RESOURCE_DIRECTORY *basedir, *resdir; + IMAGE_RESOURCE_DIRECTORY *basedir, *resdir; const IMAGE_RESOURCE_DIRECTORY_ENTRY *et; const IMAGE_RESOURCE_DIR_STRING_U *str; @@ -401,9 +384,9 @@ BOOL WINAPI EnumResourceNamesW( HMODULE hmod, LPCWSTR type, ENUMRESNAMEPROCW lpf { for (i = 0; i < resdir->NumberOfNamedEntries+resdir->NumberOfIdEntries; i++) { - if (et[i].u1.s1.NameIsString) + if (et[i].NameIsString) { - str = (const IMAGE_RESOURCE_DIR_STRING_U *)((const BYTE *)basedir + et[i].u1.s1.NameOffset); + str = (const IMAGE_RESOURCE_DIR_STRING_U *)((const BYTE *)basedir + et[i].NameOffset); if (str->Length + 1 > len) { len = str->Length + 1; @@ -420,7 +403,7 @@ BOOL WINAPI EnumResourceNamesW( HMODULE hmod, LPCWSTR type, ENUMRESNAMEPROCW lpf } else { - ret = lpfun( hmod, type, UIntToPtr(et[i].u1.Id), lparam ); + ret = lpfun( hmod, type, UIntToPtr(et[i].Id), lparam ); } if (!ret) break; } @@ -450,7 +433,7 @@ BOOL WINAPI EnumResourceLanguagesA( HMODULE hmod, LPCSTR type, LPCSTR name, NTSTATUS status; UNICODE_STRING typeW, nameW; LDR_RESOURCE_INFO info; - const IMAGE_RESOURCE_DIRECTORY *basedir, *resdir; + IMAGE_RESOURCE_DIRECTORY *basedir, *resdir; const IMAGE_RESOURCE_DIRECTORY_ENTRY *et; TRACE( "%p %s %s %p %lx\n", hmod, debugstr_a(type), debugstr_a(name), lpfun, lparam ); @@ -473,7 +456,7 @@ BOOL WINAPI EnumResourceLanguagesA( HMODULE hmod, LPCSTR type, LPCSTR name, { for (i = 0; i < resdir->NumberOfNamedEntries + resdir->NumberOfIdEntries; i++) { - ret = lpfun( hmod, type, name, et[i].u1.Id, lparam ); + ret = lpfun( hmod, type, name, et[i].Id, lparam ); if (!ret) break; } } @@ -502,7 +485,7 @@ BOOL WINAPI EnumResourceLanguagesW( HMODULE hmod, LPCWSTR type, LPCWSTR name, NTSTATUS status; UNICODE_STRING typeW, nameW; LDR_RESOURCE_INFO info; - const IMAGE_RESOURCE_DIRECTORY *basedir, *resdir; + IMAGE_RESOURCE_DIRECTORY *basedir, *resdir; const IMAGE_RESOURCE_DIRECTORY_ENTRY *et; TRACE( "%p %s %s %p %lx\n", hmod, debugstr_w(type), debugstr_w(name), lpfun, lparam ); @@ -525,7 +508,7 @@ BOOL WINAPI EnumResourceLanguagesW( HMODULE hmod, LPCWSTR type, LPCWSTR name, { for (i = 0; i < resdir->NumberOfNamedEntries + resdir->NumberOfIdEntries; i++) { - ret = lpfun( hmod, type, name, et[i].u1.Id, lparam ); + ret = lpfun( hmod, type, name, et[i].Id, lparam ); if (!ret) break; } } @@ -951,10 +934,10 @@ static LPWSTR resource_dup_string( const IMAGE_RESOURCE_DIRECTORY *root, const I const IMAGE_RESOURCE_DIR_STRING_U* string; LPWSTR s; - if (!entry->u1.s1.NameIsString) - return UIntToPtr(entry->u1.Id); + if (!entry->NameIsString) + return UIntToPtr(entry->Id); - string = (const IMAGE_RESOURCE_DIR_STRING_U*) (((const char *)root) + entry->u1.s1.NameOffset); + string = (const IMAGE_RESOURCE_DIR_STRING_U*) (((const char *)root) + entry->NameOffset); s = HeapAlloc(GetProcessHeap(), 0, (string->Length + 1)*sizeof (WCHAR) ); memcpy( s, string->NameString, (string->Length + 1)*sizeof (WCHAR) ); s[string->Length] = 0; @@ -983,7 +966,7 @@ static BOOL enumerate_mapped_resources( QUEUEDUPDATES *updates, Type = resource_dup_string( root, e1 ); - namedir = (const IMAGE_RESOURCE_DIRECTORY *)((const char *)root + e1->u2.s2.OffsetToDirectory); + namedir = (const IMAGE_RESOURCE_DIRECTORY *)((const char *)root + e1->OffsetToDirectory); for (j = 0; j < namedir->NumberOfNamedEntries + namedir->NumberOfIdEntries; j++) { LPWSTR Name; @@ -992,7 +975,7 @@ static BOOL enumerate_mapped_resources( QUEUEDUPDATES *updates, Name = resource_dup_string( root, e2 ); - langdir = (const IMAGE_RESOURCE_DIRECTORY *)((const char *)root + e2->u2.s2.OffsetToDirectory); + langdir = (const IMAGE_RESOURCE_DIRECTORY *)((const char *)root + e2->OffsetToDirectory); for (k = 0; k < langdir->NumberOfNamedEntries + langdir->NumberOfIdEntries; k++) { LANGID Lang; @@ -1001,9 +984,9 @@ static BOOL enumerate_mapped_resources( QUEUEDUPDATES *updates, e3 = (const IMAGE_RESOURCE_DIRECTORY_ENTRY*)(langdir + 1) + k; - Lang = e3->u1.Id; + Lang = e3->Id; - data = (const IMAGE_RESOURCE_DATA_ENTRY *)((const char *)root + e3->u2.OffsetToData); + data = (const IMAGE_RESOURCE_DATA_ENTRY *)((const char *)root + e3->OffsetToData); p = address_from_rva( base, mapping_size, data->OffsetToData, data->Size ); @@ -1238,8 +1221,8 @@ static BOOL write_resources( QUEUEDUPDATES *updates, LPBYTE base, struct resourc DWORD len; root->NumberOfNamedEntries++; - e1->u1.s1.NameIsString = 1; - e1->u1.s1.NameOffset = si->strings_ofs; + e1->NameIsString = 1; + e1->NameOffset = si->strings_ofs; strings = (WCHAR*) &base[si->strings_ofs]; len = lstrlenW( types->id ); @@ -1250,10 +1233,10 @@ static BOOL write_resources( QUEUEDUPDATES *updates, LPBYTE base, struct resourc else { root->NumberOfIdEntries++; - e1->u1.Id = LOWORD( types->id ); + e1->Id = LOWORD( types->id ); } - e1->u2.s2.OffsetToDirectory = si->names_ofs; - e1->u2.s2.DataIsDirectory = TRUE; + e1->OffsetToDirectory = si->names_ofs; + e1->DataIsDirectory = TRUE; si->types_ofs += sizeof (IMAGE_RESOURCE_DIRECTORY_ENTRY); namedir = (IMAGE_RESOURCE_DIRECTORY*) &base[si->names_ofs]; @@ -1274,8 +1257,8 @@ static BOOL write_resources( QUEUEDUPDATES *updates, LPBYTE base, struct resourc DWORD len; namedir->NumberOfNamedEntries++; - e2->u1.s1.NameIsString = 1; - e2->u1.s1.NameOffset = si->strings_ofs; + e2->NameIsString = 1; + e2->NameOffset = si->strings_ofs; strings = (WCHAR*) &base[si->strings_ofs]; len = lstrlenW( names->id ); @@ -1286,10 +1269,10 @@ static BOOL write_resources( QUEUEDUPDATES *updates, LPBYTE base, struct resourc else { namedir->NumberOfIdEntries++; - e2->u1.Id = LOWORD( names->id ); + e2->Id = LOWORD( names->id ); } - e2->u2.s2.OffsetToDirectory = si->langs_ofs; - e2->u2.s2.DataIsDirectory = TRUE; + e2->OffsetToDirectory = si->langs_ofs; + e2->DataIsDirectory = TRUE; si->names_ofs += sizeof (IMAGE_RESOURCE_DIRECTORY_ENTRY); langdir = (IMAGE_RESOURCE_DIRECTORY*) &base[si->langs_ofs]; @@ -1306,8 +1289,8 @@ static BOOL write_resources( QUEUEDUPDATES *updates, LPBYTE base, struct resourc e3 = (IMAGE_RESOURCE_DIRECTORY_ENTRY*) &base[si->langs_ofs]; memset( e3, 0, sizeof *e3 ); langdir->NumberOfIdEntries++; - e3->u1.Id = LOWORD( data->lang ); - e3->u2.OffsetToData = si->data_entry_ofs; + e3->Id = LOWORD( data->lang ); + e3->OffsetToData = si->data_entry_ofs; si->langs_ofs += sizeof (IMAGE_RESOURCE_DIRECTORY_ENTRY); diff --git a/reactos/dll/win32/kernel32/winnls/string/casemap.c b/reactos/dll/win32/kernel32/winnls/string/casemap.c index 141a4172675..90798f9a687 100644 --- a/reactos/dll/win32/kernel32/winnls/string/casemap.c +++ b/reactos/dll/win32/kernel32/winnls/string/casemap.c @@ -1,7 +1,7 @@ /* Unicode case mappings */ /* Automatically generated; DO NOT EDIT!! */ -#include "wine/unicode.h" +#include const WCHAR wine_casemap_lower[3802] = { diff --git a/reactos/dll/win32/kernel32/winnls/string/fold.c b/reactos/dll/win32/kernel32/winnls/string/fold.c index 87a4a418faa..9b6105b113f 100644 --- a/reactos/dll/win32/kernel32/winnls/string/fold.c +++ b/reactos/dll/win32/kernel32/winnls/string/fold.c @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "wine/unicode.h" +#include static inline WCHAR to_unicode_digit( WCHAR ch ) { diff --git a/reactos/dll/win32/kernel32/winnls/string/format_msg.c b/reactos/dll/win32/kernel32/winnls/string/format_msg.c index 89307ff415a..0c0114c6e4d 100644 --- a/reactos/dll/win32/kernel32/winnls/string/format_msg.c +++ b/reactos/dll/win32/kernel32/winnls/string/format_msg.c @@ -19,28 +19,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include -#include +#include -#include "ntstatus.h" -#define WIN32_NO_STATUS -#include "windef.h" -#include "winbase.h" -#include "winerror.h" -#include "winternl.h" -#include "winuser.h" -#include "winnls.h" -#include "wine/unicode.h" -#include "wine/debug.h" +#define NDEBUG +#include +DEBUG_CHANNEL(resource); extern HMODULE kernel32_handle; -#define HeapAlloc RtlAllocateHeap -#define HeapReAlloc RtlReAllocateHeap -#define HeapFree RtlFreeHeap -WINE_DEFAULT_DEBUG_CHANNEL(resource); - struct format_args { ULONG_PTR *args; @@ -77,7 +63,7 @@ static const WCHAR FMTWSTR[] = { '%','s',0 }; */ static LPWSTR load_message( HMODULE module, UINT id, WORD lang ) { - const MESSAGE_RESOURCE_ENTRY *mre; + MESSAGE_RESOURCE_ENTRY *mre; WCHAR *buffer; NTSTATUS status; diff --git a/reactos/dll/win32/kernel32/winnls/string/lang.c b/reactos/dll/win32/kernel32/winnls/string/lang.c index 3db74d15a86..5b3f586a9db 100644 --- a/reactos/dll/win32/kernel32/winnls/string/lang.c +++ b/reactos/dll/win32/kernel32/winnls/string/lang.c @@ -21,40 +21,19 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -//#include "config.h" -//#include "wine/port.h" +#include -#include -#include -#include -#include -#include -#include -#include - -#include "ntstatus.h" -#define WIN32_NO_STATUS -#include "windef.h" -#include "winbase.h" -#include "winuser.h" /* for RT_STRINGW */ -#include "winternl.h" -#include "wine/unicode.h" -#include "winnls.h" -#include "winerror.h" -#include "winver.h" -#include "wine/debug.h" +#define NDEBUG +#include +DEBUG_CHANNEL(nls); #include "lcformat_private.h" + #define REG_SZ 1 extern int wine_fold_string(int flags, const WCHAR *src, int srclen, WCHAR *dst, int dstlen); extern int wine_get_sortkey(int flags, const WCHAR *src, int srclen, char *dst, int dstlen); extern int wine_compare_string(int flags, const WCHAR *str1, int len1, const WCHAR *str2, int len2); -#define HeapAlloc RtlAllocateHeap -#define HeapReAlloc RtlReAllocateHeap -#define HeapFree RtlFreeHeap -WINE_DEFAULT_DEBUG_CHANNEL(nls); - extern HMODULE kernel32_handle; #define LOCALE_LOCALEINFOFLAGSMASK (LOCALE_NOUSEROVERRIDE|LOCALE_USE_CP_ACP|\ @@ -997,7 +976,7 @@ BOOL WINAPI SetLocaleInfoW( LCID lcid, LCTYPE lctype, LPCWSTR data ) if (!(hkey = create_registry_key())) return FALSE; RtlInitUnicodeString( &valueW, value ); - status = NtSetValueKey( hkey, &valueW, 0, REG_SZ, data, (strlenW(data)+1)*sizeof(WCHAR) ); + status = NtSetValueKey( hkey, &valueW, 0, REG_SZ, (PVOID)data, (strlenW(data)+1)*sizeof(WCHAR) ); if (lctype == LOCALE_SSHORTDATE || lctype == LOCALE_SLONGDATE) { diff --git a/reactos/dll/win32/kernel32/winnls/string/lcformat.c b/reactos/dll/win32/kernel32/winnls/string/lcformat.c index bf8b7ae93c4..3b2a6ebd567 100644 --- a/reactos/dll/win32/kernel32/winnls/string/lcformat.c +++ b/reactos/dll/win32/kernel32/winnls/string/lcformat.c @@ -22,30 +22,16 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -//#include "config.h" -//#include "wine/port.h" +#include -#include -#include -#include -#include - -#include "windef.h" -#include "winbase.h" -#include "wine/unicode.h" -#include "wine/debug.h" -#include "winternl.h" +#define NDEBUG +#include +DEBUG_CHANNEL(nls); #define CRITICAL_SECTION RTL_CRITICAL_SECTION #define CRITICAL_SECTION_DEBUG RTL_CRITICAL_SECTION_DEBUG #define CALINFO_MAX_YEAR 2029 -#define HeapAlloc RtlAllocateHeap -#define HeapReAlloc RtlReAllocateHeap -#define HeapFree RtlFreeHeap - -WINE_DEFAULT_DEBUG_CHANNEL(nls); - #define DATE_DATEVARSONLY 0x0100 /* only date stuff: yMdg */ #define TIME_TIMEVARSONLY 0x0200 /* only time stuff: hHmst */ diff --git a/reactos/dll/win32/kernel32/winnls/string/nls.c b/reactos/dll/win32/kernel32/winnls/string/nls.c index b64544e6a42..e1aba208431 100644 --- a/reactos/dll/win32/kernel32/winnls/string/nls.c +++ b/reactos/dll/win32/kernel32/winnls/string/nls.c @@ -14,6 +14,7 @@ /* INCLUDES *******************************************************************/ #include + #define NDEBUG #include diff --git a/reactos/dll/win32/kernel32/winnls/string/sortkey.c b/reactos/dll/win32/kernel32/winnls/string/sortkey.c index 8f9bba5cd28..3e643ec4220 100644 --- a/reactos/dll/win32/kernel32/winnls/string/sortkey.c +++ b/reactos/dll/win32/kernel32/winnls/string/sortkey.c @@ -17,7 +17,8 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "wine/unicode.h" + +#include #define get_char_typeW(x) iswctype((x) >> 8, (x) & 0xFF) extern int get_decomposition(WCHAR src, WCHAR *dst, unsigned int dstlen);