[MPlayer-cvslog] r22841 - in trunk: Gui/win32/gui.c Makefile cfg-mplayer.h fifo.c libvo/vo_aa.c libvo/vo_caca.c libvo/vo_dfbmga.c libvo/vo_directfb2.c libvo/vo_directx.c libvo/vo_ggi.c libvo/vo_quartz.c libvo/vo_sdl.c libvo/vo_winvidix.c libvo/w32_common.c libvo/x11_common.c mp_fifo.c mplayer.c

rathann subversion at mplayerhq.hu
Thu Mar 29 19:16:11 CEST 2007


Author: rathann
Date: Thu Mar 29 19:16:11 2007
New Revision: 22841

Added:
   trunk/mp_fifo.c
      - copied, changed from r22840, /trunk/fifo.c
Removed:
   trunk/fifo.c
Modified:
   trunk/Gui/win32/gui.c
   trunk/Makefile
   trunk/cfg-mplayer.h
   trunk/libvo/vo_aa.c
   trunk/libvo/vo_caca.c
   trunk/libvo/vo_dfbmga.c
   trunk/libvo/vo_directfb2.c
   trunk/libvo/vo_directx.c
   trunk/libvo/vo_ggi.c
   trunk/libvo/vo_quartz.c
   trunk/libvo/vo_sdl.c
   trunk/libvo/vo_winvidix.c
   trunk/libvo/w32_common.c
   trunk/libvo/x11_common.c
   trunk/mplayer.c

Log:
Code cleanup: don't include a .c file in mplayer.c and fix a few
"implicit declaration of function ‘mplayer_put_key’" warnings

Based on Attila's suggestions.
Approved by Uoti and Ivan.



Modified: trunk/Gui/win32/gui.c
==============================================================================
--- trunk/Gui/win32/gui.c	(original)
+++ trunk/Gui/win32/gui.c	Thu Mar 29 19:16:11 2007
@@ -28,6 +28,7 @@
 #include <shlobj.h>
 #include <version.h>
 #include <mplayer.h>
+#include <mp_fifo.h>
 #include <mp_msg.h>
 #include <help_mp.h>
 #include <input/input.h>

Modified: trunk/Makefile
==============================================================================
--- trunk/Makefile	(original)
+++ trunk/Makefile	Thu Mar 29 19:16:11 2007
@@ -41,6 +41,7 @@ SRCS_COMMON-$(UNRARLIB) += unrarlib.c
 
 SRCS_MPLAYER = mplayer.c \
                m_property.c \
+               mp_fifo.c \
                mp_msg.c \
                mixer.c \
                parser-mpcmd.c \

Modified: trunk/cfg-mplayer.h
==============================================================================
--- trunk/cfg-mplayer.h	(original)
+++ trunk/cfg-mplayer.h	Thu Mar 29 19:16:11 2007
@@ -4,6 +4,8 @@
 
 #include "cfg-common.h"
 
+extern int key_fifo_size;
+extern unsigned doubleclick_time;
 extern int noconsolecontrols;
 
 #if defined(HAVE_FBDEV)||defined(HAVE_VESA)

Modified: trunk/libvo/vo_aa.c
==============================================================================
--- trunk/libvo/vo_aa.c	(original)
+++ trunk/libvo/vo_aa.c	Thu Mar 29 19:16:11 2007
@@ -37,6 +37,7 @@
 #include "subopt-helper.h"
 #include "help_mp.h"
 #include "mp_msg.h"
+#include "mp_fifo.h"
 
 
 #define MESSAGE_DURATION 3
@@ -83,8 +84,6 @@ static struct SwsContext *sws=NULL;
 
 /* our version of the playmodes :) */
 
-extern void mplayer_put_key(int code);
-
 /* to disable stdout outputs when curses/linux mode */
 extern int quiet;
 

