Permalink
Browse files

Implement CSI-K, tweak tests.

  • Loading branch information...
bsdphk committed Jan 12, 2018
1 parent 945d2e1 commit dc0f151065a3f8a7bd23061b25bbc37685950a3c
@@ -18,4 +18,4 @@ client c1 {
rxresp
} -run
process p1 -need-bytes 2000 -screen_dump -write {q} -wait
process p1 -need-bytes 1000 -screen_dump -write {q} -wait
@@ -24,4 +24,4 @@ process p1 -writeln {quit}
process p1 -need-bytes 400
process p1 -screen_dump -writeln {quit} -wait
process p1 -screen_dump -write "quit\r" -wait
@@ -714,10 +714,11 @@ cmd_process(CMD_ARGS)
u = strtoumax(av[1], NULL, 0);
av++;
do {
usleep(100000);
usleep(500000);
AZ(pthread_mutex_lock(&p->mtx));
v = p->stdout_bytes;
AZ(pthread_mutex_unlock(&p->mtx));
vtc_log(p->vl, 4, "Have %ju bytes", v);
} while(v < u);
continue;
}
View
@@ -119,6 +119,25 @@ term_escape(struct term *tp, int c, int n)
vtc_fatal(tp->vl, "ANSI J[%d]", tp->arg[0]);
term_clear(tp);
break;
case 'K':
// erase in line 0=right, 1=left, 2=full line
switch (tp->arg[0]) {
case 0:
for (i = tp->col + 1; i < tp->ncol; i++)
tp->vram[tp->line][i] = ' ';
break;
case 1:
for (i = 0; i < tp->col; i++)
tp->vram[tp->line][i] = ' ';
break;
case 2:
for (i = 0; i < tp->ncol; i++)
tp->vram[tp->line][i] = ' ';
break;
default:
vtc_fatal(tp->vl, "ANSI K[%d]", tp->arg[0]);
}
break;
case 'm':
// Ignore Graphic Rendition settings
break;

0 comments on commit dc0f151

Please sign in to comment.