[Mplayer-cvslog] CVS: main/linux getch2.c,1.7,1.8

Alex Beregszaszi alex at mplayer.dev.hu
Mon Nov 19 18:03:40 CET 2001


Update of /cvsroot/mplayer/main/linux
In directory mplayer:/var/tmp.root/cvs-serv11752

Modified Files:
	getch2.c 
Log Message:
added HAVE_TERMIOS

Index: getch2.c
===================================================================
RCS file: /cvsroot/mplayer/main/linux/getch2.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- getch2.c	5 Oct 2001 00:39:54 -0000	1.7
+++ getch2.c	19 Nov 2001 17:03:38 -0000	1.8
@@ -16,12 +16,16 @@
 #ifdef USE_IOCTL
 #include <sys/ioctl.h>
 #endif
+#ifdef HAVE_TERMIOS
 #include <sys/termios.h>
+#endif
 #include <unistd.h>
 
 #include "keycodes.h"
 
+#ifdef HAVE_TERMIOS
 static struct termios tio_orig;
+#endif
 static int getch2_len=0;
 static char getch2_buf[BUF_LEN];
 
@@ -202,6 +206,7 @@
 static int getch2_status=0;
 
 void getch2_enable(){
+#ifdef HAVE_TERMIOS
 struct termios tio_new;
 #if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__)
     tcgetattr(0,&tio_orig);
@@ -221,17 +226,20 @@
 #else
     ioctl(0,TCSETS,&tio_new);
 #endif
+#endif
     getch2_status=1;
 }
 
 void getch2_disable(){
     if(!getch2_status) return; // already disabled / never enabled
+#ifdef HAVE_TERMIOS
 #if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__)
     tcsetattr(0,TCSANOW,&tio_orig);
 #elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__)
     ioctl(0,TIOCSETA,&tio_orig);
 #else
     ioctl(0,TCSETS,&tio_orig);
+#endif
 #endif
     getch2_status=0;
 }




More information about the MPlayer-cvslog mailing list