diff options
| author | Karoly Lorentey | 2004-01-01 17:55:53 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-01-01 17:55:53 +0000 |
| commit | 28d7d09f841801cd052bb4ba0df92016b9245870 (patch) | |
| tree | eed006b0a32c39edb7a37d893bb2b192c63b69a5 /src/cm.c | |
| parent | 819b8f00ed7b8a9a2190efaa02376ed332ecf763 (diff) | |
| download | emacs-28d7d09f841801cd052bb4ba0df92016b9245870.tar.gz emacs-28d7d09f841801cd052bb4ba0df92016b9245870.zip | |
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
Diffstat (limited to 'src/cm.c')
| -rw-r--r-- | src/cm.c | 15 |
1 files changed, 8 insertions, 7 deletions
| @@ -62,7 +62,7 @@ evalcost (c) | |||
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | /* The terminal to use for low-level output. */ | 64 | /* The terminal to use for low-level output. */ |
| 65 | struct tty_output * current_tty; | 65 | struct tty_display_info *current_tty; |
| 66 | 66 | ||
| 67 | int | 67 | int |
| 68 | cmputc (c) | 68 | cmputc (c) |
| @@ -135,7 +135,7 @@ addcol (tty, n) { | |||
| 135 | * after we reach the last column; this takes us to a known state. | 135 | * after we reach the last column; this takes us to a known state. |
| 136 | */ | 136 | */ |
| 137 | void | 137 | void |
| 138 | cmcheckmagic (struct tty_output *tty) | 138 | cmcheckmagic (struct tty_display_info *tty) |
| 139 | { | 139 | { |
| 140 | if (curX (tty) == FrameCols (tty)) | 140 | if (curX (tty) == FrameCols (tty)) |
| 141 | { | 141 | { |
| @@ -160,7 +160,7 @@ cmcheckmagic (struct tty_output *tty) | |||
| 160 | */ | 160 | */ |
| 161 | 161 | ||
| 162 | void | 162 | void |
| 163 | cmcostinit (struct tty_output *tty) | 163 | cmcostinit (struct tty_display_info *tty) |
| 164 | { | 164 | { |
| 165 | char *p; | 165 | char *p; |
| 166 | 166 | ||
| @@ -200,7 +200,8 @@ cmcostinit (struct tty_output *tty) | |||
| 200 | */ | 200 | */ |
| 201 | 201 | ||
| 202 | static int | 202 | static int |
| 203 | calccost (struct tty_output *tty, int srcy, int srcx, int dsty, int dstx, int doit) | 203 | calccost (struct tty_display_info *tty, |
| 204 | int srcy, int srcx, int dsty, int dstx, int doit) | ||
| 204 | { | 205 | { |
| 205 | register int deltay, | 206 | register int deltay, |
| 206 | deltax, | 207 | deltax, |
| @@ -336,7 +337,7 @@ losecursor () | |||
| 336 | 337 | ||
| 337 | void | 338 | void |
| 338 | cmgoto (tty, row, col) | 339 | cmgoto (tty, row, col) |
| 339 | struct tty_output *tty; | 340 | struct tty_display_info *tty; |
| 340 | int row, col; | 341 | int row, col; |
| 341 | { | 342 | { |
| 342 | int homecost, | 343 | int homecost, |
| @@ -441,7 +442,7 @@ cmgoto (tty, row, col) | |||
| 441 | */ | 442 | */ |
| 442 | 443 | ||
| 443 | void | 444 | void |
| 444 | Wcm_clear (struct tty_output *tty) | 445 | Wcm_clear (struct tty_display_info *tty) |
| 445 | { | 446 | { |
| 446 | bzero (tty->Wcm, sizeof (struct cm)); | 447 | bzero (tty->Wcm, sizeof (struct cm)); |
| 447 | UP = 0; | 448 | UP = 0; |
| @@ -456,7 +457,7 @@ Wcm_clear (struct tty_output *tty) | |||
| 456 | */ | 457 | */ |
| 457 | 458 | ||
| 458 | int | 459 | int |
| 459 | Wcm_init (struct tty_output *tty) | 460 | Wcm_init (struct tty_display_info *tty) |
| 460 | { | 461 | { |
| 461 | #if 0 | 462 | #if 0 |
| 462 | if (tty->Wcm->cm_abs && !tty->Wcm->cm_ds) | 463 | if (tty->Wcm->cm_abs && !tty->Wcm->cm_ds) |