diff options
| author | Dmitry Antipov | 2014-05-14 17:55:37 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2014-05-14 17:55:37 +0400 |
| commit | 6f1d9822d972c418dbf2295fcd01b7b0a3dc5ef8 (patch) | |
| tree | 18e260eef312d3459cb0908206bbfa621cf66808 /src/term.c | |
| parent | c5aed7bd9330c2bde33abfe1724af820273b457a (diff) | |
| download | emacs-6f1d9822d972c418dbf2295fcd01b7b0a3dc5ef8.tar.gz emacs-6f1d9822d972c418dbf2295fcd01b7b0a3dc5ef8.zip | |
Minor cleanup for terminal setup.
* termhooks.h (create_terminal): Adjust prototype.
* terminal.c (create_terminal): Pass output method and RIF as args.
(init_initial_terminal):
* nsterm.m (ns_create_terminal):
* term.c (init_tty):
* w32term.c (w32_create_terminal):
* xterm.c (x_create_terminal): Adjust users.
Avoid redundant NULL initializers and add comments.
Diffstat (limited to 'src/term.c')
| -rw-r--r-- | src/term.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/src/term.c b/src/term.c index 8ea3e42dae6..379c94e54a1 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -3940,43 +3940,24 @@ clear_tty_hooks (struct terminal *terminal) | |||
| 3940 | static void | 3940 | static void |
| 3941 | set_tty_hooks (struct terminal *terminal) | 3941 | set_tty_hooks (struct terminal *terminal) |
| 3942 | { | 3942 | { |
| 3943 | terminal->rif = 0; /* ttys don't support window-based redisplay. */ | ||
| 3944 | |||
| 3945 | terminal->cursor_to_hook = &tty_cursor_to; | 3943 | terminal->cursor_to_hook = &tty_cursor_to; |
| 3946 | terminal->raw_cursor_to_hook = &tty_raw_cursor_to; | 3944 | terminal->raw_cursor_to_hook = &tty_raw_cursor_to; |
| 3947 | |||
| 3948 | terminal->clear_to_end_hook = &tty_clear_to_end; | 3945 | terminal->clear_to_end_hook = &tty_clear_to_end; |
| 3949 | terminal->clear_frame_hook = &tty_clear_frame; | 3946 | terminal->clear_frame_hook = &tty_clear_frame; |
| 3950 | terminal->clear_end_of_line_hook = &tty_clear_end_of_line; | 3947 | terminal->clear_end_of_line_hook = &tty_clear_end_of_line; |
| 3951 | |||
| 3952 | terminal->ins_del_lines_hook = &tty_ins_del_lines; | 3948 | terminal->ins_del_lines_hook = &tty_ins_del_lines; |
| 3953 | |||
| 3954 | terminal->insert_glyphs_hook = &tty_insert_glyphs; | 3949 | terminal->insert_glyphs_hook = &tty_insert_glyphs; |
| 3955 | terminal->write_glyphs_hook = &tty_write_glyphs; | 3950 | terminal->write_glyphs_hook = &tty_write_glyphs; |
| 3956 | terminal->delete_glyphs_hook = &tty_delete_glyphs; | 3951 | terminal->delete_glyphs_hook = &tty_delete_glyphs; |
| 3957 | |||
| 3958 | terminal->ring_bell_hook = &tty_ring_bell; | 3952 | terminal->ring_bell_hook = &tty_ring_bell; |
| 3959 | |||
| 3960 | terminal->reset_terminal_modes_hook = &tty_reset_terminal_modes; | 3953 | terminal->reset_terminal_modes_hook = &tty_reset_terminal_modes; |
| 3961 | terminal->set_terminal_modes_hook = &tty_set_terminal_modes; | 3954 | terminal->set_terminal_modes_hook = &tty_set_terminal_modes; |
| 3962 | terminal->update_begin_hook = 0; /* Not needed. */ | ||
| 3963 | terminal->update_end_hook = &tty_update_end; | 3955 | terminal->update_end_hook = &tty_update_end; |
| 3964 | terminal->set_terminal_window_hook = &tty_set_terminal_window; | 3956 | terminal->set_terminal_window_hook = &tty_set_terminal_window; |
| 3965 | |||
| 3966 | terminal->mouse_position_hook = 0; /* Not needed. */ | ||
| 3967 | terminal->frame_rehighlight_hook = 0; /* Not needed. */ | ||
| 3968 | terminal->frame_raise_lower_hook = 0; /* Not needed. */ | ||
| 3969 | |||
| 3970 | terminal->set_vertical_scroll_bar_hook = 0; /* Not needed. */ | ||
| 3971 | terminal->condemn_scroll_bars_hook = 0; /* Not needed. */ | ||
| 3972 | terminal->redeem_scroll_bar_hook = 0; /* Not needed. */ | ||
| 3973 | terminal->judge_scroll_bars_hook = 0; /* Not needed. */ | ||
| 3974 | |||
| 3975 | terminal->read_socket_hook = &tty_read_avail_input; /* keyboard.c */ | 3957 | terminal->read_socket_hook = &tty_read_avail_input; /* keyboard.c */ |
| 3976 | terminal->frame_up_to_date_hook = 0; /* Not needed. */ | ||
| 3977 | |||
| 3978 | terminal->delete_frame_hook = &tty_free_frame_resources; | 3958 | terminal->delete_frame_hook = &tty_free_frame_resources; |
| 3979 | terminal->delete_terminal_hook = &delete_tty; | 3959 | terminal->delete_terminal_hook = &delete_tty; |
| 3960 | /* Other hooks are NULL by default. */ | ||
| 3980 | } | 3961 | } |
| 3981 | 3962 | ||
| 3982 | /* If FD is the controlling terminal, drop it. */ | 3963 | /* If FD is the controlling terminal, drop it. */ |
| @@ -4040,7 +4021,7 @@ init_tty (const char *name, const char *terminal_type, bool must_succeed) | |||
| 4040 | if (terminal) | 4021 | if (terminal) |
| 4041 | return terminal; | 4022 | return terminal; |
| 4042 | 4023 | ||
| 4043 | terminal = create_terminal (); | 4024 | terminal = create_terminal (output_termcap, NULL); |
| 4044 | #ifdef MSDOS | 4025 | #ifdef MSDOS |
| 4045 | if (been_here > 0) | 4026 | if (been_here > 0) |
| 4046 | maybe_fatal (0, 0, "Attempt to create another terminal %s", "", | 4027 | maybe_fatal (0, 0, "Attempt to create another terminal %s", "", |
| @@ -4054,7 +4035,6 @@ init_tty (const char *name, const char *terminal_type, bool must_succeed) | |||
| 4054 | tty->next = tty_list; | 4035 | tty->next = tty_list; |
| 4055 | tty_list = tty; | 4036 | tty_list = tty; |
| 4056 | 4037 | ||
| 4057 | terminal->type = output_termcap; | ||
| 4058 | terminal->display_info.tty = tty; | 4038 | terminal->display_info.tty = tty; |
| 4059 | tty->terminal = terminal; | 4039 | tty->terminal = terminal; |
| 4060 | 4040 | ||