[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/src ChangeLog keyboard.c term.c termhooks.h
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] emacs/src ChangeLog keyboard.c term.c termhooks.h |
Date: |
Fri, 27 Mar 2009 16:14:25 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 09/03/27 16:14:25
Modified files:
src : ChangeLog keyboard.c term.c termhooks.h
Log message:
* keyboard.c (tty_read_avail_input): Don't treat a -1 return from
Gpm_GetEvent as an error that justifies closing the filedescriptor.
* term.c (close_gpm): Get the filedescriptor as a (new) parameter.
(Fgpm_mouse_stop): Pass that new parameter.
* termhooks.h (close_gpm): Adjust prototype.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/ChangeLog?cvsroot=emacs&r1=1.7453&r2=1.7454
http://cvs.savannah.gnu.org/viewcvs/emacs/src/keyboard.c?cvsroot=emacs&r1=1.999&r2=1.1000
http://cvs.savannah.gnu.org/viewcvs/emacs/src/term.c?cvsroot=emacs&r1=1.237&r2=1.238
http://cvs.savannah.gnu.org/viewcvs/emacs/src/termhooks.h?cvsroot=emacs&r1=1.102&r2=1.103
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/src/ChangeLog,v
retrieving revision 1.7453
retrieving revision 1.7454
diff -u -b -r1.7453 -r1.7454
--- ChangeLog 26 Mar 2009 22:15:13 -0000 1.7453
+++ ChangeLog 27 Mar 2009 16:14:23 -0000 1.7454
@@ -1,3 +1,11 @@
+2009-03-27 Kevin Ryde <address@hidden>
+
+ * keyboard.c (tty_read_avail_input): Don't treat a -1 return from
+ Gpm_GetEvent as an error that justifies closing the filedescriptor.
+ * term.c (close_gpm): Get the filedescriptor as a (new) parameter.
+ (Fgpm_mouse_stop): Pass that new parameter.
+ * termhooks.h (close_gpm): Adjust prototype.
+
2009-03-26 Stefan Monnier <address@hidden>
* lisp.h (Fx_focus_frame): Declare.
Index: keyboard.c
===================================================================
RCS file: /sources/emacs/emacs/src/keyboard.c,v
retrieving revision 1.999
retrieving revision 1.1000
diff -u -b -r1.999 -r1.1000
--- keyboard.c 20 Mar 2009 09:41:21 -0000 1.999
+++ keyboard.c 27 Mar 2009 16:14:24 -0000 1.1000
@@ -7184,17 +7184,23 @@
{
Gpm_Event event;
struct input_event hold_quit;
- int gpm;
+ int gpm, fd = gpm_fd;
EVENT_INIT (hold_quit);
hold_quit.kind = NO_EVENT;
+ /* gpm==1 if event received.
+ gpm==0 if the GPM daemon has closed the connection, in which case
+ Gpm_GetEvent closes gpm_fd and clears it to -1, which is why
+ we save it in `fd' so close_gpm can remove it from the
+ select masks.
+ gpm==-1 if a protocol error or EWOULDBLOCK; the latter is normal. */
while (gpm = Gpm_GetEvent (&event), gpm == 1) {
nread += handle_one_term_event (tty, &event, &hold_quit);
}
- if (gpm < 0)
+ if (gpm == 0)
/* Presumably the GPM daemon has closed the connection. */
- close_gpm ();
+ close_gpm (fd);
if (hold_quit.kind != NO_EVENT)
kbd_buffer_store_event (&hold_quit);
if (nread)
Index: term.c
===================================================================
RCS file: /sources/emacs/emacs/src/term.c,v
retrieving revision 1.237
retrieving revision 1.238
diff -u -b -r1.237 -r1.238
--- term.c 12 Feb 2009 05:55:02 -0000 1.237
+++ term.c 27 Mar 2009 16:14:25 -0000 1.238
@@ -3150,10 +3150,10 @@
}
void
-close_gpm ()
+close_gpm (int fd)
{
- if (gpm_fd >= 0)
- delete_gpm_wait_descriptor (gpm_fd);
+ if (fd >= 0)
+ delete_gpm_wait_descriptor (fd);
while (Gpm_Close()); /* close all the stack */
gpm_tty = NULL;
}
@@ -3171,7 +3171,7 @@
if (!tty || gpm_tty != tty)
return Qnil; /* Not activated on this terminal, nothing to do. */
- close_gpm ();
+ close_gpm (gpm_fd);
return Qnil;
}
#endif /* HAVE_GPM */
Index: termhooks.h
===================================================================
RCS file: /sources/emacs/emacs/src/termhooks.h,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -b -r1.102 -r1.103
--- termhooks.h 12 Mar 2009 01:55:52 -0000 1.102
+++ termhooks.h 27 Mar 2009 16:14:25 -0000 1.103
@@ -653,7 +653,7 @@
extern struct terminal *initial_terminal;
#ifdef HAVE_GPM
-extern void close_gpm (void);
+extern void close_gpm (int gpm_fd);
#endif
/* arch-tag: 33a00ecc-52b5-4186-a410-8801ac9f087d
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/src ChangeLog keyboard.c term.c termhooks.h,
Stefan Monnier <=