1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
diff -urN multi-gnome-terminal-1.6.2/gnome-terminal/enhanced_gui.c multi-gnome-terminal-1.6.2-CVS/gnome-terminal/enhanced_gui.c
--- multi-gnome-terminal-1.6.2/gnome-terminal/enhanced_gui.c 2002-10-13 09:18:04.000000000 -0400
+++ multi-gnome-terminal-1.6.2-CVS/gnome-terminal/enhanced_gui.c 2004-04-01 06:20:18.000000000 -0500
@@ -5531,7 +5531,7 @@
}
}
#define EVENT_STATE_MASK (GDK_SHIFT_MASK | GDK_MOD1_MASK | GDK_CONTROL_MASK)
-#define kkd(x) x
+#define kkd(x)
/* ========================================================== */
/* Function to handle keybindings */
gint snooper_func(GtkWidget* widget, GdkEventKey *event, gpointer data)
diff -urN multi-gnome-terminal-1.6.2/gnome-terminal/zvtterm.c multi-gnome-terminal-1.6.2-CVS/gnome-terminal/zvtterm.c
--- multi-gnome-terminal-1.6.2/gnome-terminal/zvtterm.c 2002-09-10 08:17:29.000000000 -0400
+++ multi-gnome-terminal-1.6.2-CVS/gnome-terminal/zvtterm.c 2004-04-01 06:20:18.000000000 -0500
@@ -4504,9 +4504,12 @@
static void
zvt_term_readdata (gpointer data, gint fd, GdkInputCondition condition)
{
+ int select_retval;
+ struct timeval tv;
+ fd_set rfds;
gboolean update;
- gchar buffer[4096];
- gint count, saveerrno;
+ gchar buffer[32768];
+ gint count, total_count, saveerrno;
struct _vtx *vx;
ZvtTerm *term;
int screen;
@@ -4535,23 +4538,46 @@
vt_cursor_state (term, 0);
vt_match_highlight(term->vx, 0);
#endif
- while ( (saveerrno == EAGAIN) && (count = read (fd, buffer, 4096)) > 0) {
-
-#if 0
- int i =0;
- while(i<count)
- {
- if (buffer[i]==27)
- printf("<Esc> ");
- else
- printf("(%d,%c) ", buffer[i], buffer[i]);
- i++;
- }
- printf("\n count=%d\n", count);
-#endif
-
+
+
+ select_retval=1;
+ total_count=0;
+ count=1;
+
+ while ( (count>0) && (select_retval==1) && (total_count<32768) )
+ {
+ count=0;
+ int maxread=32768-total_count;
+ if (maxread>4096)
+ maxread=4096;
+
+ count = read (fd, &buffer[total_count], maxread);
+ saveerrno=errno;
+ if (count == -1)
+ {
+ perror("read()");
+ break;
+ }
+ if (count>0)
+ total_count+=count;
+
+ FD_ZERO(&rfds);
+ FD_SET(fd, &rfds);
+ tv.tv_sec = 0;
+ tv.tv_usec = 10000;
+ select_retval = select(fd+1, &rfds, NULL, NULL, &tv);
+ if (select_retval == -1)
+ {
+ perror("select()");
+ break;
+ }
+ }
+
+ if (total_count) {
+
+ count=total_count;
+
update = TRUE;
- saveerrno = errno;
#ifdef MGT_NEW_DATA_PROCESSING
in_data = g_malloc0(sizeof (struct in_data_t));
in_data->term = term;
|