[vte] emulation: Remove LNM mode support
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] emulation: Remove LNM mode support
- Date: Tue, 27 Mar 2018 17:44:14 +0000 (UTC)
commit 011856ac1904f79ddabce4d72c6dd6e9b428d5a9
Author: Christian Persch <chpe src gnome org>
Date: Tue Mar 27 19:40:12 2018 +0200
emulation: Remove LNM mode support
LNM has been deprecated for so long that it's been removed
from ECMA-48, see ยง F.5.2.
src/vte.cc | 50 +++++++-------------------------------------------
src/vteinternal.hh | 5 +----
src/vteseq.cc | 3 ---
3 files changed, 8 insertions(+), 50 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index 7836a07..5864b6d 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -2893,7 +2893,6 @@ VteTerminalPrivate::restore_cursor(VteScreen *screen__)
m_origin_mode = screen__->saved.origin_mode;
m_sendrecv_mode = screen__->saved.sendrecv_mode;
m_insert_mode = screen__->saved.insert_mode;
- m_linefeed_mode = screen__->saved.linefeed_mode;
m_defaults = screen__->saved.defaults;
m_color_defaults = screen__->saved.color_defaults;
m_fill_defaults = screen__->saved.fill_defaults;
@@ -2913,7 +2912,6 @@ VteTerminalPrivate::save_cursor(VteScreen *screen__)
screen__->saved.origin_mode = m_origin_mode;
screen__->saved.sendrecv_mode = m_sendrecv_mode;
screen__->saved.insert_mode = m_insert_mode;
- screen__->saved.linefeed_mode = m_linefeed_mode;
screen__->saved.defaults = m_defaults;
screen__->saved.color_defaults = m_color_defaults;
screen__->saved.fill_defaults = m_fill_defaults;
@@ -4124,15 +4122,14 @@ VteTerminalPrivate::pty_io_write(GIOChannel *channel,
void
VteTerminalPrivate::send_child(char const* data,
gssize length,
- bool local_echo,
- bool newline_stuff)
+ bool local_echo)
{
gsize icount, ocount;
const guchar *ibuf;
guchar *obuf, *obufptr;
gchar *cooked;
VteConv conv;
- long crcount, cooked_length, i;
+ long cooked_length, i;
if (!m_input_enabled)
return;
@@ -4151,36 +4148,9 @@ VteTerminalPrivate::send_child(char const* data,
g_warning(_("Error (%s) converting data for child, dropping."),
g_strerror(errno));
} else {
- crcount = 0;
- if (newline_stuff) {
- for (i = 0; i < obuf - obufptr; i++) {
- switch (obufptr[i]) {
- case '\015':
- crcount++;
- break;
- default:
- break;
- }
- }
- }
- if (crcount > 0) {
- cooked = (char *)g_malloc(obuf - obufptr + crcount);
- cooked_length = 0;
- for (i = 0; i < obuf - obufptr; i++) {
- switch (obufptr[i]) {
- case '\015':
- cooked[cooked_length++] = '\015';
- cooked[cooked_length++] = '\012';
- break;
- default:
- cooked[cooked_length++] = obufptr[i];
- break;
- }
- }
- } else {
- cooked = (gchar *)obufptr;
- cooked_length = obuf - obufptr;
- }
+ cooked = (gchar *)obufptr;
+ cooked_length = obuf - obufptr;
+
/* Tell observers that we're sending this to the child. */
if (cooked_length > 0) {
emit_commit(cooked, cooked_length);
@@ -4227,11 +4197,7 @@ VteTerminalPrivate::send_child(char const* data,
* become available for writing, set that up here. */
connect_pty_write();
}
- if (crcount > 0) {
- g_free(cooked);
- }
}
- return;
}
/*
@@ -4255,7 +4221,7 @@ VteTerminalPrivate::feed_child(char const *text,
length = strlen(text);
if (length > 0) {
- send_child(text, length, false, false);
+ send_child(text, length, false);
}
}
@@ -4300,8 +4266,7 @@ VteTerminalPrivate::feed_child_using_modes(char const* data,
if (length > 0)
send_child(data, length,
- !m_sendrecv_mode,
- m_linefeed_mode);
+ !m_sendrecv_mode);
}
/* Send text from the input method to the child. */
@@ -10579,7 +10544,6 @@ VteTerminalPrivate::reset(bool clear_tabstops,
m_scrolling_restricted = FALSE;
m_sendrecv_mode = TRUE;
m_insert_mode = FALSE;
- m_linefeed_mode = FALSE;
m_origin_mode = FALSE;
m_reverse_mode = FALSE;
m_cursor_visible = TRUE;
diff --git a/src/vteinternal.hh b/src/vteinternal.hh
index 5440e9a..d8bcd4e 100644
--- a/src/vteinternal.hh
+++ b/src/vteinternal.hh
@@ -130,7 +130,6 @@ struct _VteScreen {
gboolean origin_mode;
gboolean sendrecv_mode;
gboolean insert_mode;
- gboolean linefeed_mode;
VteCell defaults;
VteCell color_defaults;
VteCell fill_defaults;
@@ -328,7 +327,6 @@ public:
gboolean m_origin_mode; /* origin mode */
gboolean m_sendrecv_mode; /* sendrecv mode */
gboolean m_insert_mode; /* insert mode */
- gboolean m_linefeed_mode; /* linefeed mode */
VteCell m_defaults; /* default characteristics
for insertion of any new
characters */
@@ -792,8 +790,7 @@ public:
void feed_chunks(struct _vte_incoming_chunk *chunks);
void send_child(char const* data,
gssize length,
- bool local_echo,
- bool newline_stuff);
+ bool local_echo);
void feed_child_using_modes(char const* data,
gssize length);
diff --git a/src/vteseq.cc b/src/vteseq.cc
index cb8b356..2c9238c 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -494,9 +494,6 @@ VteTerminalPrivate::set_mode(vte::parser::Sequence const& params,
case 12: /* send/receive mode (local echo) */
m_sendrecv_mode = value;
break;
- case 20: /* automatic newline / normal linefeed mode */
- m_linefeed_mode = value;
- break;
default:
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]