teken_subr.h (197470) | teken_subr.h (197480) |
---|---|
1/*- 2 * Copyright (c) 2008-2009 Ed Schouten <ed@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2008-2009 Ed Schouten <ed@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/teken/teken_subr.h 197470 2009-09-24 20:33:14Z ed $ | 26 * $FreeBSD: head/sys/teken/teken_subr.h 197480 2009-09-25 11:58:51Z ed $ |
27 */ 28 29static void teken_subr_cursor_up(teken_t *, unsigned int); 30static void teken_subr_erase_line(teken_t *, unsigned int); 31static void teken_subr_regular_character(teken_t *, teken_char_t); 32static void teken_subr_reset_to_initial_state(teken_t *); 33static void teken_subr_save_cursor(teken_t *); 34 --- 357 unchanged lines hidden (view full) --- 392 teken_funcs_fill(t, &tr, BLANK, &t->t_curattr); 393} 394 395static void 396teken_subr_delete_line(teken_t *t, unsigned int nrows) 397{ 398 teken_rect_t tr; 399 | 27 */ 28 29static void teken_subr_cursor_up(teken_t *, unsigned int); 30static void teken_subr_erase_line(teken_t *, unsigned int); 31static void teken_subr_regular_character(teken_t *, teken_char_t); 32static void teken_subr_reset_to_initial_state(teken_t *); 33static void teken_subr_save_cursor(teken_t *); 34 --- 357 unchanged lines hidden (view full) --- 392 teken_funcs_fill(t, &tr, BLANK, &t->t_curattr); 393} 394 395static void 396teken_subr_delete_line(teken_t *t, unsigned int nrows) 397{ 398 teken_rect_t tr; 399 |
400 /* Ignore if outside scrolling region. */ 401 if (t->t_cursor.tp_row < t->t_scrollreg.ts_begin || 402 t->t_cursor.tp_row >= t->t_scrollreg.ts_end) 403 return; 404 |
|
400 tr.tr_begin.tp_col = 0; 401 tr.tr_end.tp_row = t->t_scrollreg.ts_end; 402 tr.tr_end.tp_col = t->t_winsize.tp_col; 403 404 if (t->t_cursor.tp_row + nrows >= t->t_scrollreg.ts_end) { 405 tr.tr_begin.tp_row = t->t_cursor.tp_row; 406 } else { 407 teken_pos_t tp; --- 243 unchanged lines hidden (view full) --- 651 teken_funcs_fill(t, &tr, BLANK, &t->t_curattr); 652} 653 654static void 655teken_subr_insert_line(teken_t *t, unsigned int nrows) 656{ 657 teken_rect_t tr; 658 | 405 tr.tr_begin.tp_col = 0; 406 tr.tr_end.tp_row = t->t_scrollreg.ts_end; 407 tr.tr_end.tp_col = t->t_winsize.tp_col; 408 409 if (t->t_cursor.tp_row + nrows >= t->t_scrollreg.ts_end) { 410 tr.tr_begin.tp_row = t->t_cursor.tp_row; 411 } else { 412 teken_pos_t tp; --- 243 unchanged lines hidden (view full) --- 656 teken_funcs_fill(t, &tr, BLANK, &t->t_curattr); 657} 658 659static void 660teken_subr_insert_line(teken_t *t, unsigned int nrows) 661{ 662 teken_rect_t tr; 663 |
664 /* Ignore if outside scrolling region. */ 665 if (t->t_cursor.tp_row < t->t_scrollreg.ts_begin || 666 t->t_cursor.tp_row >= t->t_scrollreg.ts_end) 667 return; 668 |
|
659 tr.tr_begin.tp_row = t->t_cursor.tp_row; 660 tr.tr_begin.tp_col = 0; 661 tr.tr_end.tp_col = t->t_winsize.tp_col; 662 663 if (t->t_cursor.tp_row + nrows >= t->t_scrollreg.ts_end) { 664 tr.tr_end.tp_row = t->t_scrollreg.ts_end; 665 } else { 666 teken_pos_t tp; --- 566 unchanged lines hidden --- | 669 tr.tr_begin.tp_row = t->t_cursor.tp_row; 670 tr.tr_begin.tp_col = 0; 671 tr.tr_end.tp_col = t->t_winsize.tp_col; 672 673 if (t->t_cursor.tp_row + nrows >= t->t_scrollreg.ts_end) { 674 tr.tr_end.tp_row = t->t_scrollreg.ts_end; 675 } else { 676 teken_pos_t tp; --- 566 unchanged lines hidden --- |