[vte] parser: Update sequences with additions from recent xterm
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] parser: Update sequences with additions from recent xterm
- Date: Thu, 22 Oct 2020 18:35:03 +0000 (UTC)
commit 7a484cdec223b4241d7497e08be3cda99480e25a
Author: Christian Persch <chpe src gnome org>
Date: Thu Oct 22 20:34:52 2020 +0200
parser: Update sequences with additions from recent xterm
src/parser-seq.py | 25 ++++++--
src/vteseq.cc | 187 ++++++++++++++++++++++++++++++++++++++----------------
2 files changed, 152 insertions(+), 60 deletions(-)
---
diff --git a/src/parser-seq.py b/src/parser-seq.py
index 7ee79c8d..2ed8314b 100755
--- a/src/parser-seq.py
+++ b/src/parser-seq.py
@@ -531,12 +531,18 @@ sequences = [
comment='delete character'),
seq_CSI('PPA', 'P', intermediates=(Intermediate.SPACE,), flags=Flags.NOP,
comment='page position absolute'),
+ seq_CSI('XTERM_PUSHCOLORS', 'P', intermediates=(Intermediate.HASH,), flags=Flags.NOP,
+ comment='xterm push color palette stack'),
seq_CSI('SEE', 'Q', flags=Flags.NOP,
comment='select editing extent'),
seq_CSI('PPR', 'Q', intermediates=(Intermediate.SPACE,), flags=Flags.NOP,
comment='page position relative'),
+ seq_CSI('XTERM_POPCOLORS', 'Q', intermediates=(Intermediate.HASH,), flags=Flags.NOP,
+ comment='xterm pop color palette stack'),
seq_CSI('PPB', 'R', intermediates=(Intermediate.SPACE,), flags=Flags.NOP,
comment='page position backward'),
+ seq_CSI('XTERM_REPORTCOLORS', 'R', intermediates=(Intermediate.HASH,), flags=Flags.NOP,
+ comment='xterm Report color palette stack'),
seq_CSI('SU', 'S',
comment='scroll up'),
seq_CSI('SPD', 'S', intermediates=(Intermediate.SPACE,),
@@ -661,8 +667,8 @@ sequences = [
comment='select graphics rendition'),
seq_CSI('DECSGR', 'm', pintro=(ParameterIntro.WHAT,), flags=Flags.NOP,
comment='DEC select graphics rendition'),
- seq_CSI('XTERM_SRV', 'm', pintro=(ParameterIntro.GT,), flags=Flags.NOP,
- comment='xterm set resource value'),
+ seq_CSI('XTERM_MODKEYS', 'm', pintro=(ParameterIntro.GT,), flags=Flags.NOP,
+ comment='xterm set key modifier options'),
seq_CSI('DSR_ECMA', 'n',
comment='device status report ecma'),
seq_CSI('XTERM_RRV', 'n', pintro=(ParameterIntro.GT,), flags=Flags.NOP,
@@ -679,6 +685,10 @@ sequences = [
comment='soft terminal reset'),
seq_CSI('DECSCL', 'p', intermediates=(Intermediate.DQUOTE,),
comment='select conformance level'),
+ # This will remain a NOP even if VTE ever implements XTERM_PUSHSGR, see
+ # https://gitlab.gnome.org/GNOME/vte/-/issues/23#note_513969
+ seq_CSI('XTERM_PUSHSGR', 'p', intermediates=(Intermediate.HASH,), flags=Flags.NOP,
+ comment='xterm push SGR stack'),
seq_CSI('DECRQM_ECMA', 'p', intermediates=(Intermediate.CASH,),
comment='request mode ecma'),
seq_CSI('DECSDPT', 'p', intermediates=(Intermediate.PCLOSE,), flags=Flags.NOP,
@@ -701,6 +711,9 @@ sequences = [
comment='set cursor style'),
seq_CSI('DECSCA', 'q', intermediates=(Intermediate.DQUOTE,), flags=Flags.NOP,
comment='select character protection attribute'),
+ # See comment above for XTERM_PUSHSGR
+ seq_CSI('XTERM_POPSGR', 'q', intermediates=(Intermediate.HASH,), flags=Flags.NOP,
+ comment='xterm pop SGR stack'),
seq_CSI('DECSDDT', 'q', intermediates=(Intermediate.CASH,), flags=Flags.NOP,
comment='select disconnect delay time'),
seq_CSI('DECSR', 'q', intermediates=(Intermediate.MULT,),
@@ -815,7 +828,7 @@ sequences = [
comment='program key action'),
seq_CSI('DECDLDA', 'z', intermediates=(Intermediate.COMMA,), flags=Flags.NOP,
comment='down line load allocation'),
- seq_CSI('XTERM_SGR_STACK_PUSH', '{', intermediates=(Intermediate.HASH,), flags=Flags.NOP,
+ seq_CSI('XTERM_PUSHSGR', '{', intermediates=(Intermediate.HASH,), flags=Flags.NOP,
comment='xterm push SGR stack'),
seq_CSI('DECSERA', '{', intermediates=(Intermediate.CASH,), flags=Flags.NOP,
comment='selective erase rectangular area'),
@@ -825,7 +838,7 @@ sequences = [
comment='select color lookup table'),
seq_CSI('DECSZS', '{', intermediates=(Intermediate.COMMA,), flags=Flags.NOP,
comment='select zero symbol'),
- seq_CSI('XTERM_SGR_REPORT', '|', intermediates=(Intermediate.HASH,), flags=Flags.NOP,
+ seq_CSI('XTERM_REPORTSGR', '|', intermediates=(Intermediate.HASH,), flags=Flags.NOP,
comment='xterm SGR report'),
seq_CSI('DECSCPP', '|', intermediates=(Intermediate.CASH,), flags=Flags.NOP,
comment='select columns per page'),
@@ -837,7 +850,7 @@ sequences = [
comment='assign color'),
seq_CSI('DECKBD', '}', intermediates=(Intermediate.SPACE,), flags=Flags.NOP,
comment='keyboard language selection'),
- seq_CSI('XTERM_SGR_STACK_POP', '}', intermediates=(Intermediate.HASH,), flags=Flags.NOP,
+ seq_CSI('XTERM_POPSGR', '}', intermediates=(Intermediate.HASH,), flags=Flags.NOP,
comment='xterm pop SGR stack'),
seq_CSI('DECSASD', '}', intermediates=(Intermediate.CASH,), flags=Flags.NOP,
comment='select active status display'),
@@ -857,6 +870,8 @@ sequences = [
comment='play sound'),
# DCS sequences
+ seq_DCS('XTERM_GETXRES', 'Q', intermediates=(Intermediate.PLUS,), flags=Flags.NOP,
+ comment='xterm get X resource'),
seq_DCS('RLOGIN_MML', 'm', intermediates=(Intermediate.HASH,), flags=Flags.NOP,
comment='RLogin music macro language'),
seq_DCS('DECREGIS', 'p', flags=Flags.NOP,
diff --git a/src/vteseq.cc b/src/vteseq.cc
index 1639bbe4..8a7a4906 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -3074,6 +3074,7 @@ Terminal::DECFRA(vte::parser::Sequence const& seq)
* either each UTF-8 byte in a subparam of its own, or just split
* the unicode plane off into the leading subparam (plane:remaining 16 bits).
* Or by using the last graphic character for it, like REP.
+ * See also the changes wrt. UTF-8 handling here in XTERM 357.
*/
}
@@ -8483,12 +8484,24 @@ Terminal::XTERM_CHECKSUM_MODE(vte::parser::Sequence const& seq)
* Defaults:
* args[0]: 0, matching the output from VTxxx terminals
*
- * References: XTERM (since 335)
+ * References: XTERM 335
*
* Probably not worth implementing.
*/
}
+void
+Terminal::XTERM_GETXRES(vte::parser::Sequence const& seq)
+{
+ /*
+ * XTERM_GETXRES - xterm get X resource
+ *
+ * References: XTERM 350
+ *
+ * Won't implement.
+ */
+}
+
void
Terminal::XTERM_IHMT(vte::parser::Sequence const& seq)
{
@@ -8520,64 +8533,122 @@ Terminal::XTERM_MUHP(vte::parser::Sequence const& seq)
}
void
-Terminal::XTERM_RPM(vte::parser::Sequence const& seq)
+Terminal::XTERM_MODKEYS(vte::parser::Sequence const& seq)
{
/*
- * XTERM_RPM - xterm restore DEC private mode
- *
- * Defaults: none
+ * XTERM_MODKEYS - xterm set key modifier options
*
- * References: XTERM
+ * Probably not worth implementing.
*/
+}
- save_mode_private(seq, false);
+void
+Terminal::XTERM_POPCOLORS(vte::parser::Sequence const& seq)
+{
+ /*
+ * XTERM_POPCOLORS: pop color palette stack
+ * Restore color palette attributes previously pushed to the stack
+ * with XTERM_PUSHCOLORS. If there is nothing on the
+ * stack, does nothing.
+ *
+ * Arguments: none
+ *
+ * References: XTERM 357
+ *
+ * See issue vte#23.
+ */
}
void
-Terminal::XTERM_RQTCAP(vte::parser::Sequence const& seq)
+Terminal::XTERM_POPSGR(vte::parser::Sequence const& seq)
{
/*
- * XTERM_TQTCAP - xterm request termcap/terminfo
+ * XTERM_POPSGR: pop SGR stack
+ * Restore SGR attributes previously pushed to the stack
+ * with XTERM_PUSHSGR. If there is nothing on the
+ * stack, does nothing.
*
- * Probably not worth implementing.
+ * Arguments: none
+ *
+ * References: XTERM 334
+ *
+ * Note: The {PUSH,POP,REPORT}SGR protocol is poorly thought-out, and has
+ * no real use case. See the discussion at issue vte#23.
+ * Probably won't implement.
*/
}
void
-Terminal::XTERM_RRV(vte::parser::Sequence const& seq)
+Terminal::XTERM_PUSHCOLORS(vte::parser::Sequence const& seq)
{
/*
- * XTERM_RRV - xterm-reset-resource-value
+ * XTERM_PUSHSGR: push color palette stack
+ * Push current color palette to the stack.
+ * If the stack is full, drops the bottommost item before
+ * pushing on the stack.
*
- * Probably not worth implementing.
+ * If there are any arguments, they are interpreted as in SGR
+ * to denote which attributes to save; if there are no arguments,
+ * all attributes are saved.
+ *
+ * Arguments:
+ * args[0:]: the attributes
+ * 0 = save all attributes
+ *
+ * Defaults:
+ * args[0]: 0 (save all attributes)
+ *
+ * References: XTERM 357
+ *
+ * See issue vte#23.
*/
}
void
-Terminal::XTERM_RTM(vte::parser::Sequence const& seq)
+Terminal::XTERM_PUSHSGR(vte::parser::Sequence const& seq)
{
/*
- * XTERM_RTM - xterm-reset-title-mode
+ * XTERM_PUSHSGR: push SGR stack
+ * Push current SGR attributes to the stack.
+ * If the stack is full, drops the bottommost item before
+ * pushing on the stack.
*
- * Probably not worth implementing.
+ * If there are any arguments, they are interpreted as in SGR
+ * to denote which attributes to save; if there are no arguments,
+ * all attributes are saved.
+ *
+ * Arguments:
+ * args[0:]: the attributes
+ * 0 = save all attributes
+ *
+ * Defaults:
+ * args[0]: 0 (save all attributes)
+ *
+ * References: XTERM 334
+ *
+ * Note: The {PUSH,POP,REPORT}SGR protocol is poorly thought-out, and has
+ * no real use case. See the discussion at issue vte#23.
+ * Probably won't implement.
*/
}
void
-Terminal::XTERM_SGFX(vte::parser::Sequence const& seq)
+Terminal::XTERM_REPORTCOLORS(vte::parser::Sequence const& seq)
{
/*
- * XTERM_SGFX - xterm-sixel-graphics
+ * XTERM_REPORTCOLORS: report color palette on stack
*
- * Probably not worth implementing.
+ * References: XTERM 357
+ *
+ * See issue vte#23.
*/
}
void
-Terminal::XTERM_SGR_REPORT(vte::parser::Sequence const& seq)
+Terminal::XTERM_REPORTSGR(vte::parser::Sequence const& seq)
{
/*
- * XTERM_SGR_REPORT: report SGR attributes in rectangular area
+ * XTERM_REPORTSGR: report SGR attributes in rectangular area
* Report common character attributes in the specified rectangle.
*
* Arguments;
@@ -8601,49 +8672,65 @@ Terminal::XTERM_SGR_REPORT(vte::parser::Sequence const& seq)
* positions.
*
* References: XTERM 334
+ *
+ * Note: The {PUSH,POP,REPORT}SGR protocol is poorly thought-out, and has
+ * no real use case. See the discussion at issue vte#23.
+ * Probably won't implement.
*/
- /* TODO: Implement this */
}
void
-Terminal::XTERM_SGR_STACK_POP(vte::parser::Sequence const& seq)
+Terminal::XTERM_RPM(vte::parser::Sequence const& seq)
{
/*
- * XTERM_SGR_STACK_POP: pop SGR stack
- * Restore SGR attributes previously pushed to the stack
- * with XTERM_SGR_STACK_PUSH. If there is nothing on the
- * stack, does nothing.
+ * XTERM_RPM - xterm restore DEC private mode
*
- * Arguments: none
+ * Defaults: none
*
- * References: XTERM 334
+ * References: XTERM
*/
- /* TODO: Implement this: https://gitlab.gnome.org/GNOME/vte/issues/23 */
+
+ save_mode_private(seq, false);
}
void
-Terminal::XTERM_SGR_STACK_PUSH(vte::parser::Sequence const& seq)
+Terminal::XTERM_RQTCAP(vte::parser::Sequence const& seq)
{
/*
- * XTERM_SGR_STACK_PUSH: push SGR stack
- * Push current SGR attributes to the stack.
- * If the stack is full, drops the bottommost item before
- * pushing on the stack.
+ * XTERM_TQTCAP - xterm request termcap/terminfo
*
- * If there are any arguments, they are interpreted as in SGR
- * to denote which attributes to save; if there are no arguments,
- * all attributes are saved.
+ * Probably not worth implementing.
+ */
+}
+
+void
+Terminal::XTERM_RRV(vte::parser::Sequence const& seq)
+{
+ /*
+ * XTERM_RRV - xterm-reset-resource-value
*
- * Arguments:
- * args[0:]: the attributes
- * 0 = save all attributes
+ * Probably not worth implementing.
+ */
+}
+
+void
+Terminal::XTERM_RTM(vte::parser::Sequence const& seq)
+{
+ /*
+ * XTERM_RTM - xterm-reset-title-mode
*
- * Defaults:
- * args[0]: 0 (save all attributes)
+ * Probably not worth implementing.
+ */
+}
+
+void
+Terminal::XTERM_SGFX(vte::parser::Sequence const& seq)
+{
+ /*
+ * XTERM_SGFX - xterm-sixel-graphics
*
- * References: XTERM 334
+ * Probably not worth implementing.
*/
- /* TODO: Implement this: https://gitlab.gnome.org/GNOME/vte/issues/23 */
}
void
@@ -8674,16 +8761,6 @@ Terminal::XTERM_PTRMODE(vte::parser::Sequence const& seq)
*/
}
-void
-Terminal::XTERM_SRV(vte::parser::Sequence const& seq)
-{
- /*
- * XTERM_SRV - xterm-set-resource-value
- *
- * Probably not worth implementing.
- */
-}
-
void
Terminal::XTERM_STM(vte::parser::Sequence const& seq)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]