summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Brinkmann <marcus@gnu.org>2003-08-15 21:04:10 +0000
committerMarcus Brinkmann <marcus@gnu.org>2003-08-15 21:04:10 +0000
commit8ba76d487d9820cdbe5d40337ef787c77a6389a9 (patch)
tree04bc929e9e160dfc28fd1347ac0863bcf1a86334
parentf4ff4224a1576dc0cea6b5721c9b235e6443da12 (diff)
2003-08-11 Marco Gerards <metgerards@student.han.nl>
* cons.h (cons_vcons_set_dimension): New prototype. * vcons-refresh.c (cons_vcons_refresh): Call cons_vcons_set_dimension instead of cons_vcons_clear.
-rw-r--r--libcons/ChangeLog6
-rw-r--r--libcons/cons.h10
-rw-r--r--libcons/vcons-refresh.c6
3 files changed, 18 insertions, 4 deletions
diff --git a/libcons/ChangeLog b/libcons/ChangeLog
index d18b6868..21d5bab1 100644
--- a/libcons/ChangeLog
+++ b/libcons/ChangeLog
@@ -1,3 +1,9 @@
+2003-08-11 Marco Gerards <metgerards@student.han.nl>
+
+ * cons.h (cons_vcons_set_dimension): New prototype.
+ * vcons-refresh.c (cons_vcons_refresh): Call
+ cons_vcons_set_dimension instead of cons_vcons_clear.
+
2003-08-01 Marco Gerards <metgerards@student.han.nl>
* opts-std-startup.c: Include <string.h>.
diff --git a/libcons/cons.h b/libcons/cons.h
index 8105a723..a162f010 100644
--- a/libcons/cons.h
+++ b/libcons/cons.h
@@ -1,5 +1,5 @@
/* cons.h - Definitions for cons helper and callback functions.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003 Free Software Foundation, Inc.
Written by Marcus Brinkmann.
This file is part of the GNU Hurd.
@@ -231,6 +231,14 @@ error_t cons_switch (vcons_t vcons, int id, int delta, vcons_t *r_vcons);
VCONS. */
error_t cons_vcons_input (vcons_t vcons, char *buf, size_t size);
+/* The user must define this function. Clear the existing screen
+ matrix and set the size of the screen matrix to the dimension COL x
+ ROW. This call will be immediately followed by a call to
+ cons_vcons_write that covers the whole new screen matrix. */
+error_t cons_vcons_set_dimension (vcons_t vcons,
+ uint32_t col, uint32_t row);
+);
+
typedef enum
{
CONS_SCROLL_DELTA_LINES, CONS_SCROLL_DELTA_SCREENS,
diff --git a/libcons/vcons-refresh.c b/libcons/vcons-refresh.c
index ec899a91..7a572c79 100644
--- a/libcons/vcons-refresh.c
+++ b/libcons/vcons-refresh.c
@@ -1,5 +1,5 @@
/* vcons-refresh.c - Redraw a virtual console.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003 Free Software Foundation, Inc.
Written by Marcus Brinkmann.
This file is part of the GNU Hurd.
@@ -41,8 +41,8 @@ cons_vcons_refresh (vcons_t vcons)
if (vcons->state.screen.scr_lines < vcons->scrolling)
vcons->scrolling = vcons->scrolling;
- cons_vcons_clear (vcons, vcons->state.screen.width
- * vcons->state.screen.height, 0, 0);
+ cons_vcons_set_dimension (vcons, vcons->state.screen.width,
+ vcons->state.screen.height);
if (vcons->state.screen.cur_line >= vcons->scrolling)
start = vcons->state.screen.cur_line - vcons->scrolling;