Modified: trunk/libvo/vo_caca.c
==============================================================================
--- trunk/libvo/vo_caca.c	(original)
+++ trunk/libvo/vo_caca.c	Thu Mar 29 19:16:11 2007
@@ -26,6 +26,7 @@
 
 #include "osdep/keycodes.h"
 #include "mp_msg.h"
+#include "mp_fifo.h"
 
 #include <caca.h>
 #ifdef CACA_API_VERSION_1

Modified: trunk/libvo/vo_dfbmga.c
==============================================================================
--- trunk/libvo/vo_dfbmga.c	(original)
+++ trunk/libvo/vo_dfbmga.c	Thu Mar 29 19:16:11 2007
@@ -39,6 +39,7 @@
 #include "sub.h"
 #include "mp_msg.h"
 #include "aspect.h"
+#include "mp_fifo.h"
 
 static vo_info_t info = {
      "DirectFB / Matrox G200/G400/G450/G550",
@@ -1425,8 +1426,6 @@ control( uint32_t request, void *data, .
      return VO_NOTIMPL;
 }
 
-extern void mplayer_put_key( int code );
-
 #include "osdep/keycodes.h"
 
 static void

Modified: trunk/libvo/vo_directfb2.c
==============================================================================
--- trunk/libvo/vo_directfb2.c	(original)
+++ trunk/libvo/vo_directfb2.c	Thu Mar 29 19:16:11 2007
@@ -47,6 +47,7 @@
 #include "mp_msg.h"
 #include "aspect.h"
 #include "subopt-helper.h"
+#include "mp_fifo.h"
 
 #ifndef min
 #define min(x,y) (((x)<(y))?(x):(y))
@@ -892,8 +893,6 @@ static int config(uint32_t s_width, uint
 return 0;
 }
 
-extern void mplayer_put_key(int code);
-
 #include "osdep/keycodes.h"
 
 static void check_events(void)

Modified: trunk/libvo/vo_directx.c
==============================================================================
--- trunk/libvo/vo_directx.c	(original)
+++ trunk/libvo/vo_directx.c	Thu Mar 29 19:16:11 2007
@@ -34,6 +34,7 @@
 #include "mp_msg.h"
 #include "aspect.h"
 #include "geometry.h"
+#include "mp_fifo.h"
 
 #ifdef HAVE_NEW_GUI
 #include "Gui/interface.h"
@@ -85,7 +86,6 @@ static float window_aspect;
 static BOOL (WINAPI* myGetMonitorInfo)(HMONITOR, LPMONITORINFO) = NULL;
 static RECT last_rect = {0xDEADC0DE, 0xDEADC0DE, 0xDEADC0DE, 0xDEADC0DE};
 
-extern void mplayer_put_key(int code);              //let mplayer handel the keyevents 
 extern void vo_draw_text(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride));
 extern int vidmode;
 

Modified: trunk/libvo/vo_ggi.c
==============================================================================
--- trunk/libvo/vo_ggi.c	(original)
+++ trunk/libvo/vo_ggi.c	Thu Mar 29 19:16:11 2007
@@ -26,6 +26,7 @@
 #include "video_out_internal.h"
 
 #include "fastmemcpy.h"
+#include "mp_fifo.h"
 
 #include <ggi/ggi.h>
 
