Lines Matching refs:vb
49 #define VTBUF_LOCK(vb) mtx_lock_spin(&(vb)->vb_lock) argument
50 #define VTBUF_UNLOCK(vb) mtx_unlock_spin(&(vb)->vb_lock) argument
59 static int vtbuf_htw(const struct vt_buf *vb, int row);
60 static int vtbuf_wth(const struct vt_buf *vb, int row);
73 vthistory_seek(struct vt_buf *vb, int offset, int whence) in vthistory_seek() argument
78 if ((vb->vb_flags & VBF_SCROLL) == 0) { in vthistory_seek()
79 if (vb->vb_roffset != vb->vb_curroffset) { in vthistory_seek()
80 vb->vb_roffset = vb->vb_curroffset; in vthistory_seek()
87 bottom = vb->vb_curroffset; in vthistory_seek()
88 top = (vb->vb_flags & VBF_HISTORY_FULL) ? in vthistory_seek()
89 bottom + vb->vb_scr_size.tp_row - vb->vb_history_size : in vthistory_seek()
104 roffset = vb->vb_roffset; in vthistory_seek()
105 if (roffset >= bottom + vb->vb_scr_size.tp_row) in vthistory_seek()
106 roffset -= vb->vb_history_size; in vthistory_seek()
113 roffset = vb->vb_history_size + roffset; in vthistory_seek()
118 roffset = vb->vb_curroffset; in vthistory_seek()
122 diff = vb->vb_roffset != roffset; in vthistory_seek()
123 vb->vb_roffset = roffset; in vthistory_seek()
129 vthistory_addlines(struct vt_buf *vb, int offset) in vthistory_addlines() argument
135 vb->vb_curroffset += offset; in vthistory_addlines()
136 if (vb->vb_curroffset + vb->vb_scr_size.tp_row >= vb->vb_history_size) { in vthistory_addlines()
137 vb->vb_flags |= VBF_HISTORY_FULL; in vthistory_addlines()
138 vb->vb_curroffset %= vb->vb_history_size; in vthistory_addlines()
140 if ((vb->vb_flags & VBF_SCROLL) == 0) { in vthistory_addlines()
141 vb->vb_roffset = vb->vb_curroffset; in vthistory_addlines()
145 sz = vb->vb_history_size; in vthistory_addlines()
146 cur = vb->vb_roffset + vb->vb_scr_size.tp_row + sz - 1; in vthistory_addlines()
147 if (vtbuf_in_this_range(cur, vb->vb_mark_start.tp_row, cur + offset, sz) || in vthistory_addlines()
148 vtbuf_in_this_range(cur, vb->vb_mark_end.tp_row, cur + offset, sz)) { in vthistory_addlines()
150 vb->vb_mark_start.tp_row = vb->vb_mark_end.tp_row; in vthistory_addlines()
151 vb->vb_mark_start.tp_col = vb->vb_mark_end.tp_col; in vthistory_addlines()
157 vthistory_getpos(const struct vt_buf *vb, unsigned int *offset) in vthistory_getpos() argument
160 *offset = vb->vb_roffset; in vthistory_getpos()
166 vtbuf_htw(const struct vt_buf *vb, int row) in vtbuf_htw() argument
175 return ((row - vb->vb_roffset + vb->vb_history_size) % in vtbuf_htw()
176 vb->vb_history_size); in vtbuf_htw()
181 vtbuf_wth(const struct vt_buf *vb, int row) in vtbuf_wth() argument
184 return ((vb->vb_roffset + row) % vb->vb_history_size); in vtbuf_wth()
211 vtbuf_iscursor(const struct vt_buf *vb, int row, int col) in vtbuf_iscursor() argument
217 if ((vb->vb_flags & (VBF_CURSOR|VBF_SCROLL)) == VBF_CURSOR && in vtbuf_iscursor()
218 (vb->vb_cursor.tp_row == row) && (vb->vb_cursor.tp_col == col)) in vtbuf_iscursor()
223 if (vb->vb_mark_start.tp_col == vb->vb_mark_end.tp_col && in vtbuf_iscursor()
224 vb->vb_mark_start.tp_row == vb->vb_mark_end.tp_row) in vtbuf_iscursor()
227 sc = vb->vb_mark_start.tp_col; in vtbuf_iscursor()
228 sr = vb->vb_mark_start.tp_row; in vtbuf_iscursor()
229 ec = vb->vb_mark_end.tp_col; in vtbuf_iscursor()
230 er = vb->vb_mark_end.tp_row; in vtbuf_iscursor()
237 sz = vb->vb_history_size; in vtbuf_iscursor()
239 row = vtbuf_wth(vb, row); in vtbuf_iscursor()
256 vtbuf_lock(struct vt_buf *vb) in vtbuf_lock() argument
259 VTBUF_LOCK(vb); in vtbuf_lock()
263 vtbuf_unlock(struct vt_buf *vb) in vtbuf_unlock() argument
266 VTBUF_UNLOCK(vb); in vtbuf_unlock()
270 vtbuf_dirty(struct vt_buf *vb, const term_rect_t *area) in vtbuf_dirty() argument
273 if (vb->vb_dirtyrect.tr_begin.tp_row > area->tr_begin.tp_row) in vtbuf_dirty()
274 vb->vb_dirtyrect.tr_begin.tp_row = area->tr_begin.tp_row; in vtbuf_dirty()
275 if (vb->vb_dirtyrect.tr_begin.tp_col > area->tr_begin.tp_col) in vtbuf_dirty()
276 vb->vb_dirtyrect.tr_begin.tp_col = area->tr_begin.tp_col; in vtbuf_dirty()
277 if (vb->vb_dirtyrect.tr_end.tp_row < area->tr_end.tp_row) in vtbuf_dirty()
278 vb->vb_dirtyrect.tr_end.tp_row = area->tr_end.tp_row; in vtbuf_dirty()
279 if (vb->vb_dirtyrect.tr_end.tp_col < area->tr_end.tp_col) in vtbuf_dirty()
280 vb->vb_dirtyrect.tr_end.tp_col = area->tr_end.tp_col; in vtbuf_dirty()
284 vtbuf_dirty_cell(struct vt_buf *vb, const term_pos_t *p) in vtbuf_dirty_cell() argument
291 vtbuf_dirty(vb, &area); in vtbuf_dirty_cell()
295 vtbuf_make_undirty(struct vt_buf *vb) in vtbuf_make_undirty() argument
298 vb->vb_dirtyrect.tr_begin = vb->vb_scr_size; in vtbuf_make_undirty()
299 vb->vb_dirtyrect.tr_end.tp_row = vb->vb_dirtyrect.tr_end.tp_col = 0; in vtbuf_make_undirty()
303 vtbuf_undirty(struct vt_buf *vb, term_rect_t *r) in vtbuf_undirty() argument
306 *r = vb->vb_dirtyrect; in vtbuf_undirty()
307 vtbuf_make_undirty(vb); in vtbuf_undirty()
311 vtbuf_copy(struct vt_buf *vb, const term_rect_t *r, const term_pos_t *p2) in vtbuf_copy() argument
318 KASSERT(r->tr_begin.tp_row < vb->vb_scr_size.tp_row, in vtbuf_copy()
320 r->tr_begin.tp_row, vb->vb_scr_size.tp_row)); in vtbuf_copy()
321 KASSERT(r->tr_begin.tp_col < vb->vb_scr_size.tp_col, in vtbuf_copy()
323 r->tr_begin.tp_col, vb->vb_scr_size.tp_col)); in vtbuf_copy()
325 KASSERT(r->tr_end.tp_row <= vb->vb_scr_size.tp_row, in vtbuf_copy()
327 r->tr_end.tp_row, vb->vb_scr_size.tp_row)); in vtbuf_copy()
328 KASSERT(r->tr_end.tp_col <= vb->vb_scr_size.tp_col, in vtbuf_copy()
330 r->tr_end.tp_col, vb->vb_scr_size.tp_col)); in vtbuf_copy()
332 KASSERT(p2->tp_row < vb->vb_scr_size.tp_row, in vtbuf_copy()
334 p2->tp_row, vb->vb_scr_size.tp_row)); in vtbuf_copy()
335 KASSERT(p2->tp_col < vb->vb_scr_size.tp_col, in vtbuf_copy()
337 p2->tp_col, vb->vb_scr_size.tp_col)); in vtbuf_copy()
343 r->tr_end.tp_col == vb->vb_scr_size.tp_col && /* Full row. */ in vtbuf_copy()
344 (rows + rdiff) == vb->vb_scr_size.tp_row && /* Whole screen. */ in vtbuf_copy()
346 vthistory_addlines(vb, rdiff); in vtbuf_copy()
352 &VTBUF_FIELD(vb, p2->tp_row + pr, p2->tp_col), in vtbuf_copy()
353 &VTBUF_FIELD(vb, p1->tp_row + pr, p1->tp_col), in vtbuf_copy()
359 &VTBUF_FIELD(vb, p2->tp_row + pr, p2->tp_col), in vtbuf_copy()
360 &VTBUF_FIELD(vb, p1->tp_row + pr, p1->tp_col), in vtbuf_copy()
365 area.tr_end.tp_row = MIN(p2->tp_row + rows, vb->vb_scr_size.tp_row); in vtbuf_copy()
366 area.tr_end.tp_col = MIN(p2->tp_col + cols, vb->vb_scr_size.tp_col); in vtbuf_copy()
367 vtbuf_dirty(vb, &area); in vtbuf_copy()
371 vtbuf_do_fill(struct vt_buf *vb, const term_rect_t *r, term_char_t c) in vtbuf_do_fill() argument
377 row = vb->vb_rows[(vb->vb_curroffset + pr) % in vtbuf_do_fill()
378 VTBUF_MAX_HEIGHT(vb)]; in vtbuf_do_fill()
386 vtbuf_fill(struct vt_buf *vb, const term_rect_t *r, term_char_t c) in vtbuf_fill() argument
389 KASSERT(r->tr_begin.tp_row < vb->vb_scr_size.tp_row, in vtbuf_fill()
391 r->tr_begin.tp_row, vb->vb_scr_size.tp_row)); in vtbuf_fill()
392 KASSERT(r->tr_begin.tp_col < vb->vb_scr_size.tp_col, in vtbuf_fill()
394 r->tr_begin.tp_col, vb->vb_scr_size.tp_col)); in vtbuf_fill()
396 KASSERT(r->tr_end.tp_row <= vb->vb_scr_size.tp_row, in vtbuf_fill()
398 r->tr_end.tp_row, vb->vb_scr_size.tp_row)); in vtbuf_fill()
399 KASSERT(r->tr_end.tp_col <= vb->vb_scr_size.tp_col, in vtbuf_fill()
401 r->tr_end.tp_col, vb->vb_scr_size.tp_col)); in vtbuf_fill()
403 vtbuf_do_fill(vb, r, c); in vtbuf_fill()
404 vtbuf_dirty(vb, r); in vtbuf_fill()
408 vtbuf_init_rows(struct vt_buf *vb) in vtbuf_init_rows() argument
412 vb->vb_history_size = MAX(vb->vb_history_size, vb->vb_scr_size.tp_row); in vtbuf_init_rows()
414 for (r = 0; r < vb->vb_history_size; r++) in vtbuf_init_rows()
415 vb->vb_rows[r] = &vb->vb_buffer[r * vb->vb_scr_size.tp_col]; in vtbuf_init_rows()
419 vtbuf_do_clearhistory(struct vt_buf *vb) in vtbuf_do_clearhistory() argument
425 a = teken_get_curattr(&vb->vb_terminal->tm_emulator); in vtbuf_do_clearhistory()
429 rect.tr_end.tp_col = vb->vb_scr_size.tp_col; in vtbuf_do_clearhistory()
430 rect.tr_end.tp_row = vb->vb_history_size; in vtbuf_do_clearhistory()
432 vtbuf_do_fill(vb, &rect, VTBUF_SPACE_CHAR(ch)); in vtbuf_do_clearhistory()
436 vtbuf_reset_scrollback(struct vt_buf *vb) in vtbuf_reset_scrollback() argument
438 vb->vb_roffset = 0; in vtbuf_reset_scrollback()
439 vb->vb_curroffset = 0; in vtbuf_reset_scrollback()
440 vb->vb_mark_start.tp_row = 0; in vtbuf_reset_scrollback()
441 vb->vb_mark_start.tp_col = 0; in vtbuf_reset_scrollback()
442 vb->vb_mark_end.tp_row = 0; in vtbuf_reset_scrollback()
443 vb->vb_mark_end.tp_col = 0; in vtbuf_reset_scrollback()
447 vtbuf_init_early(struct vt_buf *vb) in vtbuf_init_early() argument
449 vb->vb_flags |= VBF_CURSOR; in vtbuf_init_early()
450 vtbuf_reset_scrollback(vb); in vtbuf_init_early()
451 vtbuf_init_rows(vb); in vtbuf_init_early()
452 vtbuf_do_clearhistory(vb); in vtbuf_init_early()
453 vtbuf_make_undirty(vb); in vtbuf_init_early()
454 if ((vb->vb_flags & VBF_MTX_INIT) == 0) { in vtbuf_init_early()
455 mtx_init(&vb->vb_lock, "vtbuf", NULL, MTX_SPIN); in vtbuf_init_early()
456 vb->vb_flags |= VBF_MTX_INIT; in vtbuf_init_early()
461 vtbuf_init(struct vt_buf *vb, const term_pos_t *p) in vtbuf_init() argument
465 vb->vb_scr_size = *p; in vtbuf_init()
466 vb->vb_history_size = VBF_DEFAULT_HISTORY_SIZE; in vtbuf_init()
468 if ((vb->vb_flags & VBF_STATIC) == 0) { in vtbuf_init()
469 sz = vb->vb_history_size * p->tp_col * sizeof(term_char_t); in vtbuf_init()
470 vb->vb_buffer = malloc(sz, M_VTBUF, M_WAITOK | M_ZERO); in vtbuf_init()
472 sz = vb->vb_history_size * sizeof(term_char_t *); in vtbuf_init()
473 vb->vb_rows = malloc(sz, M_VTBUF, M_WAITOK | M_ZERO); in vtbuf_init()
476 vtbuf_init_early(vb); in vtbuf_init()
480 vtbuf_clearhistory(struct vt_buf *vb) in vtbuf_clearhistory() argument
482 VTBUF_LOCK(vb); in vtbuf_clearhistory()
483 vtbuf_do_clearhistory(vb); in vtbuf_clearhistory()
484 vtbuf_reset_scrollback(vb); in vtbuf_clearhistory()
485 vb->vb_flags &= ~VBF_HISTORY_FULL; in vtbuf_clearhistory()
486 VTBUF_UNLOCK(vb); in vtbuf_clearhistory()
490 vtbuf_sethistory_size(struct vt_buf *vb, unsigned int size) in vtbuf_sethistory_size() argument
495 p.tp_row = vb->vb_scr_size.tp_row; in vtbuf_sethistory_size()
496 p.tp_col = vb->vb_scr_size.tp_col; in vtbuf_sethistory_size()
497 vtbuf_grow(vb, &p, size); in vtbuf_sethistory_size()
501 vtbuf_grow(struct vt_buf *vb, const term_pos_t *p, unsigned int history_size) in vtbuf_grow() argument
510 a = teken_get_curattr(&vb->vb_terminal->tm_emulator); in vtbuf_grow()
522 VTBUF_LOCK(vb); in vtbuf_grow()
523 old = vb->vb_flags & VBF_STATIC ? NULL : vb->vb_buffer; in vtbuf_grow()
524 oldrows = vb->vb_flags & VBF_STATIC ? NULL : vb->vb_rows; in vtbuf_grow()
525 copyrows = vb->vb_rows; in vtbuf_grow()
527 w = vb->vb_scr_size.tp_col; in vtbuf_grow()
528 h = vb->vb_scr_size.tp_row; in vtbuf_grow()
529 old_history_size = vb->vb_history_size; in vtbuf_grow()
530 history_full = vb->vb_flags & VBF_HISTORY_FULL || in vtbuf_grow()
531 vb->vb_curroffset + h >= history_size; in vtbuf_grow()
533 vb->vb_history_size = history_size; in vtbuf_grow()
534 vb->vb_buffer = new; in vtbuf_grow()
535 vb->vb_rows = rows; in vtbuf_grow()
536 vb->vb_flags &= ~VBF_STATIC; in vtbuf_grow()
537 vb->vb_scr_size = *p; in vtbuf_grow()
538 vtbuf_init_rows(vb); in vtbuf_grow()
558 (vb->vb_curroffset + h + r) % in vtbuf_grow()
590 vb->vb_flags &= ~VBF_HISTORY_FULL; in vtbuf_grow()
603 vb->vb_curroffset = old_history_size - h; in vtbuf_grow()
620 (vb->vb_curroffset + h + r + in vtbuf_grow()
640 vb->vb_curroffset = history_size - h; in vtbuf_grow()
641 vb->vb_flags |= VBF_HISTORY_FULL; in vtbuf_grow()
645 vb->vb_roffset = vb->vb_curroffset; in vtbuf_grow()
648 if (vb->vb_cursor.tp_col > p->tp_col - 1) in vtbuf_grow()
653 vb->vb_cursor.tp_col = p->tp_col - 1; in vtbuf_grow()
655 if (vb->vb_curroffset > 0 || vb->vb_cursor.tp_row > p->tp_row - 1) in vtbuf_grow()
657 vb->vb_cursor.tp_row = p->tp_row - 1; in vtbuf_grow()
659 VTBUF_UNLOCK(vb); in vtbuf_grow()
667 vtbuf_putchar(struct vt_buf *vb, const term_pos_t *p, term_char_t c) in vtbuf_putchar() argument
671 KASSERT(p->tp_row < vb->vb_scr_size.tp_row, in vtbuf_putchar()
673 p->tp_row, vb->vb_scr_size.tp_row)); in vtbuf_putchar()
674 KASSERT(p->tp_col < vb->vb_scr_size.tp_col, in vtbuf_putchar()
676 p->tp_col, vb->vb_scr_size.tp_col)); in vtbuf_putchar()
678 row = vb->vb_rows[(vb->vb_curroffset + p->tp_row) % in vtbuf_putchar()
679 VTBUF_MAX_HEIGHT(vb)]; in vtbuf_putchar()
682 vtbuf_dirty_cell(vb, p); in vtbuf_putchar()
687 vtbuf_cursor_position(struct vt_buf *vb, const term_pos_t *p) in vtbuf_cursor_position() argument
689 if (vb->vb_flags & VBF_CURSOR) { in vtbuf_cursor_position()
690 vtbuf_dirty_cell(vb, &vb->vb_cursor); in vtbuf_cursor_position()
691 vb->vb_cursor = *p; in vtbuf_cursor_position()
692 vtbuf_dirty_cell(vb, &vb->vb_cursor); in vtbuf_cursor_position()
694 vb->vb_cursor = *p; in vtbuf_cursor_position()
700 vtbuf_flush_mark(struct vt_buf *vb) in vtbuf_flush_mark() argument
706 if ((vb->vb_mark_start.tp_col != vb->vb_mark_end.tp_col) || in vtbuf_flush_mark()
707 (vb->vb_mark_start.tp_row != vb->vb_mark_end.tp_row)) { in vtbuf_flush_mark()
708 s = vtbuf_htw(vb, vb->vb_mark_start.tp_row); in vtbuf_flush_mark()
709 e = vtbuf_htw(vb, vb->vb_mark_end.tp_row); in vtbuf_flush_mark()
714 area.tr_end.tp_col = vb->vb_scr_size.tp_col; in vtbuf_flush_mark()
717 VTBUF_LOCK(vb); in vtbuf_flush_mark()
718 vtbuf_dirty(vb, &area); in vtbuf_flush_mark()
719 VTBUF_UNLOCK(vb); in vtbuf_flush_mark()
724 vtbuf_get_marked_len(struct vt_buf *vb) in vtbuf_get_marked_len() argument
730 if (POS_INDEX(vtbuf_htw(vb, vb->vb_mark_start.tp_row), in vtbuf_get_marked_len()
731 vb->vb_mark_start.tp_col) > in vtbuf_get_marked_len()
732 POS_INDEX(vtbuf_htw(vb, vb->vb_mark_end.tp_row), in vtbuf_get_marked_len()
733 vb->vb_mark_end.tp_col)) { in vtbuf_get_marked_len()
734 POS_COPY(e, vb->vb_mark_start); in vtbuf_get_marked_len()
735 POS_COPY(s, vb->vb_mark_end); in vtbuf_get_marked_len()
737 POS_COPY(s, vb->vb_mark_start); in vtbuf_get_marked_len()
738 POS_COPY(e, vb->vb_mark_end); in vtbuf_get_marked_len()
741 si = s.tp_row * vb->vb_scr_size.tp_col + s.tp_col; in vtbuf_get_marked_len()
742 ei = e.tp_row * vb->vb_scr_size.tp_col + e.tp_col; in vtbuf_get_marked_len()
751 vtbuf_extract_marked(struct vt_buf *vb, term_char_t *buf, int sz) in vtbuf_extract_marked() argument
757 if (POS_INDEX(vtbuf_htw(vb, vb->vb_mark_start.tp_row), in vtbuf_extract_marked()
758 vb->vb_mark_start.tp_col) > in vtbuf_extract_marked()
759 POS_INDEX(vtbuf_htw(vb, vb->vb_mark_end.tp_row), in vtbuf_extract_marked()
760 vb->vb_mark_end.tp_col)) { in vtbuf_extract_marked()
761 POS_COPY(e, vb->vb_mark_start); in vtbuf_extract_marked()
762 POS_COPY(s, vb->vb_mark_end); in vtbuf_extract_marked()
764 POS_COPY(s, vb->vb_mark_start); in vtbuf_extract_marked()
765 POS_COPY(e, vb->vb_mark_end); in vtbuf_extract_marked()
771 ce = (r == e.tp_row)?e.tp_col:vb->vb_scr_size.tp_col; in vtbuf_extract_marked()
773 buf[i++] = vb->vb_rows[r][c]; in vtbuf_extract_marked()
784 vtbuf_set_mark(struct vt_buf *vb, int type, int col, int row) in vtbuf_set_mark() argument
791 if (vb->vb_mark_last != VTB_MARK_MOVE) in vtbuf_set_mark()
796 vtbuf_flush_mark(vb); /* Clean old mark. */ in vtbuf_set_mark()
797 vb->vb_mark_end.tp_col = col; in vtbuf_set_mark()
798 vb->vb_mark_end.tp_row = vtbuf_wth(vb, row); in vtbuf_set_mark()
801 vtbuf_flush_mark(vb); /* Clean old mark. */ in vtbuf_set_mark()
802 vb->vb_mark_start.tp_col = col; in vtbuf_set_mark()
803 vb->vb_mark_start.tp_row = vtbuf_wth(vb, row); in vtbuf_set_mark()
805 vb->vb_mark_end.tp_col = col; in vtbuf_set_mark()
806 vb->vb_mark_end.tp_row = vtbuf_wth(vb, row); in vtbuf_set_mark()
809 vtbuf_flush_mark(vb); /* Clean old mark. */ in vtbuf_set_mark()
810 vb->vb_mark_start.tp_row = vb->vb_mark_end.tp_row = in vtbuf_set_mark()
811 vtbuf_wth(vb, row); in vtbuf_set_mark()
812 r = vb->vb_rows[vb->vb_mark_start.tp_row]; in vtbuf_set_mark()
815 vb->vb_mark_start.tp_col = i + 1; in vtbuf_set_mark()
821 vb->vb_mark_start.tp_col = 0; in vtbuf_set_mark()
822 for (i = col; i < vb->vb_scr_size.tp_col; i++) { in vtbuf_set_mark()
824 vb->vb_mark_end.tp_col = i; in vtbuf_set_mark()
829 if (i == vb->vb_scr_size.tp_col) in vtbuf_set_mark()
830 vb->vb_mark_end.tp_col = i; in vtbuf_set_mark()
832 if (vb->vb_mark_start.tp_col > vb->vb_mark_end.tp_col) in vtbuf_set_mark()
833 vb->vb_mark_start.tp_col = vb->vb_mark_end.tp_col; in vtbuf_set_mark()
836 vtbuf_flush_mark(vb); /* Clean old mark. */ in vtbuf_set_mark()
837 vb->vb_mark_start.tp_col = 0; in vtbuf_set_mark()
838 vb->vb_mark_end.tp_col = vb->vb_scr_size.tp_col; in vtbuf_set_mark()
839 vb->vb_mark_start.tp_row = vb->vb_mark_end.tp_row = in vtbuf_set_mark()
840 vtbuf_wth(vb, row); in vtbuf_set_mark()
843 vb->vb_mark_last = type; in vtbuf_set_mark()
850 vb->vb_mark_last = type; in vtbuf_set_mark()
852 vtbuf_flush_mark(vb); in vtbuf_set_mark()
858 vtbuf_cursor_visibility(struct vt_buf *vb, int yes) in vtbuf_cursor_visibility() argument
862 oflags = vb->vb_flags; in vtbuf_cursor_visibility()
864 vb->vb_flags |= VBF_CURSOR; in vtbuf_cursor_visibility()
866 vb->vb_flags &= ~VBF_CURSOR; in vtbuf_cursor_visibility()
867 nflags = vb->vb_flags; in vtbuf_cursor_visibility()
870 vtbuf_dirty_cell(vb, &vb->vb_cursor); in vtbuf_cursor_visibility()
874 vtbuf_scroll_mode(struct vt_buf *vb, int yes) in vtbuf_scroll_mode() argument
878 VTBUF_LOCK(vb); in vtbuf_scroll_mode()
879 oflags = vb->vb_flags; in vtbuf_scroll_mode()
881 vb->vb_flags |= VBF_SCROLL; in vtbuf_scroll_mode()
883 vb->vb_flags &= ~VBF_SCROLL; in vtbuf_scroll_mode()
884 nflags = vb->vb_flags; in vtbuf_scroll_mode()
887 vtbuf_dirty_cell(vb, &vb->vb_cursor); in vtbuf_scroll_mode()
888 VTBUF_UNLOCK(vb); in vtbuf_scroll_mode()