From 8ec0e16b15c7875384594f1156e99d158b3b93fd Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 3 Jun 2009 04:37:27 +0000 Subject: [PATCH] Von: Thomas Zimmermann Betreff: [SDL] [PATCH] Make static variables const Datum: Tue, 19 May 2009 19:45:37 +0200 Hi, this is a set of simple changes which make some of SDL's internal static arrays constant. The purpose is to shrink the number of write-able static bytes and thus increase the number of memory pages shared between SDL applications. The patch set is against trunk@4513. Each of the attached patch files is specific to a sub-system. The set is completed by a second mail, because of the list's 40 KiB limit. The files readelf-r4513.txt and readelf-const-patch.txt where made by calling 'readelf -S libSDL.so'. They show the difference in ELF sections without and with the patch. Some numbers measured on my x86-64: Before [13] .rodata PROGBITS 00000000000eaaa0 000eaaa0 0000000000008170 0000000000000000 A 0 0 32 [19] .data.rel.ro PROGBITS 00000000003045e0 001045e0 00000000000023d0 0000000000000000 WA 0 0 32 [23] .data PROGBITS 00000000003076e0 001076e0 0000000000004988 0000000000000000 WA 0 0 32 After [13] .rodata PROGBITS 00000000000eaaa0 000eaaa0 0000000000009a50 0000000000000000 A 0 0 32 [19] .data.rel.ro PROGBITS 0000000000306040 00106040 0000000000002608 0000000000000000 WA 0 0 32 [23] .data PROGBITS 0000000000309360 00109360 0000000000002e88 0000000000000000 WA 0 0 32 The size of the write-able data section decreased considerably. Some entries became const-after-relocation, while most of its content went straight into the read-only data section. Best regards, Thomas --- src/SDL_fatal.c | 2 +- src/audio/SDL_audio.c | 2 +- src/audio/esd/SDL_esdaudio.c | 8 +++++--- src/events/SDL_keyboard.c | 2 +- src/events/blank_cursor.h | 4 ++-- src/events/default_cursor.h | 8 ++++---- src/events/scancodes_darwin.h | 2 +- src/events/scancodes_linux.h | 2 +- src/events/scancodes_win32.h | 2 +- src/events/scancodes_xfree86.h | 4 ++-- src/libm/e_log.c | 3 ++- src/libm/e_rem_pio2.c | 2 +- src/libm/e_sqrt.c | 3 ++- src/libm/k_cos.c | 3 ++- src/libm/k_rem_pio2.c | 2 +- src/libm/k_sin.c | 3 ++- src/libm/s_copysign.c | 2 +- src/libm/s_cos.c | 3 ++- src/libm/s_fabs.c | 3 ++- src/libm/s_floor.c | 2 +- src/libm/s_scalbn.c | 2 +- src/libm/s_sin.c | 3 ++- src/stdlib/SDL_qsort.c | 2 +- src/thread/pthread/SDL_systhread.c | 2 +- src/video/SDL_RLEaccel.c | 2 +- src/video/SDL_blit_0.c | 4 ++-- src/video/SDL_blit_1.c | 4 ++-- src/video/SDL_blit_N.c | 4 ++-- src/video/SDL_video.c | 2 +- src/video/x11/SDL_x11keyboard.c | 6 +++--- src/video/x11/imKStoUCS.c | 10 +++++----- 31 files changed, 56 insertions(+), 47 deletions(-) diff --git a/src/SDL_fatal.c b/src/SDL_fatal.c index faf614491..fde741dae 100644 --- a/src/SDL_fatal.c +++ b/src/SDL_fatal.c @@ -43,7 +43,7 @@ SDL_Parachute(int sig) raise(sig); } -static int SDL_fatal_signals[] = { +static const int SDL_fatal_signals[] = { SIGSEGV, #ifdef SIGBUS SIGBUS, diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c index 5930e9397..90a56d924 100644 --- a/src/audio/SDL_audio.c +++ b/src/audio/SDL_audio.c @@ -77,7 +77,7 @@ extern AudioBootStrap FUSIONSOUND_bootstrap; /* Available audio drivers */ -static AudioBootStrap *bootstrap[] = { +static const AudioBootStrap *const bootstrap[] = { #if SDL_AUDIO_DRIVER_BSD &BSD_AUDIO_bootstrap, #endif diff --git a/src/audio/esd/SDL_esdaudio.c b/src/audio/esd/SDL_esdaudio.c index 515cd61bd..545520f7c 100644 --- a/src/audio/esd/SDL_esdaudio.c +++ b/src/audio/esd/SDL_esdaudio.c @@ -60,9 +60,11 @@ static struct { const char *name; void **func; -} esd_functions[] = { -SDL_ESD_SYM(esd_open_sound), - SDL_ESD_SYM(esd_close), SDL_ESD_SYM(esd_play_stream),}; +} const esd_functions[] = { + SDL_ESD_SYM(esd_open_sound), + SDL_ESD_SYM(esd_close), SDL_ESD_SYM(esd_play_stream), +}; + #undef SDL_ESD_SYM static void diff --git a/src/events/SDL_keyboard.c b/src/events/SDL_keyboard.c index ffac838db..8f9692151 100644 --- a/src/events/SDL_keyboard.c +++ b/src/events/SDL_keyboard.c @@ -34,7 +34,7 @@ static int SDL_num_keyboards; static int SDL_current_keyboard; static SDL_Keyboard **SDL_keyboards; -static SDLKey SDL_default_keymap[SDL_NUM_SCANCODES] = { +static const SDLKey SDL_default_keymap[SDL_NUM_SCANCODES] = { 0, 0, 0, 0, 'a', 'b', diff --git a/src/events/blank_cursor.h b/src/events/blank_cursor.h index fa89f38fb..89e643954 100644 --- a/src/events/blank_cursor.h +++ b/src/events/blank_cursor.h @@ -28,7 +28,7 @@ #define BLANK_CHOTX 0 #define BLANK_CHOTY 0 -static unsigned char blank_cdata[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; -static unsigned char blank_cmask[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; +static const unsigned char blank_cdata[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; +static const unsigned char blank_cmask[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/events/default_cursor.h b/src/events/default_cursor.h index 8b7972db3..d7075e07e 100644 --- a/src/events/default_cursor.h +++ b/src/events/default_cursor.h @@ -33,7 +33,7 @@ #ifdef USE_MACOS_CURSOR -static unsigned char default_cdata[] = { +static const unsigned char default_cdata[] = { 0x00, 0x00, 0x40, 0x00, 0x60, 0x00, @@ -52,7 +52,7 @@ static unsigned char default_cdata[] = { 0x00, 0x00 }; -static unsigned char default_cmask[] = { +static const unsigned char default_cmask[] = { 0xC0, 0x00, 0xE0, 0x00, 0xF0, 0x00, @@ -73,7 +73,7 @@ static unsigned char default_cmask[] = { #else -static unsigned char default_cdata[] = { +static const unsigned char default_cdata[] = { 0x00, 0x00, 0x40, 0x00, 0x60, 0x00, @@ -92,7 +92,7 @@ static unsigned char default_cdata[] = { 0x00, 0x00 }; -static unsigned char default_cmask[] = { +static const unsigned char default_cmask[] = { 0x40, 0x00, 0xE0, 0x00, 0xF0, 0x00, diff --git a/src/events/scancodes_darwin.h b/src/events/scancodes_darwin.h index 9eb0a1276..264268886 100644 --- a/src/events/scancodes_darwin.h +++ b/src/events/scancodes_darwin.h @@ -27,7 +27,7 @@ - experimentation on various ADB and USB ISO keyboards and one ADB ANSI keyboard */ /* *INDENT-OFF* */ -static SDL_scancode darwin_scancode_table[] = { +static const SDL_scancode darwin_scancode_table[] = { /* 0 */ SDL_SCANCODE_A, /* 1 */ SDL_SCANCODE_S, /* 2 */ SDL_SCANCODE_D, diff --git a/src/events/scancodes_linux.h b/src/events/scancodes_linux.h index 192046253..db5666087 100644 --- a/src/events/scancodes_linux.h +++ b/src/events/scancodes_linux.h @@ -26,7 +26,7 @@ - Linux kernel source input.h */ /* *INDENT-OFF* */ -static SDL_scancode linux_scancode_table[] = { +static SDL_scancode const linux_scancode_table[] = { /* 0 */ SDL_SCANCODE_UNKNOWN, /* 1 */ SDL_SCANCODE_ESCAPE, /* 2 */ SDL_SCANCODE_1, diff --git a/src/events/scancodes_win32.h b/src/events/scancodes_win32.h index 0bbe3679e..5348e8ff1 100644 --- a/src/events/scancodes_win32.h +++ b/src/events/scancodes_win32.h @@ -26,7 +26,7 @@ - msdn.microsoft.com */ /* *INDENT-OFF* */ -static SDL_scancode win32_scancode_table[] = { +static const SDL_scancode win32_scancode_table[] = { /* 0, 0x00 */ SDL_SCANCODE_UNKNOWN, /* 1, 0x01 */ SDL_SCANCODE_UNKNOWN, /* 2, 0x02 */ SDL_SCANCODE_UNKNOWN, diff --git a/src/events/scancodes_xfree86.h b/src/events/scancodes_xfree86.h index 49e14eb57..cbf6603e1 100644 --- a/src/events/scancodes_xfree86.h +++ b/src/events/scancodes_xfree86.h @@ -26,7 +26,7 @@ - atKeyNames.h from XFree86 source code */ /* *INDENT-OFF* */ -static SDL_scancode xfree86_scancode_table[] = { +static const SDL_scancode xfree86_scancode_table[] = { /* 0 */ SDL_SCANCODE_UNKNOWN, /* 1 */ SDL_SCANCODE_ESCAPE, /* 2 */ SDL_SCANCODE_1, @@ -177,7 +177,7 @@ static SDL_scancode xfree86_scancode_table[] = { }; /* for wireless usb keyboard (manufacturer TRUST) without numpad. */ -static SDL_scancode xfree86_scancode_table2[] = { +static const SDL_scancode xfree86_scancode_table2[] = { /* 0 */ SDL_SCANCODE_UNKNOWN, /* 1 */ SDL_SCANCODE_ESCAPE, /* 2 */ SDL_SCANCODE_1, diff --git a/src/libm/e_log.c b/src/libm/e_log.c index 626027131..47e8ea452 100644 --- a/src/libm/e_log.c +++ b/src/libm/e_log.c @@ -11,7 +11,8 @@ */ #if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: e_log.c,v 1.8 1995/05/10 20:45:49 jtc Exp $"; +static const char rcsid[] = + "$NetBSD: e_log.c,v 1.8 1995/05/10 20:45:49 jtc Exp $"; #endif /* __ieee754_log(x) diff --git a/src/libm/e_rem_pio2.c b/src/libm/e_rem_pio2.c index 14e050102..3578a0fad 100644 --- a/src/libm/e_rem_pio2.c +++ b/src/libm/e_rem_pio2.c @@ -11,7 +11,7 @@ */ #if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = +static const char rcsid[] = "$NetBSD: e_rem_pio2.c,v 1.8 1995/05/10 20:46:02 jtc Exp $"; #endif diff --git a/src/libm/e_sqrt.c b/src/libm/e_sqrt.c index e1983fdb3..3c4b25ea5 100644 --- a/src/libm/e_sqrt.c +++ b/src/libm/e_sqrt.c @@ -11,7 +11,8 @@ */ #if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: e_sqrt.c,v 1.8 1995/05/10 20:46:17 jtc Exp $"; +static const char rcsid[] = + "$NetBSD: e_sqrt.c,v 1.8 1995/05/10 20:46:17 jtc Exp $"; #endif /* __ieee754_sqrt(x) diff --git a/src/libm/k_cos.c b/src/libm/k_cos.c index 5df0f514c..ab2637eb7 100644 --- a/src/libm/k_cos.c +++ b/src/libm/k_cos.c @@ -11,7 +11,8 @@ */ #if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: k_cos.c,v 1.8 1995/05/10 20:46:22 jtc Exp $"; +static const char rcsid[] = + "$NetBSD: k_cos.c,v 1.8 1995/05/10 20:46:22 jtc Exp $"; #endif /* diff --git a/src/libm/k_rem_pio2.c b/src/libm/k_rem_pio2.c index 692b22701..42db4a898 100644 --- a/src/libm/k_rem_pio2.c +++ b/src/libm/k_rem_pio2.c @@ -11,7 +11,7 @@ */ #if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = +static const char rcsid[] = "$NetBSD: k_rem_pio2.c,v 1.7 1995/05/10 20:46:25 jtc Exp $"; #endif diff --git a/src/libm/k_sin.c b/src/libm/k_sin.c index 9211744af..250ee6eca 100644 --- a/src/libm/k_sin.c +++ b/src/libm/k_sin.c @@ -11,7 +11,8 @@ */ #if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: k_sin.c,v 1.8 1995/05/10 20:46:31 jtc Exp $"; +static const char rcsid[] = + "$NetBSD: k_sin.c,v 1.8 1995/05/10 20:46:31 jtc Exp $"; #endif /* __kernel_sin( x, y, iy) diff --git a/src/libm/s_copysign.c b/src/libm/s_copysign.c index 27a0e96e2..65e719007 100644 --- a/src/libm/s_copysign.c +++ b/src/libm/s_copysign.c @@ -11,7 +11,7 @@ */ #if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = +static const char rcsid[] = "$NetBSD: s_copysign.c,v 1.8 1995/05/10 20:46:57 jtc Exp $"; #endif diff --git a/src/libm/s_cos.c b/src/libm/s_cos.c index 494a0d898..9a568fca2 100644 --- a/src/libm/s_cos.c +++ b/src/libm/s_cos.c @@ -11,7 +11,8 @@ */ #if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_cos.c,v 1.7 1995/05/10 20:47:02 jtc Exp $"; +static const char rcsid[] = + "$NetBSD: s_cos.c,v 1.7 1995/05/10 20:47:02 jtc Exp $"; #endif /* cos(x) diff --git a/src/libm/s_fabs.c b/src/libm/s_fabs.c index f7704f239..dba666cbc 100644 --- a/src/libm/s_fabs.c +++ b/src/libm/s_fabs.c @@ -11,7 +11,8 @@ */ #if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_fabs.c,v 1.7 1995/05/10 20:47:13 jtc Exp $"; +static const char rcsid[] = + "$NetBSD: s_fabs.c,v 1.7 1995/05/10 20:47:13 jtc Exp $"; #endif /* diff --git a/src/libm/s_floor.c b/src/libm/s_floor.c index f49b69685..c8898e2f4 100644 --- a/src/libm/s_floor.c +++ b/src/libm/s_floor.c @@ -11,7 +11,7 @@ */ #if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = +static const char rcsid[] = "$NetBSD: s_floor.c,v 1.8 1995/05/10 20:47:20 jtc Exp $"; #endif diff --git a/src/libm/s_scalbn.c b/src/libm/s_scalbn.c index b3a05bf07..bd4a8934f 100644 --- a/src/libm/s_scalbn.c +++ b/src/libm/s_scalbn.c @@ -11,7 +11,7 @@ */ #if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = +static const char rcsid[] = "$NetBSD: s_scalbn.c,v 1.8 1995/05/10 20:48:08 jtc Exp $"; #endif diff --git a/src/libm/s_sin.c b/src/libm/s_sin.c index c89518eb4..1b22f8813 100644 --- a/src/libm/s_sin.c +++ b/src/libm/s_sin.c @@ -11,7 +11,8 @@ */ #if defined(LIBM_SCCS) && !defined(lint) -static char rcsid[] = "$NetBSD: s_sin.c,v 1.7 1995/05/10 20:48:15 jtc Exp $"; +static const char rcsid[] = + "$NetBSD: s_sin.c,v 1.7 1995/05/10 20:48:15 jtc Exp $"; #endif /* sin(x) diff --git a/src/stdlib/SDL_qsort.c b/src/stdlib/SDL_qsort.c index 11be41f3e..5f268d2b5 100644 --- a/src/stdlib/SDL_qsort.c +++ b/src/stdlib/SDL_qsort.c @@ -60,7 +60,7 @@ #ifndef HAVE_QSORT -static char _ID[] = ""; +static const char _ID[] = ""; /* How many bytes are there per word? (Must be a power of 2, * and must in fact equal sizeof(int).) diff --git a/src/thread/pthread/SDL_systhread.c b/src/thread/pthread/SDL_systhread.c index fe79ff0e3..2a48c78cc 100644 --- a/src/thread/pthread/SDL_systhread.c +++ b/src/thread/pthread/SDL_systhread.c @@ -29,7 +29,7 @@ #include "../SDL_systhread.h" /* List of signals to mask in the subthreads */ -static int sig_list[] = { +static const int sig_list[] = { SIGHUP, SIGINT, SIGQUIT, SIGPIPE, SIGALRM, SIGTERM, SIGCHLD, SIGWINCH, SIGVTALRM, SIGPROF, 0 }; diff --git a/src/video/SDL_RLEaccel.c b/src/video/SDL_RLEaccel.c index 4be519c8e..0b18bf718 100644 --- a/src/video/SDL_RLEaccel.c +++ b/src/video/SDL_RLEaccel.c @@ -1259,7 +1259,7 @@ getpix_32(Uint8 * srcbuf) typedef Uint32(*getpix_func) (Uint8 *); -static getpix_func getpixes[4] = { +static const getpix_func getpixes[4] = { getpix_8, getpix_16, getpix_24, getpix_32 }; diff --git a/src/video/SDL_blit_0.c b/src/video/SDL_blit_0.c index 3eda0e032..abb3b19da 100644 --- a/src/video/SDL_blit_0.c +++ b/src/video/SDL_blit_0.c @@ -443,11 +443,11 @@ BlitBtoNAlphaKey(SDL_BlitInfo * info) } } -static SDL_BlitFunc bitmap_blit[] = { +static const SDL_BlitFunc bitmap_blit[] = { NULL, BlitBto1, BlitBto2, BlitBto3, BlitBto4 }; -static SDL_BlitFunc colorkey_blit[] = { +static const SDL_BlitFunc colorkey_blit[] = { NULL, BlitBto1Key, BlitBto2Key, BlitBto3Key, BlitBto4Key }; diff --git a/src/video/SDL_blit_1.c b/src/video/SDL_blit_1.c index 7039adfde..c74143db8 100644 --- a/src/video/SDL_blit_1.c +++ b/src/video/SDL_blit_1.c @@ -512,11 +512,11 @@ Blit1toNAlphaKey(SDL_BlitInfo * info) } } -static SDL_BlitFunc one_blit[] = { +static const SDL_BlitFunc one_blit[] = { NULL, Blit1to1, Blit1to2, Blit1to3, Blit1to4 }; -static SDL_BlitFunc one_blitkey[] = { +static const SDL_BlitFunc one_blitkey[] = { NULL, Blit1to1Key, Blit1to2Key, Blit1to3Key, Blit1to4Key }; diff --git a/src/video/SDL_blit_N.c b/src/video/SDL_blit_N.c index 0ed174c3f..3b4fb74db 100644 --- a/src/video/SDL_blit_N.c +++ b/src/video/SDL_blit_N.c @@ -113,7 +113,7 @@ calc_swizzle32(const SDL_PixelFormat * srcfmt, const SDL_PixelFormat * dstfmt) * leave alpha with a zero mask, but we should still swizzle the bits. */ /* ARGB */ - const static struct SDL_PixelFormat default_pixel_format = { + const static const struct SDL_PixelFormat default_pixel_format = { NULL, 32, 4, 0, 0, 0, 0, 16, 8, 0, 24, @@ -2404,7 +2404,7 @@ static const struct blit_table normal_blit_4[] = { {0, 0, 0, 0, 0, 0, 0, 0, BlitNtoN, 0} }; -static const struct blit_table *normal_blit[] = { +static const struct blit_table *const normal_blit[] = { normal_blit_1, normal_blit_2, normal_blit_3, normal_blit_4 }; diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index d7a2850f0..2d940c905 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -48,7 +48,7 @@ #endif /* SDL_VIDEO_OPENGL */ /* Available video drivers */ -static VideoBootStrap *bootstrap[] = { +static const VideoBootStrap *const bootstrap[] = { #if SDL_VIDEO_DRIVER_COCOA &COCOA_bootstrap, #endif diff --git a/src/video/x11/SDL_x11keyboard.c b/src/video/x11/SDL_x11keyboard.c index bbca0f272..02ac82b6c 100644 --- a/src/video/x11/SDL_x11keyboard.c +++ b/src/video/x11/SDL_x11keyboard.c @@ -32,7 +32,7 @@ #include "imKStoUCS.h" /* *INDENT-OFF* */ -static struct { +static const struct { KeySym keysym; SDLKey sdlkey; } KeySymToSDLKey[] = { @@ -132,9 +132,9 @@ static struct { { XK_Mode_switch, SDLK_MODE }, }; -static struct +static const struct { - SDL_scancode *table; + const SDL_scancode const *table; int table_size; } scancode_set[] = { { darwin_scancode_table, SDL_arraysize(darwin_scancode_table) }, diff --git a/src/video/x11/imKStoUCS.c b/src/video/x11/imKStoUCS.c index 45c149b8a..c17a1b304 100644 --- a/src/video/x11/imKStoUCS.c +++ b/src/video/x11/imKStoUCS.c @@ -102,7 +102,7 @@ static unsigned short const keysym_to_unicode_590_5fe[] = { 0x06a9, 0x06af, 0x06ba, 0x06be, 0x06cc, 0x06d2, 0x06c1 /* 0x05f8-0x05fe */ }; -static unsigned short keysym_to_unicode_680_6ff[] = { +static unsigned short const keysym_to_unicode_680_6ff[] = { 0x0492, 0x0496, 0x049a, 0x049c, 0x04a2, 0x04ae, 0x04b0, 0x04b2, /* 0x0680-0x0687 */ 0x04b6, 0x04b8, 0x04ba, 0x0000, 0x04d8, 0x04e2, 0x04e8, 0x04ee, /* 0x0688-0x068f */ 0x0493, 0x0497, 0x049b, 0x049d, 0x04a3, 0x04af, 0x04b1, 0x04b3, /* 0x0690-0x0697 */ @@ -214,7 +214,7 @@ static unsigned short const keysym_to_unicode_ea0_eff[] = { 0x11eb, 0x0000, 0x11f9, 0x0000, 0x0000, 0x0000, 0x0000, 0x20a9, /* 0x0ef8-0x0eff */ }; -static unsigned short keysym_to_unicode_12a1_12fe[] = { +static unsigned short const keysym_to_unicode_12a1_12fe[] = { 0x1e02, 0x1e03, 0x0000, 0x0000, 0x0000, 0x1e0a, 0x0000, /* 0x12a0-0x12a7 */ 0x1e80, 0x0000, 0x1e82, 0x1e0b, 0x1ef2, 0x0000, 0x0000, 0x0000, /* 0x12a8-0x12af */ 0x1e1e, 0x1e1f, 0x0000, 0x0000, 0x1e40, 0x1e41, 0x0000, 0x1e56, /* 0x12b0-0x12b7 */ @@ -233,7 +233,7 @@ static unsigned short const keysym_to_unicode_13bc_13be[] = { 0x0152, 0x0153, 0x0178 /* 0x13b8-0x13bf */ }; -static unsigned short keysym_to_unicode_14a1_14ff[] = { +static unsigned short const keysym_to_unicode_14a1_14ff[] = { 0x2741, 0x00a7, 0x0589, 0x0029, 0x0028, 0x00bb, 0x00ab, /* 0x14a0-0x14a7 */ 0x2014, 0x002e, 0x055d, 0x002c, 0x2013, 0x058a, 0x2026, 0x055c, /* 0x14a8-0x14af */ 0x055b, 0x055e, 0x0531, 0x0561, 0x0532, 0x0562, 0x0533, 0x0563, /* 0x14b0-0x14b7 */ @@ -248,7 +248,7 @@ static unsigned short keysym_to_unicode_14a1_14ff[] = { 0x0554, 0x0584, 0x0555, 0x0585, 0x0556, 0x0586, 0x2019, 0x0027, /* 0x14f8-0x14ff */ }; -static unsigned short keysym_to_unicode_15d0_15f6[] = { +static unsigned short const keysym_to_unicode_15d0_15f6[] = { 0x10d0, 0x10d1, 0x10d2, 0x10d3, 0x10d4, 0x10d5, 0x10d6, 0x10d7, /* 0x15d0-0x15d7 */ 0x10d8, 0x10d9, 0x10da, 0x10db, 0x10dc, 0x10dd, 0x10de, 0x10df, /* 0x15d8-0x15df */ 0x10e0, 0x10e1, 0x10e2, 0x10e3, 0x10e4, 0x10e5, 0x10e6, 0x10e7, /* 0x15e0-0x15e7 */ @@ -256,7 +256,7 @@ static unsigned short keysym_to_unicode_15d0_15f6[] = { 0x10f0, 0x10f1, 0x10f2, 0x10f3, 0x10f4, 0x10f5, 0x10f6 /* 0x15f0-0x15f7 */ }; -static unsigned short keysym_to_unicode_16a0_16f6[] = { +static unsigned short const keysym_to_unicode_16a0_16f6[] = { 0x0000, 0x0000, 0xf0a2, 0x1e8a, 0x0000, 0xf0a5, 0x012c, 0xf0a7, /* 0x16a0-0x16a7 */ 0xf0a8, 0x01b5, 0x01e6, 0x0000, 0x0000, 0x0000, 0x0000, 0x019f, /* 0x16a8-0x16af */ 0x0000, 0x0000, 0xf0b2, 0x1e8b, 0x01d1, 0xf0b5, 0x012d, 0xf0b7, /* 0x16b0-0x16b7 */