@@ -471,7 +472,6 @@ static int control(uint32_t request, voi
 
 /* EVENT handling */
 #include "osdep/keycodes.h"
-extern void mplayer_put_key(int code);
 
 static void check_events(void)
 {

Modified: trunk/libvo/vo_quartz.c
==============================================================================
--- trunk/libvo/vo_quartz.c	(original)
+++ trunk/libvo/vo_quartz.c	Thu Mar 29 19:16:11 2007
@@ -30,6 +30,7 @@
 #include "aspect.h"
 #include "mp_msg.h"
 #include "m_option.h"
+#include "mp_fifo.h"
 
 #include "input/input.h"
 #include "input/mouse.h"
@@ -128,7 +129,6 @@ enum
 
 #include "osdep/keycodes.h"
 
-extern void mplayer_put_key(int code);
 extern void vo_draw_text(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride));
 
 //PROTOTYPE/////////////////////////////////////////////////////////////////

Modified: trunk/libvo/vo_sdl.c
==============================================================================
--- trunk/libvo/vo_sdl.c	(original)
+++ trunk/libvo/vo_sdl.c	Thu Mar 29 19:16:11 2007
@@ -125,6 +125,7 @@
 #include "input/input.h"
 #include "input/mouse.h"
 #include "subopt-helper.h"
+#include "mp_fifo.h"
 
 static vo_info_t info = 
 {
@@ -1160,7 +1161,6 @@ static int draw_slice(uint8_t *image[], 
  **/
 
 #include "osdep/keycodes.h"
-extern void mplayer_put_key(int code);
 
 #define shift_key (event.key.keysym.mod==(KMOD_LSHIFT||KMOD_RSHIFT)) 
 static void check_events (void)

Modified: trunk/libvo/vo_winvidix.c
==============================================================================
--- trunk/libvo/vo_winvidix.c	(original)
+++ trunk/libvo/vo_winvidix.c	Thu Mar 29 19:16:11 2007
@@ -22,11 +22,11 @@
 
 #include "aspect.h"
 #include "mp_msg.h"
+#include "mp_fifo.h"
 
 #include "vosub_vidix.h"
 #include "vidix/vidixlib.h"
 
-extern void mplayer_put_key(int code);
 
 static vo_info_t info = 
 {

Modified: trunk/libvo/w32_common.c
==============================================================================
--- trunk/libvo/w32_common.c	(original)
+++ trunk/libvo/w32_common.c	Thu Mar 29 19:16:11 2007
@@ -10,8 +10,8 @@
 #include "video_out.h"
 #include "aspect.h"
 #include "w32_common.h"
+#include "mp_fifo.h"
 
-extern void mplayer_put_key(int code);
 extern int enable_mouse_movements;
 
 #ifndef MONITOR_DEFAULTTOPRIMARY

Modified: trunk/libvo/x11_common.c
==============================================================================
--- trunk/libvo/x11_common.c	(original)
+++ trunk/libvo/x11_common.c	Thu Mar 29 19:16:11 2007
@@ -6,6 +6,7 @@
 
 #include "config.h"
 #include "mp_msg.h"
+#include "mp_fifo.h"
 #include "x11_common.h"
 
 #ifdef X11_FULLSCREEN
@@ -557,8 +558,6 @@ void vo_uninit(void)
 #include "osdep/keycodes.h"
 #include "wskeys.h"
 
-extern void mplayer_put_key(int code);
-
 #ifdef XF86XK_AudioPause
 static void vo_x11_putkey_ext(int keysym)
 {

Copied: trunk/mp_fifo.c (from r22840, /trunk/fifo.c)
==============================================================================
--- /trunk/fifo.c	(original)
+++ trunk/mp_fifo.c	Thu Mar 29 19:16:11 2007
@@ -1,3 +1,6 @@
+#include <stdlib.h>
+#include "osdep/timer.h"
+#include "input/input.h"
 #include "input/mouse.h"
 
 
@@ -33,7 +36,7 @@ int mplayer_get_key(int fd){
 }
 
 
-static unsigned doubleclick_time = 300;
+unsigned doubleclick_time = 300;
 
 static void put_double(int code) {
   if (code >= MOUSE_BTN0 && code <= MOUSE_BTN9)

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	(original)
+++ trunk/mplayer.c	Thu Mar 29 19:16:11 2007
@@ -188,7 +188,7 @@ static int max_framesize=0;
 //**************************************************************************//
 
 // Common FIFO functions, and keyboard/event FIFO code
-#include "fifo.c"
+#include "mp_fifo.h"
 int noconsolecontrols=0;
 //**************************************************************************//
 



More information about the MPlayer-cvslog mailing list