Alexandre Julliard : user32: Make keyboard. drv into a stand-alone 16-bit module.

Alexandre Julliard julliard at winehq.org
Wed Mar 4 09:01:04 CST 2009


Module: wine
Branch: master
Commit: c2e52469fe089a5232b5c0d2aeb7606f5847f5ec
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c2e52469fe089a5232b5c0d2aeb7606f5847f5ec

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Mar  4 14:30:37 2009 +0100

user32: Make keyboard.drv into a stand-alone 16-bit module.

---

 .gitignore                                         |    1 -
 configure                                          |   10 +++++
 configure.ac                                       |    2 +
 dlls/Makefile.in                                   |    3 +-
 dlls/keyboard.drv16/Makefile.in                    |   15 ++++++++
 dlls/{user32/kbd16.c => keyboard.drv16/keyboard.c} |   39 ++++++--------------
 .../keyboard.drv16.spec}                           |    6 ++--
 dlls/user32/Makefile.in                            |    2 -
 8 files changed, 43 insertions(+), 35 deletions(-)

diff --git a/.gitignore b/.gitignore
index 3dddfaf..9247205 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,7 +41,6 @@ dlls/kernel32/nls/winerr_enu.mc.rc
 dlls/kernel32/nls/winerr_fra.mc.rc
 dlls/kernel32/nls/winerr_kor.mc.rc
 dlls/kernel32/nls/winerr_nor.mc.rc
-dlls/keyboard.drv16
 dlls/krnl386.exe16
 dlls/libd3dx9.def
 dlls/libwinspool.def
diff --git a/configure b/configure
index ab40d14..30f8970 100755
--- a/configure
+++ b/configure
@@ -3905,6 +3905,7 @@ then
     enable_dispdib_dll16=${enable_dispdib_dll16:-no}
     enable_display_drv16=${enable_display_drv16:-no}
     enable_ifsmgr_vxd=${enable_ifsmgr_vxd:-no}
+    enable_keyboard_drv16=${enable_keyboard_drv16:-no}
     enable_mmdevldr_vxd=${enable_mmdevldr_vxd:-no}
     enable_monodebg_vxd=${enable_monodebg_vxd:-no}
     enable_stress_dll16=${enable_stress_dll16:-no}
@@ -25617,6 +25618,14 @@ dlls/kernel32/tests/Makefile: dlls/kernel32/tests/Makefile.in dlls/Maketest.rule
 ac_config_files="$ac_config_files dlls/kernel32/tests/Makefile"
 
 ALL_MAKEFILES="$ALL_MAKEFILES \\
+	dlls/keyboard.drv16/Makefile"
+test "x$enable_keyboard_drv16" != xno && ALL_DLL_DIRS="$ALL_DLL_DIRS \\
+	keyboard.drv16"
+ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS
+dlls/keyboard.drv16/Makefile: dlls/keyboard.drv16/Makefile.in dlls/Makedll.rules"
+ac_config_files="$ac_config_files dlls/keyboard.drv16/Makefile"
+
+ALL_MAKEFILES="$ALL_MAKEFILES \\
 	dlls/loadperf/Makefile"
 test "x$enable_loadperf" != xno && ALL_DLL_DIRS="$ALL_DLL_DIRS \\
 	loadperf"
@@ -28856,6 +28865,7 @@ do
     "dlls/jscript/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/jscript/tests/Makefile" ;;
     "dlls/kernel32/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/kernel32/Makefile" ;;
     "dlls/kernel32/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/kernel32/tests/Makefile" ;;
+    "dlls/keyboard.drv16/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/keyboard.drv16/Makefile" ;;
     "dlls/loadperf/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/loadperf/Makefile" ;;
     "dlls/localspl/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/localspl/Makefile" ;;
     "dlls/localspl/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/localspl/tests/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index 8322dbf..f9b2e04 100644
--- a/configure.ac
+++ b/configure.ac
@@ -142,6 +142,7 @@ then
     enable_dispdib_dll16=${enable_dispdib_dll16:-no}
     enable_display_drv16=${enable_display_drv16:-no}
     enable_ifsmgr_vxd=${enable_ifsmgr_vxd:-no}
