diff options
author | wkoszek <wkoszek@FreeBSD.org> | 2007-12-29 23:26:59 +0000 |
---|---|---|
committer | wkoszek <wkoszek@FreeBSD.org> | 2007-12-29 23:26:59 +0000 |
commit | bb029b61d9d00673b61ff3bd4589761e3ddbd060 (patch) | |
tree | 2208d9a465b1ecf2354401f83d3b431d9003169a /sys/pc98 | |
parent | 8a0ce839351386ec837779aa9f63b575cf8d096a (diff) | |
download | FreeBSD-src-bb029b61d9d00673b61ff3bd4589761e3ddbd060.zip FreeBSD-src-bb029b61d9d00673b61ff3bd4589761e3ddbd060.tar.gz |
Replace explicit calls to video methods with their respective variants
implemented with macros. This patch improves code readability. Reasoning
behind vidd_* is a sort of "video discipline".
List of macros is supposed to be complete--all methods of video_switch
ought to have their respective macros from now on.
Functionally, this code should be no-op. My intention is to leave current
behaviour of touched code as is.
No objections: rwatson
Silence on: freebsd-current@
Approved by: cognet
Diffstat (limited to 'sys/pc98')
-rw-r--r-- | sys/pc98/cbus/gdc.c | 6 | ||||
-rw-r--r-- | sys/pc98/cbus/scgdcrndr.c | 16 |
2 files changed, 10 insertions, 12 deletions
diff --git a/sys/pc98/cbus/gdc.c b/sys/pc98/cbus/gdc.c index f5719f0..9f990b2 100644 --- a/sys/pc98/cbus/gdc.c +++ b/sys/pc98/cbus/gdc.c @@ -177,7 +177,7 @@ gdc_attach(device_t dev) #endif /* FB_INSTALL_CDEV */ if (bootverbose) - (*vidsw[sc->adp->va_index]->diag)(sc->adp, bootverbose); + vidd_diag(sc->adp, bootverbose); return 0; } @@ -1147,7 +1147,7 @@ gdc_set_mode(video_adapter_t *adp, int mode) bcopy(&info, &adp->va_info, sizeof(info)); /* move hardware cursor out of the way */ - (*vidsw[adp->va_index]->set_hw_cursor)(adp, -1, -1); + vidd_set_hw_cursor(adp, -1, -1); return 0; } @@ -1374,7 +1374,7 @@ packed_fill(video_adapter_t *adp, int val) length = adp->va_line_width*adp->va_info.vi_height; while (length > 0) { l = imin(length, adp->va_window_size); - (*vidsw[adp->va_index]->set_win_org)(adp, at); + vidd_set_win_org(adp, at); bzero_io(adp->va_window, l); length -= l; at += l; diff --git a/sys/pc98/cbus/scgdcrndr.c b/sys/pc98/cbus/scgdcrndr.c index f8ea8d1..53ff41e 100644 --- a/sys/pc98/cbus/scgdcrndr.c +++ b/sys/pc98/cbus/scgdcrndr.c @@ -106,7 +106,7 @@ gdc_txtclear(scr_stat *scp, int c, int attr) static void gdc_txtborder(scr_stat *scp, int color) { - (*vidsw[scp->sc->adapter]->set_border)(scp->sc->adp, color); + vidd_set_border(scp->sc->adp, color); } static void @@ -142,9 +142,8 @@ gdc_txtcursor_shape(scr_stat *scp, int base, int height, int blink) if (base < 0 || base >= scp->font_size) return; /* the caller may set height <= 0 in order to disable the cursor */ - (*vidsw[scp->sc->adapter]->set_hw_cursor_shape)(scp->sc->adp, - base, height, - scp->font_size, blink); + vidd_set_hw_cursor_shape(scp->sc->adp, base, height, scp->font_size, + blink); } static void @@ -152,12 +151,11 @@ gdc_txtcursor(scr_stat *scp, int at, int blink, int on, int flip) { if (on) { scp->status |= VR_CURSOR_ON; - (*vidsw[scp->sc->adapter]->set_hw_cursor)(scp->sc->adp, - at%scp->xsize, at/scp->xsize); + vidd_set_hw_cursor(scp->sc->adp, at%scp->xsize, + at/scp->xsize); } else { if (scp->status & VR_CURSOR_ON) - (*vidsw[scp->sc->adapter]->set_hw_cursor)(scp->sc->adp, - -1, -1); + vidd_set_hw_cursor(scp->sc->adp, -1, -1); scp->status &= ~VR_CURSOR_ON; } } @@ -204,7 +202,7 @@ gdc_txtmouse(scr_stat *scp, int x, int y, int on) static void gdc_grborder(scr_stat *scp, int color) { - (*vidsw[scp->sc->adapter]->set_border)(scp->sc->adp, color); + vidd_set_border(scp->sc->adp, color); } #endif /* SC_NO_MODE_CHANGE */ |