[NORMALIZ][KERNEL32_VISTA]
authorThomas Faber <thomas.faber@reactos.org>
Mon, 7 Sep 2015 17:16:25 +0000 (17:16 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Mon, 7 Sep 2015 17:16:25 +0000 (17:16 +0000)
- Add normaliz.dll to the build
- Move the appropriate functions from kernel32_vista to normaliz
- Import IsNormalizedString and NormalizeString stubs from Wine
Now Scilab starts
CORE-10124 #resolve

svn path=/trunk/; revision=69093

12 files changed:
reactos/dll/CMakeLists.txt
reactos/dll/nls/CMakeLists.txt
reactos/dll/nls/normaliz/CMakeLists.txt
reactos/dll/nls/normaliz/IdnToAscii.c [moved from reactos/dll/win32/kernel32_vista/IdnToAscii.c with 100% similarity]
reactos/dll/nls/normaliz/IdnToUnicode.c [moved from reactos/dll/win32/kernel32_vista/IdnToUnicode.c with 100% similarity]
reactos/dll/nls/normaliz/dummy.c [deleted file]
reactos/dll/nls/normaliz/nameprep.c [moved from reactos/dll/win32/kernel32_vista/nameprep.c with 100% similarity]
reactos/dll/nls/normaliz/normaliz.spec
reactos/dll/nls/normaliz/normalize.c [new file with mode: 0644]
reactos/dll/win32/kernel32_vista/CMakeLists.txt
reactos/dll/win32/kernel32_vista/kernel32_vista.spec
reactos/dll/win32/wininet/CMakeLists.txt

index 1fc9498..fe133d7 100644 (file)
@@ -3,6 +3,7 @@ add_subdirectory(3rdparty)
 add_subdirectory(cpl)
 add_subdirectory(directx)
 add_subdirectory(keyboard)
+add_subdirectory(nls)
 add_subdirectory(ntdll)
 add_subdirectory(opengl)
 add_subdirectory(shellext)
index d6448d3..f163066 100644 (file)
@@ -1,5 +1,3 @@
 
-if(NOT MSVC)
-    add_subdirectory(idndl) # FIXME: msvc build.
-endif()
-#add_subdirectory(normaliz) # Win Vista
+#add_subdirectory(idndl) # FIXME: fix build
+add_subdirectory(normaliz)
index fcda54b..95a41e5 100644 (file)
@@ -1,6 +1,17 @@
 
-spec2def(normaliz.dll normaliz.spec)
-add_library(normaliz SHARED dummy.c ${CMAKE_CURRENT_BINARY_DIR}/normaliz.def)
-set_entrypoint(normaliz 0)
-add_importlibs(normaliz kernel32)
-add_dependencies(normaliz psdk)
+remove_definitions(-D_WIN32_WINNT=0x502 -DWINVER=0x502)
+add_definitions(-D_WIN32_WINNT=0x600 -DWINVER=0x600)
+
+spec2def(normaliz.dll normaliz.spec ADD_IMPORTLIB)
+
+list(APPEND SOURCE
+    IdnToAscii.c
+    IdnToUnicode.c
+    nameprep.c
+    normalize.c
+    ${CMAKE_CURRENT_BINARY_DIR}/normaliz.def)
+    
+add_library(normaliz SHARED ${SOURCE})
+set_module_type(normaliz win32dll ENTRYPOINT 0)
+add_importlibs(normaliz msvcrt kernel32 ntdll)
+add_cd_file(TARGET normaliz DESTINATION reactos/system32 FOR all)
diff --git a/reactos/dll/nls/normaliz/dummy.c b/reactos/dll/nls/normaliz/dummy.c
deleted file mode 100644 (file)
index bdba1b4..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/* Leave empty */
index 54e3206..ba97fa6 100644 (file)
@@ -1,6 +1,6 @@
 
- @ stdcall IdnToAscii(long wstr long wstr long) kernel32.IdnToAscii
- @ stdcall IdnToNameprepUnicode(long wstr long wstr long) kernel32.IdnToNameprepUnicode
- @ stdcall IdnToUnicode(long wstr long wstr long) kernel32.IdnToUnicode
- @ stdcall IsNormalizedString(long wstr long) kernel32.IsNormalizedString
- @ stdcall NormalizeString(long wstr long wstr long) kernel32.NormalizeString
+@ stdcall IdnToAscii(long wstr long ptr long)
+@ stdcall IdnToNameprepUnicode(long wstr long ptr long)
+@ stdcall IdnToUnicode(long wstr long ptr long)
+@ stdcall IsNormalizedString(long wstr long)
+@ stdcall NormalizeString(long wstr long ptr long)
diff --git a/reactos/dll/nls/normaliz/normalize.c b/reactos/dll/nls/normaliz/normalize.c
new file mode 100644 (file)
index 0000000..e6f78b8
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Locale support
+ *
+ * Copyright 1995 Martin von Loewis
+ * Copyright 1998 David Lee Lambert
+ * Copyright 2000 Julio César Gázquez
+ * Copyright 2002 Alexandre Julliard for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#define WIN32_NO_STATUS
+#include <wine/unicode.h>
+
+#define NDEBUG
+#include <debug.h>
+
+/* Taken from Wine kernel32/locale.c */
+
+/******************************************************************************
+ *           NormalizeString (KERNEL32.@)
+ */
+INT WINAPI NormalizeString(NORM_FORM NormForm, LPCWSTR lpSrcString, INT cwSrcLength,
+                           LPWSTR lpDstString, INT cwDstLength)
+{
+    DPRINT1("%x %p %d %p %d\n", NormForm, lpSrcString, cwSrcLength, lpDstString, cwDstLength);
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return 0;
+}
+
+/******************************************************************************
+ *           IsNormalizedString (KERNEL32.@)
+ */
+BOOL WINAPI IsNormalizedString(NORM_FORM NormForm, LPCWSTR lpString, INT cwLength)
+{
+    DPRINT1("%x %p %d\n", NormForm, lpString, cwLength);
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
\ No newline at end of file
index 94de1a2..e787202 100644 (file)
@@ -8,10 +8,7 @@ spec2def(kernel32_vista.dll kernel32_vista.spec ADD_IMPORTLIB)
 list(APPEND SOURCE
     DllMain.c
     GetTickCount64.c
-    IdnToAscii.c
-    IdnToUnicode.c
     InitOnceExecuteOnce.c
-    nameprep.c
     ${CMAKE_CURRENT_BINARY_DIR}/kernel32_vista.def)
 
 add_library(kernel32_vista SHARED ${SOURCE})
index 9f5e63f..4594116 100644 (file)
@@ -1,5 +1,3 @@
 
 @ stdcall -ret64 GetTickCount64()
-@ stdcall IdnToAscii(long wstr long ptr long)
-@ stdcall IdnToUnicode(long wstr long ptr long)
 @ stdcall InitOnceExecuteOnce(ptr ptr ptr ptr)
index 8c7e0cb..effe478 100644 (file)
@@ -33,6 +33,6 @@ add_library(wininet SHARED
 set_module_type(wininet win32dll)
 target_link_libraries(wininet wine ${PSEH_LIB} zlib)
 add_delay_importlibs(wininet secur32 crypt32 cryptui)
-add_importlibs(wininet mpr shlwapi shell32 user32 advapi32 ws2_32 kernel32_vista msvcrt kernel32 ntdll)
+add_importlibs(wininet mpr shlwapi shell32 user32 advapi32 ws2_32 normaliz kernel32_vista msvcrt kernel32 ntdll)
 add_pch(wininet internet.h SOURCE)
 add_cd_file(TARGET wininet DESTINATION reactos/system32 FOR all)