1992-01-13 22:04:23 +00:00
|
|
|
/* Flags and parameters describing terminal's characteristics.
|
2011-01-25 04:08:28 +00:00
|
|
|
Copyright (C) 1985-1986, 2001-2011 Free Software Foundation, Inc.
|
1992-01-13 22:04:23 +00:00
|
|
|
|
|
|
|
This file is part of GNU Emacs.
|
|
|
|
|
2008-05-15 03:28:14 +00:00
|
|
|
GNU Emacs is free software: you can redistribute it and/or modify
|
1992-01-13 22:04:23 +00:00
|
|
|
it under the terms of the GNU General Public License as published by
|
2008-05-15 03:28:14 +00:00
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
1992-01-13 22:04:23 +00:00
|
|
|
|
|
|
|
GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
2008-05-15 03:28:14 +00:00
|
|
|
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
1992-01-13 22:04:23 +00:00
|
|
|
|
Separate frame-local, tty-dependent parameters from tty-local parameters.
src/termchar.h (struct tty_output): Redefined to contain frame-local
tty-dependent parameters. (Currently there are no such parameters, so
it consists of the tty_display_info pointer.)
(struct tty_display_info): New structure, with reference_count.
(FRAME_TTY): Updated to reflect new termcap frame structure.
src/term.c: Update prototypes. Use tty_display_info instead of tty_output.
src/cm.c (current_tty, cmcheckmagic, cmcostinit, calccost, cmgoto, Wcm_clear)
(Wcm_init): Use tty_display_info instead of tty_output.
src/cm.h: Update prototypes.
src/dispextern.h: Ditto.
src/dispnew.c (window_change_signal, init_display, make_terminal_frame):
Use tty_display_info instead of tty_output.
src/frame.c (Fdelete_frame): Use tty_display_info instead of
tty_output. Fix delete_tty check.
(make_terminal_frame): Allocate f->output_data.tty. Increase
reference count of tty device.
(delete_frame): Free f->output_data.tty. Use reference count to
decide if the tty should be closed.
src/frame.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): New,
unconditional definitions.
(struct device): New declaration (at the moment, it is defined as
empty in termhooks.h).
(struct frame): Added display, background_pixel, foreground_pixel member.
src/keyboard.c (read_avail_input): Use tty_display_info instead of tty_output.
src/lisp.h: Declare struct display. Update prototypes.
src/sysdep.c: Update prototypes.
(discard_tty_input, init_all_sys_modes, init_sys_modes, reset_all_sys_modes)
(reset_sys_modes, hft_init, hft_reset): Use tty_display_info instead
of tty_output.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-29
2004-01-01 17:55:53 +00:00
|
|
|
/* Each termcap frame points to its own struct tty_output object in
|
|
|
|
the output_data.tty field. The tty_output structure contains the
|
|
|
|
information that is specific to termcap frames. */
|
Removed %T in mode-line-format. Trivial documentation changes.
lisp/bindings.el (mode-line-buffer-identification): Use the
conditional formatting feature instead of builtin support.
src/buffer.c (Vmode_line_format): Removed %T documentation.
src/xdisp.c (decode_mode_spec): Removed %T processing.
lib-src/emacsclient.c (pass_signal_to_emacs, init_signals): Added
comment.
src/cm.c: Cosmetic changes.
src/termchar.h: Ditto.
src/keyboard.c (interrupt_signal, handle_interrupt): Updated
documentation.
src/process.c (add_keyboard_wait_descriptor): Added docs.
src/sysdep.c (init_all_sys_modes, init_sys_modes)
(reset_all_sys_modes): Added docs.
src/term.c (tty_ring_bell, tty_set_terminal_modes)
(tty_reset_terminal_modes, tty_update_end, set_terminal_window)
(tty_set_terminal_window, clear_to_end, tty_clear_to_end)
(tty_clear_frame, tty_clear_end_of_line, write_glyphs)
(tty_write_glyphs, insert_glyphs, tty_insert_glyphs, delete_glyphs)
(tty_delete_glyphs, tty_ins_del_lines, get_named_tty_display)
(init_initial_display, delete_tty): Added docs.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-65
2004-01-25 00:43:38 +00:00
|
|
|
|
Implemented multiple tty support.
README.multi-tty: New file.
src/termchar.h (struct terminal): Renamed to struct tty_output. Added name, type,
input, output, termscript, old_tty, term_initted, old_tty_valid,
background_pixel, foreground_pixel, next fields.
(TERMINAL_*): Renamed to TTY_* for brevity.
(CURRENT_TERMINAL): Renamed to CURTTY for brevity.
(tty_list): New variable.
(TERMINAL_PTR): Removed.
(FRAME_TTY): New function.
(TTY_NAME, TTY_TYPE): New macros.
src/term.c (current_terminal): Removed. (_current_terminal): Removed. (tty_list):
New variable. (OUTPUT, OUTPUT1, OUTPUTL, OUTPUT_IF, OUTPUT1_IF): Added tty
parameter. (set_terminal_modes): Added tty parameter. (reset_terminal_modes):
Added tty parameter. (cursor_to, raw_cursor_to): Updated cmgoto() calls.
(clear_end_of_line, write_glyphs): Add indirection to terminal output, updated
cmcheckmagic() calls. (get_named_tty): New function. (term_dummy_init): New
function. (term_init): Added name parameter, added tty_output return value.
Changed algorithm to update tty_list. Call init_sys_modes() to set up tty
mode on the newly opened terminal device.
(get_current_tty): New function, intended for debugging.
src/termhooks.h (termscript): Removed.
src/w32term.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Removed redundant
definition.
src/macterm.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Ditto.
src/window.c (init_window_once): Call make_terminal_frame with two zero parameters.
src/cm.h (emacs_tputs): New macro to set current_tty, and then call tputs().
(current_tty): New variable, for cmputc().
(cmcheckmagic, cmputc, cmgoto): Added prototypes.
src/cm.c (current_tty): New variable, for cmputc().
(cmputc): Use it.
(cmcheckmagic): Added tty parameter, look up terminal streams there.
(calccost): Added tty parameter. Use emacs_tputs() instead of tputs().
(cmgoto): Added tty parameter. Pass it on to calccost(). Use emacs_tputs()
instead of tputs().
src/dispextern.h (set_terminal_modes, reset_terminal_modes): Added tty parameter.
(term_init): Added name parameter (the filename of the terminal device). Added
return value (struct tty_output).
src/dispnew.c: Replace CURTTY() with local variables throughout the file (where applicable).
(termscript): Moved to struct tty_output.
(terminal_type): Removed.
src/emacs.c (main): Don't call init_sys_modes(), the new term_init() already does that
during init_display().
(shut_down_emacs): Call reset_all_sys_modes() instead of reset_sys_modes().
src/frame.c (Qtty, Qtty_type): New variables.
(syms_of_frame): Initialize them.
(tty_display): Removed.
(make_terminal_frame): New parameters (tty filename and type).
Initialize output_data.tty field instead of output_data.x. Use term_init() to
find the right tty_output. (Use term_dummy_init() during bootstrap.)
(Fmake_terminal_frame): Get device filename and type from frame parameters.
src/frame.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Do the right thing
if the frame is a tty.
(struct frame): New member in output_data: tty.
(make_terminal_frame): Updated of prototype.
src/keyboard.c (Fset_input_mode): Call reset_all_sys_modes(), not
reset_sys_modes(). Ditto with init_sys_modes().
src/lisp.h (tty_output): Added forward declaration.
(init_sys_modes, reset_sys_modes): Updated prototype.
(init_all_sys_modes, reset_all_sys_modes): New prototypes.
src/scroll.c: Replace CURTTY() with local variables throughout the file (where applicable).
src/sysdep.c (old_tty, term_initted, old_tty_valid): Moved to struct tty_output.(
(init_all_sys_modes): New function.
(init_sys_modes): Added tty_output parameter. Use it.
(reset_all_sys_modes): New function.
(reset_sys_modes): Added tty_output parameter. Use it.
src/Makefile.in: Update dependencies.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-2
2003-12-25 06:59:31 +00:00
|
|
|
struct tty_output
|
Add a level of indirection to terminal characteristics.
* src/termchar.h (struct terminal): New struct.
(must_write_spaces, min_padding_speed, line_ins_del_ok)
(char_ins_del_ok, scroll_region_ok, scroll_region_cost)
(memory_below_frame, fast_clear_end_of_line): Moved to struct
terminal.
(current_terminal): New variable.
(CURRENT_TERMINAL, TERMINAL_*): New accessor macros.
(min_padding_speed, dont_calculate_costs): Commented out (unused).
* src/term.c (_current_terminal): New variable. Will be removed when
true multi-tty support is implemented.
* src/termopts.h (no_redraw_on_reenter): Moved here.
* src/term.c (set_terminal_window, ins_del_lines, calculate_costs)
(term_init): Use the accessor macros for terminal characteristics.
* src/dispnew.c (line_hash_code, line_draw_cost)
(direct_output_for_insert, update_frame_1, scrolling)
(update_frame_line): Ditto.
* src/macterm.c (mac_initialize): Ditto.
* src/msdos.c (internal_terminal_init): Ditto.
* src/scroll.c (calculate_scrolling, calculate_direct_scrolling)
(scrolling_1, scroll_cost): Ditto.
* src/sysdep.c (hft_init): Ditto.
* src/w32term.c (w32_initialize): Ditto.
* src/xdisp.c (try_window_id): Ditto.
* src/xterm.c (x_initialize): Ditto.
* etc/TODO: Add pointer to my tla archive.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-1
2003-12-24 18:55:24 +00:00
|
|
|
{
|
Separate frame-local, tty-dependent parameters from tty-local parameters.
src/termchar.h (struct tty_output): Redefined to contain frame-local
tty-dependent parameters. (Currently there are no such parameters, so
it consists of the tty_display_info pointer.)
(struct tty_display_info): New structure, with reference_count.
(FRAME_TTY): Updated to reflect new termcap frame structure.
src/term.c: Update prototypes. Use tty_display_info instead of tty_output.
src/cm.c (current_tty, cmcheckmagic, cmcostinit, calccost, cmgoto, Wcm_clear)
(Wcm_init): Use tty_display_info instead of tty_output.
src/cm.h: Update prototypes.
src/dispextern.h: Ditto.
src/dispnew.c (window_change_signal, init_display, make_terminal_frame):
Use tty_display_info instead of tty_output.
src/frame.c (Fdelete_frame): Use tty_display_info instead of
tty_output. Fix delete_tty check.
(make_terminal_frame): Allocate f->output_data.tty. Increase
reference count of tty device.
(delete_frame): Free f->output_data.tty. Use reference count to
decide if the tty should be closed.
src/frame.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): New,
unconditional definitions.
(struct device): New declaration (at the moment, it is defined as
empty in termhooks.h).
(struct frame): Added display, background_pixel, foreground_pixel member.
src/keyboard.c (read_avail_input): Use tty_display_info instead of tty_output.
src/lisp.h: Declare struct display. Update prototypes.
src/sysdep.c: Update prototypes.
(discard_tty_input, init_all_sys_modes, init_sys_modes, reset_all_sys_modes)
(reset_sys_modes, hft_init, hft_reset): Use tty_display_info instead
of tty_output.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-29
2004-01-01 17:55:53 +00:00
|
|
|
/* The Emacs structure for the tty device this frame is on. */
|
|
|
|
struct tty_display_info *display_info;
|
|
|
|
|
|
|
|
/* There is nothing else here at the moment... */
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Parameters that are shared between frames on the same tty device. */
|
Removed %T in mode-line-format. Trivial documentation changes.
lisp/bindings.el (mode-line-buffer-identification): Use the
conditional formatting feature instead of builtin support.
src/buffer.c (Vmode_line_format): Removed %T documentation.
src/xdisp.c (decode_mode_spec): Removed %T processing.
lib-src/emacsclient.c (pass_signal_to_emacs, init_signals): Added
comment.
src/cm.c: Cosmetic changes.
src/termchar.h: Ditto.
src/keyboard.c (interrupt_signal, handle_interrupt): Updated
documentation.
src/process.c (add_keyboard_wait_descriptor): Added docs.
src/sysdep.c (init_all_sys_modes, init_sys_modes)
(reset_all_sys_modes): Added docs.
src/term.c (tty_ring_bell, tty_set_terminal_modes)
(tty_reset_terminal_modes, tty_update_end, set_terminal_window)
(tty_set_terminal_window, clear_to_end, tty_clear_to_end)
(tty_clear_frame, tty_clear_end_of_line, write_glyphs)
(tty_write_glyphs, insert_glyphs, tty_insert_glyphs, delete_glyphs)
(tty_delete_glyphs, tty_ins_del_lines, get_named_tty_display)
(init_initial_display, delete_tty): Added docs.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-65
2004-01-25 00:43:38 +00:00
|
|
|
|
Separate frame-local, tty-dependent parameters from tty-local parameters.
src/termchar.h (struct tty_output): Redefined to contain frame-local
tty-dependent parameters. (Currently there are no such parameters, so
it consists of the tty_display_info pointer.)
(struct tty_display_info): New structure, with reference_count.
(FRAME_TTY): Updated to reflect new termcap frame structure.
src/term.c: Update prototypes. Use tty_display_info instead of tty_output.
src/cm.c (current_tty, cmcheckmagic, cmcostinit, calccost, cmgoto, Wcm_clear)
(Wcm_init): Use tty_display_info instead of tty_output.
src/cm.h: Update prototypes.
src/dispextern.h: Ditto.
src/dispnew.c (window_change_signal, init_display, make_terminal_frame):
Use tty_display_info instead of tty_output.
src/frame.c (Fdelete_frame): Use tty_display_info instead of
tty_output. Fix delete_tty check.
(make_terminal_frame): Allocate f->output_data.tty. Increase
reference count of tty device.
(delete_frame): Free f->output_data.tty. Use reference count to
decide if the tty should be closed.
src/frame.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): New,
unconditional definitions.
(struct device): New declaration (at the moment, it is defined as
empty in termhooks.h).
(struct frame): Added display, background_pixel, foreground_pixel member.
src/keyboard.c (read_avail_input): Use tty_display_info instead of tty_output.
src/lisp.h: Declare struct display. Update prototypes.
src/sysdep.c: Update prototypes.
(discard_tty_input, init_all_sys_modes, init_sys_modes, reset_all_sys_modes)
(reset_sys_modes, hft_init, hft_reset): Use tty_display_info instead
of tty_output.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-29
2004-01-01 17:55:53 +00:00
|
|
|
struct tty_display_info
|
|
|
|
{
|
|
|
|
struct tty_display_info *next; /* Chain of all tty devices. */
|
Unify mouse highlight code of MSDOS and GUI sessions.
xdisp.c (coords_in_mouse_face_p): Move prototype out of the
HAVE_WINDOW_SYSTEM conditional.
(x_y_to_hpos_vpos, frame_to_window_pixel_xy): Move out of the
HAVE_WINDOW_SYSTEM block.
(try_window_id) [HAVE_GPM || MSDOS]: Call
x_clear_window_mouse_face.
(draw_row_with_mouse_face): Implementation for HAVE_WINDOW_SYSTEM
systems.
(show_mouse_face): Call it, instead of calling draw_glyphs directly.
(show_mouse_face, clear_mouse_face, coords_in_mouse_face_p)
(cursor_in_mouse_face_p, rows_from_pos_range)
(mouse_face_from_buffer_pos, mouse_face_from_string_pos)
(note_mode_line_or_margin_highlight, note_mouse_highlight)
(x_clear_window_mouse_face, cancel_mouse_face): Move out of the
HAVE_WINDOW_SYSTEM block. Ifdef away window-system specific
fragments.
(note_mouse_highlight): Call popup_activated for MSDOS as well.
Clear mouse highlight if pointer is over glyphs whose OBJECT is an
integer.
(mouse_face_from_buffer_pos): Add parentheses around && within ||.
xmenu.c (popup_activated): Don't define on MSDOS.
dispnew.c (mirror_make_current): Set Y coordinate of the
mode-line and header-line rows.
termchar.h (struct tty_display_info): Define mouse_face_*
members not only for MSDOS. Delete stray whitespace.
<mouse_face_beg_x, mouse_face_beg_y, mouse_face_overlay>: New
struct members.
dispextern.h (DPYINFO_DEFINED) [HAVE_X_WINDOWS]: Define.
(DPYINFO_DEFINED) [HAVE_NTGUI]: Define.
(DPYINFO_DEFINED) [HAVE_NS]: Define.
(Display_Info) [!DPYINFO_DEFINED]: Define here.
(FRAME_X_DISPLAY_INFO) [HAVE_GPM]: Define.
(FRAME_X_DISPLAY_INFO): Define to NULL if not defined.
(frame_to_window_pixel_xy, note_mouse_highlight)
(x_clear_window_mouse_face, cancel_mouse_face, clear_mouse_face)
(show_mouse_face, cursor_in_mouse_face_p): Move prototypes out of
HAVE_WINDOW_SYSTEM conditional.
(draw_row_with_mouse_face): Declare prototype.
msdos.h (Display_Info): Don't define here.
msdos.c (show_mouse_face, clear_mouse_face)
(fast_find_position, IT_note_mode_line_highlight)
(IT_note_mouse_highlight): Functions deleted.
(IT_frame_up_to_date, dos_rawgetc): Call note_mouse_highlight
instead of IT_note_mouse_highlight.
(draw_row_with_mouse_face, popup_activated): New functions.
2010-10-30 13:09:52 +00:00
|
|
|
|
Implemented multiple tty support.
README.multi-tty: New file.
src/termchar.h (struct terminal): Renamed to struct tty_output. Added name, type,
input, output, termscript, old_tty, term_initted, old_tty_valid,
background_pixel, foreground_pixel, next fields.
(TERMINAL_*): Renamed to TTY_* for brevity.
(CURRENT_TERMINAL): Renamed to CURTTY for brevity.
(tty_list): New variable.
(TERMINAL_PTR): Removed.
(FRAME_TTY): New function.
(TTY_NAME, TTY_TYPE): New macros.
src/term.c (current_terminal): Removed. (_current_terminal): Removed. (tty_list):
New variable. (OUTPUT, OUTPUT1, OUTPUTL, OUTPUT_IF, OUTPUT1_IF): Added tty
parameter. (set_terminal_modes): Added tty parameter. (reset_terminal_modes):
Added tty parameter. (cursor_to, raw_cursor_to): Updated cmgoto() calls.
(clear_end_of_line, write_glyphs): Add indirection to terminal output, updated
cmcheckmagic() calls. (get_named_tty): New function. (term_dummy_init): New
function. (term_init): Added name parameter, added tty_output return value.
Changed algorithm to update tty_list. Call init_sys_modes() to set up tty
mode on the newly opened terminal device.
(get_current_tty): New function, intended for debugging.
src/termhooks.h (termscript): Removed.
src/w32term.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Removed redundant
definition.
src/macterm.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Ditto.
src/window.c (init_window_once): Call make_terminal_frame with two zero parameters.
src/cm.h (emacs_tputs): New macro to set current_tty, and then call tputs().
(current_tty): New variable, for cmputc().
(cmcheckmagic, cmputc, cmgoto): Added prototypes.
src/cm.c (current_tty): New variable, for cmputc().
(cmputc): Use it.
(cmcheckmagic): Added tty parameter, look up terminal streams there.
(calccost): Added tty parameter. Use emacs_tputs() instead of tputs().
(cmgoto): Added tty parameter. Pass it on to calccost(). Use emacs_tputs()
instead of tputs().
src/dispextern.h (set_terminal_modes, reset_terminal_modes): Added tty parameter.
(term_init): Added name parameter (the filename of the terminal device). Added
return value (struct tty_output).
src/dispnew.c: Replace CURTTY() with local variables throughout the file (where applicable).
(termscript): Moved to struct tty_output.
(terminal_type): Removed.
src/emacs.c (main): Don't call init_sys_modes(), the new term_init() already does that
during init_display().
(shut_down_emacs): Call reset_all_sys_modes() instead of reset_sys_modes().
src/frame.c (Qtty, Qtty_type): New variables.
(syms_of_frame): Initialize them.
(tty_display): Removed.
(make_terminal_frame): New parameters (tty filename and type).
Initialize output_data.tty field instead of output_data.x. Use term_init() to
find the right tty_output. (Use term_dummy_init() during bootstrap.)
(Fmake_terminal_frame): Get device filename and type from frame parameters.
src/frame.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Do the right thing
if the frame is a tty.
(struct frame): New member in output_data: tty.
(make_terminal_frame): Updated of prototype.
src/keyboard.c (Fset_input_mode): Call reset_all_sys_modes(), not
reset_sys_modes(). Ditto with init_sys_modes().
src/lisp.h (tty_output): Added forward declaration.
(init_sys_modes, reset_sys_modes): Updated prototype.
(init_all_sys_modes, reset_all_sys_modes): New prototypes.
src/scroll.c: Replace CURTTY() with local variables throughout the file (where applicable).
src/sysdep.c (old_tty, term_initted, old_tty_valid): Moved to struct tty_output.(
(init_all_sys_modes): New function.
(init_sys_modes): Added tty_output parameter. Use it.
(reset_all_sys_modes): New function.
(reset_sys_modes): Added tty_output parameter. Use it.
src/Makefile.in: Update dependencies.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-2
2003-12-25 06:59:31 +00:00
|
|
|
char *name; /* The name of the device file or 0 if
|
|
|
|
stdin/stdout. */
|
|
|
|
char *type; /* The type of the tty. */
|
Unify mouse highlight code of MSDOS and GUI sessions.
xdisp.c (coords_in_mouse_face_p): Move prototype out of the
HAVE_WINDOW_SYSTEM conditional.
(x_y_to_hpos_vpos, frame_to_window_pixel_xy): Move out of the
HAVE_WINDOW_SYSTEM block.
(try_window_id) [HAVE_GPM || MSDOS]: Call
x_clear_window_mouse_face.
(draw_row_with_mouse_face): Implementation for HAVE_WINDOW_SYSTEM
systems.
(show_mouse_face): Call it, instead of calling draw_glyphs directly.
(show_mouse_face, clear_mouse_face, coords_in_mouse_face_p)
(cursor_in_mouse_face_p, rows_from_pos_range)
(mouse_face_from_buffer_pos, mouse_face_from_string_pos)
(note_mode_line_or_margin_highlight, note_mouse_highlight)
(x_clear_window_mouse_face, cancel_mouse_face): Move out of the
HAVE_WINDOW_SYSTEM block. Ifdef away window-system specific
fragments.
(note_mouse_highlight): Call popup_activated for MSDOS as well.
Clear mouse highlight if pointer is over glyphs whose OBJECT is an
integer.
(mouse_face_from_buffer_pos): Add parentheses around && within ||.
xmenu.c (popup_activated): Don't define on MSDOS.
dispnew.c (mirror_make_current): Set Y coordinate of the
mode-line and header-line rows.
termchar.h (struct tty_display_info): Define mouse_face_*
members not only for MSDOS. Delete stray whitespace.
<mouse_face_beg_x, mouse_face_beg_y, mouse_face_overlay>: New
struct members.
dispextern.h (DPYINFO_DEFINED) [HAVE_X_WINDOWS]: Define.
(DPYINFO_DEFINED) [HAVE_NTGUI]: Define.
(DPYINFO_DEFINED) [HAVE_NS]: Define.
(Display_Info) [!DPYINFO_DEFINED]: Define here.
(FRAME_X_DISPLAY_INFO) [HAVE_GPM]: Define.
(FRAME_X_DISPLAY_INFO): Define to NULL if not defined.
(frame_to_window_pixel_xy, note_mouse_highlight)
(x_clear_window_mouse_face, cancel_mouse_face, clear_mouse_face)
(show_mouse_face, cursor_in_mouse_face_p): Move prototypes out of
HAVE_WINDOW_SYSTEM conditional.
(draw_row_with_mouse_face): Declare prototype.
msdos.h (Display_Info): Don't define here.
msdos.c (show_mouse_face, clear_mouse_face)
(fast_find_position, IT_note_mode_line_highlight)
(IT_note_mouse_highlight): Functions deleted.
(IT_frame_up_to_date, dos_rawgetc): Call note_mouse_highlight
instead of IT_note_mouse_highlight.
(draw_row_with_mouse_face, popup_activated): New functions.
2010-10-30 13:09:52 +00:00
|
|
|
|
Implemented multiple tty support.
README.multi-tty: New file.
src/termchar.h (struct terminal): Renamed to struct tty_output. Added name, type,
input, output, termscript, old_tty, term_initted, old_tty_valid,
background_pixel, foreground_pixel, next fields.
(TERMINAL_*): Renamed to TTY_* for brevity.
(CURRENT_TERMINAL): Renamed to CURTTY for brevity.
(tty_list): New variable.
(TERMINAL_PTR): Removed.
(FRAME_TTY): New function.
(TTY_NAME, TTY_TYPE): New macros.
src/term.c (current_terminal): Removed. (_current_terminal): Removed. (tty_list):
New variable. (OUTPUT, OUTPUT1, OUTPUTL, OUTPUT_IF, OUTPUT1_IF): Added tty
parameter. (set_terminal_modes): Added tty parameter. (reset_terminal_modes):
Added tty parameter. (cursor_to, raw_cursor_to): Updated cmgoto() calls.
(clear_end_of_line, write_glyphs): Add indirection to terminal output, updated
cmcheckmagic() calls. (get_named_tty): New function. (term_dummy_init): New
function. (term_init): Added name parameter, added tty_output return value.
Changed algorithm to update tty_list. Call init_sys_modes() to set up tty
mode on the newly opened terminal device.
(get_current_tty): New function, intended for debugging.
src/termhooks.h (termscript): Removed.
src/w32term.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Removed redundant
definition.
src/macterm.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Ditto.
src/window.c (init_window_once): Call make_terminal_frame with two zero parameters.
src/cm.h (emacs_tputs): New macro to set current_tty, and then call tputs().
(current_tty): New variable, for cmputc().
(cmcheckmagic, cmputc, cmgoto): Added prototypes.
src/cm.c (current_tty): New variable, for cmputc().
(cmputc): Use it.
(cmcheckmagic): Added tty parameter, look up terminal streams there.
(calccost): Added tty parameter. Use emacs_tputs() instead of tputs().
(cmgoto): Added tty parameter. Pass it on to calccost(). Use emacs_tputs()
instead of tputs().
src/dispextern.h (set_terminal_modes, reset_terminal_modes): Added tty parameter.
(term_init): Added name parameter (the filename of the terminal device). Added
return value (struct tty_output).
src/dispnew.c: Replace CURTTY() with local variables throughout the file (where applicable).
(termscript): Moved to struct tty_output.
(terminal_type): Removed.
src/emacs.c (main): Don't call init_sys_modes(), the new term_init() already does that
during init_display().
(shut_down_emacs): Call reset_all_sys_modes() instead of reset_sys_modes().
src/frame.c (Qtty, Qtty_type): New variables.
(syms_of_frame): Initialize them.
(tty_display): Removed.
(make_terminal_frame): New parameters (tty filename and type).
Initialize output_data.tty field instead of output_data.x. Use term_init() to
find the right tty_output. (Use term_dummy_init() during bootstrap.)
(Fmake_terminal_frame): Get device filename and type from frame parameters.
src/frame.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Do the right thing
if the frame is a tty.
(struct frame): New member in output_data: tty.
(make_terminal_frame): Updated of prototype.
src/keyboard.c (Fset_input_mode): Call reset_all_sys_modes(), not
reset_sys_modes(). Ditto with init_sys_modes().
src/lisp.h (tty_output): Added forward declaration.
(init_sys_modes, reset_sys_modes): Updated prototype.
(init_all_sys_modes, reset_all_sys_modes): New prototypes.
src/scroll.c: Replace CURTTY() with local variables throughout the file (where applicable).
src/sysdep.c (old_tty, term_initted, old_tty_valid): Moved to struct tty_output.(
(init_all_sys_modes): New function.
(init_sys_modes): Added tty_output parameter. Use it.
(reset_all_sys_modes): New function.
(reset_sys_modes): Added tty_output parameter. Use it.
src/Makefile.in: Update dependencies.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-2
2003-12-25 06:59:31 +00:00
|
|
|
/* Input/output */
|
Unify mouse highlight code of MSDOS and GUI sessions.
xdisp.c (coords_in_mouse_face_p): Move prototype out of the
HAVE_WINDOW_SYSTEM conditional.
(x_y_to_hpos_vpos, frame_to_window_pixel_xy): Move out of the
HAVE_WINDOW_SYSTEM block.
(try_window_id) [HAVE_GPM || MSDOS]: Call
x_clear_window_mouse_face.
(draw_row_with_mouse_face): Implementation for HAVE_WINDOW_SYSTEM
systems.
(show_mouse_face): Call it, instead of calling draw_glyphs directly.
(show_mouse_face, clear_mouse_face, coords_in_mouse_face_p)
(cursor_in_mouse_face_p, rows_from_pos_range)
(mouse_face_from_buffer_pos, mouse_face_from_string_pos)
(note_mode_line_or_margin_highlight, note_mouse_highlight)
(x_clear_window_mouse_face, cancel_mouse_face): Move out of the
HAVE_WINDOW_SYSTEM block. Ifdef away window-system specific
fragments.
(note_mouse_highlight): Call popup_activated for MSDOS as well.
Clear mouse highlight if pointer is over glyphs whose OBJECT is an
integer.
(mouse_face_from_buffer_pos): Add parentheses around && within ||.
xmenu.c (popup_activated): Don't define on MSDOS.
dispnew.c (mirror_make_current): Set Y coordinate of the
mode-line and header-line rows.
termchar.h (struct tty_display_info): Define mouse_face_*
members not only for MSDOS. Delete stray whitespace.
<mouse_face_beg_x, mouse_face_beg_y, mouse_face_overlay>: New
struct members.
dispextern.h (DPYINFO_DEFINED) [HAVE_X_WINDOWS]: Define.
(DPYINFO_DEFINED) [HAVE_NTGUI]: Define.
(DPYINFO_DEFINED) [HAVE_NS]: Define.
(Display_Info) [!DPYINFO_DEFINED]: Define here.
(FRAME_X_DISPLAY_INFO) [HAVE_GPM]: Define.
(FRAME_X_DISPLAY_INFO): Define to NULL if not defined.
(frame_to_window_pixel_xy, note_mouse_highlight)
(x_clear_window_mouse_face, cancel_mouse_face, clear_mouse_face)
(show_mouse_face, cursor_in_mouse_face_p): Move prototypes out of
HAVE_WINDOW_SYSTEM conditional.
(draw_row_with_mouse_face): Declare prototype.
msdos.h (Display_Info): Don't define here.
msdos.c (show_mouse_face, clear_mouse_face)
(fast_find_position, IT_note_mode_line_highlight)
(IT_note_mouse_highlight): Functions deleted.
(IT_frame_up_to_date, dos_rawgetc): Call note_mouse_highlight
instead of IT_note_mouse_highlight.
(draw_row_with_mouse_face, popup_activated): New functions.
2010-10-30 13:09:52 +00:00
|
|
|
|
Implemented suspending of emacsclient frames.
lib-src/emacsclient.c (quote_file_name): Renamed to quote_argument.
(unquote_argument, handle_sigcont, handle_sigtstp): New functions.
(out, in): New global variables for communicating with the Emacs process.
(init_signals): Set up handlers for SIGCONT, SIGTSTP and SIGTTOU.
(main): Changed out and in to global variables. Prepend `-eval' or
'-file' to each argument. Use fsync to force sending the strings to Emacs.
Removed obsolete -bad-version code. Support the -suspend command.
Cleaned up newline handling.
lisp/frame.el (suspend-frame): New function.
Substitute key definition of suspend-emacs with suspend-frame.
lisp/server.el (server-log): Cosmetic change in log format.
(server-handle-delete-tty, server-handle-delete-frame): Added logging.
(server-handle-suspend-tty, server-quote-arg): New functions.
(server-start): Install server-handle-suspend-tty.
(server-process-filter): Reorganized source code for clarity.
Implemented -resume, -suspend and -ignore commands.
lisp/term/x-win.el (x-initialize-window-system): Don't change the
binding of C-z.
src/cm.c: Replaced TTY_INPUT, TTY_OUTPUT, TTY_TERMSCRIPT calls with
their macro expansion.
src/dispnew.c: Ditto.
src/frame.c: Ditto.
src/keyboard.c: Ditto.
src/sysdep.c: Ditto.
src/keyboard.c (tty_read_avail_input): Don't read if the terminal is
suspended.
src/sysdep.c (discard_tty_input, init_sys_modes, reset_sys_modes): Ditto.
src/term.c (tty_set_terminal_modes, tty_reset_terminal_modes): Ditto.
src/term.c (Vsuspend_tty_functions, Vresume_tty_functions): New hooks.
(syms_of_term): Defvar them.
(term_init): Don't allow opening a new frame on a suspended tty device.
(Fsuspend_tty, Fresume_tty): New functions.
(syms_of_term): Defsubr them.
src/termchar.c (struct tty_display_info): Update documentation of
input and output.
(TTY_INPUT, TTY_OUTPUT, TTY_TERMSCRIPT): Removed.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-105
2004-02-28 01:23:39 +00:00
|
|
|
FILE *input; /* The stream to be used for terminal input.
|
|
|
|
NULL if the terminal is suspended. */
|
|
|
|
FILE *output; /* The stream to be used for terminal output.
|
|
|
|
NULL if the terminal is suspended. */
|
Unify mouse highlight code of MSDOS and GUI sessions.
xdisp.c (coords_in_mouse_face_p): Move prototype out of the
HAVE_WINDOW_SYSTEM conditional.
(x_y_to_hpos_vpos, frame_to_window_pixel_xy): Move out of the
HAVE_WINDOW_SYSTEM block.
(try_window_id) [HAVE_GPM || MSDOS]: Call
x_clear_window_mouse_face.
(draw_row_with_mouse_face): Implementation for HAVE_WINDOW_SYSTEM
systems.
(show_mouse_face): Call it, instead of calling draw_glyphs directly.
(show_mouse_face, clear_mouse_face, coords_in_mouse_face_p)
(cursor_in_mouse_face_p, rows_from_pos_range)
(mouse_face_from_buffer_pos, mouse_face_from_string_pos)
(note_mode_line_or_margin_highlight, note_mouse_highlight)
(x_clear_window_mouse_face, cancel_mouse_face): Move out of the
HAVE_WINDOW_SYSTEM block. Ifdef away window-system specific
fragments.
(note_mouse_highlight): Call popup_activated for MSDOS as well.
Clear mouse highlight if pointer is over glyphs whose OBJECT is an
integer.
(mouse_face_from_buffer_pos): Add parentheses around && within ||.
xmenu.c (popup_activated): Don't define on MSDOS.
dispnew.c (mirror_make_current): Set Y coordinate of the
mode-line and header-line rows.
termchar.h (struct tty_display_info): Define mouse_face_*
members not only for MSDOS. Delete stray whitespace.
<mouse_face_beg_x, mouse_face_beg_y, mouse_face_overlay>: New
struct members.
dispextern.h (DPYINFO_DEFINED) [HAVE_X_WINDOWS]: Define.
(DPYINFO_DEFINED) [HAVE_NTGUI]: Define.
(DPYINFO_DEFINED) [HAVE_NS]: Define.
(Display_Info) [!DPYINFO_DEFINED]: Define here.
(FRAME_X_DISPLAY_INFO) [HAVE_GPM]: Define.
(FRAME_X_DISPLAY_INFO): Define to NULL if not defined.
(frame_to_window_pixel_xy, note_mouse_highlight)
(x_clear_window_mouse_face, cancel_mouse_face, clear_mouse_face)
(show_mouse_face, cursor_in_mouse_face_p): Move prototypes out of
HAVE_WINDOW_SYSTEM conditional.
(draw_row_with_mouse_face): Declare prototype.
msdos.h (Display_Info): Don't define here.
msdos.c (show_mouse_face, clear_mouse_face)
(fast_find_position, IT_note_mode_line_highlight)
(IT_note_mouse_highlight): Functions deleted.
(IT_frame_up_to_date, dos_rawgetc): Call note_mouse_highlight
instead of IT_note_mouse_highlight.
(draw_row_with_mouse_face, popup_activated): New functions.
2010-10-30 13:09:52 +00:00
|
|
|
|
Implemented multiple tty support.
README.multi-tty: New file.
src/termchar.h (struct terminal): Renamed to struct tty_output. Added name, type,
input, output, termscript, old_tty, term_initted, old_tty_valid,
background_pixel, foreground_pixel, next fields.
(TERMINAL_*): Renamed to TTY_* for brevity.
(CURRENT_TERMINAL): Renamed to CURTTY for brevity.
(tty_list): New variable.
(TERMINAL_PTR): Removed.
(FRAME_TTY): New function.
(TTY_NAME, TTY_TYPE): New macros.
src/term.c (current_terminal): Removed. (_current_terminal): Removed. (tty_list):
New variable. (OUTPUT, OUTPUT1, OUTPUTL, OUTPUT_IF, OUTPUT1_IF): Added tty
parameter. (set_terminal_modes): Added tty parameter. (reset_terminal_modes):
Added tty parameter. (cursor_to, raw_cursor_to): Updated cmgoto() calls.
(clear_end_of_line, write_glyphs): Add indirection to terminal output, updated
cmcheckmagic() calls. (get_named_tty): New function. (term_dummy_init): New
function. (term_init): Added name parameter, added tty_output return value.
Changed algorithm to update tty_list. Call init_sys_modes() to set up tty
mode on the newly opened terminal device.
(get_current_tty): New function, intended for debugging.
src/termhooks.h (termscript): Removed.
src/w32term.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Removed redundant
definition.
src/macterm.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Ditto.
src/window.c (init_window_once): Call make_terminal_frame with two zero parameters.
src/cm.h (emacs_tputs): New macro to set current_tty, and then call tputs().
(current_tty): New variable, for cmputc().
(cmcheckmagic, cmputc, cmgoto): Added prototypes.
src/cm.c (current_tty): New variable, for cmputc().
(cmputc): Use it.
(cmcheckmagic): Added tty parameter, look up terminal streams there.
(calccost): Added tty parameter. Use emacs_tputs() instead of tputs().
(cmgoto): Added tty parameter. Pass it on to calccost(). Use emacs_tputs()
instead of tputs().
src/dispextern.h (set_terminal_modes, reset_terminal_modes): Added tty parameter.
(term_init): Added name parameter (the filename of the terminal device). Added
return value (struct tty_output).
src/dispnew.c: Replace CURTTY() with local variables throughout the file (where applicable).
(termscript): Moved to struct tty_output.
(terminal_type): Removed.
src/emacs.c (main): Don't call init_sys_modes(), the new term_init() already does that
during init_display().
(shut_down_emacs): Call reset_all_sys_modes() instead of reset_sys_modes().
src/frame.c (Qtty, Qtty_type): New variables.
(syms_of_frame): Initialize them.
(tty_display): Removed.
(make_terminal_frame): New parameters (tty filename and type).
Initialize output_data.tty field instead of output_data.x. Use term_init() to
find the right tty_output. (Use term_dummy_init() during bootstrap.)
(Fmake_terminal_frame): Get device filename and type from frame parameters.
src/frame.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Do the right thing
if the frame is a tty.
(struct frame): New member in output_data: tty.
(make_terminal_frame): Updated of prototype.
src/keyboard.c (Fset_input_mode): Call reset_all_sys_modes(), not
reset_sys_modes(). Ditto with init_sys_modes().
src/lisp.h (tty_output): Added forward declaration.
(init_sys_modes, reset_sys_modes): Updated prototype.
(init_all_sys_modes, reset_all_sys_modes): New prototypes.
src/scroll.c: Replace CURTTY() with local variables throughout the file (where applicable).
src/sysdep.c (old_tty, term_initted, old_tty_valid): Moved to struct tty_output.(
(init_all_sys_modes): New function.
(init_sys_modes): Added tty_output parameter. Use it.
(reset_all_sys_modes): New function.
(reset_sys_modes): Added tty_output parameter. Use it.
src/Makefile.in: Update dependencies.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-2
2003-12-25 06:59:31 +00:00
|
|
|
FILE *termscript; /* If nonzero, send all terminal output
|
|
|
|
characters to this stream also. */
|
|
|
|
|
Fully eliminated global tty state variables.
lib-src/emacsclient.c (main.c): Fix error message.
lisp/frame.el (make-frame-on-tty): New function.
lisp/server.el (server-process-filter): Notify emacsclient if there
was on error during evaluation.
src/cm.c: Fix remaining cases of direct Wcm references.
src/dispextern.h: Updated prototypes.
src/dispnew.c (Fredraw_frame): Fix set_terminal_modes call.
(init_display): Remove reference to meta_key.
src/frame.c (make_terminal_frame): Renamed first parameter to
tty_name. Call term_init before creating the frame.
(Fmake_terminal_frame): Look up the `tty' and `tty-type' frame
parameters from the currently selected terminal before the global
default.
(Fdelete_frame): Make sure that the new selected frame is live.
src/keyboard.c (meta_key): Moved to struct tty_output.
(read_avail_input): Fix C syntax. Update references to meta_key.
(Fsuspend_emacs): pass current tty to init_sys_modes via
record_unwind_protect.
(Fset_input_mode): Update references to meta_key.
(Fcurrent_input_mode): Ditto.
src/sysdep.c (init_sys_modes): Updated old_tty and meta_key
references. Don't call set_terminal_modes, it needs termcap strings.
(reset_sys_modes): Call tty_reset_terminal_modes instead of
reset_terminal_modes. Updated old_tty references.
src/term.c: Massive updates throuout the file.
(TS_*, TN_*): Moved to struct tty_output.
(RPov, delete_in_insert_mode se_is_so, costs_set, insert_mode): Ditto.
(standout_mode, specified_window, tty_cursor_hidden): Ditto.
(tty_set_terminal_modes, tty_reset_terminal_modes): New functions.
(turn_on_insert, turn_off_insert): Added tty parameter.
(turn_on_highlight, turn_off_highlight, toggle_highlight): Added tty parameter.
(tty_hide_cursor, tty_show_cursor): Ditto.
(background_highlight, highlight_if_desired): Ditto.
(tty_capable_p): Changed first parameter to tty_output.
(term_init): Make sure top_frame is initialized. Don't exit on errors
if this would have been a secondary terminal. Call set_terminal_modes
on the end.
(delete_tty): New function.
(delete_tty_1): New function.
(print_all_frames): New function, marginally useful for debugging.
src/termchar.h (struct tty_output): Changed old_tty to be a pointer.
Removed old_tty_valid member. Added tty-specific variables from term.c.
src/xfaces.c (Ftty_supports_face_attributes_p): Update for new
tty_capable_p.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-9
2003-12-27 10:00:19 +00:00
|
|
|
struct emacs_tty *old_tty; /* The initial tty mode bits */
|
Implemented multiple tty support.
README.multi-tty: New file.
src/termchar.h (struct terminal): Renamed to struct tty_output. Added name, type,
input, output, termscript, old_tty, term_initted, old_tty_valid,
background_pixel, foreground_pixel, next fields.
(TERMINAL_*): Renamed to TTY_* for brevity.
(CURRENT_TERMINAL): Renamed to CURTTY for brevity.
(tty_list): New variable.
(TERMINAL_PTR): Removed.
(FRAME_TTY): New function.
(TTY_NAME, TTY_TYPE): New macros.
src/term.c (current_terminal): Removed. (_current_terminal): Removed. (tty_list):
New variable. (OUTPUT, OUTPUT1, OUTPUTL, OUTPUT_IF, OUTPUT1_IF): Added tty
parameter. (set_terminal_modes): Added tty parameter. (reset_terminal_modes):
Added tty parameter. (cursor_to, raw_cursor_to): Updated cmgoto() calls.
(clear_end_of_line, write_glyphs): Add indirection to terminal output, updated
cmcheckmagic() calls. (get_named_tty): New function. (term_dummy_init): New
function. (term_init): Added name parameter, added tty_output return value.
Changed algorithm to update tty_list. Call init_sys_modes() to set up tty
mode on the newly opened terminal device.
(get_current_tty): New function, intended for debugging.
src/termhooks.h (termscript): Removed.
src/w32term.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Removed redundant
definition.
src/macterm.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Ditto.
src/window.c (init_window_once): Call make_terminal_frame with two zero parameters.
src/cm.h (emacs_tputs): New macro to set current_tty, and then call tputs().
(current_tty): New variable, for cmputc().
(cmcheckmagic, cmputc, cmgoto): Added prototypes.
src/cm.c (current_tty): New variable, for cmputc().
(cmputc): Use it.
(cmcheckmagic): Added tty parameter, look up terminal streams there.
(calccost): Added tty parameter. Use emacs_tputs() instead of tputs().
(cmgoto): Added tty parameter. Pass it on to calccost(). Use emacs_tputs()
instead of tputs().
src/dispextern.h (set_terminal_modes, reset_terminal_modes): Added tty parameter.
(term_init): Added name parameter (the filename of the terminal device). Added
return value (struct tty_output).
src/dispnew.c: Replace CURTTY() with local variables throughout the file (where applicable).
(termscript): Moved to struct tty_output.
(terminal_type): Removed.
src/emacs.c (main): Don't call init_sys_modes(), the new term_init() already does that
during init_display().
(shut_down_emacs): Call reset_all_sys_modes() instead of reset_sys_modes().
src/frame.c (Qtty, Qtty_type): New variables.
(syms_of_frame): Initialize them.
(tty_display): Removed.
(make_terminal_frame): New parameters (tty filename and type).
Initialize output_data.tty field instead of output_data.x. Use term_init() to
find the right tty_output. (Use term_dummy_init() during bootstrap.)
(Fmake_terminal_frame): Get device filename and type from frame parameters.
src/frame.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Do the right thing
if the frame is a tty.
(struct frame): New member in output_data: tty.
(make_terminal_frame): Updated of prototype.
src/keyboard.c (Fset_input_mode): Call reset_all_sys_modes(), not
reset_sys_modes(). Ditto with init_sys_modes().
src/lisp.h (tty_output): Added forward declaration.
(init_sys_modes, reset_sys_modes): Updated prototype.
(init_all_sys_modes, reset_all_sys_modes): New prototypes.
src/scroll.c: Replace CURTTY() with local variables throughout the file (where applicable).
src/sysdep.c (old_tty, term_initted, old_tty_valid): Moved to struct tty_output.(
(init_all_sys_modes): New function.
(init_sys_modes): Added tty_output parameter. Use it.
(reset_all_sys_modes): New function.
(reset_sys_modes): Added tty_output parameter. Use it.
src/Makefile.in: Update dependencies.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-2
2003-12-25 06:59:31 +00:00
|
|
|
|
|
|
|
int term_initted; /* 1 if we have been through init_sys_modes. */
|
lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
(here): New variable.
(decode_options): Use it.
(ec_get_tty, ec_set_tty, init_tty, window_change, hang_up_signal): New functions.
(window_change_signal, init_signals, reset_tty, init_pty, copy_from_to): Ditto.
(pty_conversation): Ditto.
(main): Use them.
(master, pty_name, old_tty, tty, old_tty_valid, tty_erase_char): New variables.
(flow_control, meta_key, _sobuf, in_conversation, quit_conversation): Ditto.
lisp/server.el (server-process-filter): Added support for opening a new terminal frame.
dispextern.h (get_frame_size): Renamed to get_tty_size, added tty_output parameter.
dispnew.c (Fredraw_frame): fflush the current terminal instead of stdout.
(direct_output_for_insert, direct_output_forward_char, update_frame_1): Ditto.
(Fding, bitch_at_user): Ditto.
(update_frame_1): Count pending output for current terminal instead of stdout.
(window_change_signal): Resize all terminals.
(change_frame_size): Don't resize all terminals to the same size.
frame.c (Vterminal_frame): Removed.
(syms_of_frame): Removed declaration of Vterminal_frame.
(make_terminal_frame): Set the top frame of the terminal to the new frame.
(Fmake_terminal_frame): Get a new frame size from get_tty_size, don't copy it.
(do_switch_frame): Handle terminal frame visibility.
(next_frame, prev_frame): Skip over frames on different terminals.
frame.h (Vterminal_frame): Removed.
keyboard.c (input_fd): Removed.
(read_avail_input): Removed first argument from read_socket_hook.
Try to read from each available tty, until one succeeds.
(Fsuspend_emacs): Don't suspend if there are multiple terminals.
lisp.h (get_frame_size): Removed superflous declaration.
xterm.c (Xtread_socket): Removed first parameter.
macterm.h (XTread_socket): Ditto.
w32inevt.c (w32_console_read_socket): Ditto.
w32term.c (w32_read_socket): Ditto.
sysdep.c (input_fd): Removed.
(change_input_fd): Removed.
(discard_tty_input): Discard pending input on _all_ input descriptors.
(stuff_char, tabs_safe_p): Use current terminal instead of input_fd.
(init_baud_rate, request_sigio, unrequest_sigio): Ditto.
(init_sys_modes, reset_sys_modes): Ditto.
(narrow_foreground_group, widen_foreground_group): Use stdin.
(init_sys_modes, reset_sys_modes): otty parameter renamed to tty_out.
(get_frame_size): Renamed to get_tty_size, added tty_out parameter.
term.c (read_socket_hook): Removed first parameter.
(clear_end_of_line): Use updating_frame, if possible.
(write_glyphs, insert_glyphs, ins_del_lines): Ditto.
(term_init): Renamed get_frame_size to get_tty_size.
termchar.h (struct tty_output): New entries: top_frame,
previous_terminal_frame.
termhooks.h (read_socket_hook): Removed first parameter.
window.c (init_window_once): Removed reference to Vterminal_frame.
xdisp.c (previous_terminal_frame): Moved to struct tty_output.
(redisplay_internal): Updated to use previous_terminal_frame in tty_output.
Allow for simultaneous refresh of multiple ttys.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-5
2003-12-26 04:24:54 +00:00
|
|
|
|
|
|
|
|
Separate frame-local, tty-dependent parameters from tty-local parameters.
src/termchar.h (struct tty_output): Redefined to contain frame-local
tty-dependent parameters. (Currently there are no such parameters, so
it consists of the tty_display_info pointer.)
(struct tty_display_info): New structure, with reference_count.
(FRAME_TTY): Updated to reflect new termcap frame structure.
src/term.c: Update prototypes. Use tty_display_info instead of tty_output.
src/cm.c (current_tty, cmcheckmagic, cmcostinit, calccost, cmgoto, Wcm_clear)
(Wcm_init): Use tty_display_info instead of tty_output.
src/cm.h: Update prototypes.
src/dispextern.h: Ditto.
src/dispnew.c (window_change_signal, init_display, make_terminal_frame):
Use tty_display_info instead of tty_output.
src/frame.c (Fdelete_frame): Use tty_display_info instead of
tty_output. Fix delete_tty check.
(make_terminal_frame): Allocate f->output_data.tty. Increase
reference count of tty device.
(delete_frame): Free f->output_data.tty. Use reference count to
decide if the tty should be closed.
src/frame.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): New,
unconditional definitions.
(struct device): New declaration (at the moment, it is defined as
empty in termhooks.h).
(struct frame): Added display, background_pixel, foreground_pixel member.
src/keyboard.c (read_avail_input): Use tty_display_info instead of tty_output.
src/lisp.h: Declare struct display. Update prototypes.
src/sysdep.c: Update prototypes.
(discard_tty_input, init_all_sys_modes, init_sys_modes, reset_all_sys_modes)
(reset_sys_modes, hft_init, hft_reset): Use tty_display_info instead
of tty_output.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-29
2004-01-01 17:55:53 +00:00
|
|
|
int reference_count; /* Number of frames that are on this display. */
|
Hookified termcap devices, added bootstrap display device, plus many bugfixes.
lisp/frame.el (display-color-cells): Pass display parameter to tty-display-color-cells.
lisp/term/xterm.el (xterm-register-default-colors): Pass the selected-frame to display-color-cells.
src/dispextern.h (set_terminal_modes, reset_terminal_modes): Removed declarations.
(get_named_tty_display): New prototype.
(tty_clear_end_of_line, term_init): Updated to new prototype.
(initial_term_init): Renamed to init_initial_display.
src/dispnew.c (Fredraw_frame): ifdef-out DOS-specific code. Add display parameter to set_terminal_modes call.
(update_frame): Don't flush the tty of there is no tty.
(init_display): Set up a termcap display on the controlling tty and
change the initial frame to use that. Delete the initial display.
src/frame.c (Fframep): Return t for the initial frame.
(make_initial_frame): New function for creating the initial frame during bootstrap. Use init_initial_display, not initial_term_init.
(make_terminal_frame): Removed special cases for creating the initial frame.
src/frame.h (enum output_method): New entry: output_initial for the bootstrap display.
(FRAME_INITIAL_P): New macro.
(make_initial_frame): New prototype.
src/keyboard.c (interrupt_signal): Exit Emacs on SIGINT from the (frameless) controlling tty, if possible. Explain this in a comment.
(init_keyboard): Added comment about exiting on SIGINT.
(Fset_input_mode): A termcap frame is never the initial frame anymore.
src/sysdep.c (init_sys_modes): Update tty_set_terminal_modes call to the new prototype.
(reset_sys_modes): Comment out tty_clear_end_of_line call; it doesn't work anymore. Update tty_reset_terminal_modes call.
src/termchar.h (struct tty_display_info): Added pointer to the display structure, for reset_sys_modes.
src/termhooks.h (struct display): Added display parameter to set_terminal_modes_hook and reset_terminal_modes_hook.
src/term.c (initial_display): New variable.
(tty_ring_bell, tty_update_end, tty_set_terminal_window, tty_cursor_to)
(tty_raw_cursor_to, tty_clear_to_end, tty_clear_frame, tty_clear_end_of_line)
(tty_write_glyphs, tty_insert_glyphs, tty_delete_glyphs, tty_ins_del_lines): New functions.
(ring_bell, update_end, set_terminal_window, cursor_to, raw_cursor_to)
(clear_to_end, clear_frame, clear_end_of_line, write_glyphs, insert_glyphs)
(delete_glyphs, ins_del_lines): Removed special casing of termcap displays.
(get_tty_display): New function.
(Ftty_display_color_p, Ftty_display_color_cells): Use it.
(get_named_tty_display): Removed static.
(tty_set_terminal_modes, tty_reset_terminal_modes): Changed to use a display parameter
instead of tty_display_info for hook compatibility.
(set_terminal_modes, reset_terminal_modes): Removed.
(initial_term_init): Renamed to init_initial_display. Set up an
output_initial device, not a termcap display.
(delete_initial_display): New function.
(maybe_fatal): New function, for private use of term_init.
(term_init): New parameter for choosing between fatal and simple errors.
Removed incomprehensible special casing for the second initialization of the
controlling tty. Use maybe_fatal for error handling.
Initialize termcap display hooks in the new device.
Initialize the display pointer in the tty_display_info structure.
(delete_tty): Replace order of reset_sys_modes and delete_display.
src/window.c (init_window_once): Call make_initial_frame instead of make_terminal_frame.
src/xfaces.c (realize_default_face, realize_face): Don't abort on the bootstrap display device.
src/xterm.c (XTset_terminal_modes, XTreset_terminal_modes): Added display parameter.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-48
2004-01-09 18:57:53 +00:00
|
|
|
|
Rename `struct device' to `struct terminal'. Rename some terminal-related functions similarly.
* src/termhooks.h (struct device): Rename to `terminal'. Rename member
`next_device' to `next_terminal'.
(device_list): Rename to `terminal_list'.
(FRAME_DEVICE): Rename to `FRAME_TERMINAL'.
(DEVICE_TERMINAL_CODING): Rename to `TERMINAL_TERMINAL_CODING'.
(TERMINAL_KEYBOARD_CODING): Rename to `TERMINAL_KEYBOARD_CODING'.
(DEVICE_ACTIVE_P): Rename to `TERMINAL_ACTIVE_P'.
Update declarations and macro definitions.
* src/termchar.h (tty_display_info): Rename member `device' to `terminal'.
(FRAME_TTY): Update for renames.
* src/xterm.h (x_display_info): Rename member `device' to `terminal'.
* src/frame.h (frame): Rename `device' member to `terminal'.
(FRAME_KBOARD, FRAME_LIVE_P, Qdevice, Qdisplay_live_p):
Update for renames.
* src/lisp.h (set_process_environment): Rename to `set_global_environment'.
(device): Rename to `terminal'.
* src/dispextern.h: Update declarations and macro definitions.
* src/terminal.c (device_list): Rename to `terminal_list'.
(next_device_id): Rename to `next_terminal_id'.
(initial_device): Rename to `initial_terminal'.
(get_device): Rename to `get_terminal'.
(create_device): Rename to `create_terminal'.
(mark_devices): Rename to `mark_terminals'.
(delete_device): Rename to `delete_terminal'.
(Fdelete_display): Rename to `Fdelete_terminal'.
(Fframe_terminal): Move here from frame.c.
(Fdisplay_live_p): Rename to `Fterminal_live_p'.
(Fdisplay_list): Rename to `Fterminal_list'.
(Fdisplay_name): Rename to `Fterminal_name'.
(init_initial_device): Rename to `init_initial_terminal'.
(delete_initial_device): Rename to `delete_initial_terminal'.
(ring_bell, update_begin, update_end, set_terminal_window)
(cursor_to, raw_cursor_to, clear_to_end, clear_frame)
(clear_end_of_line, write_glyphs, insert_glyphs, delete_glyphs)
(ins_del_lines, get_terminal_param, store_terminal_param)
(Fterminal_parameters, Fterminal_parameter)
(Fmodify_terminal_parameters, Fset_terminal_parameter)
(syms_of_terminal): Update for renames.
* src/term.c (get_tty_device): Rename to `get_tty_terminal'. Update.
(Fdisplay_tty_type): Rename to `Ftty_type'.
(Fdisplay_controlling_tty_p): Rename to `Fcontrolling_tty_p'.
(delete_tty, tty_set_terminal_modes, tty_reset_terminal_modes)
(Ftty_display_color_p, Ftty_display_color_cells, get_named_tty)
(Ftty_no_underline, Fsuspend_tty, Fresume_tty, create_tty_output)
(init_tty, maybe_fatal, delete_tty, syms_of_term): Update for rename.
* src/frame.c (Qdevice): Rename to `Qterminal'.
(Qdisplay_live_p): Rename to `Qterminal_live_p'.
(terminal_frame_count): Rename to `tty_frame_count'.
(Fframe_display): Move to terminal.c, rename to `Fframe_terminal'.
(make_frame_without_minibuffer, make_initial_frame)
(make_terminal_frame, Fmodify_frame_parameters)
(do_switch_frame, Fdelete_frame, Fmouse_position)
(Fmouse_pixel_position, Fraise_frame, Flower_frame)
(Fredirect_frame_focus, set_term_frame_name, syms_of_frame):
Update for renames.
* src/xdisp.c (message2_nolog, message3_nolog, redisplay_internal)
(set_vertical_scroll_bar, redisplay_window, check_x_display_info)
(x_set_scroll_bar_foreground, x_set_scroll_bar_background)
(Fx_create_frame, Fxw_display_color_p, Fx_display_grayscale_p)
(Fx_display_pixel_width, Fx_display_pixel_height)
(Fx_display_planes, Fx_display_color_cells)
(Fx_server_max_request_size, Fx_server_vendor, Fx_server_version)
(Fx_display_screens, Fx_display_mm_height, Fx_display_mm_width)
(Fx_display_backing_store, Fx_display_visual_class)
(Fx_display_save_under, Fx_close_connection, x_create_tip_frame):
Update for renames.
* xterm.c (handle_one_xevent): Initialize `f' to NULL.
(x_delete_device): Rename to `x_delete_terminal'.
(x_create_device): Rename to `x_create_terminal'.
(XTset_terminal_modes, XTreset_terminal_modes)
(XTread_socket, x_connection_closed, x_term_init)
(x_term_init, x_delete_display): Update for renames.
* src/dispnew.c (Fredraw_frame, Fsend_string_to_terminal)
(Fsend_string_to_terminal, init_display): Update for renames.
* src/keyboard.c (push_frame_kboard, pop_kboard, pop_kboard)
(kbd_buffer_get_event, read_avail_input, tty_read_avail_input)
(interrupt_signal, Fset_output_flow_control)
(Fset_input_meta_mode, Fset_quit_char, delete_kboard)
(syms_of_keyboard): Update for renames.
* src/alloc.c (mark_devices): Update declaration.
(Fgarbage_collect): Update for renames.
* src/coding.c (Fset_terminal_coding_system_internal)
(Fterminal_coding_system4)
(Fset_keyboard_coding_system_internal)
(Fkeyboard_coding_system): Update for renames.
* src/data.c (Fterminal_local_value, Fset_terminal_local_value):
Update for renames.
* src/minibuf.c (read_minibuf): Update for renames.
* src/sysdep.c (init_sys_modes, reset_sys_modes): Update for renames.
* xselect.c (x_handle_selection_clear): Update for renames.
* lisp/files.el (save-buffers-kill-display): Rename to `save-buffers-kill-terminal'.
(save-buffers-kill-terminal, ctl-x-map): Update for renames.
* frame.el (make-frame): Rename 'device frame parameter to 'terminal. Update.
(frames-on-display-list, framep-on-display, suspend-frame): Update for renames.
(selected-display): Rename to `selected-terminal'.
* server.el (server-save-buffers-kill-display): Rename to
`server-save-buffers-kill-terminal'.
(server-delete-client, server-handle-delete-frame)
(server-handle-suspend-tty, server-process-filter)
(server-switch-buffer): Update for renames.
* startup.el (normal-splash-screen, normal-splash-screen): Update for renames.
* talk.el (talk): Update for renames.
* termdev.el (terminal-id): Update for renames.
* xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal)
(turn-off-xterm-mouse-tracking-on-terminal)
(xterm-mouse-handle-delete-frame): Update for renames.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-471
2005-12-29 18:20:26 +00:00
|
|
|
struct terminal *terminal; /* Points back to the generic terminal
|
Hookified termcap devices, added bootstrap display device, plus many bugfixes.
lisp/frame.el (display-color-cells): Pass display parameter to tty-display-color-cells.
lisp/term/xterm.el (xterm-register-default-colors): Pass the selected-frame to display-color-cells.
src/dispextern.h (set_terminal_modes, reset_terminal_modes): Removed declarations.
(get_named_tty_display): New prototype.
(tty_clear_end_of_line, term_init): Updated to new prototype.
(initial_term_init): Renamed to init_initial_display.
src/dispnew.c (Fredraw_frame): ifdef-out DOS-specific code. Add display parameter to set_terminal_modes call.
(update_frame): Don't flush the tty of there is no tty.
(init_display): Set up a termcap display on the controlling tty and
change the initial frame to use that. Delete the initial display.
src/frame.c (Fframep): Return t for the initial frame.
(make_initial_frame): New function for creating the initial frame during bootstrap. Use init_initial_display, not initial_term_init.
(make_terminal_frame): Removed special cases for creating the initial frame.
src/frame.h (enum output_method): New entry: output_initial for the bootstrap display.
(FRAME_INITIAL_P): New macro.
(make_initial_frame): New prototype.
src/keyboard.c (interrupt_signal): Exit Emacs on SIGINT from the (frameless) controlling tty, if possible. Explain this in a comment.
(init_keyboard): Added comment about exiting on SIGINT.
(Fset_input_mode): A termcap frame is never the initial frame anymore.
src/sysdep.c (init_sys_modes): Update tty_set_terminal_modes call to the new prototype.
(reset_sys_modes): Comment out tty_clear_end_of_line call; it doesn't work anymore. Update tty_reset_terminal_modes call.
src/termchar.h (struct tty_display_info): Added pointer to the display structure, for reset_sys_modes.
src/termhooks.h (struct display): Added display parameter to set_terminal_modes_hook and reset_terminal_modes_hook.
src/term.c (initial_display): New variable.
(tty_ring_bell, tty_update_end, tty_set_terminal_window, tty_cursor_to)
(tty_raw_cursor_to, tty_clear_to_end, tty_clear_frame, tty_clear_end_of_line)
(tty_write_glyphs, tty_insert_glyphs, tty_delete_glyphs, tty_ins_del_lines): New functions.
(ring_bell, update_end, set_terminal_window, cursor_to, raw_cursor_to)
(clear_to_end, clear_frame, clear_end_of_line, write_glyphs, insert_glyphs)
(delete_glyphs, ins_del_lines): Removed special casing of termcap displays.
(get_tty_display): New function.
(Ftty_display_color_p, Ftty_display_color_cells): Use it.
(get_named_tty_display): Removed static.
(tty_set_terminal_modes, tty_reset_terminal_modes): Changed to use a display parameter
instead of tty_display_info for hook compatibility.
(set_terminal_modes, reset_terminal_modes): Removed.
(initial_term_init): Renamed to init_initial_display. Set up an
output_initial device, not a termcap display.
(delete_initial_display): New function.
(maybe_fatal): New function, for private use of term_init.
(term_init): New parameter for choosing between fatal and simple errors.
Removed incomprehensible special casing for the second initialization of the
controlling tty. Use maybe_fatal for error handling.
Initialize termcap display hooks in the new device.
Initialize the display pointer in the tty_display_info structure.
(delete_tty): Replace order of reset_sys_modes and delete_display.
src/window.c (init_window_once): Call make_initial_frame instead of make_terminal_frame.
src/xfaces.c (realize_default_face, realize_face): Don't abort on the bootstrap display device.
src/xterm.c (XTset_terminal_modes, XTreset_terminal_modes): Added display parameter.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-48
2004-01-09 18:57:53 +00:00
|
|
|
structure. This is sometimes handy. */
|
Rename `struct device' to `struct terminal'. Rename some terminal-related functions similarly.
* src/termhooks.h (struct device): Rename to `terminal'. Rename member
`next_device' to `next_terminal'.
(device_list): Rename to `terminal_list'.
(FRAME_DEVICE): Rename to `FRAME_TERMINAL'.
(DEVICE_TERMINAL_CODING): Rename to `TERMINAL_TERMINAL_CODING'.
(TERMINAL_KEYBOARD_CODING): Rename to `TERMINAL_KEYBOARD_CODING'.
(DEVICE_ACTIVE_P): Rename to `TERMINAL_ACTIVE_P'.
Update declarations and macro definitions.
* src/termchar.h (tty_display_info): Rename member `device' to `terminal'.
(FRAME_TTY): Update for renames.
* src/xterm.h (x_display_info): Rename member `device' to `terminal'.
* src/frame.h (frame): Rename `device' member to `terminal'.
(FRAME_KBOARD, FRAME_LIVE_P, Qdevice, Qdisplay_live_p):
Update for renames.
* src/lisp.h (set_process_environment): Rename to `set_global_environment'.
(device): Rename to `terminal'.
* src/dispextern.h: Update declarations and macro definitions.
* src/terminal.c (device_list): Rename to `terminal_list'.
(next_device_id): Rename to `next_terminal_id'.
(initial_device): Rename to `initial_terminal'.
(get_device): Rename to `get_terminal'.
(create_device): Rename to `create_terminal'.
(mark_devices): Rename to `mark_terminals'.
(delete_device): Rename to `delete_terminal'.
(Fdelete_display): Rename to `Fdelete_terminal'.
(Fframe_terminal): Move here from frame.c.
(Fdisplay_live_p): Rename to `Fterminal_live_p'.
(Fdisplay_list): Rename to `Fterminal_list'.
(Fdisplay_name): Rename to `Fterminal_name'.
(init_initial_device): Rename to `init_initial_terminal'.
(delete_initial_device): Rename to `delete_initial_terminal'.
(ring_bell, update_begin, update_end, set_terminal_window)
(cursor_to, raw_cursor_to, clear_to_end, clear_frame)
(clear_end_of_line, write_glyphs, insert_glyphs, delete_glyphs)
(ins_del_lines, get_terminal_param, store_terminal_param)
(Fterminal_parameters, Fterminal_parameter)
(Fmodify_terminal_parameters, Fset_terminal_parameter)
(syms_of_terminal): Update for renames.
* src/term.c (get_tty_device): Rename to `get_tty_terminal'. Update.
(Fdisplay_tty_type): Rename to `Ftty_type'.
(Fdisplay_controlling_tty_p): Rename to `Fcontrolling_tty_p'.
(delete_tty, tty_set_terminal_modes, tty_reset_terminal_modes)
(Ftty_display_color_p, Ftty_display_color_cells, get_named_tty)
(Ftty_no_underline, Fsuspend_tty, Fresume_tty, create_tty_output)
(init_tty, maybe_fatal, delete_tty, syms_of_term): Update for rename.
* src/frame.c (Qdevice): Rename to `Qterminal'.
(Qdisplay_live_p): Rename to `Qterminal_live_p'.
(terminal_frame_count): Rename to `tty_frame_count'.
(Fframe_display): Move to terminal.c, rename to `Fframe_terminal'.
(make_frame_without_minibuffer, make_initial_frame)
(make_terminal_frame, Fmodify_frame_parameters)
(do_switch_frame, Fdelete_frame, Fmouse_position)
(Fmouse_pixel_position, Fraise_frame, Flower_frame)
(Fredirect_frame_focus, set_term_frame_name, syms_of_frame):
Update for renames.
* src/xdisp.c (message2_nolog, message3_nolog, redisplay_internal)
(set_vertical_scroll_bar, redisplay_window, check_x_display_info)
(x_set_scroll_bar_foreground, x_set_scroll_bar_background)
(Fx_create_frame, Fxw_display_color_p, Fx_display_grayscale_p)
(Fx_display_pixel_width, Fx_display_pixel_height)
(Fx_display_planes, Fx_display_color_cells)
(Fx_server_max_request_size, Fx_server_vendor, Fx_server_version)
(Fx_display_screens, Fx_display_mm_height, Fx_display_mm_width)
(Fx_display_backing_store, Fx_display_visual_class)
(Fx_display_save_under, Fx_close_connection, x_create_tip_frame):
Update for renames.
* xterm.c (handle_one_xevent): Initialize `f' to NULL.
(x_delete_device): Rename to `x_delete_terminal'.
(x_create_device): Rename to `x_create_terminal'.
(XTset_terminal_modes, XTreset_terminal_modes)
(XTread_socket, x_connection_closed, x_term_init)
(x_term_init, x_delete_display): Update for renames.
* src/dispnew.c (Fredraw_frame, Fsend_string_to_terminal)
(Fsend_string_to_terminal, init_display): Update for renames.
* src/keyboard.c (push_frame_kboard, pop_kboard, pop_kboard)
(kbd_buffer_get_event, read_avail_input, tty_read_avail_input)
(interrupt_signal, Fset_output_flow_control)
(Fset_input_meta_mode, Fset_quit_char, delete_kboard)
(syms_of_keyboard): Update for renames.
* src/alloc.c (mark_devices): Update declaration.
(Fgarbage_collect): Update for renames.
* src/coding.c (Fset_terminal_coding_system_internal)
(Fterminal_coding_system4)
(Fset_keyboard_coding_system_internal)
(Fkeyboard_coding_system): Update for renames.
* src/data.c (Fterminal_local_value, Fset_terminal_local_value):
Update for renames.
* src/minibuf.c (read_minibuf): Update for renames.
* src/sysdep.c (init_sys_modes, reset_sys_modes): Update for renames.
* xselect.c (x_handle_selection_clear): Update for renames.
* lisp/files.el (save-buffers-kill-display): Rename to `save-buffers-kill-terminal'.
(save-buffers-kill-terminal, ctl-x-map): Update for renames.
* frame.el (make-frame): Rename 'device frame parameter to 'terminal. Update.
(frames-on-display-list, framep-on-display, suspend-frame): Update for renames.
(selected-display): Rename to `selected-terminal'.
* server.el (server-save-buffers-kill-display): Rename to
`server-save-buffers-kill-terminal'.
(server-delete-client, server-handle-delete-frame)
(server-handle-suspend-tty, server-process-filter)
(server-switch-buffer): Update for renames.
* startup.el (normal-splash-screen, normal-splash-screen): Update for renames.
* talk.el (talk): Update for renames.
* termdev.el (terminal-id): Update for renames.
* xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal)
(turn-off-xterm-mouse-tracking-on-terminal)
(xterm-mouse-handle-delete-frame): Update for renames.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-471
2005-12-29 18:20:26 +00:00
|
|
|
|
Separate frame-local, tty-dependent parameters from tty-local parameters.
src/termchar.h (struct tty_output): Redefined to contain frame-local
tty-dependent parameters. (Currently there are no such parameters, so
it consists of the tty_display_info pointer.)
(struct tty_display_info): New structure, with reference_count.
(FRAME_TTY): Updated to reflect new termcap frame structure.
src/term.c: Update prototypes. Use tty_display_info instead of tty_output.
src/cm.c (current_tty, cmcheckmagic, cmcostinit, calccost, cmgoto, Wcm_clear)
(Wcm_init): Use tty_display_info instead of tty_output.
src/cm.h: Update prototypes.
src/dispextern.h: Ditto.
src/dispnew.c (window_change_signal, init_display, make_terminal_frame):
Use tty_display_info instead of tty_output.
src/frame.c (Fdelete_frame): Use tty_display_info instead of
tty_output. Fix delete_tty check.
(make_terminal_frame): Allocate f->output_data.tty. Increase
reference count of tty device.
(delete_frame): Free f->output_data.tty. Use reference count to
decide if the tty should be closed.
src/frame.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): New,
unconditional definitions.
(struct device): New declaration (at the moment, it is defined as
empty in termhooks.h).
(struct frame): Added display, background_pixel, foreground_pixel member.
src/keyboard.c (read_avail_input): Use tty_display_info instead of tty_output.
src/lisp.h: Declare struct display. Update prototypes.
src/sysdep.c: Update prototypes.
(discard_tty_input, init_all_sys_modes, init_sys_modes, reset_all_sys_modes)
(reset_sys_modes, hft_init, hft_reset): Use tty_display_info instead
of tty_output.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-29
2004-01-01 17:55:53 +00:00
|
|
|
/* Info on cursor positioning. */
|
2003-12-27 01:12:57 +00:00
|
|
|
struct cm *Wcm;
|
|
|
|
|
lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
(here): New variable.
(decode_options): Use it.
(ec_get_tty, ec_set_tty, init_tty, window_change, hang_up_signal): New functions.
(window_change_signal, init_signals, reset_tty, init_pty, copy_from_to): Ditto.
(pty_conversation): Ditto.
(main): Use them.
(master, pty_name, old_tty, tty, old_tty_valid, tty_erase_char): New variables.
(flow_control, meta_key, _sobuf, in_conversation, quit_conversation): Ditto.
lisp/server.el (server-process-filter): Added support for opening a new terminal frame.
dispextern.h (get_frame_size): Renamed to get_tty_size, added tty_output parameter.
dispnew.c (Fredraw_frame): fflush the current terminal instead of stdout.
(direct_output_for_insert, direct_output_forward_char, update_frame_1): Ditto.
(Fding, bitch_at_user): Ditto.
(update_frame_1): Count pending output for current terminal instead of stdout.
(window_change_signal): Resize all terminals.
(change_frame_size): Don't resize all terminals to the same size.
frame.c (Vterminal_frame): Removed.
(syms_of_frame): Removed declaration of Vterminal_frame.
(make_terminal_frame): Set the top frame of the terminal to the new frame.
(Fmake_terminal_frame): Get a new frame size from get_tty_size, don't copy it.
(do_switch_frame): Handle terminal frame visibility.
(next_frame, prev_frame): Skip over frames on different terminals.
frame.h (Vterminal_frame): Removed.
keyboard.c (input_fd): Removed.
(read_avail_input): Removed first argument from read_socket_hook.
Try to read from each available tty, until one succeeds.
(Fsuspend_emacs): Don't suspend if there are multiple terminals.
lisp.h (get_frame_size): Removed superflous declaration.
xterm.c (Xtread_socket): Removed first parameter.
macterm.h (XTread_socket): Ditto.
w32inevt.c (w32_console_read_socket): Ditto.
w32term.c (w32_read_socket): Ditto.
sysdep.c (input_fd): Removed.
(change_input_fd): Removed.
(discard_tty_input): Discard pending input on _all_ input descriptors.
(stuff_char, tabs_safe_p): Use current terminal instead of input_fd.
(init_baud_rate, request_sigio, unrequest_sigio): Ditto.
(init_sys_modes, reset_sys_modes): Ditto.
(narrow_foreground_group, widen_foreground_group): Use stdin.
(init_sys_modes, reset_sys_modes): otty parameter renamed to tty_out.
(get_frame_size): Renamed to get_tty_size, added tty_out parameter.
term.c (read_socket_hook): Removed first parameter.
(clear_end_of_line): Use updating_frame, if possible.
(write_glyphs, insert_glyphs, ins_del_lines): Ditto.
(term_init): Renamed get_frame_size to get_tty_size.
termchar.h (struct tty_output): New entries: top_frame,
previous_terminal_frame.
termhooks.h (read_socket_hook): Removed first parameter.
window.c (init_window_once): Removed reference to Vterminal_frame.
xdisp.c (previous_terminal_frame): Moved to struct tty_output.
(redisplay_internal): Updated to use previous_terminal_frame in tty_output.
Allow for simultaneous refresh of multiple ttys.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-5
2003-12-26 04:24:54 +00:00
|
|
|
/* Redisplay. */
|
|
|
|
|
|
|
|
Lisp_Object top_frame; /* The topmost frame on this tty. */
|
Unify mouse highlight code of MSDOS and GUI sessions.
xdisp.c (coords_in_mouse_face_p): Move prototype out of the
HAVE_WINDOW_SYSTEM conditional.
(x_y_to_hpos_vpos, frame_to_window_pixel_xy): Move out of the
HAVE_WINDOW_SYSTEM block.
(try_window_id) [HAVE_GPM || MSDOS]: Call
x_clear_window_mouse_face.
(draw_row_with_mouse_face): Implementation for HAVE_WINDOW_SYSTEM
systems.
(show_mouse_face): Call it, instead of calling draw_glyphs directly.
(show_mouse_face, clear_mouse_face, coords_in_mouse_face_p)
(cursor_in_mouse_face_p, rows_from_pos_range)
(mouse_face_from_buffer_pos, mouse_face_from_string_pos)
(note_mode_line_or_margin_highlight, note_mouse_highlight)
(x_clear_window_mouse_face, cancel_mouse_face): Move out of the
HAVE_WINDOW_SYSTEM block. Ifdef away window-system specific
fragments.
(note_mouse_highlight): Call popup_activated for MSDOS as well.
Clear mouse highlight if pointer is over glyphs whose OBJECT is an
integer.
(mouse_face_from_buffer_pos): Add parentheses around && within ||.
xmenu.c (popup_activated): Don't define on MSDOS.
dispnew.c (mirror_make_current): Set Y coordinate of the
mode-line and header-line rows.
termchar.h (struct tty_display_info): Define mouse_face_*
members not only for MSDOS. Delete stray whitespace.
<mouse_face_beg_x, mouse_face_beg_y, mouse_face_overlay>: New
struct members.
dispextern.h (DPYINFO_DEFINED) [HAVE_X_WINDOWS]: Define.
(DPYINFO_DEFINED) [HAVE_NTGUI]: Define.
(DPYINFO_DEFINED) [HAVE_NS]: Define.
(Display_Info) [!DPYINFO_DEFINED]: Define here.
(FRAME_X_DISPLAY_INFO) [HAVE_GPM]: Define.
(FRAME_X_DISPLAY_INFO): Define to NULL if not defined.
(frame_to_window_pixel_xy, note_mouse_highlight)
(x_clear_window_mouse_face, cancel_mouse_face, clear_mouse_face)
(show_mouse_face, cursor_in_mouse_face_p): Move prototypes out of
HAVE_WINDOW_SYSTEM conditional.
(draw_row_with_mouse_face): Declare prototype.
msdos.h (Display_Info): Don't define here.
msdos.c (show_mouse_face, clear_mouse_face)
(fast_find_position, IT_note_mode_line_highlight)
(IT_note_mouse_highlight): Functions deleted.
(IT_frame_up_to_date, dos_rawgetc): Call note_mouse_highlight
instead of IT_note_mouse_highlight.
(draw_row_with_mouse_face, popup_activated): New functions.
2010-10-30 13:09:52 +00:00
|
|
|
|
2006-01-03 01:50:46 +00:00
|
|
|
/* The previous frame we displayed on this tty. */
|
|
|
|
struct frame *previous_frame;
|
2008-04-09 03:25:14 +00:00
|
|
|
int previous_color_mode;
|
lib-src/emacsclient.c: Implemented --here option (open a new Emacs tty). Needs more work.
(here): New variable.
(decode_options): Use it.
(ec_get_tty, ec_set_tty, init_tty, window_change, hang_up_signal): New functions.
(window_change_signal, init_signals, reset_tty, init_pty, copy_from_to): Ditto.
(pty_conversation): Ditto.
(main): Use them.
(master, pty_name, old_tty, tty, old_tty_valid, tty_erase_char): New variables.
(flow_control, meta_key, _sobuf, in_conversation, quit_conversation): Ditto.
lisp/server.el (server-process-filter): Added support for opening a new terminal frame.
dispextern.h (get_frame_size): Renamed to get_tty_size, added tty_output parameter.
dispnew.c (Fredraw_frame): fflush the current terminal instead of stdout.
(direct_output_for_insert, direct_output_forward_char, update_frame_1): Ditto.
(Fding, bitch_at_user): Ditto.
(update_frame_1): Count pending output for current terminal instead of stdout.
(window_change_signal): Resize all terminals.
(change_frame_size): Don't resize all terminals to the same size.
frame.c (Vterminal_frame): Removed.
(syms_of_frame): Removed declaration of Vterminal_frame.
(make_terminal_frame): Set the top frame of the terminal to the new frame.
(Fmake_terminal_frame): Get a new frame size from get_tty_size, don't copy it.
(do_switch_frame): Handle terminal frame visibility.
(next_frame, prev_frame): Skip over frames on different terminals.
frame.h (Vterminal_frame): Removed.
keyboard.c (input_fd): Removed.
(read_avail_input): Removed first argument from read_socket_hook.
Try to read from each available tty, until one succeeds.
(Fsuspend_emacs): Don't suspend if there are multiple terminals.
lisp.h (get_frame_size): Removed superflous declaration.
xterm.c (Xtread_socket): Removed first parameter.
macterm.h (XTread_socket): Ditto.
w32inevt.c (w32_console_read_socket): Ditto.
w32term.c (w32_read_socket): Ditto.
sysdep.c (input_fd): Removed.
(change_input_fd): Removed.
(discard_tty_input): Discard pending input on _all_ input descriptors.
(stuff_char, tabs_safe_p): Use current terminal instead of input_fd.
(init_baud_rate, request_sigio, unrequest_sigio): Ditto.
(init_sys_modes, reset_sys_modes): Ditto.
(narrow_foreground_group, widen_foreground_group): Use stdin.
(init_sys_modes, reset_sys_modes): otty parameter renamed to tty_out.
(get_frame_size): Renamed to get_tty_size, added tty_out parameter.
term.c (read_socket_hook): Removed first parameter.
(clear_end_of_line): Use updating_frame, if possible.
(write_glyphs, insert_glyphs, ins_del_lines): Ditto.
(term_init): Renamed get_frame_size to get_tty_size.
termchar.h (struct tty_output): New entries: top_frame,
previous_terminal_frame.
termhooks.h (read_socket_hook): Removed first parameter.
window.c (init_window_once): Removed reference to Vterminal_frame.
xdisp.c (previous_terminal_frame): Moved to struct tty_output.
(redisplay_internal): Updated to use previous_terminal_frame in tty_output.
Allow for simultaneous refresh of multiple ttys.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-5
2003-12-26 04:24:54 +00:00
|
|
|
|
2010-10-31 18:50:02 +00:00
|
|
|
/* Information about the range of text currently shown in
|
|
|
|
mouse-face. */
|
|
|
|
Mouse_HLInfo mouse_highlight;
|
2008-08-23 16:48:24 +00:00
|
|
|
|
2008-12-08 14:44:23 +00:00
|
|
|
/* Buffer used internally by termcap (see tgetent in the Termcap
|
|
|
|
manual). Only init_tty and delete_tty should change this. */
|
|
|
|
char *termcap_term_buffer;
|
|
|
|
|
|
|
|
/* Buffer storing terminal description strings (see tgetstr in the
|
|
|
|
Termcap manual). Only init_tty and delete_tty should change
|
|
|
|
this. */
|
|
|
|
char *termcap_strings_buffer;
|
|
|
|
|
Fully eliminated global tty state variables.
lib-src/emacsclient.c (main.c): Fix error message.
lisp/frame.el (make-frame-on-tty): New function.
lisp/server.el (server-process-filter): Notify emacsclient if there
was on error during evaluation.
src/cm.c: Fix remaining cases of direct Wcm references.
src/dispextern.h: Updated prototypes.
src/dispnew.c (Fredraw_frame): Fix set_terminal_modes call.
(init_display): Remove reference to meta_key.
src/frame.c (make_terminal_frame): Renamed first parameter to
tty_name. Call term_init before creating the frame.
(Fmake_terminal_frame): Look up the `tty' and `tty-type' frame
parameters from the currently selected terminal before the global
default.
(Fdelete_frame): Make sure that the new selected frame is live.
src/keyboard.c (meta_key): Moved to struct tty_output.
(read_avail_input): Fix C syntax. Update references to meta_key.
(Fsuspend_emacs): pass current tty to init_sys_modes via
record_unwind_protect.
(Fset_input_mode): Update references to meta_key.
(Fcurrent_input_mode): Ditto.
src/sysdep.c (init_sys_modes): Updated old_tty and meta_key
references. Don't call set_terminal_modes, it needs termcap strings.
(reset_sys_modes): Call tty_reset_terminal_modes instead of
reset_terminal_modes. Updated old_tty references.
src/term.c: Massive updates throuout the file.
(TS_*, TN_*): Moved to struct tty_output.
(RPov, delete_in_insert_mode se_is_so, costs_set, insert_mode): Ditto.
(standout_mode, specified_window, tty_cursor_hidden): Ditto.
(tty_set_terminal_modes, tty_reset_terminal_modes): New functions.
(turn_on_insert, turn_off_insert): Added tty parameter.
(turn_on_highlight, turn_off_highlight, toggle_highlight): Added tty parameter.
(tty_hide_cursor, tty_show_cursor): Ditto.
(background_highlight, highlight_if_desired): Ditto.
(tty_capable_p): Changed first parameter to tty_output.
(term_init): Make sure top_frame is initialized. Don't exit on errors
if this would have been a secondary terminal. Call set_terminal_modes
on the end.
(delete_tty): New function.
(delete_tty_1): New function.
(print_all_frames): New function, marginally useful for debugging.
src/termchar.h (struct tty_output): Changed old_tty to be a pointer.
Removed old_tty_valid member. Added tty-specific variables from term.c.
src/xfaces.c (Ftty_supports_face_attributes_p): Update for new
tty_capable_p.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-9
2003-12-27 10:00:19 +00:00
|
|
|
/* Strings, numbers and flags taken from the termcap entry. */
|
|
|
|
|
|
|
|
char *TS_ins_line; /* "al" */
|
|
|
|
char *TS_ins_multi_lines; /* "AL" (one parameter, # lines to insert) */
|
|
|
|
char *TS_bell; /* "bl" */
|
|
|
|
char *TS_clr_to_bottom; /* "cd" */
|
|
|
|
char *TS_clr_line; /* "ce", clear to end of line */
|
|
|
|
char *TS_clr_frame; /* "cl" */
|
|
|
|
char *TS_set_scroll_region; /* "cs" (2 params, first line and last line) */
|
|
|
|
char *TS_set_scroll_region_1; /* "cS" (4 params: total lines,
|
|
|
|
lines above scroll region, lines below it,
|
|
|
|
total lines again) */
|
|
|
|
char *TS_del_char; /* "dc" */
|
|
|
|
char *TS_del_multi_chars; /* "DC" (one parameter, # chars to delete) */
|
|
|
|
char *TS_del_line; /* "dl" */
|
|
|
|
char *TS_del_multi_lines; /* "DL" (one parameter, # lines to delete) */
|
|
|
|
char *TS_delete_mode; /* "dm", enter character-delete mode */
|
|
|
|
char *TS_end_delete_mode; /* "ed", leave character-delete mode */
|
|
|
|
char *TS_end_insert_mode; /* "ei", leave character-insert mode */
|
|
|
|
char *TS_ins_char; /* "ic" */
|
|
|
|
char *TS_ins_multi_chars; /* "IC" (one parameter, # chars to insert) */
|
|
|
|
char *TS_insert_mode; /* "im", enter character-insert mode */
|
|
|
|
char *TS_pad_inserted_char; /* "ip". Just padding, no commands. */
|
|
|
|
char *TS_end_keypad_mode; /* "ke" */
|
|
|
|
char *TS_keypad_mode; /* "ks" */
|
|
|
|
char *TS_pad_char; /* "pc", char to use as padding */
|
|
|
|
char *TS_repeat; /* "rp" (2 params, # times to repeat
|
|
|
|
and character to be repeated) */
|
|
|
|
char *TS_end_standout_mode; /* "se" */
|
|
|
|
char *TS_fwd_scroll; /* "sf" */
|
|
|
|
char *TS_standout_mode; /* "so" */
|
|
|
|
char *TS_rev_scroll; /* "sr" */
|
|
|
|
char *TS_end_termcap_modes; /* "te" */
|
|
|
|
char *TS_termcap_modes; /* "ti" */
|
|
|
|
char *TS_visible_bell; /* "vb" */
|
|
|
|
char *TS_cursor_normal; /* "ve" */
|
|
|
|
char *TS_cursor_visible; /* "vs" */
|
|
|
|
char *TS_cursor_invisible; /* "vi" */
|
|
|
|
char *TS_set_window; /* "wi" (4 params, start and end of window,
|
|
|
|
each as vpos and hpos) */
|
|
|
|
|
|
|
|
char *TS_enter_bold_mode; /* "md" -- turn on bold (extra bright mode). */
|
|
|
|
char *TS_enter_dim_mode; /* "mh" -- turn on half-bright mode. */
|
|
|
|
char *TS_enter_blink_mode; /* "mb" -- enter blinking mode. */
|
|
|
|
char *TS_enter_reverse_mode; /* "mr" -- enter reverse video mode. */
|
|
|
|
char *TS_exit_underline_mode; /* "us" -- start underlining. */
|
|
|
|
char *TS_enter_underline_mode; /* "ue" -- end underlining. */
|
|
|
|
|
|
|
|
/* "as"/"ae" -- start/end alternate character set. Not really
|
|
|
|
supported, yet. */
|
|
|
|
char *TS_enter_alt_charset_mode;
|
|
|
|
char *TS_exit_alt_charset_mode;
|
|
|
|
|
|
|
|
char *TS_exit_attribute_mode; /* "me" -- switch appearances off. */
|
|
|
|
|
|
|
|
/* Value of the "NC" (no_color_video) capability, or 0 if not present. */
|
|
|
|
int TN_no_color_video;
|
|
|
|
|
|
|
|
int TN_max_colors; /* "Co" -- number of colors. */
|
|
|
|
|
|
|
|
/* "pa" -- max. number of color pairs on screen. Not handled yet.
|
|
|
|
Could be a problem if not equal to TN_max_colors * TN_max_colors. */
|
|
|
|
int TN_max_pairs;
|
|
|
|
|
|
|
|
/* "op" -- SVr4 set default pair to its original value. */
|
|
|
|
char *TS_orig_pair;
|
|
|
|
|
|
|
|
/* "AF"/"AB" or "Sf"/"Sb"-- set ANSI or SVr4 foreground/background color.
|
|
|
|
1 param, the color index. */
|
|
|
|
char *TS_set_foreground;
|
|
|
|
char *TS_set_background;
|
|
|
|
|
|
|
|
int TF_hazeltine; /* termcap hz flag. */
|
|
|
|
int TF_insmode_motion; /* termcap mi flag: can move while in insert mode. */
|
|
|
|
int TF_standout_motion; /* termcap mi flag: can move while in standout mode. */
|
|
|
|
int TF_underscore; /* termcap ul flag: _ underlines if over-struck on
|
|
|
|
non-blank position. Must clear before writing _. */
|
|
|
|
int TF_teleray; /* termcap xt flag: many weird consequences.
|
|
|
|
For t1061. */
|
|
|
|
|
|
|
|
int RPov; /* # chars to start a TS_repeat */
|
|
|
|
|
|
|
|
int delete_in_insert_mode; /* delete mode == insert mode */
|
Unify mouse highlight code of MSDOS and GUI sessions.
xdisp.c (coords_in_mouse_face_p): Move prototype out of the
HAVE_WINDOW_SYSTEM conditional.
(x_y_to_hpos_vpos, frame_to_window_pixel_xy): Move out of the
HAVE_WINDOW_SYSTEM block.
(try_window_id) [HAVE_GPM || MSDOS]: Call
x_clear_window_mouse_face.
(draw_row_with_mouse_face): Implementation for HAVE_WINDOW_SYSTEM
systems.
(show_mouse_face): Call it, instead of calling draw_glyphs directly.
(show_mouse_face, clear_mouse_face, coords_in_mouse_face_p)
(cursor_in_mouse_face_p, rows_from_pos_range)
(mouse_face_from_buffer_pos, mouse_face_from_string_pos)
(note_mode_line_or_margin_highlight, note_mouse_highlight)
(x_clear_window_mouse_face, cancel_mouse_face): Move out of the
HAVE_WINDOW_SYSTEM block. Ifdef away window-system specific
fragments.
(note_mouse_highlight): Call popup_activated for MSDOS as well.
Clear mouse highlight if pointer is over glyphs whose OBJECT is an
integer.
(mouse_face_from_buffer_pos): Add parentheses around && within ||.
xmenu.c (popup_activated): Don't define on MSDOS.
dispnew.c (mirror_make_current): Set Y coordinate of the
mode-line and header-line rows.
termchar.h (struct tty_display_info): Define mouse_face_*
members not only for MSDOS. Delete stray whitespace.
<mouse_face_beg_x, mouse_face_beg_y, mouse_face_overlay>: New
struct members.
dispextern.h (DPYINFO_DEFINED) [HAVE_X_WINDOWS]: Define.
(DPYINFO_DEFINED) [HAVE_NTGUI]: Define.
(DPYINFO_DEFINED) [HAVE_NS]: Define.
(Display_Info) [!DPYINFO_DEFINED]: Define here.
(FRAME_X_DISPLAY_INFO) [HAVE_GPM]: Define.
(FRAME_X_DISPLAY_INFO): Define to NULL if not defined.
(frame_to_window_pixel_xy, note_mouse_highlight)
(x_clear_window_mouse_face, cancel_mouse_face, clear_mouse_face)
(show_mouse_face, cursor_in_mouse_face_p): Move prototypes out of
HAVE_WINDOW_SYSTEM conditional.
(draw_row_with_mouse_face): Declare prototype.
msdos.h (Display_Info): Don't define here.
msdos.c (show_mouse_face, clear_mouse_face)
(fast_find_position, IT_note_mode_line_highlight)
(IT_note_mouse_highlight): Functions deleted.
(IT_frame_up_to_date, dos_rawgetc): Call note_mouse_highlight
instead of IT_note_mouse_highlight.
(draw_row_with_mouse_face, popup_activated): New functions.
2010-10-30 13:09:52 +00:00
|
|
|
|
Fully eliminated global tty state variables.
lib-src/emacsclient.c (main.c): Fix error message.
lisp/frame.el (make-frame-on-tty): New function.
lisp/server.el (server-process-filter): Notify emacsclient if there
was on error during evaluation.
src/cm.c: Fix remaining cases of direct Wcm references.
src/dispextern.h: Updated prototypes.
src/dispnew.c (Fredraw_frame): Fix set_terminal_modes call.
(init_display): Remove reference to meta_key.
src/frame.c (make_terminal_frame): Renamed first parameter to
tty_name. Call term_init before creating the frame.
(Fmake_terminal_frame): Look up the `tty' and `tty-type' frame
parameters from the currently selected terminal before the global
default.
(Fdelete_frame): Make sure that the new selected frame is live.
src/keyboard.c (meta_key): Moved to struct tty_output.
(read_avail_input): Fix C syntax. Update references to meta_key.
(Fsuspend_emacs): pass current tty to init_sys_modes via
record_unwind_protect.
(Fset_input_mode): Update references to meta_key.
(Fcurrent_input_mode): Ditto.
src/sysdep.c (init_sys_modes): Updated old_tty and meta_key
references. Don't call set_terminal_modes, it needs termcap strings.
(reset_sys_modes): Call tty_reset_terminal_modes instead of
reset_terminal_modes. Updated old_tty references.
src/term.c: Massive updates throuout the file.
(TS_*, TN_*): Moved to struct tty_output.
(RPov, delete_in_insert_mode se_is_so, costs_set, insert_mode): Ditto.
(standout_mode, specified_window, tty_cursor_hidden): Ditto.
(tty_set_terminal_modes, tty_reset_terminal_modes): New functions.
(turn_on_insert, turn_off_insert): Added tty parameter.
(turn_on_highlight, turn_off_highlight, toggle_highlight): Added tty parameter.
(tty_hide_cursor, tty_show_cursor): Ditto.
(background_highlight, highlight_if_desired): Ditto.
(tty_capable_p): Changed first parameter to tty_output.
(term_init): Make sure top_frame is initialized. Don't exit on errors
if this would have been a secondary terminal. Call set_terminal_modes
on the end.
(delete_tty): New function.
(delete_tty_1): New function.
(print_all_frames): New function, marginally useful for debugging.
src/termchar.h (struct tty_output): Changed old_tty to be a pointer.
Removed old_tty_valid member. Added tty-specific variables from term.c.
src/xfaces.c (Ftty_supports_face_attributes_p): Update for new
tty_capable_p.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-9
2003-12-27 10:00:19 +00:00
|
|
|
int se_is_so; /* 1 if same string both enters and leaves
|
|
|
|
standout mode */
|
Unify mouse highlight code of MSDOS and GUI sessions.
xdisp.c (coords_in_mouse_face_p): Move prototype out of the
HAVE_WINDOW_SYSTEM conditional.
(x_y_to_hpos_vpos, frame_to_window_pixel_xy): Move out of the
HAVE_WINDOW_SYSTEM block.
(try_window_id) [HAVE_GPM || MSDOS]: Call
x_clear_window_mouse_face.
(draw_row_with_mouse_face): Implementation for HAVE_WINDOW_SYSTEM
systems.
(show_mouse_face): Call it, instead of calling draw_glyphs directly.
(show_mouse_face, clear_mouse_face, coords_in_mouse_face_p)
(cursor_in_mouse_face_p, rows_from_pos_range)
(mouse_face_from_buffer_pos, mouse_face_from_string_pos)
(note_mode_line_or_margin_highlight, note_mouse_highlight)
(x_clear_window_mouse_face, cancel_mouse_face): Move out of the
HAVE_WINDOW_SYSTEM block. Ifdef away window-system specific
fragments.
(note_mouse_highlight): Call popup_activated for MSDOS as well.
Clear mouse highlight if pointer is over glyphs whose OBJECT is an
integer.
(mouse_face_from_buffer_pos): Add parentheses around && within ||.
xmenu.c (popup_activated): Don't define on MSDOS.
dispnew.c (mirror_make_current): Set Y coordinate of the
mode-line and header-line rows.
termchar.h (struct tty_display_info): Define mouse_face_*
members not only for MSDOS. Delete stray whitespace.
<mouse_face_beg_x, mouse_face_beg_y, mouse_face_overlay>: New
struct members.
dispextern.h (DPYINFO_DEFINED) [HAVE_X_WINDOWS]: Define.
(DPYINFO_DEFINED) [HAVE_NTGUI]: Define.
(DPYINFO_DEFINED) [HAVE_NS]: Define.
(Display_Info) [!DPYINFO_DEFINED]: Define here.
(FRAME_X_DISPLAY_INFO) [HAVE_GPM]: Define.
(FRAME_X_DISPLAY_INFO): Define to NULL if not defined.
(frame_to_window_pixel_xy, note_mouse_highlight)
(x_clear_window_mouse_face, cancel_mouse_face, clear_mouse_face)
(show_mouse_face, cursor_in_mouse_face_p): Move prototypes out of
HAVE_WINDOW_SYSTEM conditional.
(draw_row_with_mouse_face): Declare prototype.
msdos.h (Display_Info): Don't define here.
msdos.c (show_mouse_face, clear_mouse_face)
(fast_find_position, IT_note_mode_line_highlight)
(IT_note_mouse_highlight): Functions deleted.
(IT_frame_up_to_date, dos_rawgetc): Call note_mouse_highlight
instead of IT_note_mouse_highlight.
(draw_row_with_mouse_face, popup_activated): New functions.
2010-10-30 13:09:52 +00:00
|
|
|
|
Fully eliminated global tty state variables.
lib-src/emacsclient.c (main.c): Fix error message.
lisp/frame.el (make-frame-on-tty): New function.
lisp/server.el (server-process-filter): Notify emacsclient if there
was on error during evaluation.
src/cm.c: Fix remaining cases of direct Wcm references.
src/dispextern.h: Updated prototypes.
src/dispnew.c (Fredraw_frame): Fix set_terminal_modes call.
(init_display): Remove reference to meta_key.
src/frame.c (make_terminal_frame): Renamed first parameter to
tty_name. Call term_init before creating the frame.
(Fmake_terminal_frame): Look up the `tty' and `tty-type' frame
parameters from the currently selected terminal before the global
default.
(Fdelete_frame): Make sure that the new selected frame is live.
src/keyboard.c (meta_key): Moved to struct tty_output.
(read_avail_input): Fix C syntax. Update references to meta_key.
(Fsuspend_emacs): pass current tty to init_sys_modes via
record_unwind_protect.
(Fset_input_mode): Update references to meta_key.
(Fcurrent_input_mode): Ditto.
src/sysdep.c (init_sys_modes): Updated old_tty and meta_key
references. Don't call set_terminal_modes, it needs termcap strings.
(reset_sys_modes): Call tty_reset_terminal_modes instead of
reset_terminal_modes. Updated old_tty references.
src/term.c: Massive updates throuout the file.
(TS_*, TN_*): Moved to struct tty_output.
(RPov, delete_in_insert_mode se_is_so, costs_set, insert_mode): Ditto.
(standout_mode, specified_window, tty_cursor_hidden): Ditto.
(tty_set_terminal_modes, tty_reset_terminal_modes): New functions.
(turn_on_insert, turn_off_insert): Added tty parameter.
(turn_on_highlight, turn_off_highlight, toggle_highlight): Added tty parameter.
(tty_hide_cursor, tty_show_cursor): Ditto.
(background_highlight, highlight_if_desired): Ditto.
(tty_capable_p): Changed first parameter to tty_output.
(term_init): Make sure top_frame is initialized. Don't exit on errors
if this would have been a secondary terminal. Call set_terminal_modes
on the end.
(delete_tty): New function.
(delete_tty_1): New function.
(print_all_frames): New function, marginally useful for debugging.
src/termchar.h (struct tty_output): Changed old_tty to be a pointer.
Removed old_tty_valid member. Added tty-specific variables from term.c.
src/xfaces.c (Ftty_supports_face_attributes_p): Update for new
tty_capable_p.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-9
2003-12-27 10:00:19 +00:00
|
|
|
int costs_set; /* Nonzero if costs have been calculated. */
|
Unify mouse highlight code of MSDOS and GUI sessions.
xdisp.c (coords_in_mouse_face_p): Move prototype out of the
HAVE_WINDOW_SYSTEM conditional.
(x_y_to_hpos_vpos, frame_to_window_pixel_xy): Move out of the
HAVE_WINDOW_SYSTEM block.
(try_window_id) [HAVE_GPM || MSDOS]: Call
x_clear_window_mouse_face.
(draw_row_with_mouse_face): Implementation for HAVE_WINDOW_SYSTEM
systems.
(show_mouse_face): Call it, instead of calling draw_glyphs directly.
(show_mouse_face, clear_mouse_face, coords_in_mouse_face_p)
(cursor_in_mouse_face_p, rows_from_pos_range)
(mouse_face_from_buffer_pos, mouse_face_from_string_pos)
(note_mode_line_or_margin_highlight, note_mouse_highlight)
(x_clear_window_mouse_face, cancel_mouse_face): Move out of the
HAVE_WINDOW_SYSTEM block. Ifdef away window-system specific
fragments.
(note_mouse_highlight): Call popup_activated for MSDOS as well.
Clear mouse highlight if pointer is over glyphs whose OBJECT is an
integer.
(mouse_face_from_buffer_pos): Add parentheses around && within ||.
xmenu.c (popup_activated): Don't define on MSDOS.
dispnew.c (mirror_make_current): Set Y coordinate of the
mode-line and header-line rows.
termchar.h (struct tty_display_info): Define mouse_face_*
members not only for MSDOS. Delete stray whitespace.
<mouse_face_beg_x, mouse_face_beg_y, mouse_face_overlay>: New
struct members.
dispextern.h (DPYINFO_DEFINED) [HAVE_X_WINDOWS]: Define.
(DPYINFO_DEFINED) [HAVE_NTGUI]: Define.
(DPYINFO_DEFINED) [HAVE_NS]: Define.
(Display_Info) [!DPYINFO_DEFINED]: Define here.
(FRAME_X_DISPLAY_INFO) [HAVE_GPM]: Define.
(FRAME_X_DISPLAY_INFO): Define to NULL if not defined.
(frame_to_window_pixel_xy, note_mouse_highlight)
(x_clear_window_mouse_face, cancel_mouse_face, clear_mouse_face)
(show_mouse_face, cursor_in_mouse_face_p): Move prototypes out of
HAVE_WINDOW_SYSTEM conditional.
(draw_row_with_mouse_face): Declare prototype.
msdos.h (Display_Info): Don't define here.
msdos.c (show_mouse_face, clear_mouse_face)
(fast_find_position, IT_note_mode_line_highlight)
(IT_note_mouse_highlight): Functions deleted.
(IT_frame_up_to_date, dos_rawgetc): Call note_mouse_highlight
instead of IT_note_mouse_highlight.
(draw_row_with_mouse_face, popup_activated): New functions.
2010-10-30 13:09:52 +00:00
|
|
|
|
Fully eliminated global tty state variables.
lib-src/emacsclient.c (main.c): Fix error message.
lisp/frame.el (make-frame-on-tty): New function.
lisp/server.el (server-process-filter): Notify emacsclient if there
was on error during evaluation.
src/cm.c: Fix remaining cases of direct Wcm references.
src/dispextern.h: Updated prototypes.
src/dispnew.c (Fredraw_frame): Fix set_terminal_modes call.
(init_display): Remove reference to meta_key.
src/frame.c (make_terminal_frame): Renamed first parameter to
tty_name. Call term_init before creating the frame.
(Fmake_terminal_frame): Look up the `tty' and `tty-type' frame
parameters from the currently selected terminal before the global
default.
(Fdelete_frame): Make sure that the new selected frame is live.
src/keyboard.c (meta_key): Moved to struct tty_output.
(read_avail_input): Fix C syntax. Update references to meta_key.
(Fsuspend_emacs): pass current tty to init_sys_modes via
record_unwind_protect.
(Fset_input_mode): Update references to meta_key.
(Fcurrent_input_mode): Ditto.
src/sysdep.c (init_sys_modes): Updated old_tty and meta_key
references. Don't call set_terminal_modes, it needs termcap strings.
(reset_sys_modes): Call tty_reset_terminal_modes instead of
reset_terminal_modes. Updated old_tty references.
src/term.c: Massive updates throuout the file.
(TS_*, TN_*): Moved to struct tty_output.
(RPov, delete_in_insert_mode se_is_so, costs_set, insert_mode): Ditto.
(standout_mode, specified_window, tty_cursor_hidden): Ditto.
(tty_set_terminal_modes, tty_reset_terminal_modes): New functions.
(turn_on_insert, turn_off_insert): Added tty parameter.
(turn_on_highlight, turn_off_highlight, toggle_highlight): Added tty parameter.
(tty_hide_cursor, tty_show_cursor): Ditto.
(background_highlight, highlight_if_desired): Ditto.
(tty_capable_p): Changed first parameter to tty_output.
(term_init): Make sure top_frame is initialized. Don't exit on errors
if this would have been a secondary terminal. Call set_terminal_modes
on the end.
(delete_tty): New function.
(delete_tty_1): New function.
(print_all_frames): New function, marginally useful for debugging.
src/termchar.h (struct tty_output): Changed old_tty to be a pointer.
Removed old_tty_valid member. Added tty-specific variables from term.c.
src/xfaces.c (Ftty_supports_face_attributes_p): Update for new
tty_capable_p.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-9
2003-12-27 10:00:19 +00:00
|
|
|
int insert_mode; /* Nonzero when in insert mode. */
|
|
|
|
int standout_mode; /* Nonzero when in standout mode. */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* 1 if should obey 0200 bit in input chars as "Meta", 2 if should
|
|
|
|
keep 0200 bit in input chars. 0 to ignore the 0200 bit. */
|
|
|
|
|
|
|
|
int meta_key;
|
|
|
|
|
|
|
|
/* Size of window specified by higher levels.
|
|
|
|
This is the number of lines, from the top of frame downwards,
|
|
|
|
which can participate in insert-line/delete-line operations.
|
|
|
|
|
|
|
|
Effectively it excludes the bottom frame_lines - specified_window_size
|
|
|
|
lines from those operations. */
|
|
|
|
|
|
|
|
int specified_window;
|
Unify mouse highlight code of MSDOS and GUI sessions.
xdisp.c (coords_in_mouse_face_p): Move prototype out of the
HAVE_WINDOW_SYSTEM conditional.
(x_y_to_hpos_vpos, frame_to_window_pixel_xy): Move out of the
HAVE_WINDOW_SYSTEM block.
(try_window_id) [HAVE_GPM || MSDOS]: Call
x_clear_window_mouse_face.
(draw_row_with_mouse_face): Implementation for HAVE_WINDOW_SYSTEM
systems.
(show_mouse_face): Call it, instead of calling draw_glyphs directly.
(show_mouse_face, clear_mouse_face, coords_in_mouse_face_p)
(cursor_in_mouse_face_p, rows_from_pos_range)
(mouse_face_from_buffer_pos, mouse_face_from_string_pos)
(note_mode_line_or_margin_highlight, note_mouse_highlight)
(x_clear_window_mouse_face, cancel_mouse_face): Move out of the
HAVE_WINDOW_SYSTEM block. Ifdef away window-system specific
fragments.
(note_mouse_highlight): Call popup_activated for MSDOS as well.
Clear mouse highlight if pointer is over glyphs whose OBJECT is an
integer.
(mouse_face_from_buffer_pos): Add parentheses around && within ||.
xmenu.c (popup_activated): Don't define on MSDOS.
dispnew.c (mirror_make_current): Set Y coordinate of the
mode-line and header-line rows.
termchar.h (struct tty_display_info): Define mouse_face_*
members not only for MSDOS. Delete stray whitespace.
<mouse_face_beg_x, mouse_face_beg_y, mouse_face_overlay>: New
struct members.
dispextern.h (DPYINFO_DEFINED) [HAVE_X_WINDOWS]: Define.
(DPYINFO_DEFINED) [HAVE_NTGUI]: Define.
(DPYINFO_DEFINED) [HAVE_NS]: Define.
(Display_Info) [!DPYINFO_DEFINED]: Define here.
(FRAME_X_DISPLAY_INFO) [HAVE_GPM]: Define.
(FRAME_X_DISPLAY_INFO): Define to NULL if not defined.
(frame_to_window_pixel_xy, note_mouse_highlight)
(x_clear_window_mouse_face, cancel_mouse_face, clear_mouse_face)
(show_mouse_face, cursor_in_mouse_face_p): Move prototypes out of
HAVE_WINDOW_SYSTEM conditional.
(draw_row_with_mouse_face): Declare prototype.
msdos.h (Display_Info): Don't define here.
msdos.c (show_mouse_face, clear_mouse_face)
(fast_find_position, IT_note_mode_line_highlight)
(IT_note_mouse_highlight): Functions deleted.
(IT_frame_up_to_date, dos_rawgetc): Call note_mouse_highlight
instead of IT_note_mouse_highlight.
(draw_row_with_mouse_face, popup_activated): New functions.
2010-10-30 13:09:52 +00:00
|
|
|
|
Fully eliminated global tty state variables.
lib-src/emacsclient.c (main.c): Fix error message.
lisp/frame.el (make-frame-on-tty): New function.
lisp/server.el (server-process-filter): Notify emacsclient if there
was on error during evaluation.
src/cm.c: Fix remaining cases of direct Wcm references.
src/dispextern.h: Updated prototypes.
src/dispnew.c (Fredraw_frame): Fix set_terminal_modes call.
(init_display): Remove reference to meta_key.
src/frame.c (make_terminal_frame): Renamed first parameter to
tty_name. Call term_init before creating the frame.
(Fmake_terminal_frame): Look up the `tty' and `tty-type' frame
parameters from the currently selected terminal before the global
default.
(Fdelete_frame): Make sure that the new selected frame is live.
src/keyboard.c (meta_key): Moved to struct tty_output.
(read_avail_input): Fix C syntax. Update references to meta_key.
(Fsuspend_emacs): pass current tty to init_sys_modes via
record_unwind_protect.
(Fset_input_mode): Update references to meta_key.
(Fcurrent_input_mode): Ditto.
src/sysdep.c (init_sys_modes): Updated old_tty and meta_key
references. Don't call set_terminal_modes, it needs termcap strings.
(reset_sys_modes): Call tty_reset_terminal_modes instead of
reset_terminal_modes. Updated old_tty references.
src/term.c: Massive updates throuout the file.
(TS_*, TN_*): Moved to struct tty_output.
(RPov, delete_in_insert_mode se_is_so, costs_set, insert_mode): Ditto.
(standout_mode, specified_window, tty_cursor_hidden): Ditto.
(tty_set_terminal_modes, tty_reset_terminal_modes): New functions.
(turn_on_insert, turn_off_insert): Added tty parameter.
(turn_on_highlight, turn_off_highlight, toggle_highlight): Added tty parameter.
(tty_hide_cursor, tty_show_cursor): Ditto.
(background_highlight, highlight_if_desired): Ditto.
(tty_capable_p): Changed first parameter to tty_output.
(term_init): Make sure top_frame is initialized. Don't exit on errors
if this would have been a secondary terminal. Call set_terminal_modes
on the end.
(delete_tty): New function.
(delete_tty_1): New function.
(print_all_frames): New function, marginally useful for debugging.
src/termchar.h (struct tty_output): Changed old_tty to be a pointer.
Removed old_tty_valid member. Added tty-specific variables from term.c.
src/xfaces.c (Ftty_supports_face_attributes_p): Update for new
tty_capable_p.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-9
2003-12-27 10:00:19 +00:00
|
|
|
/* Flag used in tty_show/hide_cursor. */
|
|
|
|
|
|
|
|
int cursor_hidden;
|
Fixed X support, preliminary support for X-tty combo sessions.
lib-src/emacsclient.c (copy_from_to, pty_conversation): Re-added SIGIO
hack. (Sigh.)
lisp/frame.el (make-frame-on-tty): Use make-terminal-frame, not
make-frame.
src/dispnew.c (line_hash_code, line_draw_cost): Updated to use
the new display_method parameters.
(Fredraw_frame): fflush the tty only if f is a termcap frame.
(direct_output_for_insert): Updated to use the new display_method
parameters. fflush the tty only if f is a termcap frame.
(direct_output_forward_char, update_frame_1, scrolling): Ditto.
(update_frame_line, Fding, bitch_at_user): Ditto.
(Fsend_string_to_terminal): Fail if current frame is not on a tty.
(init_display): Frame size change is safe here.
src/frame.c (Vterminal_frame): Restored previously deleted variable.
(syms_of_frame): Initialize it.
(make_terminal_frame): Copy the frame's display_method from tty_display_info.
(Fmake_terminal_frame): Enable simultaneous X and tty frames (buggy).
(Fredirect_frame_focus): Don't call frame_rehighlight_hook if frame
is on a termcap device.
src/frame.h (struct frame): Renamed display to display_method.
(Vterminal_frame): Re-added declaration.
src/keyboard.c (flow_control): Moved to struct tty_display_info.
(read_avail_input): Check ttys even if there is a read_socket_hook.
(Fset_input_mode): Call reset_sys_modes/init_sys_modes and set
flow_control or meta_key only when the frame is a termcap frame.
(Fcurrent_input_mode): Handle flow_control and meta_key right on
non-termcap frames.
src/scroll.c (calculate_scrolling, calculate_direct_scrolling): Update
to use the new display_method parameters.
(scrolling_1, scroll_cost): Ditto.
src/sysdep.c (init_sys_modes, reset_sys_modes): Always set the
terminal parameters if tty_out->input is not stdin. Updated to the
new location of flow_control.
(hft_init): Moved HFT init code to term_init, as it needs the frame.
src/term.c (tty_display_method_template): New variable.
(update_begin): Added rif hack.
(set_terminal_window, ins_del_lines, term_init): Updated to use the
new display_method parameters.
(insert_glyphs, ins_del_lines): Only call insert_glyphs_hook if the
current frame is not on a tty.
(calculate_costs): Don't calculate costs if not on a tty.
(term_dummy_init): Fixed tty->output initialization. Preallocate Wcm
and display_method.
(term_init): Allocate & initialize display_method. Blindly fixed
WINDOWSNT-specific parts. Added HFT-specific initialization
exception from hft_init.
(delete_tty): Only delete termcap frames. Free() the display_method.
src/termchar.h (struct tty_display_info): Moved high-level terminal
characteristics to struct display_method. Added flow_control and
display_method members.
src/termhooks.h (struct display_method): New struct (renamed from
struct device). Added accessor macros.
src/window.c (init_window_once): Initialize Vterminal_frame.
src/xdisp.c (init_iterator, expose_frame): Added rif hack.
(try_window_id): Updated to use the new display_method parameters.
src/xfaces.c (realize_basic_faces): Don't call
x_update_menu_appearance if the frame is a tty frame.
src/xfns.c (Fx_create_frame): Added rif hack. Initialize
display_method.
(x_create_tip_frame): Initialize display_method.
src/xterm.c (x_display_method): New variable.
(x_flush, x_frame_of_widget, XTmouse_position): Ignore non-X frames.
(x_window_to_scroll_bar, x_window_to_menu_bar): Ditto.
(xim_destroy_callback, xim_instantiate_callback): Ditto.
(frame_highlight, frame_unhighlight): Added rif hack.
(x_initialize): Don't initialize rif. Do initialize x_display_method.
src/xterm.h (x_display_method): New declaration.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-30
2004-01-02 01:15:26 +00:00
|
|
|
|
|
|
|
/* Nonzero means use ^S/^Q for flow control. */
|
|
|
|
int flow_control;
|
|
|
|
|
Add a level of indirection to terminal characteristics.
* src/termchar.h (struct terminal): New struct.
(must_write_spaces, min_padding_speed, line_ins_del_ok)
(char_ins_del_ok, scroll_region_ok, scroll_region_cost)
(memory_below_frame, fast_clear_end_of_line): Moved to struct
terminal.
(current_terminal): New variable.
(CURRENT_TERMINAL, TERMINAL_*): New accessor macros.
(min_padding_speed, dont_calculate_costs): Commented out (unused).
* src/term.c (_current_terminal): New variable. Will be removed when
true multi-tty support is implemented.
* src/termopts.h (no_redraw_on_reenter): Moved here.
* src/term.c (set_terminal_window, ins_del_lines, calculate_costs)
(term_init): Use the accessor macros for terminal characteristics.
* src/dispnew.c (line_hash_code, line_draw_cost)
(direct_output_for_insert, update_frame_1, scrolling)
(update_frame_line): Ditto.
* src/macterm.c (mac_initialize): Ditto.
* src/msdos.c (internal_terminal_init): Ditto.
* src/scroll.c (calculate_scrolling, calculate_direct_scrolling)
(scrolling_1, scroll_cost): Ditto.
* src/sysdep.c (hft_init): Ditto.
* src/w32term.c (w32_initialize): Ditto.
* src/xdisp.c (try_window_id): Ditto.
* src/xterm.c (x_initialize): Ditto.
* etc/TODO: Add pointer to my tla archive.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-1
2003-12-24 18:55:24 +00:00
|
|
|
};
|
|
|
|
|
Separate frame-local, tty-dependent parameters from tty-local parameters.
src/termchar.h (struct tty_output): Redefined to contain frame-local
tty-dependent parameters. (Currently there are no such parameters, so
it consists of the tty_display_info pointer.)
(struct tty_display_info): New structure, with reference_count.
(FRAME_TTY): Updated to reflect new termcap frame structure.
src/term.c: Update prototypes. Use tty_display_info instead of tty_output.
src/cm.c (current_tty, cmcheckmagic, cmcostinit, calccost, cmgoto, Wcm_clear)
(Wcm_init): Use tty_display_info instead of tty_output.
src/cm.h: Update prototypes.
src/dispextern.h: Ditto.
src/dispnew.c (window_change_signal, init_display, make_terminal_frame):
Use tty_display_info instead of tty_output.
src/frame.c (Fdelete_frame): Use tty_display_info instead of
tty_output. Fix delete_tty check.
(make_terminal_frame): Allocate f->output_data.tty. Increase
reference count of tty device.
(delete_frame): Free f->output_data.tty. Use reference count to
decide if the tty should be closed.
src/frame.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): New,
unconditional definitions.
(struct device): New declaration (at the moment, it is defined as
empty in termhooks.h).
(struct frame): Added display, background_pixel, foreground_pixel member.
src/keyboard.c (read_avail_input): Use tty_display_info instead of tty_output.
src/lisp.h: Declare struct display. Update prototypes.
src/sysdep.c: Update prototypes.
(discard_tty_input, init_all_sys_modes, init_sys_modes, reset_all_sys_modes)
(reset_sys_modes, hft_init, hft_reset): Use tty_display_info instead
of tty_output.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-29
2004-01-01 17:55:53 +00:00
|
|
|
/* A chain of structures for all tty devices currently in use. */
|
|
|
|
extern struct tty_display_info *tty_list;
|
Implemented multiple tty support.
README.multi-tty: New file.
src/termchar.h (struct terminal): Renamed to struct tty_output. Added name, type,
input, output, termscript, old_tty, term_initted, old_tty_valid,
background_pixel, foreground_pixel, next fields.
(TERMINAL_*): Renamed to TTY_* for brevity.
(CURRENT_TERMINAL): Renamed to CURTTY for brevity.
(tty_list): New variable.
(TERMINAL_PTR): Removed.
(FRAME_TTY): New function.
(TTY_NAME, TTY_TYPE): New macros.
src/term.c (current_terminal): Removed. (_current_terminal): Removed. (tty_list):
New variable. (OUTPUT, OUTPUT1, OUTPUTL, OUTPUT_IF, OUTPUT1_IF): Added tty
parameter. (set_terminal_modes): Added tty parameter. (reset_terminal_modes):
Added tty parameter. (cursor_to, raw_cursor_to): Updated cmgoto() calls.
(clear_end_of_line, write_glyphs): Add indirection to terminal output, updated
cmcheckmagic() calls. (get_named_tty): New function. (term_dummy_init): New
function. (term_init): Added name parameter, added tty_output return value.
Changed algorithm to update tty_list. Call init_sys_modes() to set up tty
mode on the newly opened terminal device.
(get_current_tty): New function, intended for debugging.
src/termhooks.h (termscript): Removed.
src/w32term.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Removed redundant
definition.
src/macterm.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Ditto.
src/window.c (init_window_once): Call make_terminal_frame with two zero parameters.
src/cm.h (emacs_tputs): New macro to set current_tty, and then call tputs().
(current_tty): New variable, for cmputc().
(cmcheckmagic, cmputc, cmgoto): Added prototypes.
src/cm.c (current_tty): New variable, for cmputc().
(cmputc): Use it.
(cmcheckmagic): Added tty parameter, look up terminal streams there.
(calccost): Added tty parameter. Use emacs_tputs() instead of tputs().
(cmgoto): Added tty parameter. Pass it on to calccost(). Use emacs_tputs()
instead of tputs().
src/dispextern.h (set_terminal_modes, reset_terminal_modes): Added tty parameter.
(term_init): Added name parameter (the filename of the terminal device). Added
return value (struct tty_output).
src/dispnew.c: Replace CURTTY() with local variables throughout the file (where applicable).
(termscript): Moved to struct tty_output.
(terminal_type): Removed.
src/emacs.c (main): Don't call init_sys_modes(), the new term_init() already does that
during init_display().
(shut_down_emacs): Call reset_all_sys_modes() instead of reset_sys_modes().
src/frame.c (Qtty, Qtty_type): New variables.
(syms_of_frame): Initialize them.
(tty_display): Removed.
(make_terminal_frame): New parameters (tty filename and type).
Initialize output_data.tty field instead of output_data.x. Use term_init() to
find the right tty_output. (Use term_dummy_init() during bootstrap.)
(Fmake_terminal_frame): Get device filename and type from frame parameters.
src/frame.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): Do the right thing
if the frame is a tty.
(struct frame): New member in output_data: tty.
(make_terminal_frame): Updated of prototype.
src/keyboard.c (Fset_input_mode): Call reset_all_sys_modes(), not
reset_sys_modes(). Ditto with init_sys_modes().
src/lisp.h (tty_output): Added forward declaration.
(init_sys_modes, reset_sys_modes): Updated prototype.
(init_all_sys_modes, reset_all_sys_modes): New prototypes.
src/scroll.c: Replace CURTTY() with local variables throughout the file (where applicable).
src/sysdep.c (old_tty, term_initted, old_tty_valid): Moved to struct tty_output.(
(init_all_sys_modes): New function.
(init_sys_modes): Added tty_output parameter. Use it.
(reset_all_sys_modes): New function.
(reset_sys_modes): Added tty_output parameter. Use it.
src/Makefile.in: Update dependencies.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-2
2003-12-25 06:59:31 +00:00
|
|
|
|
|
|
|
|
Separate frame-local, tty-dependent parameters from tty-local parameters.
src/termchar.h (struct tty_output): Redefined to contain frame-local
tty-dependent parameters. (Currently there are no such parameters, so
it consists of the tty_display_info pointer.)
(struct tty_display_info): New structure, with reference_count.
(FRAME_TTY): Updated to reflect new termcap frame structure.
src/term.c: Update prototypes. Use tty_display_info instead of tty_output.
src/cm.c (current_tty, cmcheckmagic, cmcostinit, calccost, cmgoto, Wcm_clear)
(Wcm_init): Use tty_display_info instead of tty_output.
src/cm.h: Update prototypes.
src/dispextern.h: Ditto.
src/dispnew.c (window_change_signal, init_display, make_terminal_frame):
Use tty_display_info instead of tty_output.
src/frame.c (Fdelete_frame): Use tty_display_info instead of
tty_output. Fix delete_tty check.
(make_terminal_frame): Allocate f->output_data.tty. Increase
reference count of tty device.
(delete_frame): Free f->output_data.tty. Use reference count to
decide if the tty should be closed.
src/frame.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): New,
unconditional definitions.
(struct device): New declaration (at the moment, it is defined as
empty in termhooks.h).
(struct frame): Added display, background_pixel, foreground_pixel member.
src/keyboard.c (read_avail_input): Use tty_display_info instead of tty_output.
src/lisp.h: Declare struct display. Update prototypes.
src/sysdep.c: Update prototypes.
(discard_tty_input, init_all_sys_modes, init_sys_modes, reset_all_sys_modes)
(reset_sys_modes, hft_init, hft_reset): Use tty_display_info instead
of tty_output.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-29
2004-01-01 17:55:53 +00:00
|
|
|
#define FRAME_TTY(f) \
|
2008-08-23 16:48:24 +00:00
|
|
|
(((f)->output_method == output_termcap \
|
|
|
|
|| (f)->output_method == output_msdos_raw) \
|
Rename `struct device' to `struct terminal'. Rename some terminal-related functions similarly.
* src/termhooks.h (struct device): Rename to `terminal'. Rename member
`next_device' to `next_terminal'.
(device_list): Rename to `terminal_list'.
(FRAME_DEVICE): Rename to `FRAME_TERMINAL'.
(DEVICE_TERMINAL_CODING): Rename to `TERMINAL_TERMINAL_CODING'.
(TERMINAL_KEYBOARD_CODING): Rename to `TERMINAL_KEYBOARD_CODING'.
(DEVICE_ACTIVE_P): Rename to `TERMINAL_ACTIVE_P'.
Update declarations and macro definitions.
* src/termchar.h (tty_display_info): Rename member `device' to `terminal'.
(FRAME_TTY): Update for renames.
* src/xterm.h (x_display_info): Rename member `device' to `terminal'.
* src/frame.h (frame): Rename `device' member to `terminal'.
(FRAME_KBOARD, FRAME_LIVE_P, Qdevice, Qdisplay_live_p):
Update for renames.
* src/lisp.h (set_process_environment): Rename to `set_global_environment'.
(device): Rename to `terminal'.
* src/dispextern.h: Update declarations and macro definitions.
* src/terminal.c (device_list): Rename to `terminal_list'.
(next_device_id): Rename to `next_terminal_id'.
(initial_device): Rename to `initial_terminal'.
(get_device): Rename to `get_terminal'.
(create_device): Rename to `create_terminal'.
(mark_devices): Rename to `mark_terminals'.
(delete_device): Rename to `delete_terminal'.
(Fdelete_display): Rename to `Fdelete_terminal'.
(Fframe_terminal): Move here from frame.c.
(Fdisplay_live_p): Rename to `Fterminal_live_p'.
(Fdisplay_list): Rename to `Fterminal_list'.
(Fdisplay_name): Rename to `Fterminal_name'.
(init_initial_device): Rename to `init_initial_terminal'.
(delete_initial_device): Rename to `delete_initial_terminal'.
(ring_bell, update_begin, update_end, set_terminal_window)
(cursor_to, raw_cursor_to, clear_to_end, clear_frame)
(clear_end_of_line, write_glyphs, insert_glyphs, delete_glyphs)
(ins_del_lines, get_terminal_param, store_terminal_param)
(Fterminal_parameters, Fterminal_parameter)
(Fmodify_terminal_parameters, Fset_terminal_parameter)
(syms_of_terminal): Update for renames.
* src/term.c (get_tty_device): Rename to `get_tty_terminal'. Update.
(Fdisplay_tty_type): Rename to `Ftty_type'.
(Fdisplay_controlling_tty_p): Rename to `Fcontrolling_tty_p'.
(delete_tty, tty_set_terminal_modes, tty_reset_terminal_modes)
(Ftty_display_color_p, Ftty_display_color_cells, get_named_tty)
(Ftty_no_underline, Fsuspend_tty, Fresume_tty, create_tty_output)
(init_tty, maybe_fatal, delete_tty, syms_of_term): Update for rename.
* src/frame.c (Qdevice): Rename to `Qterminal'.
(Qdisplay_live_p): Rename to `Qterminal_live_p'.
(terminal_frame_count): Rename to `tty_frame_count'.
(Fframe_display): Move to terminal.c, rename to `Fframe_terminal'.
(make_frame_without_minibuffer, make_initial_frame)
(make_terminal_frame, Fmodify_frame_parameters)
(do_switch_frame, Fdelete_frame, Fmouse_position)
(Fmouse_pixel_position, Fraise_frame, Flower_frame)
(Fredirect_frame_focus, set_term_frame_name, syms_of_frame):
Update for renames.
* src/xdisp.c (message2_nolog, message3_nolog, redisplay_internal)
(set_vertical_scroll_bar, redisplay_window, check_x_display_info)
(x_set_scroll_bar_foreground, x_set_scroll_bar_background)
(Fx_create_frame, Fxw_display_color_p, Fx_display_grayscale_p)
(Fx_display_pixel_width, Fx_display_pixel_height)
(Fx_display_planes, Fx_display_color_cells)
(Fx_server_max_request_size, Fx_server_vendor, Fx_server_version)
(Fx_display_screens, Fx_display_mm_height, Fx_display_mm_width)
(Fx_display_backing_store, Fx_display_visual_class)
(Fx_display_save_under, Fx_close_connection, x_create_tip_frame):
Update for renames.
* xterm.c (handle_one_xevent): Initialize `f' to NULL.
(x_delete_device): Rename to `x_delete_terminal'.
(x_create_device): Rename to `x_create_terminal'.
(XTset_terminal_modes, XTreset_terminal_modes)
(XTread_socket, x_connection_closed, x_term_init)
(x_term_init, x_delete_display): Update for renames.
* src/dispnew.c (Fredraw_frame, Fsend_string_to_terminal)
(Fsend_string_to_terminal, init_display): Update for renames.
* src/keyboard.c (push_frame_kboard, pop_kboard, pop_kboard)
(kbd_buffer_get_event, read_avail_input, tty_read_avail_input)
(interrupt_signal, Fset_output_flow_control)
(Fset_input_meta_mode, Fset_quit_char, delete_kboard)
(syms_of_keyboard): Update for renames.
* src/alloc.c (mark_devices): Update declaration.
(Fgarbage_collect): Update for renames.
* src/coding.c (Fset_terminal_coding_system_internal)
(Fterminal_coding_system4)
(Fset_keyboard_coding_system_internal)
(Fkeyboard_coding_system): Update for renames.
* src/data.c (Fterminal_local_value, Fset_terminal_local_value):
Update for renames.
* src/minibuf.c (read_minibuf): Update for renames.
* src/sysdep.c (init_sys_modes, reset_sys_modes): Update for renames.
* xselect.c (x_handle_selection_clear): Update for renames.
* lisp/files.el (save-buffers-kill-display): Rename to `save-buffers-kill-terminal'.
(save-buffers-kill-terminal, ctl-x-map): Update for renames.
* frame.el (make-frame): Rename 'device frame parameter to 'terminal. Update.
(frames-on-display-list, framep-on-display, suspend-frame): Update for renames.
(selected-display): Rename to `selected-terminal'.
* server.el (server-save-buffers-kill-display): Rename to
`server-save-buffers-kill-terminal'.
(server-delete-client, server-handle-delete-frame)
(server-handle-suspend-tty, server-process-filter)
(server-switch-buffer): Update for renames.
* startup.el (normal-splash-screen, normal-splash-screen): Update for renames.
* talk.el (talk): Update for renames.
* termdev.el (terminal-id): Update for renames.
* xt-mouse.el (turn-on-xterm-mouse-tracking-on-terminal)
(turn-off-xterm-mouse-tracking-on-terminal)
(xterm-mouse-handle-delete-frame): Update for renames.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-471
2005-12-29 18:20:26 +00:00
|
|
|
? (f)->terminal->display_info.tty \
|
Separate frame-local, tty-dependent parameters from tty-local parameters.
src/termchar.h (struct tty_output): Redefined to contain frame-local
tty-dependent parameters. (Currently there are no such parameters, so
it consists of the tty_display_info pointer.)
(struct tty_display_info): New structure, with reference_count.
(FRAME_TTY): Updated to reflect new termcap frame structure.
src/term.c: Update prototypes. Use tty_display_info instead of tty_output.
src/cm.c (current_tty, cmcheckmagic, cmcostinit, calccost, cmgoto, Wcm_clear)
(Wcm_init): Use tty_display_info instead of tty_output.
src/cm.h: Update prototypes.
src/dispextern.h: Ditto.
src/dispnew.c (window_change_signal, init_display, make_terminal_frame):
Use tty_display_info instead of tty_output.
src/frame.c (Fdelete_frame): Use tty_display_info instead of
tty_output. Fix delete_tty check.
(make_terminal_frame): Allocate f->output_data.tty. Increase
reference count of tty device.
(delete_frame): Free f->output_data.tty. Use reference count to
decide if the tty should be closed.
src/frame.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): New,
unconditional definitions.
(struct device): New declaration (at the moment, it is defined as
empty in termhooks.h).
(struct frame): Added display, background_pixel, foreground_pixel member.
src/keyboard.c (read_avail_input): Use tty_display_info instead of tty_output.
src/lisp.h: Declare struct display. Update prototypes.
src/sysdep.c: Update prototypes.
(discard_tty_input, init_all_sys_modes, init_sys_modes, reset_all_sys_modes)
(reset_sys_modes, hft_init, hft_reset): Use tty_display_info instead
of tty_output.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-29
2004-01-01 17:55:53 +00:00
|
|
|
: (abort(), (struct tty_display_info *) 0))
|
Add a level of indirection to terminal characteristics.
* src/termchar.h (struct terminal): New struct.
(must_write_spaces, min_padding_speed, line_ins_del_ok)
(char_ins_del_ok, scroll_region_ok, scroll_region_cost)
(memory_below_frame, fast_clear_end_of_line): Moved to struct
terminal.
(current_terminal): New variable.
(CURRENT_TERMINAL, TERMINAL_*): New accessor macros.
(min_padding_speed, dont_calculate_costs): Commented out (unused).
* src/term.c (_current_terminal): New variable. Will be removed when
true multi-tty support is implemented.
* src/termopts.h (no_redraw_on_reenter): Moved here.
* src/term.c (set_terminal_window, ins_del_lines, calculate_costs)
(term_init): Use the accessor macros for terminal characteristics.
* src/dispnew.c (line_hash_code, line_draw_cost)
(direct_output_for_insert, update_frame_1, scrolling)
(update_frame_line): Ditto.
* src/macterm.c (mac_initialize): Ditto.
* src/msdos.c (internal_terminal_init): Ditto.
* src/scroll.c (calculate_scrolling, calculate_direct_scrolling)
(scrolling_1, scroll_cost): Ditto.
* src/sysdep.c (hft_init): Ditto.
* src/w32term.c (w32_initialize): Ditto.
* src/xdisp.c (try_window_id): Ditto.
* src/xterm.c (x_initialize): Ditto.
* etc/TODO: Add pointer to my tla archive.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-1
2003-12-24 18:55:24 +00:00
|
|
|
|
Separate frame-local, tty-dependent parameters from tty-local parameters.
src/termchar.h (struct tty_output): Redefined to contain frame-local
tty-dependent parameters. (Currently there are no such parameters, so
it consists of the tty_display_info pointer.)
(struct tty_display_info): New structure, with reference_count.
(FRAME_TTY): Updated to reflect new termcap frame structure.
src/term.c: Update prototypes. Use tty_display_info instead of tty_output.
src/cm.c (current_tty, cmcheckmagic, cmcostinit, calccost, cmgoto, Wcm_clear)
(Wcm_init): Use tty_display_info instead of tty_output.
src/cm.h: Update prototypes.
src/dispextern.h: Ditto.
src/dispnew.c (window_change_signal, init_display, make_terminal_frame):
Use tty_display_info instead of tty_output.
src/frame.c (Fdelete_frame): Use tty_display_info instead of
tty_output. Fix delete_tty check.
(make_terminal_frame): Allocate f->output_data.tty. Increase
reference count of tty device.
(delete_frame): Free f->output_data.tty. Use reference count to
decide if the tty should be closed.
src/frame.h (FRAME_FOREGROUND_PIXEL, FRAME_BACKGROUND_PIXEL): New,
unconditional definitions.
(struct device): New declaration (at the moment, it is defined as
empty in termhooks.h).
(struct frame): Added display, background_pixel, foreground_pixel member.
src/keyboard.c (read_avail_input): Use tty_display_info instead of tty_output.
src/lisp.h: Declare struct display. Update prototypes.
src/sysdep.c: Update prototypes.
(discard_tty_input, init_all_sys_modes, init_sys_modes, reset_all_sys_modes)
(reset_sys_modes, hft_init, hft_reset): Use tty_display_info instead
of tty_output.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-29
2004-01-01 17:55:53 +00:00
|
|
|
#define CURTTY() FRAME_TTY (SELECTED_FRAME())
|
Add a level of indirection to terminal characteristics.
* src/termchar.h (struct terminal): New struct.
(must_write_spaces, min_padding_speed, line_ins_del_ok)
(char_ins_del_ok, scroll_region_ok, scroll_region_cost)
(memory_below_frame, fast_clear_end_of_line): Moved to struct
terminal.
(current_terminal): New variable.
(CURRENT_TERMINAL, TERMINAL_*): New accessor macros.
(min_padding_speed, dont_calculate_costs): Commented out (unused).
* src/term.c (_current_terminal): New variable. Will be removed when
true multi-tty support is implemented.
* src/termopts.h (no_redraw_on_reenter): Moved here.
* src/term.c (set_terminal_window, ins_del_lines, calculate_costs)
(term_init): Use the accessor macros for terminal characteristics.
* src/dispnew.c (line_hash_code, line_draw_cost)
(direct_output_for_insert, update_frame_1, scrolling)
(update_frame_line): Ditto.
* src/macterm.c (mac_initialize): Ditto.
* src/msdos.c (internal_terminal_init): Ditto.
* src/scroll.c (calculate_scrolling, calculate_direct_scrolling)
(scrolling_1, scroll_cost): Ditto.
* src/sysdep.c (hft_init): Ditto.
* src/w32term.c (w32_initialize): Ditto.
* src/xdisp.c (try_window_id): Ditto.
* src/xterm.c (x_initialize): Ditto.
* etc/TODO: Add pointer to my tla archive.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-1
2003-12-24 18:55:24 +00:00
|
|
|
|