[vte] parser: Recognise new xterm sequence



commit db2127025b742da895a416d7053b3e09589b2fa4
Author: Christian Persch <chpe src gnome org>
Date:   Thu Sep 27 20:15:24 2018 +0200

    parser: Recognise new xterm sequence
    
    xterm 335 adds XTERM_CHECKSUM_MODE sequence to set
    how DECRQCRA calculates the area checksum. Make our
    parser recognise it, but we won't implement it unless
    esctest starts requiring it.
    
    https://gitlab.gnome.org/GNOME/vte/issues/24

 src/parser-cmd.hh |  1 +
 src/parser-csi.hh |  1 +
 src/vteseq.cc     | 24 ++++++++++++++++++++++++
 3 files changed, 26 insertions(+)
---
diff --git a/src/parser-cmd.hh b/src/parser-cmd.hh
index 96471bd6..16d6458c 100644
--- a/src/parser-cmd.hh
+++ b/src/parser-cmd.hh
@@ -315,6 +315,7 @@ _VTE_NOP(WYDHL_TH) /* single width double height line: top half */
 _VTE_NOP(WYLSFNT) /* load soft font */
 _VTE_NOP(WYSCRATE) /* set smooth scroll rate */
 _VTE_NOP(XDGSYNC) /* synchronous update */
+_VTE_NOP(XTERM_CHECKSUM_MODE) /* xterm DECRQCRA checksum mode */
 _VTE_NOP(XTERM_IHMT) /* xterm initiate highlight mouse tracking */
 _VTE_NOP(XTERM_MLHP) /* xterm memory lock hp bugfix */
 _VTE_NOP(XTERM_MUHP) /* xterm memory unlock hp bugfix */
diff --git a/src/parser-csi.hh b/src/parser-csi.hh
index f88cd2ce..4a4a1dd9 100644
--- a/src/parser-csi.hh
+++ b/src/parser-csi.hh
@@ -182,6 +182,7 @@ _VTE_NOQ(DECSACE,                CSI,    'x',  NONE,  1, MULT     ) /* select-at
 _VTE_NOQ(DECRQPKFM,              CSI,    'x',  NONE,  1, PLUS     ) /* request-program-key-free-memory */
 _VTE_NOQ(DECSPMA,                CSI,    'x',  NONE,  1, COMMA    ) /* session page memory allocation */
 _VTE_NOQ(DECTST,                 CSI,    'y',  NONE,  0, NONE     ) /* invoke-confidence-test */
+_VTE_NOQ(XTERM_CHECKSUM_MODE,    CSI,    'y',  NONE,  1, HASH     ) /* xterm DECRQCRA checksum mode */
 _VTE_SEQ(DECRQCRA,               CSI,    'y',  NONE,  1, MULT     ) /* request-checksum-of-rectangular-area 
*/
 _VTE_NOQ(DECPKFMR,               CSI,    'y',  NONE,  1, PLUS     ) /* program-key-free-memory-report */
 _VTE_NOQ(DECUS,                  CSI,    'y',  NONE,  1, COMMA    ) /* update session */
diff --git a/src/vteseq.cc b/src/vteseq.cc
index eabcbbaa..442ef1d3 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -8111,6 +8111,30 @@ Terminal::XDGSYNC(vte::parser::Sequence const& seq)
         /* TODO: implement this! https://gitlab.gnome.org/GNOME/vte/issues/15 */
 }
 
+void
+Terminal::XTERM_CHECKSUM_MODE(vte::parser::Sequence const& seq)
+{
+        /*
+         * XTERM_CHECKSUM_MODE - xterm DECRQCRA checksum mode
+         * Sets how DECRQCRA calculates the area checksum.
+         *
+         * Arguments:
+         *   args[0]: flag value composed of the following flags:
+         *     1: no negation
+         *     2: don't report attributes
+         *     4: checksum trailing blanks
+         *     8: don't checksum empty cells
+         *     16: no 8-bit masking or ignoring combining characters
+         *
+         * Defaults:
+         *   args[0]: 0, matching the output from VTxxx terminals
+         *
+         * References: XTERM (since 335)
+         *
+         * Probably not worth implementing.
+         */
+}
+
 void
 Terminal::XTERM_IHMT(vte::parser::Sequence const& seq)
 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]