diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-05-02 06:44:48 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-05-02 06:44:48 +0000 |
commit | a1ab0133973a053ec8cb7034b5f525c772d2c6d6 (patch) | |
tree | 348052b6165a33d50f05b52e0989ec9095b81452 /sys/arch/amiga/dev/grf_rh.c | |
parent | 357d854e83a35ee1bdb134546c9f0e8b086a8833 (diff) |
Sync with NetBSD 9600430. The port has gone over a major -Wall treat
Diffstat (limited to 'sys/arch/amiga/dev/grf_rh.c')
-rw-r--r-- | sys/arch/amiga/dev/grf_rh.c | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/sys/arch/amiga/dev/grf_rh.c b/sys/arch/amiga/dev/grf_rh.c index 0ce33cc0238..77abac737c5 100644 --- a/sys/arch/amiga/dev/grf_rh.c +++ b/sys/arch/amiga/dev/grf_rh.c @@ -1,5 +1,5 @@ -/* $OpenBSD: grf_rh.c,v 1.4 1996/04/21 22:15:13 deraadt Exp $ */ -/* $NetBSD: grf_rh.c,v 1.13 1996/03/17 05:58:39 mhitch Exp $ */ +/* $OpenBSD: grf_rh.c,v 1.5 1996/05/02 06:43:48 niklas Exp $ */ +/* $NetBSD: grf_rh.c,v 1.14 1996/04/21 21:11:17 veego Exp $ */ /* * Copyright (c) 1994 Markus Wild @@ -40,6 +40,7 @@ */ #include <sys/param.h> +#include <sys/systm.h> #include <sys/errno.h> #include <sys/ioctl.h> #include <sys/device.h> @@ -89,7 +90,7 @@ extern unsigned char kernel_font_8x11[]; * initial driver, has made an agreement with MS not to document * the driver source (see also his comment below). * -> ALL comments after - * -> "/* -------------- START OF CODE -------------- * /" + * -> " -------------- START OF CODE -------------- " * -> have been added by myself (mw) from studying the publically * -> available "NCR 77C32BLT" Data Manual */ @@ -741,9 +742,9 @@ rh_load_mon(gp, md) struct MonDef *md; { struct grfinfo *gi = &gp->g_display; - volatile unsigned char *ba; - volatile unsigned char *fb; - short FW, clksel, HDE, VDE; + volatile caddr_t ba; + volatile caddr_t fb; + short FW, clksel, HDE = 0, VDE; unsigned short *c, z; const unsigned char *f; @@ -1415,7 +1416,7 @@ int rh_default_gfx = 4; static struct MonDef *current_mon; -int rh_mode __P((struct grf_softc *, int, void *, int, int)); +int rh_mode __P((struct grf_softc *, u_long, void *, u_long, int)); void grfrhattach __P((struct device *, struct device *, void *)); int grfrhprint __P((void *, char *)); int grfrhmatch __P((struct device *, void *, void *)); @@ -1449,7 +1450,7 @@ grfrhmatch(pdp, match, auxp) #endif return(0); if (zap->manid != 18260 || - (zap->prodid != 16) && (zap->prodid != 19)) + ((zap->prodid != 16) && (zap->prodid != 19))) return(0); #ifdef RETINACONSOLE if (amiga_realconfig == 0 || rhconunit != cfp->cf_unit) { @@ -1476,7 +1477,6 @@ grfrhattach(pdp, dp, auxp) void *auxp; { static struct grf_softc congrf; - static int coninited; struct zbus_args *zap; struct grf_softc *gp; @@ -1534,7 +1534,7 @@ rh_getvmode(gp, vm) vm->mode_num = (current_mon - monitor_defs) + 1; md = monitor_defs + (vm->mode_num - 1); - strncpy (vm->mode_descr, monitor_descr + (vm->mode_num - 1), + strncpy (vm->mode_descr, monitor_descr[vm->mode_num - 1], sizeof (vm->mode_descr)); vm->pixel_clock = md->FQ; vm->disp_width = (md->DEP == 4) ? md->MW : md->TX; @@ -1587,7 +1587,6 @@ rh_setvmode(gp, mode, type) unsigned mode; enum mode_type type; { - struct MonDef *md; int error; if (!mode || mode > rh_mon_max) @@ -1609,11 +1608,13 @@ rh_setvmode(gp, mode, type) * Change the mode of the display. * Return a UNIX error number or 0 for success. */ +int rh_mode(gp, cmd, arg, a2, a3) register struct grf_softc *gp; - int cmd; + u_long cmd; void *arg; - int a2, a3; + u_long a2; + int a3; { switch (cmd) { case GM_GRFON: @@ -1645,7 +1646,7 @@ rh_mode(gp, cmd, arg, a2, a3) return(EINVAL); #endif case GM_GRFIOCTL: - return(rh_ioctl (gp, (u_long) arg, (caddr_t) a2)); + return(rh_ioctl (gp, a2, arg)); default: break; @@ -1892,7 +1893,9 @@ rh_setspriteinfo (gp, info) struct grf_spriteinfo *info; { volatile unsigned char *ba, *fb; +#if 0 u_char control; +#endif ba = gp->g_regkva; fb = gp->g_fbkva; @@ -2042,5 +2045,7 @@ rh_bitblt (gp, bb) RZ3BitBlit16(gp, bb); else RZ3BitBlit24(gp, bb); + + return(0); } #endif /* NGRF */ |