diff options
Diffstat (limited to 'sys/dev/syscons/scvtb.c')
-rw-r--r-- | sys/dev/syscons/scvtb.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/sys/dev/syscons/scvtb.c b/sys/dev/syscons/scvtb.c index a7d1a71..3c62ec9 100644 --- a/sys/dev/syscons/scvtb.c +++ b/sys/dev/syscons/scvtb.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id:$ + * $Id: scvtb.c,v 1.1 1999/06/22 14:13:30 yokota Exp $ */ #include "sc.h" @@ -232,6 +232,24 @@ 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)); + } else { + bcopy((void *)sc_vtb_pointer(vtb, from), + (void *)sc_vtb_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; |