diff options
author | KATO Takenori <kato@FreeBSD.org> | 1999-06-24 14:03:07 +0000 |
---|---|---|
committer | KATO Takenori <kato@FreeBSD.org> | 1999-06-24 14:03:07 +0000 |
commit | a5788613e16877918b182d240242d7d277c825a6 (patch) | |
tree | 808a7913338b8ad908d6a8bedbc6d114fc54781b /sys/pc98/cbus/scvtb.c | |
parent | 7107ea4aa1711cdffdac41eaf0993ae7c44a77df (diff) | |
download | src-a5788613e16877918b182d240242d7d277c825a6.tar.gz src-a5788613e16877918b182d240242d7d277c825a6.zip |
Sync with sys/dev/syscons/scvtb.c revision 1.2.
Submitted by: yokota
Notes
Notes:
svn path=/head/; revision=48190
Diffstat (limited to 'sys/pc98/cbus/scvtb.c')
-rw-r--r-- | sys/pc98/cbus/scvtb.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/sys/pc98/cbus/scvtb.c b/sys/pc98/cbus/scvtb.c index 64f4cb6b5ff6..022f10627d85 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; |