Sync with sys/dev/syscons/scvtb.c revision 1.2.
Submitted by: yokota
This commit is contained in:
parent
7107ea4aa1
commit
a5788613e1
@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* $Id:$
|
||||
* $Id: scvtbpc98.c,v 1.1 1999/06/24 10:51:34 kato Exp $
|
||||
*/
|
||||
|
||||
#include "sc.h"
|
||||
@ -288,6 +288,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)
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* $Id:$
|
||||
* $Id: scvtbpc98.c,v 1.1 1999/06/24 10:51:34 kato Exp $
|
||||
*/
|
||||
|
||||
#include "sc.h"
|
||||
@ -288,6 +288,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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user