[MPlayer-cvslog] r24148 - trunk/input/input.c

uau subversion at mplayerhq.hu
Sat Aug 25 06:28:06 CEST 2007


Author: uau
Date: Sat Aug 25 06:28:06 2007
New Revision: 24148

Log:
Remove unused function

The only case which does not override mp_input_default_key_func in
mp_input_add_key_fd() is fd 0, but that is later special-cased not to
use the input function at all. Remove the useless default function.


Modified:
   trunk/input/input.c

Modified: trunk/input/input.c
==============================================================================
--- trunk/input/input.c	(original)
+++ trunk/input/input.c	Sat Aug 25 06:28:06 2007
@@ -586,9 +586,6 @@ static m_option_t mp_input_opts[] = {
 };
 
 static int
-mp_input_default_key_func(int fd);
-
-static int
 mp_input_default_cmd_func(int fd,char* buf, int l);
 
 static char*
@@ -659,7 +656,7 @@ mp_input_add_key_fd(int fd, int select, 
 
   memset(&key_fds[num_key_fd],0,sizeof(mp_input_fd_t));
   key_fds[num_key_fd].fd = fd;
-  key_fds[num_key_fd].read_func = read_func ? read_func : mp_input_default_key_func;
+  key_fds[num_key_fd].read_func = read_func;
   key_fds[num_key_fd].close_func = close_func;
   key_fds[num_key_fd].no_select = !select;
   num_key_fd++;
@@ -803,20 +800,6 @@ mp_input_parse_cmd(char* str) {
   return cmd;
 }
 
-static int
-mp_input_default_key_func(int fd) {
-  int r,code=0;
-  unsigned int l;
-  l = 0;
-  while(l < sizeof(int)) {
-    r = read(fd,((char *)&code)+l,sizeof(int)-l);
-    if(r <= 0)
-      break;
-    l +=r;
-  }
-  return code;
-}
-
 #define MP_CMD_MAX_SIZE 256
 
 static int



More information about the MPlayer-cvslog mailing list