#include "madtty.h"
#include "roteprivate.h"
-#define ROTE_VT_UPDATE_ITERATIONS 5
-
RoteTerm *rote_vt_create(int rows, int cols)
{
RoteTerm *rt;
void (*cur_set_attr)(WINDOW*,unsigned char)) {
int i, j;
- rote_vt_update(rt);
- if (!cur_set_attr) cur_set_attr = default_cur_set_attr;
+ if (!cur_set_attr)
+ cur_set_attr = default_cur_set_attr;
+
for (i = 0; i < rt->rows; i++) {
wmove(win, srow + i, scol);
for (j = 0; j < rt->cols; j++) {
rt->childpid = 0;
}
-void rote_vt_update(RoteTerm *rt)
-{
- char buf[512];
- int nbread;
- int n = ROTE_VT_UPDATE_ITERATIONS;
-
- while (n--) { /* iterate at most ROVE_VT_UPDATE_ITERATIONS times.
- * As Phil Endecott pointed out, if we don't restrict this,
- * a program that floods the terminal with output
- * could cause this loop to iterate forever, never
- * being able to catch up. So we'll rely on the client
- * calling rote_vt_update often, as the documentation
- * recommends :-) */
-
- nbread = rote_vt_read(rt, buf, sizeof(buf));
- if (nbread <= 0)
- return;
-
- /* inject the data into the terminal */
- rote_vt_inject(rt, buf, nbread);
- }
-}
-
int rote_vt_read(RoteTerm *rt, char *buf, int buflen)
{
if (rt->pty < 0) {