teken_subr.h (b554075d14f03dab619b711e9c6c8d5f52f111e1) teken_subr.h (3eb27bf0a7b229d523bcc059b90784cfd7b908db)
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 *
4 * Copyright (c) 2008-2009 Ed Schouten <ed@FreeBSD.org>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 782 unchanged lines hidden (view full) ---

791
792 teken_funcs_respond(t, response, sizeof response - 1);
793 } else {
794 teken_printf("Unknown DA1\n");
795 }
796}
797
798static void
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 *
4 * Copyright (c) 2008-2009 Ed Schouten <ed@FreeBSD.org>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 782 unchanged lines hidden (view full) ---

791
792 teken_funcs_respond(t, response, sizeof response - 1);
793 } else {
794 teken_printf("Unknown DA1\n");
795 }
796}
797
798static void
799teken_subr_do_putchar(const teken_t *t, const teken_pos_t *tp, teken_char_t c,
799teken_subr_do_putchar(teken_t *t, const teken_pos_t *tp, teken_char_t c,
800 int width)
801{
802
800 int width)
801{
802
803 t->t_last = c;
803 if (t->t_stateflags & TS_INSERT &&
804 tp->tp_col < t->t_winsize.tp_col - width) {
805 teken_rect_t ctr;
806 teken_pos_t ctp;
807
808 /* Insert mode. Move existing characters to the right. */
809 ctr.tr_begin = *tp;
810 ctr.tr_end.tp_row = tp->tp_row + 1;

--- 516 unchanged lines hidden (view full) ---

1327
1328 row = (row - 1) + t->t_originreg.ts_begin;
1329 t->t_cursor.tp_row = row < t->t_originreg.ts_end ?
1330 row : t->t_originreg.ts_end - 1;
1331
1332 t->t_stateflags &= ~TS_WRAPPED;
1333 teken_funcs_cursor(t);
1334}
804 if (t->t_stateflags & TS_INSERT &&
805 tp->tp_col < t->t_winsize.tp_col - width) {
806 teken_rect_t ctr;
807 teken_pos_t ctp;
808
809 /* Insert mode. Move existing characters to the right. */
810 ctr.tr_begin = *tp;
811 ctr.tr_end.tp_row = tp->tp_row + 1;

--- 516 unchanged lines hidden (view full) ---

1328
1329 row = (row - 1) + t->t_originreg.ts_begin;
1330 t->t_cursor.tp_row = row < t->t_originreg.ts_end ?
1331 row : t->t_originreg.ts_end - 1;
1332
1333 t->t_stateflags &= ~TS_WRAPPED;
1334 teken_funcs_cursor(t);
1335}
1336
1337static void
1338teken_subr_repeat_last_graphic_char(teken_t *t, unsigned int rpts)
1339{
1340
1341 for (; t->t_last != 0 && rpts > 0; rpts--)
1342 teken_subr_regular_character(t, t->t_last);
1343}
1344