mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-26 11:47:31 +00:00
Implement ECMA-48 "REP", some Linuxen have started emitting them recently.
Approved by: ed
This commit is contained in:
parent
60874184a0
commit
3eb27bf0a7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=339529
@ -158,6 +158,7 @@ for (p in l_prefix_name) {
|
||||
|
||||
if (l_prefix_name[p] != "teken_state_init") {
|
||||
print "";
|
||||
print "\tt->t_last = 0;";
|
||||
print "\tteken_state_switch(t, teken_state_init);";
|
||||
}
|
||||
print "}";
|
||||
|
@ -114,3 +114,6 @@ C25VTSW Cons25 switch virtual terminal ^[ [ z r
|
||||
|
||||
# VT52 compatibility
|
||||
#DECID VT52 DECID ^[ Z
|
||||
|
||||
# ECMA-48
|
||||
REP Repeat last graphic char ^[ [ b n
|
||||
|
@ -157,6 +157,7 @@ struct __teken {
|
||||
|
||||
unsigned int t_utf8_left;
|
||||
teken_char_t t_utf8_partial;
|
||||
teken_char_t t_last;
|
||||
|
||||
unsigned int t_curscs;
|
||||
teken_scs_t *t_saved_curscs;
|
||||
|
@ -796,10 +796,11 @@ teken_subr_primary_device_attributes(const teken_t *t, unsigned int request)
|
||||
}
|
||||
|
||||
static void
|
||||
teken_subr_do_putchar(const teken_t *t, const teken_pos_t *tp, teken_char_t c,
|
||||
teken_subr_do_putchar(teken_t *t, const teken_pos_t *tp, teken_char_t c,
|
||||
int width)
|
||||
{
|
||||
|
||||
t->t_last = c;
|
||||
if (t->t_stateflags & TS_INSERT &&
|
||||
tp->tp_col < t->t_winsize.tp_col - width) {
|
||||
teken_rect_t ctr;
|
||||
@ -1332,3 +1333,12 @@ teken_subr_vertical_position_absolute(teken_t *t, unsigned int row)
|
||||
t->t_stateflags &= ~TS_WRAPPED;
|
||||
teken_funcs_cursor(t);
|
||||
}
|
||||
|
||||
static void
|
||||
teken_subr_repeat_last_graphic_char(teken_t *t, unsigned int rpts)
|
||||
{
|
||||
|
||||
for (; t->t_last != 0 && rpts > 0; rpts--)
|
||||
teken_subr_regular_character(t, t->t_last);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user