Deleted Added
full compact
scvtb.c (48104) scvtb.c (48189)
1/*-
2 * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * $Id:$
26 * $Id: scvtb.c,v 1.1 1999/06/22 14:13:30 yokota Exp $
27 */
28
29#include "sc.h"
30#include "opt_syscons.h"
31
32#if NSC > 0
33
34#include <sys/param.h>

--- 192 unchanged lines hidden (view full) ---

227 count = vtb->vtb_size - at;
228 if (vtb->vtb_type == VTB_FRAMEBUFFER)
229 fillw_io(attr | c, sc_vtb_pointer(vtb, at), count);
230 else
231 fillw(attr | c, (void *)sc_vtb_pointer(vtb, at), count);
232}
233
234void
27 */
28
29#include "sc.h"
30#include "opt_syscons.h"
31
32#if NSC > 0
33
34#include <sys/param.h>

--- 192 unchanged lines hidden (view full) ---

227 count = vtb->vtb_size - at;
228 if (vtb->vtb_type == VTB_FRAMEBUFFER)
229 fillw_io(attr | c, sc_vtb_pointer(vtb, at), count);
230 else
231 fillw(attr | c, (void *)sc_vtb_pointer(vtb, at), count);
232}
233
234void
235sc_vtb_move(sc_vtb_t *vtb, int from, int to, int count)
236{
237 if (from + count > vtb->vtb_size)
238 count = vtb->vtb_size - from;
239 if (to + count > vtb->vtb_size)
240 count = vtb->vtb_size - to;
241 if (count <= 0)
242 return;
243 if (vtb->vtb_type == VTB_FRAMEBUFFER) {
244 bcopy_io(sc_vtb_pointer(vtb, from),
245 sc_vtb_pointer(vtb, to), count*sizeof(u_int16_t));
246 } else {
247 bcopy((void *)sc_vtb_pointer(vtb, from),
248 (void *)sc_vtb_pointer(vtb, to), count*sizeof(u_int16_t));
249 }
250}
251
252void
235sc_vtb_delete(sc_vtb_t *vtb, int at, int count, int c, int attr)
236{
237 int len;
238
239 if (at + count > vtb->vtb_size)
240 count = vtb->vtb_size - at;
241 len = vtb->vtb_size - at - count;
242 if (len > 0) {

--- 41 unchanged lines hidden ---
253sc_vtb_delete(sc_vtb_t *vtb, int at, int count, int c, int attr)
254{
255 int len;
256
257 if (at + count > vtb->vtb_size)
258 count = vtb->vtb_size - at;
259 len = vtb->vtb_size - at - count;
260 if (len > 0) {

--- 41 unchanged lines hidden ---