[vte] emulation: Remove SRM support
- From: Egmont Koblinger <egmontkob src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] emulation: Remove SRM support
- Date: Sat, 14 Sep 2019 20:31:23 +0000 (UTC)
commit 3e285bc667a3599056aa567d581b9fba880acae5
Author: Egmont Koblinger <egmont gmail com>
Date: Sat Sep 14 22:28:22 2019 +0200
emulation: Remove SRM support
https://gitlab.gnome.org/GNOME/vte/issues/69
src/modes-ecma.hh | 29 ++++++++++++++++-------------
src/modes-test.cc | 12 ++++++------
src/modes.hh | 3 +--
src/vte.cc | 26 +++-----------------------
src/vteinternal.hh | 3 +--
5 files changed, 27 insertions(+), 46 deletions(-)
---
diff --git a/src/modes-ecma.hh b/src/modes-ecma.hh
index 3c862be7..f0d318fe 100644
--- a/src/modes-ecma.hh
+++ b/src/modes-ecma.hh
@@ -52,19 +52,6 @@ MODE(IRM, 4)
*/
MODE(BDSM, 8)
-/*
- * SRM - local echo send/receive mode
- * If reset, characters entered by the keyboard are shown on the
- * screen as well as being sent to the host; if set, the
- * keyboard input is only sent to the host.
- *
- * Default: set
- *
- * References: ECMA-48 § 7.2.15
- * VT525
- */
-MODE(SRM, 12)
-
/* Unsupported */
MODE_FIXED(GATM, 1, ALWAYS_RESET)
@@ -77,6 +64,22 @@ MODE_FIXED(VEM, 7, ALWAYS_RESET)
MODE_FIXED(DCSM, 9, ALWAYS_SET)
MODE_FIXED(HEM, 10, ALWAYS_RESET)
MODE_FIXED(PUM, 11, ALWAYS_RESET) /* ECMA-48 § F.4.1 Deprecated */
+
+/*
+ * SRM - local echo send/receive mode
+ * If reset, characters entered by the keyboard are shown on the
+ * screen as well as being sent to the host; if set, the
+ * keyboard input is only sent to the host.
+ *
+ * Default: set
+ *
+ * References: ECMA-48 § 7.2.15
+ * VT525
+ *
+ * Removed in VTE 0.60: issue #69
+ */
+MODE_FIXED(SRM, 12, ALWAYS_SET)
+
MODE_FIXED(FEAM, 13, ALWAYS_RESET)
MODE_FIXED(FETM, 14, ALWAYS_RESET)
MODE_FIXED(MATM, 15, ALWAYS_RESET)
diff --git a/src/modes-test.cc b/src/modes-test.cc
index 39f4cfb4..5841485c 100644
--- a/src/modes-test.cc
+++ b/src/modes-test.cc
@@ -35,22 +35,22 @@ test_modes_ecma(void)
vte::terminal::modes::ECMA modes{};
g_assert_false(modes.IRM());
- g_assert_true(modes.SRM());
+ g_assert_true(modes.BDSM());
modes.set_IRM(true);
g_assert_true(modes.IRM());
- g_assert_true(modes.SRM());
- modes.set_SRM(false);
+ g_assert_true(modes.BDSM());
+ modes.set_BDSM(false);
g_assert_true(modes.IRM());
- g_assert_false(modes.SRM());
+ g_assert_false(modes.BDSM());
vte::terminal::modes::ECMA copy{modes};
g_assert_cmpuint(copy.get_modes(), ==, modes.get_modes());
g_assert_cmpint(copy.IRM(), ==, modes.IRM());
- g_assert_cmpint(copy.SRM(), ==, modes.SRM());
+ g_assert_cmpint(copy.BDSM(), ==, modes.BDSM());
modes.reset();
g_assert_false(modes.IRM());
- g_assert_true(modes.SRM());
+ g_assert_true(modes.BDSM());
}
static void
diff --git a/src/modes.hh b/src/modes.hh
index af218622..48b1b2ce 100644
--- a/src/modes.hh
+++ b/src/modes.hh
@@ -170,8 +170,7 @@ public:
#undef MODE
#undef MODE_FIXED
- constexpr ECMA() : Self{eBDSM,
- eSRM} { }
+ constexpr ECMA() : Self{eBDSM} { }
}; // class ECMA
diff --git a/src/vte.cc b/src/vte.cc
index e7815b44..c52241de 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -4299,8 +4299,7 @@ Terminal::pty_io_write(GIOChannel *channel,
/* Convert some UTF-8 data to send to the child. */
void
Terminal::send_child(char const* data,
- gssize length,
- bool local_echo) noexcept
+ gssize length) noexcept
{
gchar *cooked;
long cooked_length, i;
@@ -4345,25 +4344,6 @@ Terminal::send_child(char const* data,
if (cooked_length > 0) {
emit_commit(cooked, cooked_length);
}
- /* Echo the text if we've been asked to do so. */
- if ((cooked_length > 0) && local_echo) {
- gunichar *ucs4;
- // FIXMEchpe: if (!m_using_utf8), then cooked is NOT UTF-8 !!!
- // So I think this should use (data, length) not (cooked, cooked_length)
- ucs4 = g_utf8_to_ucs4(cooked, cooked_length,
- NULL, NULL, NULL);
- if (ucs4 != NULL) {
- int len;
- len = g_utf8_strlen(cooked, cooked_length);
- for (i = 0; i < len; i++) {
- insert_char(
- ucs4[i],
- false,
- true);
- }
- g_free(ucs4);
- }
- }
/* If there's a place for it to go, add the data to the
* outgoing buffer. */
@@ -4413,7 +4393,7 @@ Terminal::feed_child(char const *text,
length = strlen(text);
if (length > 0) {
- send_child(text, length, false);
+ send_child(text, length);
}
}
@@ -4457,7 +4437,7 @@ Terminal::feed_child_using_modes(char const* data,
length = strlen(data);
if (length > 0)
- send_child(data, length, !m_modes_ecma.SRM());
+ send_child(data, length);
}
void
diff --git a/src/vteinternal.hh b/src/vteinternal.hh
index b0b6239e..6eebcf6f 100644
--- a/src/vteinternal.hh
+++ b/src/vteinternal.hh
@@ -836,8 +836,7 @@ public:
GIOCondition condition);
void send_child(char const* data,
- gssize length,
- bool local_echo) noexcept;
+ gssize length) noexcept;
void feed_child_using_modes(char const* data,
gssize length);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]