diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2007-07-11 15:22:11 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2007-07-11 15:22:11 +0000 |
commit | 1ec5dc773ad07a1577f4970bf211a3d4bf460fda (patch) | |
tree | 7034181fdc943ab95c12e1f4174d3082e7f93624 | |
parent | 1a98ebdffb144238b530c68d7ee0b62b891afcd1 (diff) | |
download | emacs-1ec5dc773ad07a1577f4970bf211a3d4bf460fda.tar.gz |
Include unistd.h for ttyname, used in handle_one_term_event.
(term_show_mouse_face): Remove unused var `j'.
(handle_one_term_event): Remove unused vars `i' and `j'.
Don't cast return value of ttyname since it's not necessary.
-rw-r--r-- | src/term.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/term.c b/src/term.c index 20d3024bd6d..41ccfb0dd1f 100644 --- a/src/term.c +++ b/src/term.c @@ -25,6 +25,7 @@ Boston, MA 02110-1301, USA. */ #include <stdio.h> #include <ctype.h> #include <string.h> +#include <unistd.h> #include "termchar.h" #include "termopts.h" @@ -2381,9 +2382,9 @@ set_tty_color_mode (f, val) void term_mouse_moveto (int x, int y) { + /* TODO: how to set mouse position? const char *name; int fd; - /* TODO: how to set mouse position? name = (const char *) ttyname (0); fd = open (name, O_WRONLY); SOME_FUNCTION (x, y, fd); @@ -2397,7 +2398,7 @@ term_show_mouse_face (enum draw_glyphs_face draw) { struct window *w = XWINDOW (Qmouse_face_window); int save_x, save_y; - int i, j; + int i; if (/* If window is in the process of being destroyed, don't bother to do anything. */ @@ -2917,7 +2918,7 @@ int handle_one_term_event (Gpm_Event *event, struct input_event* hold_quit) { struct frame *f = SELECTED_FRAME (); - int i, j, fd; + int fd; struct input_event ie; int do_help = 0; int count = 0; @@ -2941,7 +2942,7 @@ handle_one_term_event (Gpm_Event *event, struct input_event* hold_quit) arg[1] = arg[3] = (unsigned short) event->y + gpm_zerobased; arg[4] = (unsigned short) 3; - name = (const char *) ttyname (0); + name = ttyname (0); fd = open (name, O_WRONLY); ioctl (fd, TIOCLINUX, buf + sizeof (short) - 1); close (fd); |