diff options
| author | Stefan Monnier | 2007-07-11 15:22:11 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-07-11 15:22:11 +0000 |
| commit | 1ec5dc773ad07a1577f4970bf211a3d4bf460fda (patch) | |
| tree | 7034181fdc943ab95c12e1f4174d3082e7f93624 /src | |
| parent | 1a98ebdffb144238b530c68d7ee0b62b891afcd1 (diff) | |
| download | emacs-1ec5dc773ad07a1577f4970bf211a3d4bf460fda.tar.gz emacs-1ec5dc773ad07a1577f4970bf211a3d4bf460fda.zip | |
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.
Diffstat (limited to 'src')
| -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. */ | |||
| 25 | #include <stdio.h> | 25 | #include <stdio.h> |
| 26 | #include <ctype.h> | 26 | #include <ctype.h> |
| 27 | #include <string.h> | 27 | #include <string.h> |
| 28 | #include <unistd.h> | ||
| 28 | 29 | ||
| 29 | #include "termchar.h" | 30 | #include "termchar.h" |
| 30 | #include "termopts.h" | 31 | #include "termopts.h" |
| @@ -2381,9 +2382,9 @@ set_tty_color_mode (f, val) | |||
| 2381 | void | 2382 | void |
| 2382 | term_mouse_moveto (int x, int y) | 2383 | term_mouse_moveto (int x, int y) |
| 2383 | { | 2384 | { |
| 2385 | /* TODO: how to set mouse position? | ||
| 2384 | const char *name; | 2386 | const char *name; |
| 2385 | int fd; | 2387 | int fd; |
| 2386 | /* TODO: how to set mouse position? | ||
| 2387 | name = (const char *) ttyname (0); | 2388 | name = (const char *) ttyname (0); |
| 2388 | fd = open (name, O_WRONLY); | 2389 | fd = open (name, O_WRONLY); |
| 2389 | SOME_FUNCTION (x, y, fd); | 2390 | SOME_FUNCTION (x, y, fd); |
| @@ -2397,7 +2398,7 @@ term_show_mouse_face (enum draw_glyphs_face draw) | |||
| 2397 | { | 2398 | { |
| 2398 | struct window *w = XWINDOW (Qmouse_face_window); | 2399 | struct window *w = XWINDOW (Qmouse_face_window); |
| 2399 | int save_x, save_y; | 2400 | int save_x, save_y; |
| 2400 | int i, j; | 2401 | int i; |
| 2401 | 2402 | ||
| 2402 | if (/* If window is in the process of being destroyed, don't bother | 2403 | if (/* If window is in the process of being destroyed, don't bother |
| 2403 | to do anything. */ | 2404 | to do anything. */ |
| @@ -2917,7 +2918,7 @@ int | |||
| 2917 | handle_one_term_event (Gpm_Event *event, struct input_event* hold_quit) | 2918 | handle_one_term_event (Gpm_Event *event, struct input_event* hold_quit) |
| 2918 | { | 2919 | { |
| 2919 | struct frame *f = SELECTED_FRAME (); | 2920 | struct frame *f = SELECTED_FRAME (); |
| 2920 | int i, j, fd; | 2921 | int fd; |
| 2921 | struct input_event ie; | 2922 | struct input_event ie; |
| 2922 | int do_help = 0; | 2923 | int do_help = 0; |
| 2923 | int count = 0; | 2924 | int count = 0; |
| @@ -2941,7 +2942,7 @@ handle_one_term_event (Gpm_Event *event, struct input_event* hold_quit) | |||
| 2941 | arg[1] = arg[3] = (unsigned short) event->y + gpm_zerobased; | 2942 | arg[1] = arg[3] = (unsigned short) event->y + gpm_zerobased; |
| 2942 | arg[4] = (unsigned short) 3; | 2943 | arg[4] = (unsigned short) 3; |
| 2943 | 2944 | ||
| 2944 | name = (const char *) ttyname (0); | 2945 | name = ttyname (0); |
| 2945 | fd = open (name, O_WRONLY); | 2946 | fd = open (name, O_WRONLY); |
| 2946 | ioctl (fd, TIOCLINUX, buf + sizeof (short) - 1); | 2947 | ioctl (fd, TIOCLINUX, buf + sizeof (short) - 1); |
| 2947 | close (fd); | 2948 | close (fd); |