From 80a243f5e1ce1a023cb45c6ecfa9ccc2b83312d7 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann <marcus@gnu.org> Date: Mon, 9 Sep 2002 22:04:25 +0000 Subject: libcons/ 2002-09-09 Marcus Brinkmann <marcus@gnu.org> * Makefile (SRCS): Add vcons-scrollback.c. * vcons-scrollback.c: New file. * cons.h (struct vcons): Add SCROLLING member. * file-changed.c: Include <assert.h>. (cons_S_file_changed): Be careful to take VCONS->scrolling into account when doing clipping and scrolling. * cons-switch.c: Roll back to earlier version with vcons -> vcons_entry adjustments. The user is now expected to hold a reference to the VCONS. * cons.h: Fix prototype, too. * vcons-open.c (cons_vcons_open): Initialize VCONS->lock, VCONS->input and VCONS->display. utils/ 2002-09-09 Marcus Brinkmann <marcus@gnu.org> * console-ncurses.c (console_switch): Keep a reference to the port instead refering to it by number. --- libcons/cons.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'libcons/cons.h') diff --git a/libcons/cons.h b/libcons/cons.h index e7484db5..6b2fca49 100644 --- a/libcons/cons.h +++ b/libcons/cons.h @@ -103,6 +103,8 @@ struct vcons cons_change_t *buffer; } changes; } state; + + uint32_t scrolling; }; struct cons @@ -206,10 +208,13 @@ void cons_vcons_add (cons_t cons, vcons_list_t vcons_entry); virtual console entry is removed. CONS is locked. */ void cons_vcons_remove (cons_t cons, vcons_list_t vcons_entry); -/* Open the virtual console ID or the ACTIVE_ID plus DELTA one in CONS - and return it in R_VCONS. */ -error_t cons_switch (cons_t cons, int active_id, int id, int delta, - vcons_t *r_vcons); +/* Open the virtual console ID or the virtual console DELTA steps away + from VCONS in the linked list and return it in R_VCONS, which will + be locked. */ +error_t cons_switch (vcons_t vcons, int id, int delta, vcons_t *r_vcons); + +/* Scroll back into the history of VCONS by DELTA lines. */ +int cons_vcons_scrollback (vcons_t vcons, int delta); extern const struct argp cons_startup_argp; -- cgit v1.2.3