Dmitry Timoshkov : wineconsole: Make some data const.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Jan 10 05:36:07 CST 2007
Module: wine
Branch: master
Commit: 9e357cd78100218bf012ee1876457a26b6325c13
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9e357cd78100218bf012ee1876457a26b6325c13
Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date: Wed Jan 10 15:27:24 2007 +0800
wineconsole: Make some data const.
---
programs/wineconsole/curses.c | 8 ++++----
programs/wineconsole/user.c | 2 +-
programs/wineconsole/winecon_user.h | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/programs/wineconsole/curses.c b/programs/wineconsole/curses.c
index 692cec2..fcda4ec 100644
--- a/programs/wineconsole/curses.c
+++ b/programs/wineconsole/curses.c
@@ -130,9 +130,9 @@ MAKE_FUNCPTR(mousemask)
static BOOL WCCURSES_bind_libcurses(void)
{
#ifdef HAVE_NCURSES_H
- static const char *ncname = SONAME_LIBNCURSES;
+ static const char ncname[] = SONAME_LIBNCURSES;
#else
- static const char *ncname = SONAME_LIBCURSES;
+ static const char ncname[] = SONAME_LIBCURSES;
#endif
nc_handle = wine_dlopen(ncname, RTLD_NOW, NULL, 0);
@@ -434,7 +434,7 @@ static void WCCURSES_ScrollV(struct inne
}
/* Ascii -> VK, generated by calling VkKeyScanA(i) */
-static int vkkeyscan_table[256] =
+static const int vkkeyscan_table[256] =
{
0,0,0,0,0,0,0,0,8,9,0,0,0,13,0,0,0,0,0,19,145,556,0,0,0,0,0,27,0,0,0,
0,32,305,478,307,308,309,311,222,313,304,312,443,188,189,190,191,48,
@@ -448,7 +448,7 @@ static int vkkeyscan_table[256] =
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,400,0,0,0,0,0,0
};
-static int mapvkey_0[256] =
+static const int mapvkey_0[256] =
{
0,0,0,0,0,0,0,0,14,15,0,0,0,28,0,0,42,29,56,69,58,0,0,0,0,0,0,1,0,0,
0,0,57,73,81,79,71,75,72,77,80,0,0,0,55,82,83,0,11,2,3,4,5,6,7,8,9,
diff --git a/programs/wineconsole/user.c b/programs/wineconsole/user.c
index 4249e1f..d597a1e 100644
--- a/programs/wineconsole/user.c
+++ b/programs/wineconsole/user.c
@@ -31,7 +31,7 @@ WINE_DECLARE_DEBUG_CHANNEL(wc_font);
UINT g_uiDefaultCharset;
/* mapping console colors to RGB values */
-COLORREF WCUSER_ColorMap[16] =
+const COLORREF WCUSER_ColorMap[16] =
{
RGB(0x00, 0x00, 0x00), RGB(0x00, 0x00, 0x80), RGB(0x00, 0x80, 0x00), RGB(0x00, 0x80, 0x80),
RGB(0x80, 0x00, 0x00), RGB(0x80, 0x00, 0x80), RGB(0x80, 0x80, 0x00), RGB(0x80, 0x80, 0x80),
diff --git a/programs/wineconsole/winecon_user.h b/programs/wineconsole/winecon_user.h
index aa86338..e6e2507 100644
--- a/programs/wineconsole/winecon_user.h
+++ b/programs/wineconsole/winecon_user.h
@@ -44,7 +44,7 @@ struct inner_data_user {
#define PRIVATE(data) ((struct inner_data_user*)((data)->private))
/* from user.c */
-extern COLORREF WCUSER_ColorMap[16];
+extern const COLORREF WCUSER_ColorMap[16];
extern BOOL WCUSER_GetProperties(struct inner_data*, BOOL);
extern BOOL WCUSER_ValidateFont(const struct inner_data* data, const LOGFONT* lf);
extern BOOL WCUSER_ValidateFontMetric(const struct inner_data* data,
More information about the wine-cvs
mailing list