+    enable_keyboard_drv16=${enable_keyboard_drv16:-no}
     enable_mmdevldr_vxd=${enable_mmdevldr_vxd:-no}
     enable_monodebg_vxd=${enable_monodebg_vxd:-no}
     enable_stress_dll16=${enable_stress_dll16:-no}
@@ -2038,6 +2039,7 @@ WINE_CONFIG_MAKEFILE([dlls/jscript/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DL
 WINE_CONFIG_MAKEFILE([dlls/jscript/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests])
 WINE_CONFIG_MAKEFILE([dlls/kernel32/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
 WINE_CONFIG_MAKEFILE([dlls/kernel32/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests])
+WINE_CONFIG_MAKEFILE([dlls/keyboard.drv16/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
 WINE_CONFIG_MAKEFILE([dlls/loadperf/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
 WINE_CONFIG_MAKEFILE([dlls/localspl/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
 WINE_CONFIG_MAKEFILE([dlls/localspl/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS],[enable_tests])
diff --git a/dlls/Makefile.in b/dlls/Makefile.in
index e09d7cb..def2518 100644
--- a/dlls/Makefile.in
+++ b/dlls/Makefile.in
@@ -26,7 +26,6 @@ WIN16_FILES = \
 	ddeml.dll16 \
 	gdi.exe16 \
 	imm.dll16 \
-	keyboard.drv16 \
 	krnl386.exe16 \
 	lzexpand.dll16 \
 	mmsystem.dll16 \
@@ -121,7 +120,7 @@ shell.dll16:
 twain.dll16:
 	echo "twain_32.dll" >$@
 
-ddeml.dll16 keyboard.drv16 mouse.drv16 user.exe16:
+ddeml.dll16 mouse.drv16 user.exe16:
 	echo "user32.dll" >$@
 
 ver.dll16:
diff --git a/dlls/keyboard.drv16/Makefile.in b/dlls/keyboard.drv16/Makefile.in
new file mode 100644
index 0000000..ef8c36c
--- /dev/null
+++ b/dlls/keyboard.drv16/Makefile.in
@@ -0,0 +1,15 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+MODULE    = keyboard.drv16
+IMPORTS   = user32 kernel32
+EXTRADLLFLAGS = -Wb,--subsystem,win16
+
+SPEC_SRCS = keyboard.drv16.spec
+
+C_SRCS = keyboard.c
+
+ at MAKE_DLL_RULES@
+
+ at DEPENDENCIES@  # everything below this line is overwritten by make depend
diff --git a/dlls/user32/kbd16.c b/dlls/keyboard.drv16/keyboard.c
similarity index 84%
rename from dlls/user32/kbd16.c
rename to dlls/keyboard.drv16/keyboard.c
index ffc53ef..f42ee4b 100644
--- a/dlls/user32/kbd16.c
+++ b/dlls/keyboard.drv16/keyboard.c
@@ -54,7 +54,7 @@ static LPBYTE pKeyStateTable;
 /***********************************************************************
  *		Inquire (KEYBOARD.1)
  */
-WORD WINAPI KEYBOARD_Inquire(LPKBINFO kbInfo)
+WORD WINAPI Inquire16(LPKBINFO kbInfo)
 {
   kbInfo->Begin_First_Range = 0;
   kbInfo->End_First_Range = 0;
@@ -68,7 +68,7 @@ WORD WINAPI KEYBOARD_Inquire(LPKBINFO kbInfo)
 /***********************************************************************
  *		Enable (KEYBOARD.2)
  */
-VOID WINAPI KEYBOARD_Enable( FARPROC16 proc, LPBYTE lpKeyState )
+VOID WINAPI Enable16( FARPROC16 proc, LPBYTE lpKeyState )
 {
     DefKeybEventProc = proc;
     pKeyStateTable = lpKeyState;
@@ -79,12 +79,21 @@ VOID WINAPI KEYBOARD_Enable( FARPROC16 proc, LPBYTE lpKeyState )
 /***********************************************************************
  *		Disable (KEYBOARD.3)
  */
-VOID WINAPI KEYBOARD_Disable(VOID)
+VOID WINAPI Disable16(VOID)
 {
     DefKeybEventProc = NULL;
     pKeyStateTable = NULL;
 }
 
+/****************************************************************************
+ *		ToAscii (KEYBOARD.4)
+ */
+INT16 WINAPI ToAscii16(UINT16 virtKey,UINT16 scanCode, LPBYTE lpKeyState,
+                       LPVOID lpChar, UINT16 flags)
+{
+    return ToAscii( virtKey, scanCode, lpKeyState, lpChar, flags );
+}
+
 /***********************************************************************
  *           AnsiToOem   (KEYBOARD.5)
  */
@@ -185,27 +194,3 @@ void WINAPI OemToAnsiBuff16( LPCSTR s, LPSTR d, UINT16 len )
 {
     if (len != 0) OemToCharBuffA( s, d, len );
 }
-
-/****************************************************************************
- *		ToAscii (KEYBOARD.4)
- *
- * The ToAscii function translates the specified virtual-key code and keyboard
- * state to the corresponding Windows character or characters.
- *
- * If the specified key is a dead key, the return value is negative. Otherwise,
- * it is one of the following values:
- * Value	Meaning
- * 0	The specified virtual key has no translation for the current state of the keyboard.
- * 1	One Windows character was copied to the buffer.
- * 2	Two characters were copied to the buffer. This usually happens when a
- *      dead-key character (accent or diacritic) stored in the keyboard layout cannot
- *      be composed with the specified virtual key to form a single character.
- *
- * FIXME : should do the above (return 2 for non matching deadchar+char combinations)
- *
- */
-INT16 WINAPI ToAscii16(UINT16 virtKey,UINT16 scanCode, LPBYTE lpKeyState,
-                       LPVOID lpChar, UINT16 flags)
-{
-    return ToAscii( virtKey, scanCode, lpKeyState, lpChar, flags );
-}
diff --git a/dlls/user32/keyboard.drv.spec b/dlls/keyboard.drv16/keyboard.drv16.spec
similarity index 86%
rename from dlls/user32/keyboard.drv.spec
rename to dlls/keyboard.drv16/keyboard.drv16.spec
index 230b18e..88dc7a7 100644
--- a/dlls/user32/keyboard.drv.spec
+++ b/dlls/keyboard.drv16/keyboard.drv16.spec
@@ -1,6 +1,6 @@
-1   pascal -ret16 Inquire(ptr) KEYBOARD_Inquire
-2   pascal -ret16 Enable(segptr ptr) KEYBOARD_Enable
-3   pascal -ret16 Disable() KEYBOARD_Disable
+1   pascal -ret16 Inquire(ptr) Inquire16
+2   pascal -ret16 Enable(segptr ptr) Enable16
+3   pascal -ret16 Disable() Disable16
 4   pascal -ret16 ToAscii(word word ptr ptr word) ToAscii16
 5   pascal -ret16 AnsiToOem(str ptr) AnsiToOem16
 6   pascal -ret16 OemToAnsi(str ptr) OemToAnsi16
diff --git a/dlls/user32/Makefile.in b/dlls/user32/Makefile.in
index 2bfc65b..511db73 100644
--- a/dlls/user32/Makefile.in
+++ b/dlls/user32/Makefile.in
@@ -10,7 +10,6 @@ DELAYIMPORTS = imm32
 
 SPEC_SRCS16 = \
 	ddeml.spec \
-	keyboard.drv.spec \
 	mouse.drv.spec \
 	user.exe.spec
 
@@ -68,7 +67,6 @@ C_SRCS16 = \
 	bidi16.c \
 	comm16.c \
 	hook16.c \
-	kbd16.c \
 	mouse16.c \
 	network.c \
 	user16.c \




More information about the wine-cvs mailing list