=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/tty.c,v retrieving revision 1.23 retrieving revision 1.24 diff -c -r1.23 -r1.24 *** src/usr.bin/tmux/tty.c 2009/08/11 22:34:17 1.23 --- src/usr.bin/tmux/tty.c 2009/08/12 09:41:59 1.24 *************** *** 1,4 **** ! /* $OpenBSD: tty.c,v 1.23 2009/08/11 22:34:17 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: tty.c,v 1.24 2009/08/12 09:41:59 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 38,44 **** void tty_attributes_fg(struct tty *, const struct grid_cell *); void tty_attributes_bg(struct tty *, const struct grid_cell *); ! void tty_redraw_region(struct tty *, struct tty_ctx *); void tty_emulate_repeat( struct tty *, enum tty_code_code, enum tty_code_code, u_int); void tty_cell(struct tty *, --- 38,44 ---- void tty_attributes_fg(struct tty *, const struct grid_cell *); void tty_attributes_bg(struct tty *, const struct grid_cell *); ! void tty_redraw_region(struct tty *, const struct tty_ctx *); void tty_emulate_repeat( struct tty *, enum tty_code_code, enum tty_code_code, u_int); void tty_cell(struct tty *, *************** *** 461,467 **** * width of the terminal. */ void ! tty_redraw_region(struct tty *tty, struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; --- 461,467 ---- * width of the terminal. */ void ! tty_redraw_region(struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; *************** *** 532,538 **** } void ! tty_write(void (*cmdfn)(struct tty *, struct tty_ctx *), struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct client *c; --- 532,539 ---- } void ! tty_write(void (*cmdfn)( ! struct tty *, const struct tty_ctx *), const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct client *c; *************** *** 563,572 **** } void ! tty_cmd_insertcharacter(struct tty *tty, struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; if (wp->xoff != 0 || screen_size_x(s) < tty->sx) { tty_draw_line(tty, wp->screen, ctx->ocy, wp->xoff, wp->yoff); --- 564,574 ---- } void ! tty_cmd_insertcharacter(struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; + u_int i; if (wp->xoff != 0 || screen_size_x(s) < tty->sx) { tty_draw_line(tty, wp->screen, ctx->ocy, wp->xoff, wp->yoff); *************** *** 581,594 **** tty_emulate_repeat(tty, TTYC_ICH, TTYC_ICH1, ctx->num); else { tty_putcode(tty, TTYC_SMIR); ! while (ctx->num-- > 0) tty_putc(tty, ' '); tty_putcode(tty, TTYC_RMIR); } } void ! tty_cmd_deletecharacter(struct tty *tty, struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; --- 583,596 ---- tty_emulate_repeat(tty, TTYC_ICH, TTYC_ICH1, ctx->num); else { tty_putcode(tty, TTYC_SMIR); ! for (i = 0; i < ctx->num; i++) tty_putc(tty, ' '); tty_putcode(tty, TTYC_RMIR); } } void ! tty_cmd_deletecharacter(struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; *************** *** 605,611 **** } void ! tty_cmd_insertline(struct tty *tty, struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; --- 607,613 ---- } void ! tty_cmd_insertline(struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; *************** *** 625,631 **** } void ! tty_cmd_deleteline(struct tty *tty, struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; --- 627,633 ---- } void ! tty_cmd_deleteline(struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; *************** *** 645,651 **** } void ! tty_cmd_clearline(struct tty *tty, struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; --- 647,653 ---- } void ! tty_cmd_clearline(struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; *************** *** 664,670 **** } void ! tty_cmd_clearendofline(struct tty *tty, struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; --- 666,672 ---- } void ! tty_cmd_clearendofline(struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; *************** *** 683,689 **** } void ! tty_cmd_clearstartofline(struct tty *tty, struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; u_int i; --- 685,691 ---- } void ! tty_cmd_clearstartofline(struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; u_int i; *************** *** 701,707 **** } void ! tty_cmd_reverseindex(struct tty *tty, struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; --- 703,709 ---- } void ! tty_cmd_reverseindex(struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; *************** *** 723,729 **** } void ! tty_cmd_linefeed(struct tty *tty, struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; --- 725,731 ---- } void ! tty_cmd_linefeed(struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; *************** *** 745,751 **** } void ! tty_cmd_clearendofscreen(struct tty *tty, struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; --- 747,753 ---- } void ! tty_cmd_clearendofscreen(struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; *************** *** 780,786 **** } void ! tty_cmd_clearstartofscreen(struct tty *tty, struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; --- 782,788 ---- } void ! tty_cmd_clearstartofscreen(struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; *************** *** 809,815 **** } void ! tty_cmd_clearscreen(struct tty *tty, struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; --- 811,817 ---- } void ! tty_cmd_clearscreen(struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; *************** *** 838,844 **** } void ! tty_cmd_alignmenttest(struct tty *tty, struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; --- 840,846 ---- } void ! tty_cmd_alignmenttest(struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; struct screen *s = wp->screen; *************** *** 856,862 **** } void ! tty_cmd_cell(struct tty *tty, struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; --- 858,864 ---- } void ! tty_cmd_cell(struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; *************** *** 866,872 **** } void ! tty_cmd_utf8character(struct tty *tty, struct tty_ctx *ctx) { u_char *ptr = ctx->ptr; size_t i; --- 868,874 ---- } void ! tty_cmd_utf8character(struct tty *tty, const struct tty_ctx *ctx) { u_char *ptr = ctx->ptr; size_t i;