# HG changeset patch # User Stefan Monnier # Date 1184167331 0 # Node ID c10410a3aa36009f378b98c4a78df9519b5a6623 # Parent 63cd48f8fc9f12d9cac680da4629847d00642c54 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. diff -r 63cd48f8fc9f -r c10410a3aa36 src/term.c --- a/src/term.c Wed Jul 11 05:58:45 2007 +0000 +++ b/src/term.c Wed Jul 11 15:22:11 2007 +0000 @@ -25,6 +25,7 @@ #include #include #include +#include #include "termchar.h" #include "termopts.h" @@ -2381,9 +2382,9 @@ 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 @@ { 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 @@ 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 @@ 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);