Mercurial > emacs
diff src/term.c @ 83644:0ece58f6e0aa
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 803-813)
- Update from CVS
- Merge from emacs--rel--22
* emacs--rel--22 (patch 51-58)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 233-236)
- Merge from emacs--devo--0
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-25
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sun, 15 Jul 2007 02:05:20 +0000 |
parents | 9c01792a3ce8 e6ed0991129c |
children | 65663fcd2caa |
line wrap: on
line diff
--- a/src/term.c Sun Jul 08 11:35:01 2007 +0000 +++ b/src/term.c Sun Jul 15 02:05:20 2007 +0000 @@ -27,7 +27,10 @@ #include <string.h> #include <errno.h> #include <sys/file.h> -#include <unistd.h> /* For isatty. */ + +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif #if HAVE_TERMIOS_H #include <termios.h> /* For TIOCNOTTY. */ @@ -2343,9 +2346,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); @@ -2359,7 +2362,7 @@ { struct window *w = XWINDOW (Qmouse_face_window); int save_x, save_y; - int i, j; + int i; struct frame *f = XFRAME (w->frame); struct tty_display_info *tty = FRAME_TTY (f); @@ -2882,7 +2885,7 @@ handle_one_term_event (struct tty_display_info *tty, Gpm_Event *event, struct input_event* hold_quit) { struct frame *f = XFRAME (tty->top_frame); - int i, j, fd; + int fd; struct input_event ie; int do_help = 0; int count = 0; @@ -2906,7 +2909,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);