Alexandre Julliard : kernel32: Make the keymap entries const.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Aug 2 06:48:50 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: ae1f6982a0b31c697ccf60dc6c396bf16f5f1bc6
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=ae1f6982a0b31c697ccf60dc6c396bf16f5f1bc6
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Aug 2 13:32:05 2006 +0200
kernel32: Make the keymap entries const.
---
dlls/kernel/editline.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/dlls/kernel/editline.c b/dlls/kernel/editline.c
index af7eb2a..13c9697 100644
--- a/dlls/kernel/editline.c
+++ b/dlls/kernel/editline.c
@@ -46,7 +46,7 @@ typedef struct
{
DWORD keyState; /* keyState (from INPUT_RECORD) to match */
BOOL chkChar; /* check vk or char */
- KeyEntry* entries; /* array of entries */
+ const KeyEntry* entries; /* array of entries */
} KeyMap;
typedef struct WCEL_Context {
@@ -648,7 +648,7 @@ #endif
* ====================================================================*/
#define CTRL(x) ((x) - '@')
-static KeyEntry StdKeyMap[] =
+static const KeyEntry StdKeyMap[] =
{
{/*BACK*/0x08, WCEL_DeletePrevChar },
{/*RETURN*/0x0d, WCEL_Done },
@@ -656,14 +656,14 @@ static KeyEntry StdKeyMap[] =
{ 0, NULL }
};
-static KeyEntry Win32ExtraStdKeyMap[] =
+static const KeyEntry Win32ExtraStdKeyMap[] =
{
{/*VK_F8*/ 0x77, WCEL_FindPrevInHist },
{ 0, NULL }
};
-static KeyEntry EmacsKeyMapCtrl[] =
+static const KeyEntry EmacsKeyMapCtrl[] =
{
{ CTRL('@'), WCEL_SetMark },
{ CTRL('A'), WCEL_MoveToBeg },
@@ -695,7 +695,7 @@ static KeyEntry EmacsKeyMapCtrl[] =
{ 0, NULL }
};
-static KeyEntry EmacsKeyMapAlt[] =
+static const KeyEntry EmacsKeyMapAlt[] =
{
{/*DEL*/127, WCEL_DeleteLeftWord },
{ '<', WCEL_MoveToFirstHist },
@@ -712,7 +712,7 @@ static KeyEntry EmacsKeyMapAlt[] =
{ 0, NULL }
};
-static KeyEntry EmacsKeyMapExtended[] =
+static const KeyEntry EmacsKeyMapExtended[] =
{
{/*RETURN*/ 0x0d, WCEL_Done },
{/*VK_PRIOR*/0x21, WCEL_MoveToPrevHist },
@@ -725,7 +725,7 @@ static KeyEntry EmacsKeyMapExtended[] =
{ 0, NULL }
};
-static KeyMap EmacsKeyMap[] =
+static const KeyMap EmacsKeyMap[] =
{
{0x00000000, 1, StdKeyMap},
{0x00000001, 1, EmacsKeyMapAlt}, /* left alt */
@@ -736,7 +736,7 @@ static KeyMap EmacsKeyMap[] =
{0, 0, 0}
};
-static KeyEntry Win32KeyMapExtended[] =
+static const KeyEntry Win32KeyMapExtended[] =
{
{/*VK_LEFT*/ 0x25, WCEL_MoveLeft },
{/*VK_RIGHT*/0x27, WCEL_MoveRight },
@@ -748,7 +748,7 @@ static KeyEntry Win32KeyMapExtended[] =
{ 0, NULL }
};
-static KeyEntry Win32KeyMapCtrlExtended[] =
+static const KeyEntry Win32KeyMapCtrlExtended[] =
{
{/*VK_LEFT*/ 0x25, WCEL_MoveToLeftWord },
{/*VK_RIGHT*/0x27, WCEL_MoveToRightWord },
@@ -756,7 +756,7 @@ static KeyEntry Win32KeyMapCtrlExtended[
{ 0, NULL }
};
-KeyMap Win32KeyMap[] =
+static const KeyMap Win32KeyMap[] =
{
{0x00000000, 1, StdKeyMap},
{0x00000000, 0, Win32ExtraStdKeyMap},
@@ -777,8 +777,8 @@ WCHAR* CONSOLE_Readline(HANDLE hConsoleI
{
WCEL_Context ctx;
INPUT_RECORD ir;
- KeyMap* km;
- KeyEntry* ke;
+ const KeyMap* km;
+ const KeyEntry* ke;
unsigned ofs;
void (*func)(struct WCEL_Context* ctx);
DWORD ks;
More information about the wine-cvs
mailing list