Lines Matching refs:vb

46 #define	VTBUF_LOCK(vb)		mtx_lock_spin(&(vb)->vb_lock)  argument
47 #define VTBUF_UNLOCK(vb) mtx_unlock_spin(&(vb)->vb_lock) argument
56 static int vtbuf_htw(const struct vt_buf *vb, int row);
57 static int vtbuf_wth(const struct vt_buf *vb, int row);
70 vthistory_seek(struct vt_buf *vb, int offset, int whence) in vthistory_seek() argument
75 if ((vb->vb_flags & VBF_SCROLL) == 0) { in vthistory_seek()
76 if (vb->vb_roffset != vb->vb_curroffset) { in vthistory_seek()
77 vb->vb_roffset = vb->vb_curroffset; in vthistory_seek()
84 bottom = vb->vb_curroffset; in vthistory_seek()
85 top = (vb->vb_flags & VBF_HISTORY_FULL) ? in vthistory_seek()
86 bottom + vb->vb_scr_size.tp_row - vb->vb_history_size : in vthistory_seek()
101 roffset = vb->vb_roffset; in vthistory_seek()
102 if (roffset >= bottom + vb->vb_scr_size.tp_row) in vthistory_seek()
103 roffset -= vb->vb_history_size; in vthistory_seek()
110 roffset = vb->vb_history_size + roffset; in vthistory_seek()
115 roffset = vb->vb_curroffset; in vthistory_seek()
119 diff = vb->vb_roffset != roffset; in vthistory_seek()
120 vb->vb_roffset = roffset; in vthistory_seek()
126 vthistory_addlines(struct vt_buf *vb, int offset) in vthistory_addlines() argument
132 vb->vb_curroffset += offset; in vthistory_addlines()
133 if (vb->vb_curroffset + vb->vb_scr_size.tp_row >= vb->vb_history_size) { in vthistory_addlines()
134 vb->vb_flags |= VBF_HISTORY_FULL; in vthistory_addlines()
135 vb->vb_curroffset %= vb->vb_history_size; in vthistory_addlines()
137 if ((vb->vb_flags & VBF_SCROLL) == 0) { in vthistory_addlines()
138 vb->vb_roffset = vb->vb_curroffset; in vthistory_addlines()
142 sz = vb->vb_history_size; in vthistory_addlines()
143 cur = vb->vb_roffset + vb->vb_scr_size.tp_row + sz - 1; in vthistory_addlines()
144 if (vtbuf_in_this_range(cur, vb->vb_mark_start.tp_row, cur + offset, sz) || in vthistory_addlines()
145 vtbuf_in_this_range(cur, vb->vb_mark_end.tp_row, cur + offset, sz)) { in vthistory_addlines()
147 vb->vb_mark_start.tp_row = vb->vb_mark_end.tp_row; in vthistory_addlines()
148 vb->vb_mark_start.tp_col = vb->vb_mark_end.tp_col; in vthistory_addlines()
154 vthistory_getpos(const struct vt_buf *vb, unsigned int *offset) in vthistory_getpos() argument
157 *offset = vb->vb_roffset; in vthistory_getpos()
163 vtbuf_htw(const struct vt_buf *vb, int row) in vtbuf_htw() argument
172 return ((row - vb->vb_roffset + vb->vb_history_size) % in vtbuf_htw()
173 vb->vb_history_size); in vtbuf_htw()
178 vtbuf_wth(const struct vt_buf *vb, int row) in vtbuf_wth() argument
181 return ((vb->vb_roffset + row) % vb->vb_history_size); in vtbuf_wth()
208 vtbuf_iscursor(const struct vt_buf *vb, int row, int col) in vtbuf_iscursor() argument
214 if ((vb->vb_flags & (VBF_CURSOR|VBF_SCROLL)) == VBF_CURSOR && in vtbuf_iscursor()
215 (vb->vb_cursor.tp_row == row) && (vb->vb_cursor.tp_col == col)) in vtbuf_iscursor()
220 if (vb->vb_mark_start.tp_col == vb->vb_mark_end.tp_col && in vtbuf_iscursor()
221 vb->vb_mark_start.tp_row == vb->vb_mark_end.tp_row) in vtbuf_iscursor()
224 sc = vb->vb_mark_start.tp_col; in vtbuf_iscursor()
225 sr = vb->vb_mark_start.tp_row; in vtbuf_iscursor()
226 ec = vb->vb_mark_end.tp_col; in vtbuf_iscursor()
227 er = vb->vb_mark_end.tp_row; in vtbuf_iscursor()
234 sz = vb->vb_history_size; in vtbuf_iscursor()
236 row = vtbuf_wth(vb, row); in vtbuf_iscursor()
253 vtbuf_lock(struct vt_buf *vb) in vtbuf_lock() argument
256 VTBUF_LOCK(vb); in vtbuf_lock()
260 vtbuf_unlock(struct vt_buf *vb) in vtbuf_unlock() argument
263 VTBUF_UNLOCK(vb); in vtbuf_unlock()
267 vtbuf_dirty(struct vt_buf *vb, const term_rect_t *area) in vtbuf_dirty() argument
270 if (vb->vb_dirtyrect.tr_begin.tp_row > area->tr_begin.tp_row) in vtbuf_dirty()
271 vb->vb_dirtyrect.tr_begin.tp_row = area->tr_begin.tp_row; in vtbuf_dirty()
272 if (vb->vb_dirtyrect.tr_begin.tp_col > area->tr_begin.tp_col) in vtbuf_dirty()
273 vb->vb_dirtyrect.tr_begin.tp_col = area->tr_begin.tp_col; in vtbuf_dirty()
274 if (vb->vb_dirtyrect.tr_end.tp_row < area->tr_end.tp_row) in vtbuf_dirty()
275 vb->vb_dirtyrect.tr_end.tp_row = area->tr_end.tp_row; in vtbuf_dirty()
276 if (vb->vb_dirtyrect.tr_end.tp_col < area->tr_end.tp_col) in vtbuf_dirty()
277 vb->vb_dirtyrect.tr_end.tp_col = area->tr_end.tp_col; in vtbuf_dirty()
281 vtbuf_dirty_cell(struct vt_buf *vb, const term_pos_t *p) in vtbuf_dirty_cell() argument
288 vtbuf_dirty(vb, &area); in vtbuf_dirty_cell()
292 vtbuf_make_undirty(struct vt_buf *vb) in vtbuf_make_undirty() argument
295 vb->vb_dirtyrect.tr_begin = vb->vb_scr_size; in vtbuf_make_undirty()
296 vb->vb_dirtyrect.tr_end.tp_row = vb->vb_dirtyrect.tr_end.tp_col = 0; in vtbuf_make_undirty()
300 vtbuf_undirty(struct vt_buf *vb, term_rect_t *r) in vtbuf_undirty() argument
303 *r = vb->vb_dirtyrect; in vtbuf_undirty()
304 vtbuf_make_undirty(vb); in vtbuf_undirty()
308 vtbuf_copy(struct vt_buf *vb, const term_rect_t *r, const term_pos_t *p2) in vtbuf_copy() argument
315 KASSERT(r->tr_begin.tp_row < vb->vb_scr_size.tp_row, in vtbuf_copy()
317 r->tr_begin.tp_row, vb->vb_scr_size.tp_row)); in vtbuf_copy()
318 KASSERT(r->tr_begin.tp_col < vb->vb_scr_size.tp_col, in vtbuf_copy()
320 r->tr_begin.tp_col, vb->vb_scr_size.tp_col)); in vtbuf_copy()
322 KASSERT(r->tr_end.tp_row <= vb->vb_scr_size.tp_row, in vtbuf_copy()
324 r->tr_end.tp_row, vb->vb_scr_size.tp_row)); in vtbuf_copy()
325 KASSERT(r->tr_end.tp_col <= vb->vb_scr_size.tp_col, in vtbuf_copy()
327 r->tr_end.tp_col, vb->vb_scr_size.tp_col)); in vtbuf_copy()
329 KASSERT(p2->tp_row < vb->vb_scr_size.tp_row, in vtbuf_copy()
331 p2->tp_row, vb->vb_scr_size.tp_row)); in vtbuf_copy()
332 KASSERT(p2->tp_col < vb->vb_scr_size.tp_col, in vtbuf_copy()
334 p2->tp_col, vb->vb_scr_size.tp_col)); in vtbuf_copy()
340 r->tr_end.tp_col == vb->vb_scr_size.tp_col && /* Full row. */ in vtbuf_copy()
341 (rows + rdiff) == vb->vb_scr_size.tp_row && /* Whole screen. */ in vtbuf_copy()
343 vthistory_addlines(vb, rdiff); in vtbuf_copy()
349 &VTBUF_FIELD(vb, p2->tp_row + pr, p2->tp_col), in vtbuf_copy()
350 &VTBUF_FIELD(vb, p1->tp_row + pr, p1->tp_col), in vtbuf_copy()
356 &VTBUF_FIELD(vb, p2->tp_row + pr, p2->tp_col), in vtbuf_copy()
357 &VTBUF_FIELD(vb, p1->tp_row + pr, p1->tp_col), in vtbuf_copy()
362 area.tr_end.tp_row = MIN(p2->tp_row + rows, vb->vb_scr_size.tp_row); in vtbuf_copy()
363 area.tr_end.tp_col = MIN(p2->tp_col + cols, vb->vb_scr_size.tp_col); in vtbuf_copy()
364 vtbuf_dirty(vb, &area); in vtbuf_copy()
368 vtbuf_do_fill(struct vt_buf *vb, const term_rect_t *r, term_char_t c) in vtbuf_do_fill() argument
374 row = vb->vb_rows[(vb->vb_curroffset + pr) % in vtbuf_do_fill()
375 VTBUF_MAX_HEIGHT(vb)]; in vtbuf_do_fill()
383 vtbuf_fill(struct vt_buf *vb, const term_rect_t *r, term_char_t c) in vtbuf_fill() argument
386 KASSERT(r->tr_begin.tp_row < vb->vb_scr_size.tp_row, in vtbuf_fill()
388 r->tr_begin.tp_row, vb->vb_scr_size.tp_row)); in vtbuf_fill()
389 KASSERT(r->tr_begin.tp_col < vb->vb_scr_size.tp_col, in vtbuf_fill()
391 r->tr_begin.tp_col, vb->vb_scr_size.tp_col)); in vtbuf_fill()
393 KASSERT(r->tr_end.tp_row <= vb->vb_scr_size.tp_row, in vtbuf_fill()
395 r->tr_end.tp_row, vb->vb_scr_size.tp_row)); in vtbuf_fill()
396 KASSERT(r->tr_end.tp_col <= vb->vb_scr_size.tp_col, in vtbuf_fill()
398 r->tr_end.tp_col, vb->vb_scr_size.tp_col)); in vtbuf_fill()
400 vtbuf_do_fill(vb, r, c); in vtbuf_fill()
401 vtbuf_dirty(vb, r); in vtbuf_fill()
405 vtbuf_init_rows(struct vt_buf *vb) in vtbuf_init_rows() argument
409 vb->vb_history_size = MAX(vb->vb_history_size, vb->vb_scr_size.tp_row); in vtbuf_init_rows()
411 for (r = 0; r < vb->vb_history_size; r++) in vtbuf_init_rows()
412 vb->vb_rows[r] = &vb->vb_buffer[r * vb->vb_scr_size.tp_col]; in vtbuf_init_rows()
416 vtbuf_do_clearhistory(struct vt_buf *vb) in vtbuf_do_clearhistory() argument
422 a = teken_get_curattr(&vb->vb_terminal->tm_emulator); in vtbuf_do_clearhistory()
426 rect.tr_end.tp_col = vb->vb_scr_size.tp_col; in vtbuf_do_clearhistory()
427 rect.tr_end.tp_row = vb->vb_history_size; in vtbuf_do_clearhistory()
429 vtbuf_do_fill(vb, &rect, VTBUF_SPACE_CHAR(ch)); in vtbuf_do_clearhistory()
433 vtbuf_reset_scrollback(struct vt_buf *vb) in vtbuf_reset_scrollback() argument
435 vb->vb_roffset = 0; in vtbuf_reset_scrollback()
436 vb->vb_curroffset = 0; in vtbuf_reset_scrollback()
437 vb->vb_mark_start.tp_row = 0; in vtbuf_reset_scrollback()
438 vb->vb_mark_start.tp_col = 0; in vtbuf_reset_scrollback()
439 vb->vb_mark_end.tp_row = 0; in vtbuf_reset_scrollback()
440 vb->vb_mark_end.tp_col = 0; in vtbuf_reset_scrollback()
444 vtbuf_init_early(struct vt_buf *vb) in vtbuf_init_early() argument
446 vb->vb_flags |= VBF_CURSOR; in vtbuf_init_early()
447 vtbuf_reset_scrollback(vb); in vtbuf_init_early()
448 vtbuf_init_rows(vb); in vtbuf_init_early()
449 vtbuf_do_clearhistory(vb); in vtbuf_init_early()
450 vtbuf_make_undirty(vb); in vtbuf_init_early()
451 if ((vb->vb_flags & VBF_MTX_INIT) == 0) { in vtbuf_init_early()
452 mtx_init(&vb->vb_lock, "vtbuf", NULL, MTX_SPIN); in vtbuf_init_early()
453 vb->vb_flags |= VBF_MTX_INIT; in vtbuf_init_early()
458 vtbuf_init(struct vt_buf *vb, const term_pos_t *p) in vtbuf_init() argument
462 vb->vb_scr_size = *p; in vtbuf_init()
463 vb->vb_history_size = VBF_DEFAULT_HISTORY_SIZE; in vtbuf_init()
465 if ((vb->vb_flags & VBF_STATIC) == 0) { in vtbuf_init()
466 sz = vb->vb_history_size * p->tp_col * sizeof(term_char_t); in vtbuf_init()
467 vb->vb_buffer = malloc(sz, M_VTBUF, M_WAITOK | M_ZERO); in vtbuf_init()
469 sz = vb->vb_history_size * sizeof(term_char_t *); in vtbuf_init()
470 vb->vb_rows = malloc(sz, M_VTBUF, M_WAITOK | M_ZERO); in vtbuf_init()
473 vtbuf_init_early(vb); in vtbuf_init()
477 vtbuf_clearhistory(struct vt_buf *vb) in vtbuf_clearhistory() argument
479 VTBUF_LOCK(vb); in vtbuf_clearhistory()
480 vtbuf_do_clearhistory(vb); in vtbuf_clearhistory()
481 vtbuf_reset_scrollback(vb); in vtbuf_clearhistory()
482 vb->vb_flags &= ~VBF_HISTORY_FULL; in vtbuf_clearhistory()
483 VTBUF_UNLOCK(vb); in vtbuf_clearhistory()
487 vtbuf_sethistory_size(struct vt_buf *vb, unsigned int size) in vtbuf_sethistory_size() argument
492 p.tp_row = vb->vb_scr_size.tp_row; in vtbuf_sethistory_size()
493 p.tp_col = vb->vb_scr_size.tp_col; in vtbuf_sethistory_size()
494 vtbuf_grow(vb, &p, size); in vtbuf_sethistory_size()
498 vtbuf_grow(struct vt_buf *vb, const term_pos_t *p, unsigned int history_size) in vtbuf_grow() argument
507 a = teken_get_curattr(&vb->vb_terminal->tm_emulator); in vtbuf_grow()
519 VTBUF_LOCK(vb); in vtbuf_grow()
520 old = vb->vb_flags & VBF_STATIC ? NULL : vb->vb_buffer; in vtbuf_grow()
521 oldrows = vb->vb_flags & VBF_STATIC ? NULL : vb->vb_rows; in vtbuf_grow()
522 copyrows = vb->vb_rows; in vtbuf_grow()
524 w = vb->vb_scr_size.tp_col; in vtbuf_grow()
525 h = vb->vb_scr_size.tp_row; in vtbuf_grow()
526 old_history_size = vb->vb_history_size; in vtbuf_grow()
527 history_full = vb->vb_flags & VBF_HISTORY_FULL || in vtbuf_grow()
528 vb->vb_curroffset + h >= history_size; in vtbuf_grow()
530 vb->vb_history_size = history_size; in vtbuf_grow()
531 vb->vb_buffer = new; in vtbuf_grow()
532 vb->vb_rows = rows; in vtbuf_grow()
533 vb->vb_flags &= ~VBF_STATIC; in vtbuf_grow()
534 vb->vb_scr_size = *p; in vtbuf_grow()
535 vtbuf_init_rows(vb); in vtbuf_grow()
555 (vb->vb_curroffset + h + r) % in vtbuf_grow()
587 vb->vb_flags &= ~VBF_HISTORY_FULL; in vtbuf_grow()
600 vb->vb_curroffset = old_history_size - h; in vtbuf_grow()
617 (vb->vb_curroffset + h + r + in vtbuf_grow()
637 vb->vb_curroffset = history_size - h; in vtbuf_grow()
638 vb->vb_flags |= VBF_HISTORY_FULL; in vtbuf_grow()
642 vb->vb_roffset = vb->vb_curroffset; in vtbuf_grow()
645 if (vb->vb_cursor.tp_col > p->tp_col - 1) in vtbuf_grow()
650 vb->vb_cursor.tp_col = p->tp_col - 1; in vtbuf_grow()
652 if (vb->vb_curroffset > 0 || vb->vb_cursor.tp_row > p->tp_row - 1) in vtbuf_grow()
654 vb->vb_cursor.tp_row = p->tp_row - 1; in vtbuf_grow()
656 VTBUF_UNLOCK(vb); in vtbuf_grow()
664 vtbuf_putchar(struct vt_buf *vb, const term_pos_t *p, term_char_t c) in vtbuf_putchar() argument
668 KASSERT(p->tp_row < vb->vb_scr_size.tp_row, in vtbuf_putchar()
670 p->tp_row, vb->vb_scr_size.tp_row)); in vtbuf_putchar()
671 KASSERT(p->tp_col < vb->vb_scr_size.tp_col, in vtbuf_putchar()
673 p->tp_col, vb->vb_scr_size.tp_col)); in vtbuf_putchar()
675 row = vb->vb_rows[(vb->vb_curroffset + p->tp_row) % in vtbuf_putchar()
676 VTBUF_MAX_HEIGHT(vb)]; in vtbuf_putchar()
679 vtbuf_dirty_cell(vb, p); in vtbuf_putchar()
684 vtbuf_cursor_position(struct vt_buf *vb, const term_pos_t *p) in vtbuf_cursor_position() argument
686 if (vb->vb_flags & VBF_CURSOR) { in vtbuf_cursor_position()
687 vtbuf_dirty_cell(vb, &vb->vb_cursor); in vtbuf_cursor_position()
688 vb->vb_cursor = *p; in vtbuf_cursor_position()
689 vtbuf_dirty_cell(vb, &vb->vb_cursor); in vtbuf_cursor_position()
691 vb->vb_cursor = *p; in vtbuf_cursor_position()
697 vtbuf_flush_mark(struct vt_buf *vb) in vtbuf_flush_mark() argument
703 if ((vb->vb_mark_start.tp_col != vb->vb_mark_end.tp_col) || in vtbuf_flush_mark()
704 (vb->vb_mark_start.tp_row != vb->vb_mark_end.tp_row)) { in vtbuf_flush_mark()
705 s = vtbuf_htw(vb, vb->vb_mark_start.tp_row); in vtbuf_flush_mark()
706 e = vtbuf_htw(vb, vb->vb_mark_end.tp_row); in vtbuf_flush_mark()
711 area.tr_end.tp_col = vb->vb_scr_size.tp_col; in vtbuf_flush_mark()
714 VTBUF_LOCK(vb); in vtbuf_flush_mark()
715 vtbuf_dirty(vb, &area); in vtbuf_flush_mark()
716 VTBUF_UNLOCK(vb); in vtbuf_flush_mark()
721 vtbuf_get_marked_len(struct vt_buf *vb) in vtbuf_get_marked_len() argument
727 if (POS_INDEX(vtbuf_htw(vb, vb->vb_mark_start.tp_row), in vtbuf_get_marked_len()
728 vb->vb_mark_start.tp_col) > in vtbuf_get_marked_len()
729 POS_INDEX(vtbuf_htw(vb, vb->vb_mark_end.tp_row), in vtbuf_get_marked_len()
730 vb->vb_mark_end.tp_col)) { in vtbuf_get_marked_len()
731 POS_COPY(e, vb->vb_mark_start); in vtbuf_get_marked_len()
732 POS_COPY(s, vb->vb_mark_end); in vtbuf_get_marked_len()
734 POS_COPY(s, vb->vb_mark_start); in vtbuf_get_marked_len()
735 POS_COPY(e, vb->vb_mark_end); in vtbuf_get_marked_len()
738 si = s.tp_row * vb->vb_scr_size.tp_col + s.tp_col; in vtbuf_get_marked_len()
739 ei = e.tp_row * vb->vb_scr_size.tp_col + e.tp_col; in vtbuf_get_marked_len()
771 vtbuf_extract_marked(struct vt_buf *vb, term_char_t *buf, int sz, int mark) in vtbuf_extract_marked() argument
777 if (POS_INDEX(vtbuf_htw(vb, vb->vb_mark_start.tp_row), in vtbuf_extract_marked()
778 vb->vb_mark_start.tp_col) > in vtbuf_extract_marked()
779 POS_INDEX(vtbuf_htw(vb, vb->vb_mark_end.tp_row), in vtbuf_extract_marked()
780 vb->vb_mark_end.tp_col)) { in vtbuf_extract_marked()
781 POS_COPY(e, vb->vb_mark_start); in vtbuf_extract_marked()
782 POS_COPY(s, vb->vb_mark_end); in vtbuf_extract_marked()
784 POS_COPY(s, vb->vb_mark_start); in vtbuf_extract_marked()
785 POS_COPY(e, vb->vb_mark_end); in vtbuf_extract_marked()
791 ce = (r == e.tp_row)?e.tp_col:vb->vb_scr_size.tp_col; in vtbuf_extract_marked()
796 buf[i++] = vb->vb_rows[r][c]; in vtbuf_extract_marked()
817 vtbuf_set_mark(struct vt_buf *vb, int type, int col, int row) in vtbuf_set_mark() argument
824 if (vb->vb_mark_last != VTB_MARK_MOVE) in vtbuf_set_mark()
829 vtbuf_flush_mark(vb); /* Clean old mark. */ in vtbuf_set_mark()
830 vb->vb_mark_end.tp_col = col; in vtbuf_set_mark()
831 vb->vb_mark_end.tp_row = vtbuf_wth(vb, row); in vtbuf_set_mark()
834 vtbuf_flush_mark(vb); /* Clean old mark. */ in vtbuf_set_mark()
835 vb->vb_mark_start.tp_col = col; in vtbuf_set_mark()
836 vb->vb_mark_start.tp_row = vtbuf_wth(vb, row); in vtbuf_set_mark()
838 vb->vb_mark_end.tp_col = col; in vtbuf_set_mark()
839 vb->vb_mark_end.tp_row = vtbuf_wth(vb, row); in vtbuf_set_mark()
842 vtbuf_flush_mark(vb); /* Clean old mark. */ in vtbuf_set_mark()
843 vb->vb_mark_start.tp_row = vb->vb_mark_end.tp_row = in vtbuf_set_mark()
844 vtbuf_wth(vb, row); in vtbuf_set_mark()
845 r = vb->vb_rows[vb->vb_mark_start.tp_row]; in vtbuf_set_mark()
848 vb->vb_mark_start.tp_col = i + 1; in vtbuf_set_mark()
854 vb->vb_mark_start.tp_col = 0; in vtbuf_set_mark()
855 for (i = col; i < vb->vb_scr_size.tp_col; i++) { in vtbuf_set_mark()
857 vb->vb_mark_end.tp_col = i; in vtbuf_set_mark()
862 if (i == vb->vb_scr_size.tp_col) in vtbuf_set_mark()
863 vb->vb_mark_end.tp_col = i; in vtbuf_set_mark()
865 if (vb->vb_mark_start.tp_col > vb->vb_mark_end.tp_col) in vtbuf_set_mark()
866 vb->vb_mark_start.tp_col = vb->vb_mark_end.tp_col; in vtbuf_set_mark()
869 vtbuf_flush_mark(vb); /* Clean old mark. */ in vtbuf_set_mark()
870 vb->vb_mark_start.tp_col = 0; in vtbuf_set_mark()
871 vb->vb_mark_end.tp_col = vb->vb_scr_size.tp_col; in vtbuf_set_mark()
872 vb->vb_mark_start.tp_row = vb->vb_mark_end.tp_row = in vtbuf_set_mark()
873 vtbuf_wth(vb, row); in vtbuf_set_mark()
876 vb->vb_mark_last = type; in vtbuf_set_mark()
883 vb->vb_mark_last = type; in vtbuf_set_mark()
885 vtbuf_flush_mark(vb); in vtbuf_set_mark()
891 vtbuf_cursor_visibility(struct vt_buf *vb, int yes) in vtbuf_cursor_visibility() argument
895 oflags = vb->vb_flags; in vtbuf_cursor_visibility()
897 vb->vb_flags |= VBF_CURSOR; in vtbuf_cursor_visibility()
899 vb->vb_flags &= ~VBF_CURSOR; in vtbuf_cursor_visibility()
900 nflags = vb->vb_flags; in vtbuf_cursor_visibility()
903 vtbuf_dirty_cell(vb, &vb->vb_cursor); in vtbuf_cursor_visibility()
907 vtbuf_scroll_mode(struct vt_buf *vb, int yes) in vtbuf_scroll_mode() argument
911 VTBUF_LOCK(vb); in vtbuf_scroll_mode()
912 oflags = vb->vb_flags; in vtbuf_scroll_mode()
914 vb->vb_flags |= VBF_SCROLL; in vtbuf_scroll_mode()
916 vb->vb_flags &= ~VBF_SCROLL; in vtbuf_scroll_mode()
917 nflags = vb->vb_flags; in vtbuf_scroll_mode()
920 vtbuf_dirty_cell(vb, &vb->vb_cursor); in vtbuf_scroll_mode()
921 VTBUF_UNLOCK(vb); in vtbuf_scroll_mode()