Fix a bug in vte where the terminal would lock up sometimes when doing long
ls's or viewing scripts in /usr/bin/dialog. Tested by: Mezz bsdforums.org <reigncracks@hotmail.com>
This commit is contained in:
parent
0f7623a8a6
commit
a0bbff3acc
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=78123
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= vte
|
||||
PORTVERSION= 0.10.26
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= x11-toolkits gnome
|
||||
MASTER_SITES= ${MASTER_SITE_GNOME}
|
||||
MASTER_SITE_SUBDIR= sources/${PORTNAME}/0.10
|
||||
|
@ -1,51 +1,20 @@
|
||||
--- src/vte.c.orig Sat Oct 5 21:26:51 2002
|
||||
+++ src/vte.c Sat Oct 5 21:27:06 2002
|
||||
@@ -472,48 +472,7 @@
|
||||
--- src/vte.c.orig Tue Mar 4 14:25:26 2003
|
||||
+++ src/vte.c Wed Mar 26 01:42:42 2003
|
||||
@@ -547,7 +547,7 @@
|
||||
static wchar_t
|
||||
vte_wc_from_unichar(VteTerminal *terminal, gunichar c)
|
||||
{
|
||||
-#ifdef __STDC_ISO_10646__
|
||||
+#if defined(__STDC_ISO_10646__) || (defined(__FreeBSD__) && __FreeBSD_version < 500000)
|
||||
return (wchar_t) c;
|
||||
-#else
|
||||
- gpointer original, result;
|
||||
- char *local, utf8_buf[VTE_UTF8_BPC];
|
||||
- const char *localr;
|
||||
- wchar_t wc_buf[VTE_UTF8_BPC];
|
||||
- int ret;
|
||||
- gsize length, bytes_read, bytes_written;
|
||||
- mbstate_t state;
|
||||
- GError *error = NULL;
|
||||
- /* Check the cache. */
|
||||
- if (g_tree_lookup_extended(terminal->pvt->unichar_wc_map,
|
||||
- GINT_TO_POINTER(c),
|
||||
- &original,
|
||||
- &result)) {
|
||||
- return GPOINTER_TO_INT(c);
|
||||
- }
|
||||
- /* Convert the character to a locally-encoded mbs. */
|
||||
- length = g_unichar_to_utf8(c, utf8_buf);
|
||||
- local = g_locale_from_utf8(utf8_buf, length,
|
||||
- &bytes_read, &bytes_written, &error);
|
||||
- if (error == NULL) {
|
||||
- /* Convert from an mbs to a (single-character) wcs. */
|
||||
- memset(&state, 0, sizeof(state));
|
||||
- localr = local;
|
||||
- ret = mbsrtowcs(wc_buf, &localr, bytes_written, &state);
|
||||
- if (ret == 1) {
|
||||
- g_tree_insert(terminal->pvt->unichar_wc_map,
|
||||
- GINT_TO_POINTER(c),
|
||||
- GINT_TO_POINTER(wc_buf[0]));
|
||||
- return wc_buf[0];
|
||||
- }
|
||||
- }
|
||||
- /* Punt. */
|
||||
- if (error != NULL) {
|
||||
- g_printerr("g_locale_from_utf8(%d): %s", error->code,
|
||||
- error->message);
|
||||
- g_error_free(error);
|
||||
- }
|
||||
- return (wchar_t) c;
|
||||
-#endif
|
||||
}
|
||||
|
||||
#ifdef VTE_PREFER_PANGOX
|
||||
#else
|
||||
gpointer original, result;
|
||||
@@ -7320,7 +7320,7 @@
|
||||
if (condition & G_IO_IN) {
|
||||
bcount = sizeof(buf) -
|
||||
_vte_buffer_length(terminal->pvt->incoming);
|
||||
- bcount = read(fd, buf, MAX(bcount, sizeof(buf) / 2));
|
||||
+ bcount = read(fd, buf, MAX(bcount, (int)(sizeof(buf) / 2)));
|
||||
}
|
||||
eof = FALSE;
|
||||
if (condition & G_IO_HUP) {
|
||||
|
Loading…
Reference in New Issue
Block a user