comparison src/event-unixoid.c @ 272:c5d627a313b1 r21-0b34

Import from CVS: tag r21-0b34
author cvs
date Mon, 13 Aug 2007 10:28:48 +0200
parents 966663fcf606
children 90d73dddcdc4
comparison
equal deleted inserted replaced
271:c7b7086b0a39 272:c5d627a313b1
35 #include "events.h" 35 #include "events.h"
36 #include "lstream.h" 36 #include "lstream.h"
37 #include "process.h" 37 #include "process.h"
38 38
39 #include "sysdep.h" 39 #include "sysdep.h"
40 #include "sysfile.h"
40 #include "sysproc.h" /* select stuff */ 41 #include "sysproc.h" /* select stuff */
41 #include "systime.h" 42 #include "systime.h"
42 43
43 #ifdef HAVE_GPM 44 #ifdef HAVE_GPM
44 #include "gpmevent.h" 45 #include "gpmevent.h"
45 #include <gpm.h>
46 #endif 46 #endif
47 47
48 /* Mask of bits indicating the descriptors that we wait for input on. 48 /* Mask of bits indicating the descriptors that we wait for input on.
49 These work as follows: 49 These work as follows:
50 50
78 read_event_from_tty_or_stream_desc (struct Lisp_Event *event, 78 read_event_from_tty_or_stream_desc (struct Lisp_Event *event,
79 struct console *con, int fd) 79 struct console *con, int fd)
80 { 80 {
81 unsigned char ch; 81 unsigned char ch;
82 int nread; 82 int nread;
83 Lisp_Object console = Qnil; 83 Lisp_Object console;
84 84
85 XSETCONSOLE (console, con); 85 XSETCONSOLE (console, con);
86 86
87 #ifdef HAVE_GPM 87 #ifdef HAVE_GPM
88 if (fd == CONSOLE_TTY_MOUSE_FD (con)) { 88 if (fd == CONSOLE_TTY_MOUSE_FD (con)) {
89 return (handle_gpm_read (event,con,fd)); 89 return handle_gpm_read (event,con,fd);
90 } 90 }
91 #endif 91 #endif
92 92
93 nread = read (fd, &ch, 1); 93 nread = read (fd, &ch, 1);
94 if (nread <= 0) 94 if (nread <= 0)