summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>1999-06-24 14:03:07 +0000
committerkato <kato@FreeBSD.org>1999-06-24 14:03:07 +0000
commit5c8c1d98a310db3cd0ff3c7dea7285674ee81f55 (patch)
tree33b37acac8896bbb543e33f8338c2821cf156e57
parentaf2f08c3ae7043bd91601daac047801532ef990f (diff)
downloadFreeBSD-src-5c8c1d98a310db3cd0ff3c7dea7285674ee81f55.zip
FreeBSD-src-5c8c1d98a310db3cd0ff3c7dea7285674ee81f55.tar.gz
Sync with sys/dev/syscons/scvtb.c revision 1.2.
Submitted by: yokota
-rw-r--r--sys/pc98/cbus/scvtb.c24
-rw-r--r--sys/pc98/pc98/scvtbpc98.c24
2 files changed, 46 insertions, 2 deletions
diff --git a/sys/pc98/cbus/scvtb.c b/sys/pc98/cbus/scvtb.c
index 64f4cb6..022f106 100644
--- a/sys/pc98/cbus/scvtb.c
+++ b/sys/pc98/cbus/scvtb.c
@@ -1,5 +1,5 @@
/*-
- * $Id:$
+ * $Id: scvtbpc98.c,v 1.1 1999/06/24 10:51:34 kato Exp $
*/
#include "sc.h"
@@ -289,6 +289,28 @@ sc_vtb_erase(sc_vtb_t *vtb, int at, int count, int c, int attr)
}
void
+sc_vtb_move(sc_vtb_t *vtb, int from, int to, int count)
+{
+ if (from + count > vtb->vtb_size)
+ count = vtb->vtb_size - from;
+ if (to + count > vtb->vtb_size)
+ count = vtb->vtb_size - to;
+ if (count <= 0)
+ return;
+ if (vtb->vtb_type == VTB_FRAMEBUFFER) {
+ bcopy_io(sc_vtb_pointer(vtb, from),
+ sc_vtb_pointer(vtb, to), count*sizeof(u_int16_t));
+ bcopy_io(sc_vtb_attr_pointer(vtb, from),
+ sc_vtb_attr_pointer(vtb, to), count*sizeof(u_int16_t));
+ } else {
+ bcopy((void *)sc_vtb_pointer(vtb, from),
+ (void *)sc_vtb_pointer(vtb, to), count*sizeof(u_int16_t));
+ bcopy((void *)sc_vtb_attr_pointer(vtb, from),
+ (void *)sc_vtb_attr_pointer(vtb, to), count*sizeof(u_int16_t));
+ }
+}
+
+void
sc_vtb_delete(sc_vtb_t *vtb, int at, int count, int c, int attr)
{
int len;
diff --git a/sys/pc98/pc98/scvtbpc98.c b/sys/pc98/pc98/scvtbpc98.c
index 64f4cb6..022f106 100644
--- a/sys/pc98/pc98/scvtbpc98.c
+++ b/sys/pc98/pc98/scvtbpc98.c
@@ -1,5 +1,5 @@
/*-
- * $Id:$
+ * $Id: scvtbpc98.c,v 1.1 1999/06/24 10:51:34 kato Exp $
*/
#include "sc.h"
@@ -289,6 +289,28 @@ sc_vtb_erase(sc_vtb_t *vtb, int at, int count, int c, int attr)
}
void
+sc_vtb_move(sc_vtb_t *vtb, int from, int to, int count)
+{
+ if (from + count > vtb->vtb_size)
+ count = vtb->vtb_size - from;
+ if (to + count > vtb->vtb_size)
+ count = vtb->vtb_size - to;
+ if (count <= 0)
+ return;
+ if (vtb->vtb_type == VTB_FRAMEBUFFER) {
+ bcopy_io(sc_vtb_pointer(vtb, from),
+ sc_vtb_pointer(vtb, to), count*sizeof(u_int16_t));
+ bcopy_io(sc_vtb_attr_pointer(vtb, from),
+ sc_vtb_attr_pointer(vtb, to), count*sizeof(u_int16_t));
+ } else {
+ bcopy((void *)sc_vtb_pointer(vtb, from),
+ (void *)sc_vtb_pointer(vtb, to), count*sizeof(u_int16_t));
+ bcopy((void *)sc_vtb_attr_pointer(vtb, from),
+ (void *)sc_vtb_attr_pointer(vtb, to), count*sizeof(u_int16_t));
+ }
+}
+
+void
sc_vtb_delete(sc_vtb_t *vtb, int at, int count, int c, int attr)
{
int len;
OpenPOWER on IntegriCloud