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/dev/syscons/scvidctl.c | |
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/dev/syscons/scvidctl.c')
-rw-r--r-- | sys/dev/syscons/scvidctl.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/syscons/scvidctl.c b/sys/dev/syscons/scvidctl.c index 65a56c6..5e1d910 100644 --- a/sys/dev/syscons/scvidctl.c +++ b/sys/dev/syscons/scvidctl.c @@ -142,7 +142,7 @@ sc_set_text_mode(scr_stat *scp, struct tty *tp, int mode, int xsize, int ysize, int error; int s; - if ((*vidsw[scp->sc->adapter]->get_info)(scp->sc->adp, mode, &info)) + if (vidd_get_info(scp->sc->adp, mode, &info)) return ENODEV; /* adjust argument values */ @@ -261,7 +261,7 @@ sc_set_graphics_mode(scr_stat *scp, struct tty *tp, int mode) int error; int s; - if ((*vidsw[scp->sc->adapter]->get_info)(scp->sc->adp, mode, &info)) + if (vidd_get_info(scp->sc->adp, mode, &info)) return ENODEV; /* stop screen saver, etc */ @@ -332,7 +332,7 @@ sc_set_pixel_mode(scr_stat *scp, struct tty *tp, int xsize, int ysize, int error; int s; - if ((*vidsw[scp->sc->adapter]->get_info)(scp->sc->adp, scp->mode, &info)) + if (vidd_get_info(scp->sc->adp, scp->mode, &info)) return ENODEV; /* this shouldn't happen */ /* adjust argument values */ @@ -472,7 +472,7 @@ sc_set_pixel_mode(scr_stat *scp, struct tty *tp, int xsize, int ysize, #define fb_ioctl(a, c, d) \ (((a) == NULL) ? ENODEV : \ - (*vidsw[(a)->va_index]->ioctl)((a), (c), (caddr_t)(d))) + vidd_ioctl((a), (c), (caddr_t)(d))) int sc_vid_ioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, struct thread *td) @@ -723,12 +723,12 @@ sc_vid_ioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, struct thread * #endif #ifndef SC_NO_PALETTE_LOADING - load_palette(adp, scp->sc->palette); + vidd_load_palette(adp, scp->sc->palette); #endif #ifndef PC98 /* move hardware cursor out of the way */ - (*vidsw[adp->va_index]->set_hw_cursor)(adp, -1, -1); + vidd_set_hw_cursor(adp, -1, -1); #endif /* FALLTHROUGH */ @@ -780,7 +780,7 @@ sc_vid_ioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, struct thread * if (scp == scp->sc->cur_scp) { set_mode(scp); #ifndef SC_NO_PALETTE_LOADING - load_palette(adp, scp->sc->palette); + vidd_load_palette(adp, scp->sc->palette); #endif } sc_clear_screen(scp); |