summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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