Mercurial > emacs
diff src/cm.c @ 82989:f3845715a5f6
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
| author | Karoly Lorentey <lorentey@elte.hu> |
|---|---|
| date | Thu, 01 Jan 2004 17:55:53 +0000 |
| parents | 56e4b7166995 |
| children | 039bd6989d29 |
line wrap: on
line diff
--- a/src/cm.c Wed Dec 31 05:09:29 2003 +0000 +++ b/src/cm.c Thu Jan 01 17:55:53 2004 +0000 @@ -62,7 +62,7 @@ } /* The terminal to use for low-level output. */ -struct tty_output * current_tty; +struct tty_display_info *current_tty; int cmputc (c) @@ -135,7 +135,7 @@ * after we reach the last column; this takes us to a known state. */ void -cmcheckmagic (struct tty_output *tty) +cmcheckmagic (struct tty_display_info *tty) { if (curX (tty) == FrameCols (tty)) { @@ -160,7 +160,7 @@ */ void -cmcostinit (struct tty_output *tty) +cmcostinit (struct tty_display_info *tty) { char *p; @@ -200,7 +200,8 @@ */ static int -calccost (struct tty_output *tty, int srcy, int srcx, int dsty, int dstx, int doit) +calccost (struct tty_display_info *tty, + int srcy, int srcx, int dsty, int dstx, int doit) { register int deltay, deltax, @@ -336,7 +337,7 @@ void cmgoto (tty, row, col) - struct tty_output *tty; + struct tty_display_info *tty; int row, col; { int homecost, @@ -441,7 +442,7 @@ */ void -Wcm_clear (struct tty_output *tty) +Wcm_clear (struct tty_display_info *tty) { bzero (tty->Wcm, sizeof (struct cm)); UP = 0; @@ -456,7 +457,7 @@ */ int -Wcm_init (struct tty_output *tty) +Wcm_init (struct tty_display_info *tty) { #if 0 if (tty->Wcm->cm_abs && !tty->Wcm->cm_ds)
