From 9cef48bac77cbeefe7dade7cb38fb3a00a16733a Mon Sep 17 00:00:00 2001 From: siretart Date: Fri, 23 Apr 2010 10:22:44 +0000 Subject: [PATCH] rename 'struct keymap' -> 'struct mp_keymap' This avoids the compilation failure on kFreeBSD (at least amd64): In file included from libvo/vo_directfb2.c:44: libvo/video_out.h:267: error: redefinition of 'struct keymap' This is because libvo/vo_directfb2.c #includes sys/kd.h, which in turn includes sys/kbio.h, which defines another 'struct keymap'. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31059 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/osx_common.c | 2 +- libvo/video_out.c | 2 +- libvo/video_out.h | 4 ++-- libvo/vo_kva.c | 6 +++--- libvo/w32_common.c | 2 +- libvo/x11_common.c | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libvo/osx_common.c b/libvo/osx_common.c index 3ceef2fece..b89a5e3d5c 100644 --- a/libvo/osx_common.c +++ b/libvo/osx_common.c @@ -76,7 +76,7 @@ #define kVK_UpArrow 0x7e #endif /* MAC_OS_X_VERSION_MAX_ALLOWED <= 1040 */ -static const struct keymap keymap[] = { +static const struct mp_keymap keymap[] = { // special keys {0x34, KEY_ENTER}, // Enter key on some iBooks? {kVK_Return, KEY_ENTER}, diff --git a/libvo/video_out.c b/libvo/video_out.c index ec7872c0e5..c1786d27ba 100644 --- a/libvo/video_out.c +++ b/libvo/video_out.c @@ -371,7 +371,7 @@ int config_video_out(const vo_functions_t *vo, uint32_t width, uint32_t height, * \result translation corresponding to key or "to" value of last mapping * if not found. */ -int lookup_keymap_table(const struct keymap *map, int key) { +int lookup_keymap_table(const struct mp_keymap *map, int key) { while (map->from && map->from != key) map++; return map->to; } diff --git a/libvo/video_out.h b/libvo/video_out.h index 1fce2c2877..4e8716f13e 100644 --- a/libvo/video_out.h +++ b/libvo/video_out.h @@ -269,11 +269,11 @@ extern char *monitor_hfreq_str; extern char *monitor_vfreq_str; extern char *monitor_dotclock_str; -struct keymap { +struct mp_keymap { int from; int to; }; -int lookup_keymap_table(const struct keymap *map, int key); +int lookup_keymap_table(const struct mp_keymap *map, int key); struct vo_rect { int left, right, top, bottom, width, height; }; diff --git a/libvo/vo_kva.c b/libvo/vo_kva.c index dd604fdeb5..29a739eac7 100644 --- a/libvo/vo_kva.c +++ b/libvo/vo_kva.c @@ -70,7 +70,7 @@ const LIBVO_EXTERN(kva) #define HWNDFROMWINID(wid) ((wid) + 0x80000000UL) -static const struct keymap m_vk_map[] = { +static const struct mp_keymap m_vk_map[] = { {VK_NEWLINE, KEY_ENTER}, {VK_TAB, KEY_TAB}, {VK_SPACE, ' '}, // control keys @@ -92,7 +92,7 @@ static const struct keymap m_vk_map[] = { {0, 0} }; -static const struct keymap m_keypad_map[] = { +static const struct mp_keymap m_keypad_map[] = { // keypad keys {0x52, KEY_KP0}, {0x4F, KEY_KP1}, {0x50, KEY_KP2}, {0x51, KEY_KP3}, {0x4B, KEY_KP4}, {0x4C, KEY_KP5}, {0x4D, KEY_KP6}, {0x47, KEY_KP7}, @@ -101,7 +101,7 @@ static const struct keymap m_keypad_map[] = { {0, 0} }; -static const struct keymap m_mouse_map[] = { +static const struct mp_keymap m_mouse_map[] = { {WM_BUTTON1DOWN, MOUSE_BTN0}, {WM_BUTTON3DOWN, MOUSE_BTN1}, {WM_BUTTON2DOWN, MOUSE_BTN2}, diff --git a/libvo/w32_common.c b/libvo/w32_common.c index a0ffd9fb98..ba47f37e7c 100644 --- a/libvo/w32_common.c +++ b/libvo/w32_common.c @@ -60,7 +60,7 @@ static HMONITOR (WINAPI* myMonitorFromWindow)(HWND, DWORD); static BOOL (WINAPI* myGetMonitorInfo)(HMONITOR, LPMONITORINFO); static BOOL (WINAPI* myEnumDisplayMonitors)(HDC, LPCRECT, MONITORENUMPROC, LPARAM); -static const struct keymap vk_map[] = { +static const struct mp_keymap vk_map[] = { // special keys {VK_ESCAPE, KEY_ESC}, {VK_BACK, KEY_BS}, {VK_TAB, KEY_TAB}, {VK_CONTROL, KEY_CTRL}, diff --git a/libvo/x11_common.c b/libvo/x11_common.c index 5c21fee975..08252198d3 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -561,7 +561,7 @@ void vo_uninit(void) #include "wskeys.h" #ifdef XF86XK_AudioPause -static const struct keymap keysym_map[] = { +static const struct mp_keymap keysym_map[] = { {XF86XK_MenuKB, KEY_MENU}, {XF86XK_AudioPlay, KEY_PLAY}, {XF86XK_AudioPause, KEY_PAUSE}, {XF86XK_AudioStop, KEY_STOP}, {XF86XK_AudioPrev, KEY_PREV}, {XF86XK_AudioNext, KEY_NEXT}, @@ -577,7 +577,7 @@ static void vo_x11_putkey_ext(int keysym) } #endif -static const struct keymap keymap[] = { +static const struct mp_keymap keymap[] = { // special keys {wsEscape, KEY_ESC}, {wsBackSpace, KEY_BS}, {wsTab, KEY_TAB}, {wsEnter, KEY_ENTER}, -- 2.11.4.GIT