summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@src.gnome.org>2002-05-02 20:48:18 +0000
committerNalin Dahyabhai <nalin@src.gnome.org>2002-05-02 20:48:18 +0000
commitab1b7b660db6f9ea5b1d142e97749e232e708be5 (patch)
tree25103195bf7d67947b80b7bea96023cdf7502964
parent7df826f2358df847542716ad585d9982ff141cef (diff)
downloadvte-ab1b7b660db6f9ea5b1d142e97749e232e708be5.tar.gz
fix parsing of octal codes which start with "1" instead of "0" munge asvte_0_3_5
* src/termcap.c: fix parsing of octal codes which start with "1" instead of "0" * src/vte.c: munge as many invalid multibyte characters as necessary to get past decoding errors.
-rw-r--r--ChangeLog6
-rw-r--r--src/termcap.c1
-rw-r--r--src/trie.c6
-rw-r--r--src/vte.c9
-rw-r--r--vte.spec5
5 files changed, 21 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 7ebe5019..119696e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
2002-05-02 nalin
+ * src/termcap.c: Fix handling of triple-digit escaped characters,
+ which weren't being processed right if the first digit was '1' instead
+ of '0'.
* src/trie.c: Rework trie matching to return the address of the
character which ended the match attempt, which should cut down on
useless initial-substring checks. Fix a subtle bug which caused
@@ -13,7 +16,8 @@
terminal size to 80x24 instead of 60x18, which was originally chosen for
debugging purposes. Don't use $SHELL as the command to invoke when
starting up a default command (as in the test app) -- libtool wrappers
- keep screwing this up.
+ keep screwing this up. Don't limit the number of characters we skip
+ over in invalid multibyte sequences -- sometimes that's not enough.
* src/vteaccess.h: Fix a crashbug due to mismatch between parent field
in the object's structure and its inherited object's type. More to go.
2002-05-01 nalin
diff --git a/src/termcap.c b/src/termcap.c
index 79839d5c..bd421233 100644
--- a/src/termcap.c
+++ b/src/termcap.c
@@ -245,6 +245,7 @@ vte_termcap_strip(const char *termcap, char **stripped, ssize_t *len)
ret[o - 1] = 12;
continue;
case '0':
+ case '1':
i++;
ret[o - 1] = strtol(termcap + i, &p, 8);
p--;
diff --git a/src/trie.c b/src/trie.c
index c674c767..98a7406c 100644
--- a/src/trie.c
+++ b/src/trie.c
@@ -658,6 +658,12 @@ vte_trie_printx(struct vte_trie *trie, const char *previous)
"^%lc",
(wint_t)trie->trie_paths[i].data.c +
64);
+ } else
+ if (trie->trie_paths[i].data.c > 126) {
+ snprintf(buf + strlen(buf),
+ sizeof(buf) - strlen(buf),
+ "[:%ld:]",
+ (long)trie->trie_paths[i].data.c);
} else {
snprintf(buf + strlen(buf),
sizeof(buf) - strlen(buf),
diff --git a/src/vte.c b/src/vte.c
index e5aa8664..b7c3f1e1 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -3378,7 +3378,7 @@ vte_terminal_process_incoming(gpointer data)
start = terminal->pvt->n_incoming - icount;
if (terminal->pvt->incoming[start] > 128) {
/* Count the number of non-ascii chars. */
- for (end = start; end < start + VTE_UTF8_BPC; end++) {
+ for (end = start; end < terminal->pvt->n_incoming; end++) {
if (terminal->pvt->incoming[end] < 128) {
break;
}
@@ -3777,8 +3777,8 @@ vte_terminal_io_read(GIOChannel *channel,
fprintf(stderr, "Queuing handler to process bytes.\n");
#endif
terminal->pvt->processing = TRUE;
- terminal->pvt->processing_tag = g_idle_add(vte_terminal_process_incoming,
- terminal);
+ terminal->pvt->processing_tag =
+ g_idle_add(vte_terminal_process_incoming, terminal);
}
/* If we detected an eof condition, signal one. */
@@ -5525,7 +5525,8 @@ vte_terminal_set_emulation(VteTerminal *terminal, const char *emulation)
vte_trie_add(terminal->pvt->trie, code, strlen(code), value, 0);
}
#ifdef VTE_DEBUG
- /* vte_trie_print(terminal->pvt->trie); */
+ fprintf(stderr, "Trie contents:\n");
+ vte_trie_print(terminal->pvt->trie);
fprintf(stderr, "\n");
#endif
diff --git a/vte.spec b/vte.spec
index 4ffab4d8..b981c6e1 100644
--- a/vte.spec
+++ b/vte.spec
@@ -1,5 +1,5 @@
Name: vte
-Version: 0.3.4
+Version: 0.3.5
Release: 1
Summary: An experimental terminal emulator.
License: LGPL
@@ -53,6 +53,9 @@ make install DESTDIR=$RPM_BUILD_ROOT
%{_libdir}/pkgconfig/*
%changelog
+* Thu May 2 2002 Nalin Dahyabhai <nalin@redhat.com> 0.3.5-1
+- fix cap parsing error and "handle" long invalid multibyte sequences better
+
* Thu May 2 2002 Nalin Dahyabhai <nalin@redhat.com> 0.3.4-1
- try to speed up sequence recognition a bit
- disable some window_scroll speedups that appear to cause flickering