summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog22
-rw-r--r--src/trie.c29
-rw-r--r--src/vte.c50
-rw-r--r--src/vteaccess.c10
-rw-r--r--src/vteaccess.h4
-rw-r--r--vte.spec6
6 files changed, 67 insertions, 54 deletions
diff --git a/ChangeLog b/ChangeLog
index e6b8af2b..7ebe5019 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,13 +1,21 @@
2002-05-02 nalin
* 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. Remove several gdk_window_scroll()
- calls which apparently aren't buffered. Convert invalid multibyte
- characters to '?' instead of just dropping them. Provide a means of
- setting the backspace/delete bindings. Add a poor xlfd_from_pango
- mapping function which would need serious work to be useful. Get rid
- of warnings when we're transparent and the root widnow pixmap isn't as
- big as the root window because it's tiled.
+ useless initial-substring checks. Fix a subtle bug which caused
+ intermittent off-by-somenumber errors in the return address.
+ * src/vte.c: Remove several gdk_window_scroll() calls which apparently
+ aren't buffered. Convert invalid multibyte characters to '?' instead of
+ just dropping them. Provide a means of setting the backspace/delete
+ bindings. Add a poor xlfd_from_pango mapping function which would need
+ serious work to be useful. Get rid of warnings when we're transparent
+ and the root window pixmap isn't as big as the root window because it's
+ been tiled. Setup bindings using the export functions. Set the default
+ 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.
+ * 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
* src/vte.c: Try @pkgdatadir@/termcap/$TERM when reading termcap files.
This fixes the app on systems with no /etc/termcap, and also speeds up
diff --git a/src/trie.c b/src/trie.c
index dec2e250..c674c767 100644
--- a/src/trie.c
+++ b/src/trie.c
@@ -490,26 +490,25 @@ vte_trie_matchx(struct vte_trie *trie, const wchar_t *pattern, size_t length,
res = &hres;
}
- /* Trivial cases. We've matched the entire pattern, or we're out of
+ /* Trivial cases. We've matched an entire pattern, or we're out of
* pattern to match. */
+ if (trie->result) {
+ *res = trie->result;
+ *quark = trie->quark;
+ *consumed = pattern;
+ return *res;
+ }
if (length <= 0) {
- if (trie->result) {
- *res = trie->result;
- *quark = trie->quark;
+ if (trie->trie_path_count > 0) {
+ *res = "";
+ *quark = g_quark_from_static_string("");
*consumed = pattern;
return *res;
} else {
- if (trie->trie_path_count > 0) {
- *res = "";
- *quark = g_quark_from_static_string("");
- *consumed = pattern;
- return *res;
- } else {
- *res = NULL;
- *quark = 0;
- *consumed = pattern;
- return *res;
- }
+ *res = NULL;
+ *quark = 0;
+ *consumed = pattern;
+ return *res;
}
}
diff --git a/src/vte.c b/src/vte.c
index be4eaca8..e5aa8664 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -3438,7 +3438,7 @@ vte_terminal_process_incoming(gpointer data)
* clear that up if possible. */
if ((match != NULL) && (match[0] == '\0')) {
#ifdef VTE_DEBUG
- fprintf(stderr, "Ambiguous sequence (%d/%d). "
+ fprintf(stderr, "Ambiguous sequence at %d of %d. "
"Resolving.\n", start, wcount);
#endif
/* Try to match the *entire* string. This will set
@@ -3457,7 +3457,8 @@ vte_terminal_process_incoming(gpointer data)
if (match == NULL) {
#ifdef VTE_DEBUG
fprintf(stderr,
- "Looks like a sequence (%d).\n",
+ "Looks like a sequence at %d, "
+ "length = %d.\n", start,
next - (wbuf + start));
#endif
free_params_array(params);
@@ -3469,20 +3470,13 @@ vte_terminal_process_incoming(gpointer data)
&next,
&quark,
&params);
- if ((match != NULL) && (match[0] == '\0')) {
- vte_trie_match(terminal->pvt->trie,
- &wbuf[start],
- next - (wbuf + start) + 1,
- &match,
- &next,
- &quark,
- &params);
- }
}
#ifdef VTE_DEBUG
if ((match != NULL) && (match[0] != '\0')) {
fprintf(stderr,
- "Ambiguity resolved -- sequence ");
+ "Ambiguity resolved -- sequence at %d, "
+ "length = %d.\n", start,
+ next - (wbuf + start));
}
if ((match != NULL) && (match[0] == '\0')) {
int i;
@@ -3491,6 +3485,9 @@ vte_terminal_process_incoming(gpointer data)
for (i = 0; i < wcount; i++) {
if (i == start) {
fprintf(stderr, "=>");
+ } else
+ if (i == (next - wbuf)) {
+ fprintf(stderr, "<=");
}
if ((wbuf[i] < 32) || (wbuf[i] > 127)) {
fprintf(stderr, "{%ld}",
@@ -3499,20 +3496,16 @@ vte_terminal_process_incoming(gpointer data)
fprintf(stderr, "%lc",
(wint_t) wbuf[i]);
}
- if (i == (next - wbuf)) {
- fprintf(stderr, "<=");
- }
}
if (i == (next - wbuf)) {
fprintf(stderr, "<=");
}
- fprintf(stderr, "'.\n");
+ fprintf(stderr, "' at %d.\n", start);
}
if (match == NULL) {
- fprintf(stderr,
- "Ambiguity resolved -- plain data ");
+ fprintf(stderr, "Ambiguity resolved -- "
+ "plain data (%d).\n", start);
}
- fprintf(stderr, "(%d).\n", next - wbuf);
#endif
}
@@ -5532,6 +5525,7 @@ 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, "\n");
#endif
@@ -5544,10 +5538,10 @@ vte_terminal_set_emulation(VteTerminal *terminal, const char *emulation)
vte_terminal_set_size(terminal,
vte_termcap_find_numeric(terminal->pvt->termcap,
terminal->pvt->terminal,
- "co") ?: 60,
+ "co") ?: 80,
vte_termcap_find_numeric(terminal->pvt->termcap,
terminal->pvt->terminal,
- "li") ?: 18);
+ "li") ?: 24);
}
/* Set the path to the termcap file we read, and read it in. */
@@ -5615,15 +5609,22 @@ vte_terminal_init(VteTerminal *terminal, gpointer *klass)
/* Initialize data members with settings from the environment and
* structures to use for these. */
pvt = terminal->pvt = g_malloc0(sizeof(*terminal->pvt));
- pvt->shell = getenv("SHELL");
if (pvt->shell == NULL) {
pwd = getpwuid(getuid());
if (pwd != NULL) {
pvt->shell = pwd->pw_shell;
+#ifdef VTE_DEBUG
+ fprintf(stderr, "Using user's shell (%s).\n",
+ pvt->shell);
+#endif
}
}
if (pvt->shell == NULL) {
pvt->shell = "/bin/sh";
+#ifdef VTE_DEBUG
+ fprintf(stderr, "Using hard-coded default shell (%s).\n",
+ pvt->shell);
+#endif
}
pvt->shell = g_quark_to_string(g_quark_from_string(pvt->shell));
pvt->pty_master = -1;
@@ -5752,8 +5753,8 @@ vte_terminal_init(VteTerminal *terminal, gpointer *klass)
pvt->im_context = NULL;
/* Set backspace/delete bindings. */
- pvt->backspace_binding = VTE_ERASE_AUTO;
- pvt->delete_binding = VTE_ERASE_AUTO;
+ vte_terminal_set_backspace_binding(terminal, VTE_ERASE_AUTO);
+ vte_terminal_set_delete_binding(terminal, VTE_ERASE_AUTO);
}
/* Tell GTK+ how much space we need. */
@@ -7726,6 +7727,7 @@ vte_terminal_set_backspace_binding(VteTerminal *terminal,
VteTerminalEraseBinding binding)
{
g_return_if_fail(VTE_IS_TERMINAL(terminal));
+ /* FIXME: should we set the pty mode to match? */
terminal->pvt->backspace_binding = binding;
}
diff --git a/src/vteaccess.c b/src/vteaccess.c
index 9e2dfcf8..51a01c5e 100644
--- a/src/vteaccess.c
+++ b/src/vteaccess.c
@@ -161,9 +161,11 @@ AtkObject *
vte_terminal_accessible_new(VteTerminal *terminal)
{
GtkAccessible *access;
+ GObject *object;
g_return_val_if_fail(VTE_IS_TERMINAL(terminal), NULL);
- access = GTK_ACCESSIBLE(g_object_new(VTE_TYPE_TERMINAL_ACCESSIBLE,
- NULL));
+ object = g_object_new(VTE_TYPE_TERMINAL_ACCESSIBLE, NULL);
+ g_return_val_if_fail(GTK_IS_ACCESSIBLE(object), NULL);
+ access = GTK_ACCESSIBLE(object);
atk_object_initialize(ATK_OBJECT(access), G_OBJECT(terminal));
access->widget = GTK_WIDGET(terminal);
@@ -622,12 +624,10 @@ static void
vte_terminal_accessible_class_init(gpointer *klass)
{
GObjectClass *gobject_class;
- AtkObjectClass *atk_object_class;
GtkAccessibleClass *gtk_accessible_class;
GInterfaceInfo text;
gobject_class = G_OBJECT_CLASS(klass);
- atk_object_class = ATK_OBJECT_CLASS(klass);
gtk_accessible_class = GTK_ACCESSIBLE_CLASS(klass);
/* Add a text interface to this object class. */
@@ -660,7 +660,7 @@ vte_terminal_accessible_get_type(void)
(GClassFinalizeFunc)NULL,
(gconstpointer)NULL,
- sizeof(VteTerminal),
+ sizeof(VteTerminalAccessible),
0,
(GInstanceInitFunc)vte_terminal_accessible_init,
diff --git a/src/vteaccess.h b/src/vteaccess.h
index 6ee06f91..cb1d4921 100644
--- a/src/vteaccess.h
+++ b/src/vteaccess.h
@@ -29,14 +29,14 @@ G_BEGIN_DECLS
/* The terminal accessibility object itself. */
typedef struct _VteTerminalAccessible {
- AtkObject object;
+ GtkAccessible parent;
} VteTerminalAccessible;
/* The object's class structure. */
typedef struct _VteTerminalAccessibleClass {
/*< public > */
/* Inherited parent class. */
- AtkObjectClass parent_class;
+ GtkAccessibleClass parent_class;
} VteTerminalAccessibleClass;
/* The object's type. */
diff --git a/vte.spec b/vte.spec
index 1a2432f0..4ffab4d8 100644
--- a/vte.spec
+++ b/vte.spec
@@ -1,5 +1,5 @@
Name: vte
-Version: 0.3.3
+Version: 0.3.4
Release: 1
Summary: An experimental terminal emulator.
License: LGPL
@@ -53,6 +53,10 @@ make install DESTDIR=$RPM_BUILD_ROOT
%{_libdir}/pkgconfig/*
%changelog
+* 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
+
* Wed May 1 2002 Nalin Dahyabhai <nalin@redhat.com> 0.3.2-1
- include a small default termcap for systems without termcap files