Lines Matching defs:wsc
1400 vcons_putwschar(struct vcons_screen *scr, struct wsdisplay_char *wsc)
1407 KASSERT(wsc != NULL);
1412 if (wsc->row == 0) {
1413 if (wsc->col < 0 || wsc->col > (ri->ri_cols * ri->ri_rows))
1416 rem = wsc->col % ri->ri_cols;
1417 wsc->row = wsc->col / ri->ri_cols;
1418 DPRINTF("off %d -> %d, %d\n", wsc->col, rem, wsc->row);
1419 wsc->col = rem;
1421 if (__predict_false(wsc->col < 0 || wsc->col >= ri->ri_cols))
1424 if (__predict_false(wsc->row < 0 || wsc->row >= ri->ri_rows))
1428 error = ri->ri_ops.allocattr(ri, wsc->foreground,
1429 wsc->background, wsc->flags, &attr);
1432 vcons_putchar(ri, wsc->row, wsc->col, wsc->letter, attr);
1433 DPRINTF("vcons_putwschar(%d, %d, %x, %lx\n", wsc->row, wsc->col,
1434 wsc->letter, attr);
1439 vcons_getwschar(struct vcons_screen *scr, struct wsdisplay_char *wsc)
1447 KASSERT(wsc != NULL);
1452 if (wsc->row == 0) {
1453 if (wsc->col < 0 || wsc->col > (ri->ri_cols * ri->ri_rows))
1456 rem = wsc->col % ri->ri_cols;
1457 wsc->row = wsc->col / ri->ri_cols;
1458 DPRINTF("off %d -> %d, %d\n", wsc->col, rem, wsc->row);
1459 wsc->col = rem;
1461 if (__predict_false(wsc->col < 0 || wsc->col >= ri->ri_cols))
1464 if (__predict_false(wsc->row < 0 || wsc->row >= ri->ri_rows))
1468 offset = ri->ri_cols * wsc->row + wsc->col;
1470 wsc->letter = scr->scr_chars[offset];
1473 DPRINTF("vcons_getwschar: %d, %d, %x, %lx\n", wsc->row,
1474 wsc->col, wsc->letter, attr);
1488 wsc->foreground = fg;
1489 wsc->background = bg;
1498 if (wsc->foreground >= 8)
1499 wsc->foreground -= 8;