version 1.117, 2017/04/22 10:30:56 |
version 1.118, 2017/04/25 18:30:29 |
|
|
|
|
struct screen_write_collect_item { |
struct screen_write_collect_item { |
u_int x; |
u_int x; |
|
int wrapped; |
|
|
u_int used; |
u_int used; |
char data[256]; |
char data[256]; |
|
|
screen_write_cursormove(ctx, ci->x, y); |
screen_write_cursormove(ctx, ci->x, y); |
screen_write_initctx(ctx, &ttyctx); |
screen_write_initctx(ctx, &ttyctx); |
ttyctx.cell = &ci->gc; |
ttyctx.cell = &ci->gc; |
|
ttyctx.wrapped = ci->wrapped; |
ttyctx.ptr = ci->data; |
ttyctx.ptr = ci->data; |
ttyctx.num = ci->used; |
ttyctx.num = ci->used; |
tty_write(tty_cmd_cells, &ttyctx); |
tty_write(tty_cmd_cells, &ttyctx); |
|
|
|
|
if (s->cx > sx - 1 || ctx->item->used > sx - 1 - s->cx) |
if (s->cx > sx - 1 || ctx->item->used > sx - 1 - s->cx) |
screen_write_collect_end(ctx); |
screen_write_collect_end(ctx); |
|
ci = ctx->item; /* may have changed */ |
|
|
if (s->cx > sx - 1) { |
if (s->cx > sx - 1) { |
log_debug("%s: wrapped at %u,%u", __func__, s->cx, s->cy); |
log_debug("%s: wrapped at %u,%u", __func__, s->cx, s->cy); |
|
ci->wrapped = 1; |
screen_write_linefeed(ctx, 1); |
screen_write_linefeed(ctx, 1); |
s->cx = 0; |
s->cx = 0; |
} |
} |
|
|
ci = ctx->item; /* may have changed */ |
|
if (ci->used == 0) |
if (ci->used == 0) |
memcpy(&ci->gc, gc, sizeof ci->gc); |
memcpy(&ci->gc, gc, sizeof ci->gc); |
ci->data[ci->used++] = gc->data.data[0]; |
ci->data[ci->used++] = gc->data.data[0]; |