[Mplayer-cvslog] CVS: main/libmenu menu_param.c,1.2,1.3 menu_console.c,1.6,1.7

Sascha Sommer CVS faust3 at mplayerhq.hu
Sat Sep 13 20:02:46 CEST 2003


Update of /cvsroot/mplayer/main/libmenu
In directory mail:/var/tmp.root/cvs-serv31511/libmenu

Modified Files:
	menu_param.c menu_console.c 
Log Message:
make menu work on mingw (run command is still disabled), based on patch by Christophe Perinaud

Index: menu_param.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmenu/menu_param.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- menu_param.c	9 Feb 2003 20:18:20 -0000	1.2
+++ menu_param.c	13 Sep 2003 18:02:20 -0000	1.3
@@ -103,19 +103,19 @@
   free(entry);
 }
 
-static void close(menu_t* menu) {
+static void closeMenu(menu_t* menu) {
   menu_list_uninit(menu,free_entry);
   if(mpriv->edit)
     free(mpriv->edit);
 }
 
-static int open(menu_t* menu, char* args) {
+static int openMenu(menu_t* menu, char* args) {
   list_entry_t* e;
 
   menu->draw = menu_list_draw;
   menu->read_cmd = menu_list_read_cmd;
   menu->read_key = read_key;
-  menu->close = close;
+  menu->close = closeMenu;
 
 
   if(!args) {
@@ -155,5 +155,5 @@
     &cfg_dflt,
     cfg_fields
   },
-  open
+  openMenu
 };

Index: menu_console.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmenu/menu_console.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- menu_console.c	24 Jun 2003 19:59:14 -0000	1.6
+++ menu_console.c	13 Sep 2003 18:02:20 -0000	1.7
@@ -7,7 +7,9 @@
 #include <ctype.h>
 #include <sys/time.h>
 #include <sys/types.h>
+#ifndef __MINGW32__
 #include <sys/wait.h>
+#endif
 #include <unistd.h>
 #include <errno.h>
 
@@ -223,6 +225,7 @@
 }
 
 static void check_child(menu_t* menu) {
+#ifndef __MINGW32__
   fd_set rfd;
   struct timeval tv;
   int max_fd = mpriv->child_fd[2] > mpriv->child_fd[1] ? mpriv->child_fd[2] :
@@ -268,12 +271,14 @@
       w = 1;
     }
   }
+#endif
 
 }
 
 #define close_pipe(pipe) close(pipe[0]); close(pipe[1])
 
 static int run_shell_cmd(menu_t* menu, char* cmd) {
+#ifndef __MINGW32__
   int in[2],out[2],err[2];
 
   printf("Console run %s ...\n",cmd);
@@ -311,6 +316,7 @@
   mpriv->child_fd[2] = err[0];
   mpriv->prompt = mpriv->child_prompt;
   //add_line(mpriv,"Child process started");
+#endif
   return 1;
 }
 
@@ -439,7 +445,7 @@
 }
 
 
-static int open(menu_t* menu, char* args) {
+static int openMenu(menu_t* menu, char* args) {
 
 
   menu->draw = draw;
@@ -469,5 +475,5 @@
     &cfg_dflt,
     cfg_fields
   },
-  open,
+  openMenu,
 };



More information about the MPlayer-cvslog mailing list