[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/term.c
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] Changes to emacs/src/term.c |
Date: |
Tue, 04 Feb 2003 09:03:45 -0500 |
Index: emacs/src/term.c
diff -c emacs/src/term.c:1.143 emacs/src/term.c:1.144
*** emacs/src/term.c:1.143 Fri Jul 19 10:37:18 2002
--- emacs/src/term.c Tue Feb 4 09:03:13 2003
***************
*** 76,82 ****
tputs (a, (int) (FRAME_HEIGHT (XFRAME (selected_frame)) \
- curY), cmputc); \
} while (0)
!
#define OUTPUT1_IF(a) do { if (a) tputs (a, 1, cmputc); } while (0)
/* Function to use to ring the bell. */
--- 76,82 ----
tputs (a, (int) (FRAME_HEIGHT (XFRAME (selected_frame)) \
- curY), cmputc); \
} while (0)
!
#define OUTPUT1_IF(a) do { if (a) tputs (a, 1, cmputc); } while (0)
/* Function to use to ring the bell. */
***************
*** 203,209 ****
/* Arrange for all scroll bars on FRAME to be removed at the next call
to `*judge_scroll_bars_hook'. A scroll bar may be spared if
! `*redeem_scroll_bar_hook' is applied to its window before the judgment.
This should be applied to each frame each time its window tree is
redisplayed, even if it is not displaying scroll bars at the moment;
--- 203,209 ----
/* Arrange for all scroll bars on FRAME to be removed at the next call
to `*judge_scroll_bars_hook'. A scroll bar may be spared if
! `*redeem_scroll_bar_hook' is applied to its window before the judgment.
This should be applied to each frame each time its window tree is
redisplayed, even if it is not displaying scroll bars at the moment;
***************
*** 222,228 ****
void (*redeem_scroll_bar_hook) P_ ((struct window *window));
/* Remove all scroll bars on FRAME that haven't been saved since the
! last call to `*condemn_scroll_bars_hook'.
This should be applied to each frame after each time its window
tree is redisplayed, even if it is not displaying scroll bars at the
--- 222,228 ----
void (*redeem_scroll_bar_hook) P_ ((struct window *window));
/* Remove all scroll bars on FRAME that haven't been saved since the
! last call to `*condemn_scroll_bars_hook'.
This should be applied to each frame after each time its window
tree is redisplayed, even if it is not displaying scroll bars at the
***************
*** 431,437 ****
We don't specbind it, because that would carefully
restore the bad value if there's an error
and make the loop of errors happen anyway. */
!
function = Vring_bell_function;
Vring_bell_function = Qnil;
--- 431,437 ----
We don't specbind it, because that would carefully
restore the bad value if there's an error
and make the loop of errors happen anyway. */
!
function = Vring_bell_function;
Vring_bell_function = Qnil;
***************
*** 499,505 ****
}
else
update_end_hook (f);
!
updating_frame = NULL;
}
--- 499,505 ----
}
else
update_end_hook (f);
!
updating_frame = NULL;
}
***************
*** 523,529 ****
{
char *buf;
struct frame *sf = XFRAME (selected_frame);
!
if (TS_set_scroll_region)
buf = tparam (TS_set_scroll_region, 0, 0, start, stop - 1);
else if (TS_set_scroll_region_1)
--- 523,529 ----
{
char *buf;
struct frame *sf = XFRAME (selected_frame);
!
if (TS_set_scroll_region)
buf = tparam (TS_set_scroll_region, 0, 0, start, stop - 1);
else if (TS_set_scroll_region_1)
***************
*** 533,539 ****
FRAME_HEIGHT (sf));
else
buf = tparam (TS_set_window, 0, 0, start, 0, stop, FRAME_WIDTH (sf));
!
OUTPUT (buf);
xfree (buf);
losecursor ();
--- 533,539 ----
FRAME_HEIGHT (sf));
else
buf = tparam (TS_set_window, 0, 0, start, 0, stop, FRAME_WIDTH (sf));
!
OUTPUT (buf);
xfree (buf);
losecursor ();
***************
*** 644,650 ****
int vpos, hpos;
{
struct frame *f = updating_frame ? updating_frame : XFRAME (selected_frame);
!
if (! FRAME_TERMCAP_P (f) && cursor_to_hook)
{
(*cursor_to_hook) (vpos, hpos);
--- 644,650 ----
int vpos, hpos;
{
struct frame *f = updating_frame ? updating_frame : XFRAME (selected_frame);
!
if (! FRAME_TERMCAP_P (f) && cursor_to_hook)
{
(*cursor_to_hook) (vpos, hpos);
***************
*** 720,726 ****
clear_frame ()
{
struct frame *sf = XFRAME (selected_frame);
!
if (clear_frame_hook
&& ! FRAME_TERMCAP_P ((updating_frame ? updating_frame : sf)))
{
--- 720,726 ----
clear_frame ()
{
struct frame *sf = XFRAME (selected_frame);
!
if (clear_frame_hook
&& ! FRAME_TERMCAP_P ((updating_frame ? updating_frame : sf)))
{
***************
*** 872,878 ****
coding->src_multibyte = STRING_MULTIBYTE (tbase[g]);
}
}
!
result = encode_coding (coding, buf, dst, len, dst_end - dst);
len -= coding->consumed;
dst += coding->produced;
--- 872,878 ----
coding->src_multibyte = STRING_MULTIBYTE (tbase[g]);
}
}
!
result = encode_coding (coding, buf, dst, len, dst_end - dst);
len -= coding->consumed;
dst += coding->produced;
***************
*** 895,901 ****
}
src++;
}
!
*consumed = src - src_start;
return (dst - dst_start);
}
--- 895,901 ----
}
src++;
}
!
*consumed = src - src_start;
return (dst - dst_start);
}
***************
*** 933,949 ****
return;
cmplus (len);
!
/* The mode bit CODING_MODE_LAST_BLOCK should be set to 1 only at
the tail. */
terminal_coding.mode &= ~CODING_MODE_LAST_BLOCK;
!
while (len > 0)
{
/* Identify a run of glyphs with the same face. */
int face_id = string->face_id;
int n;
!
for (n = 1; n < len; ++n)
if (string[n].face_id != face_id)
break;
--- 933,949 ----
return;
cmplus (len);
!
/* The mode bit CODING_MODE_LAST_BLOCK should be set to 1 only at
the tail. */
terminal_coding.mode &= ~CODING_MODE_LAST_BLOCK;
!
while (len > 0)
{
/* Identify a run of glyphs with the same face. */
int face_id = string->face_id;
int n;
!
for (n = 1; n < len; ++n)
if (string[n].face_id != face_id)
break;
***************
*** 977,983 ****
turn_off_face (f, face_id);
turn_off_highlight ();
}
!
/* We may have to output some codes to terminate the writing. */
if (CODING_REQUIRE_FLUSHING (&terminal_coding))
{
--- 977,983 ----
turn_off_face (f, face_id);
turn_off_highlight ();
}
!
/* We may have to output some codes to terminate the writing. */
if (CODING_REQUIRE_FLUSHING (&terminal_coding))
{
***************
*** 994,1005 ****
termscript);
}
}
!
cmcheckmagic ();
}
/* If start is zero, insert blanks instead of a string at start */
!
void
insert_glyphs (start, len)
register struct glyph *start;
--- 994,1005 ----
termscript);
}
}
!
cmcheckmagic ();
}
/* If start is zero, insert blanks instead of a string at start */
!
void
insert_glyphs (start, len)
register struct glyph *start;
***************
*** 1087,1093 ****
turn_off_highlight ();
}
}
!
cmcheckmagic ();
}
--- 1087,1093 ----
turn_off_highlight ();
}
}
!
cmcheckmagic ();
}
***************
*** 1148,1154 ****
}
sf = XFRAME (selected_frame);
!
/* If the lines below the insertion are being pushed
into the end of the window, this is the same as clearing;
and we know the lines are already clear, since the matching
--- 1148,1154 ----
}
sf = XFRAME (selected_frame);
!
/* If the lines below the insertion are being pushed
into the end of the window, this is the same as clearing;
and we know the lines are already clear, since the matching
***************
*** 1462,1468 ****
static Lisp_Object term_get_fkeys_1 ();
/* Find the escape codes sent by the function keys for Vfunction_key_map.
! This function scans the termcap function key sequence entries, and
adds entries to Vfunction_key_map for each function key it finds. */
void
--- 1462,1468 ----
static Lisp_Object term_get_fkeys_1 ();
/* Find the escape codes sent by the function keys for Vfunction_key_map.
! This function scans the termcap function key sequence entries, and
adds entries to Vfunction_key_map for each function key it finds. */
void
***************
*** 1567,1573 ****
Fmake_vector (make_number (1), \
intern (sym))); \
}
!
/* if there's no key_next keycap, map key_npage to `next' keysym */
CONDITIONAL_REASSIGN ("%5", "kN", "next");
/* if there's no key_prev keycap, map key_ppage to `previous' keysym */
--- 1567,1573 ----
Fmake_vector (make_number (1), \
intern (sym))); \
}
!
/* if there's no key_next keycap, map key_npage to `next' keysym */
CONDITIONAL_REASSIGN ("%5", "kN", "next");
/* if there's no key_prev keycap, map key_ppage to `previous' keysym */
***************
*** 1607,1613 ****
for which to produce glyphs; IT->face_id contains the character's
face. Padding glyphs are appended if IT->c has a IT->pixel_width >
1. */
!
static void
append_glyph (it)
struct it *it;
--- 1607,1613 ----
for which to produce glyphs; IT->face_id contains the character's
face. Padding glyphs are appended if IT->c has a IT->pixel_width >
1. */
!
static void
append_glyph (it)
struct it *it;
***************
*** 1620,1627 ****
+ it->glyph_row->used[it->area]);
end = it->glyph_row->glyphs[1 + it->area];
! for (i = 0;
! i < it->pixel_width && glyph < end;
++i)
{
glyph->type = CHAR_GLYPH;
--- 1620,1627 ----
+ it->glyph_row->used[it->area]);
end = it->glyph_row->glyphs[1 + it->area];
! for (i = 0;
! i < it->pixel_width && glyph < end;
++i)
{
glyph->type = CHAR_GLYPH;
***************
*** 1631,1637 ****
glyph->padding_p = i > 0;
glyph->charpos = CHARPOS (it->position);
glyph->object = it->object;
!
++it->glyph_row->used[it->area];
++glyph;
}
--- 1631,1637 ----
glyph->padding_p = i > 0;
glyph->charpos = CHARPOS (it->position);
glyph->object = it->object;
!
++it->glyph_row->used[it->area];
++glyph;
}
***************
*** 1656,1662 ****
Callers usually don't call produce_glyphs directly;
instead they use the macro PRODUCE_GLYPHS. */
! void
produce_glyphs (it)
struct it *it;
{
--- 1656,1662 ----
Callers usually don't call produce_glyphs directly;
instead they use the macro PRODUCE_GLYPHS. */
! void
produce_glyphs (it)
struct it *it;
{
***************
*** 1665,1671 ****
|| it->what == IT_COMPOSITION
|| it->what == IT_IMAGE
|| it->what == IT_STRETCH);
!
/* Nothing but characters are supported on terminal frames. For a
composition sequence, it->c is the first character of the
sequence. */
--- 1665,1671 ----
|| it->what == IT_COMPOSITION
|| it->what == IT_IMAGE
|| it->what == IT_STRETCH);
!
/* Nothing but characters are supported on terminal frames. For a
composition sequence, it->c is the first character of the
sequence. */
***************
*** 1684,1691 ****
{
int absolute_x = (it->current_x
+ it->continuation_lines_width);
! int next_tab_x
! = (((1 + absolute_x + it->tab_width - 1)
/ it->tab_width)
* it->tab_width);
int nspaces;
--- 1684,1691 ----
{
int absolute_x = (it->current_x
+ it->continuation_lines_width);
! int next_tab_x
! = (((1 + absolute_x + it->tab_width - 1)
/ it->tab_width)
* it->tab_width);
int nspaces;
***************
*** 1696,1712 ****
continued line. So, we will get the right number of spaces
here. */
nspaces = next_tab_x - absolute_x;
!
if (it->glyph_row)
{
int n = nspaces;
!
it->c = ' ';
it->pixel_width = it->len = 1;
!
while (n--)
append_glyph (it);
!
it->c = '\t';
}
--- 1696,1712 ----
continued line. So, we will get the right number of spaces
here. */
nspaces = next_tab_x - absolute_x;
!
if (it->glyph_row)
{
int n = nspaces;
!
it->c = ' ';
it->pixel_width = it->len = 1;
!
while (n--)
append_glyph (it);
!
it->c = '\t';
}
***************
*** 1734,1745 ****
it->pixel_width = CHARSET_WIDTH (charset);
it->nglyphs = it->pixel_width;
!
if (it->glyph_row)
append_glyph (it);
}
! /* Advance current_x by the pixel width as a convenience for
the caller. */
if (it->area == TEXT_AREA)
it->current_x += it->pixel_width;
--- 1734,1745 ----
it->pixel_width = CHARSET_WIDTH (charset);
it->nglyphs = it->pixel_width;
!
if (it->glyph_row)
append_glyph (it);
}
! /* Advance current_x by the pixel width as a convenience for
the caller. */
if (it->area == TEXT_AREA)
it->current_x += it->pixel_width;
***************
*** 1760,1766 ****
enum display_element_type what;
{
struct it temp_it;
!
temp_it = *it;
temp_it.dp = NULL;
temp_it.what = IT_CHARACTER;
--- 1760,1766 ----
enum display_element_type what;
{
struct it temp_it;
!
temp_it = *it;
temp_it.dp = NULL;
temp_it.what = IT_CHARACTER;
***************
*** 1780,1786 ****
}
else
temp_it.c = '\\';
!
produce_glyphs (&temp_it);
it->pixel_width = temp_it.pixel_width;
it->nglyphs = temp_it.pixel_width;
--- 1780,1786 ----
}
else
temp_it.c = '\\';
!
produce_glyphs (&temp_it);
it->pixel_width = temp_it.pixel_width;
it->nglyphs = temp_it.pixel_width;
***************
*** 1797,1803 ****
}
else
temp_it.c = '$';
!
produce_glyphs (&temp_it);
it->pixel_width = temp_it.pixel_width;
it->nglyphs = temp_it.pixel_width;
--- 1797,1803 ----
}
else
temp_it.c = '$';
!
produce_glyphs (&temp_it);
it->pixel_width = temp_it.pixel_width;
it->nglyphs = temp_it.pixel_width;
***************
*** 1918,1924 ****
if (TN_max_colors > 0)
{
char *p;
!
if (fg >= 0 && TS_set_foreground)
{
p = tparam (TS_set_foreground, NULL, 0, (int) fg);
--- 1918,1924 ----
if (TN_max_colors > 0)
{
char *p;
!
if (fg >= 0 && TS_set_foreground)
{
p = tparam (TS_set_foreground, NULL, 0, (int) fg);
***************
*** 1934,1940 ****
}
}
}
!
/* Turn off appearances of face FACE_ID on tty frame F. */
--- 1934,1940 ----
}
}
}
!
/* Turn off appearances of face FACE_ID on tty frame F. */
***************
*** 1986,1993 ****
&& face->background != FACE_TTY_DEFAULT_BG_COLOR)))
OUTPUT1_IF (TS_orig_pair);
}
!
!
/* Return non-zero if the terminal on frame F supports all of the
capabilities in CAPS simultaneously, with foreground and background
colors FG and BG. */
--- 1986,1993 ----
&& face->background != FACE_TTY_DEFAULT_BG_COLOR)))
OUTPUT1_IF (TS_orig_pair);
}
!
!
/* Return non-zero if the terminal on frame F supports all of the
capabilities in CAPS simultaneously, with foreground and background
colors FG and BG. */
***************
*** 2316,2322 ****
TS_cursor_visible = tgetstr ("vs", address);
TS_cursor_invisible = tgetstr ("vi", address);
TS_set_window = tgetstr ("wi", address);
!
TS_enter_underline_mode = tgetstr ("us", address);
TS_exit_underline_mode = tgetstr ("ue", address);
TS_enter_bold_mode = tgetstr ("md", address);
--- 2316,2322 ----
TS_cursor_visible = tgetstr ("vs", address);
TS_cursor_invisible = tgetstr ("vi", address);
TS_set_window = tgetstr ("wi", address);
!
TS_enter_underline_mode = tgetstr ("us", address);
TS_exit_underline_mode = tgetstr ("ue", address);
TS_enter_bold_mode = tgetstr ("md", address);
***************
*** 2326,2332 ****
TS_enter_alt_charset_mode = tgetstr ("as", address);
TS_exit_alt_charset_mode = tgetstr ("ae", address);
TS_exit_attribute_mode = tgetstr ("me", address);
!
MultiUp = tgetstr ("UP", address);
MultiDown = tgetstr ("DO", address);
MultiLeft = tgetstr ("LE", address);
--- 2326,2332 ----
TS_enter_alt_charset_mode = tgetstr ("as", address);
TS_exit_alt_charset_mode = tgetstr ("ae", address);
TS_exit_attribute_mode = tgetstr ("me", address);
!
MultiUp = tgetstr ("UP", address);
MultiDown = tgetstr ("DO", address);
MultiLeft = tgetstr ("LE", address);
***************
*** 2346,2355 ****
TS_set_foreground = tgetstr ("Sf", address);
TS_set_background = tgetstr ("Sb", address);
}
!
TN_max_colors = tgetnum ("Co");
TN_max_pairs = tgetnum ("pa");
!
TN_no_color_video = tgetnum ("NC");
if (TN_no_color_video == -1)
TN_no_color_video = 0;
--- 2346,2355 ----
TS_set_foreground = tgetstr ("Sf", address);
TS_set_background = tgetstr ("Sb", address);
}
!
TN_max_colors = tgetnum ("Co");
TN_max_pairs = tgetnum ("pa");
!
TN_no_color_video = tgetnum ("NC");
if (TN_no_color_video == -1)
TN_no_color_video = 0;
***************
*** 2387,2393 ****
SET_FRAME_WIDTH (sf, FRAME_WIDTH (sf));
if (FRAME_HEIGHT (sf) <= 0)
FRAME_HEIGHT (sf) = tgetnum ("li");
!
if (FRAME_HEIGHT (sf) < 3 || FRAME_WIDTH (sf) < 3)
fatal ("Screen size %dx%d is too small",
FRAME_HEIGHT (sf), FRAME_WIDTH (sf));
--- 2387,2393 ----
SET_FRAME_WIDTH (sf, FRAME_WIDTH (sf));
if (FRAME_HEIGHT (sf) <= 0)
FRAME_HEIGHT (sf) = tgetnum ("li");
!
if (FRAME_HEIGHT (sf) < 3 || FRAME_WIDTH (sf) < 3)
fatal ("Screen size %dx%d is too small",
FRAME_HEIGHT (sf), FRAME_WIDTH (sf));
***************
*** 2414,2420 ****
if (TabWidth < 0)
TabWidth = 8;
!
/* Turned off since /etc/termcap seems to have :ta= for most terminals
and newer termcap doc does not seem to say there is a default.
if (!Wcm.cm_tab)
--- 2414,2420 ----
if (TabWidth < 0)
TabWidth = 8;
!
/* Turned off since /etc/termcap seems to have :ta= for most terminals
and newer termcap doc does not seem to say there is a default.
if (!Wcm.cm_tab)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/src/term.c,
Juanma Barranquero <=