Lines Matching refs:at

45 #define vtb_wrap(vtb, at, offset)				\
46 (((at) + (offset) + (vtb)->vtb_size)%(vtb)->vtb_size)
120 sc_vtb_getc(sc_vtb_t *vtb, int at)
124 return (readw(sc_vtb_pointer(vtb, at)) & 0x00ff);
127 return (*(u_int16_t *)sc_vtb_pointer(vtb, at) & 0x00ff);
131 sc_vtb_geta(sc_vtb_t *vtb, int at)
135 return (readw(sc_vtb_pointer(vtb, at)) & 0xff00);
138 return (*(u_int16_t *)sc_vtb_pointer(vtb, at) & 0xff00);
142 sc_vtb_putc(sc_vtb_t *vtb, int at, int c, int a)
146 writew(sc_vtb_pointer(vtb, at), a | c);
149 *(u_int16_t *)sc_vtb_pointer(vtb, at) = a | c;
165 sc_vtb_pointer(sc_vtb_t *vtb, int at)
167 return (vtb->vtb_buffer + sizeof(u_int16_t)*(at));
240 sc_vtb_erase(sc_vtb_t *vtb, int at, int count, int c, int attr)
242 if (at + count > vtb->vtb_size)
243 count = vtb->vtb_size - at;
246 fillw_io(attr | c, sc_vtb_pointer(vtb, at), count);
249 fillw(attr | c, (void *)sc_vtb_pointer(vtb, at), count);
272 sc_vtb_delete(sc_vtb_t *vtb, int at, int count, int c, int attr)
276 if (at + count > vtb->vtb_size)
277 count = vtb->vtb_size - at;
278 len = vtb->vtb_size - at - count;
282 bcopy_io(sc_vtb_pointer(vtb, at + count),
283 sc_vtb_pointer(vtb, at),
287 bcopy((void *)sc_vtb_pointer(vtb, at + count),
288 (void *)sc_vtb_pointer(vtb, at),
293 fillw_io(attr | c, sc_vtb_pointer(vtb, at + len),
294 vtb->vtb_size - at - len);
297 fillw(attr | c, (void *)sc_vtb_pointer(vtb, at + len),
298 vtb->vtb_size - at - len);
302 sc_vtb_ins(sc_vtb_t *vtb, int at, int count, int c, int attr)
304 if (at + count > vtb->vtb_size)
305 count = vtb->vtb_size - at;
309 bcopy_io(sc_vtb_pointer(vtb, at),
310 sc_vtb_pointer(vtb, at + count),
311 (vtb->vtb_size - at - count)*sizeof(u_int16_t));
314 bcopy((void *)sc_vtb_pointer(vtb, at),
315 (void *)sc_vtb_pointer(vtb, at + count),
316 (vtb->vtb_size - at - count)*sizeof(u_int16_t));
320 fillw_io(attr | c, sc_vtb_pointer(vtb, at), count);
323 fillw(attr | c, (void *)sc_vtb_pointer(vtb, at), count);