Lines 4504-4512
Link Here
|
4504 |
static void |
4504 |
static void |
4505 |
zvt_term_readdata (gpointer data, gint fd, GdkInputCondition condition) |
4505 |
zvt_term_readdata (gpointer data, gint fd, GdkInputCondition condition) |
4506 |
{ |
4506 |
{ |
|
|
4507 |
int select_retval; |
4508 |
struct timeval tv; |
4509 |
fd_set rfds; |
4507 |
gboolean update; |
4510 |
gboolean update; |
4508 |
gchar buffer[4096]; |
4511 |
gchar buffer[32768]; |
4509 |
gint count, saveerrno; |
4512 |
gint count, total_count, saveerrno; |
4510 |
struct _vtx *vx; |
4513 |
struct _vtx *vx; |
4511 |
ZvtTerm *term; |
4514 |
ZvtTerm *term; |
4512 |
int screen; |
4515 |
int screen; |
Lines 4535-4557
Link Here
|
4535 |
vt_cursor_state (term, 0); |
4538 |
vt_cursor_state (term, 0); |
4536 |
vt_match_highlight(term->vx, 0); |
4539 |
vt_match_highlight(term->vx, 0); |
4537 |
#endif |
4540 |
#endif |
4538 |
while ( (saveerrno == EAGAIN) && (count = read (fd, buffer, 4096)) > 0) { |
4541 |
|
4539 |
|
4542 |
|
4540 |
#if 0 |
4543 |
select_retval=1; |
4541 |
int i =0; |
4544 |
total_count=0; |
4542 |
while(i<count) |
4545 |
count=1; |
4543 |
{ |
4546 |
|
4544 |
if (buffer[i]==27) |
4547 |
while ( (count>0) && (select_retval==1) && (total_count<32768) ) |
4545 |
printf("<Esc> "); |
4548 |
{ |
4546 |
else |
4549 |
count=0; |
4547 |
printf("(%d,%c) ", buffer[i], buffer[i]); |
4550 |
int maxread=32768-total_count; |
4548 |
i++; |
4551 |
if (maxread>4096) |
4549 |
} |
4552 |
maxread=4096; |
4550 |
printf("\n count=%d\n", count); |
4553 |
|
4551 |
#endif |
4554 |
count = read (fd, &buffer[total_count], maxread); |
4552 |
|
4555 |
saveerrno=errno; |
|
|
4556 |
if (count == -1) |
4557 |
{ |
4558 |
perror("read()"); |
4559 |
break; |
4560 |
} |
4561 |
if (count>0) |
4562 |
total_count+=count; |
4563 |
|
4564 |
FD_ZERO(&rfds); |
4565 |
FD_SET(fd, &rfds); |
4566 |
tv.tv_sec = 0; |
4567 |
tv.tv_usec = 10000; |
4568 |
select_retval = select(fd+1, &rfds, NULL, NULL, &tv); |
4569 |
if (select_retval == -1) |
4570 |
{ |
4571 |
perror("select()"); |
4572 |
break; |
4573 |
} |
4574 |
} |
4575 |
|
4576 |
if (total_count) { |
4577 |
|
4578 |
count=total_count; |
4579 |
|
4553 |
update = TRUE; |
4580 |
update = TRUE; |
4554 |
saveerrno = errno; |
|
|
4555 |
#ifdef MGT_NEW_DATA_PROCESSING |
4581 |
#ifdef MGT_NEW_DATA_PROCESSING |
4556 |
in_data = g_malloc0(sizeof (struct in_data_t)); |
4582 |
in_data = g_malloc0(sizeof (struct in_data_t)); |
4557 |
in_data->term = term; |
4583 |
in_data->term = term; |