[MPlayer-dev-eng] [PATCH] fix missing extern for mplayer_put_key in vo_caca

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Sun Oct 8 19:57:19 CEST 2006


On Sunday, 08 October 2006 at 19:37, Dominik 'Rathann' Mierzejewski wrote:
> On Sunday, 08 October 2006 at 18:38, Dominik 'Rathann' Mierzejewski wrote:
> > On Sunday, 08 October 2006 at 18:27, Attila Kinali wrote:
> > > On Sun, 8 Oct 2006 17:19:03 +0200
> > > Dominik 'Rathann' Mierzejewski <dominik at rangers.eu.org> wrote:
> > > 
> > > > Fixes:
> > > > vo_caca.c: In function ‘check_events’:
> > > > vo_caca.c:239: warning: implicit declaration of function ‘mplayer_put_key’
> > > 
> > > IMHO this function should go into a .h file and this .h file
> > > should be included.
> > > 
> > > We already have way too many extern blah() declarations.
> > 
> > OK, I'll introduce fifo.h, remove relevant externs and add #include fifo.h
> > instead.
> 
> fifo.h is already in libavutil, hence m_fifo.h.

Or even mp_fifo.h, as suggested by KotH. How about
svn rename fifo.c mp_fifo.c
as well?

-- 
MPlayer developer and RPMs maintainer: http://rpm.greysector.net/mplayer/
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
	-- from "Collected Sayings of Muad'Dib" by the Princess Irulan
-------------- next part --------------
Index: Gui/win32/gui.c
===================================================================
--- Gui/win32/gui.c	(revision 20117)
+++ Gui/win32/gui.c	(working copy)
@@ -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 <cpudetect.h>
Index: mp_fifo.h
===================================================================
--- mp_fifo.h	(revision 0)
+++ mp_fifo.h	(revision 0)
@@ -0,0 +1,6 @@
+#ifndef MP_FIFO_H
+#define MP_FIFO_H
+
+void mplayer_put_key(int code);
+
+#endif
Index: libvo/vo_winvidix.c
===================================================================
--- libvo/vo_winvidix.c	(revision 20117)
+++ libvo/vo_winvidix.c	(working copy)
@@ -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 = 
 {
Index: libvo/vo_ggi.c
===================================================================
--- libvo/vo_ggi.c	(revision 20117)
+++ libvo/vo_ggi.c	(working copy)
@@ -26,6 +26,7 @@
 #include "video_out_internal.h"
 
 #include "fastmemcpy.h"
+#include "mp_fifo.h"
 
 #include <ggi/ggi.h>
 
@@ -471,7 +472,6 @@
 
 /* EVENT handling */
 #include "osdep/keycodes.h"
-extern void mplayer_put_key(int code);
 
 static void check_events(void)
 {
Index: libvo/x11_common.c
===================================================================
--- libvo/x11_common.c	(revision 20117)
+++ libvo/x11_common.c	(working copy)
@@ -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 @@
 #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)
 {
Index: libvo/vo_sdl.c
===================================================================
--- libvo/vo_sdl.c	(revision 20117)
+++ libvo/vo_sdl.c	(working copy)
@@ -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 = 
 {
@@ -1159,7 +1160,6 @@
  **/
 
 #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)
Index: libvo/vo_caca.c
===================================================================
--- libvo/vo_caca.c	(revision 20117)
+++ libvo/vo_caca.c	(working copy)
@@ -26,6 +26,7 @@
 
 #include "osdep/keycodes.h"
 #include "mp_msg.h"
+#include "mp_fifo.h"
 
 #include <caca.h>
 #ifdef CACA_API_VERSION_1
Index: libvo/w32_common.c
===================================================================
--- libvo/w32_common.c	(revision 20117)
+++ libvo/w32_common.c	(working copy)
@@ -8,9 +8,8 @@
 #include "video_out.h"
 #include "aspect.h"
 #include "w32_common.h"
+#include "mp_fifo.h"
 
-extern void mplayer_put_key(int code);
-
 #ifndef MONITOR_DEFAULTTOPRIMARY
 #define MONITOR_DEFAULTTOPRIMARY 1
 #endif
Index: libvo/vo_aa.c
===================================================================
--- libvo/vo_aa.c	(revision 20117)
+++ libvo/vo_aa.c	(working copy)
@@ -37,6 +37,7 @@
 #include "subopt-helper.h"
 #include "help_mp.h"
 #include "mp_msg.h"
+#include "mp_fifo.h"
 
 
 #define MESSAGE_DURATION 3
@@ -85,8 +86,6 @@
 
 /* our version of the playmodes :) */
 
-extern void mplayer_put_key(int code);
-
 /* to disable stdout outputs when curses/linux mode */
 extern int quiet;
 
Index: libvo/vo_quartz.c
===================================================================
--- libvo/vo_quartz.c	(revision 20117)
+++ libvo/vo_quartz.c	(working copy)
@@ -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 @@
 
 #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/////////////////////////////////////////////////////////////////
Index: libvo/vo_directx.c
===================================================================
--- libvo/vo_directx.c	(revision 20117)
+++ libvo/vo_directx.c	(working copy)
@@ -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 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;
 
Index: libvo/vo_directfb2.c
===================================================================
--- libvo/vo_directfb2.c	(revision 20117)
+++ libvo/vo_directfb2.c	(working copy)
@@ -45,6 +45,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))
@@ -890,8 +891,6 @@
 return 0;
 }
 
-extern void mplayer_put_key(int code);
-
 #include "osdep/keycodes.h"
 
 static void check_events(void)
Index: libvo/vo_dfbmga.c
===================================================================
--- libvo/vo_dfbmga.c	(revision 20117)
+++ libvo/vo_dfbmga.c	(working copy)
@@ -37,6 +37,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",
@@ -1421,8 +1422,6 @@
      return VO_NOTIMPL;
 }
 
-extern void mplayer_put_key( int code );
-
 #include "osdep/keycodes.h"
 
 static void


More information about the MPlayer-dev-eng mailing list