diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-01-24 19:58:34 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-01-24 19:58:34 +0000 |
commit | 0ef244d8476654749f2eaf9441dc06b2fd4d4f7b (patch) | |
tree | 270851bce850e6dddd96484e78fa648cb8bec296 /sys/arch/alpha/wscons | |
parent | a77b8c21d70779c5365903c1f86d3c3126549212 (diff) |
Sync with NetBSD 961207
Diffstat (limited to 'sys/arch/alpha/wscons')
-rw-r--r-- | sys/arch/alpha/wscons/kbd.c | 7 | ||||
-rw-r--r-- | sys/arch/alpha/wscons/kbd.h | 16 | ||||
-rw-r--r-- | sys/arch/alpha/wscons/ms.c | 4 | ||||
-rw-r--r-- | sys/arch/alpha/wscons/ms.h | 14 | ||||
-rw-r--r-- | sys/arch/alpha/wscons/wscons.c | 22 | ||||
-rw-r--r-- | sys/arch/alpha/wscons/wscons_emul.c | 21 | ||||
-rw-r--r-- | sys/arch/alpha/wscons/wscons_rinit.c | 6 | ||||
-rw-r--r-- | sys/arch/alpha/wscons/wsconsvar.h | 30 |
8 files changed, 72 insertions, 48 deletions
diff --git a/sys/arch/alpha/wscons/kbd.c b/sys/arch/alpha/wscons/kbd.c index c2782435e2b..05e43d07eea 100644 --- a/sys/arch/alpha/wscons/kbd.c +++ b/sys/arch/alpha/wscons/kbd.c @@ -1,5 +1,5 @@ -/* $OpenBSD: kbd.c,v 1.3 1996/10/30 22:41:39 niklas Exp $ */ -/* $NetBSD: kbd.c,v 1.2 1996/09/15 17:15:28 cgd Exp $ */ +/* $OpenBSD: kbd.c,v 1.4 1997/01/24 19:58:25 niklas Exp $ */ +/* $NetBSD: kbd.c,v 1.3 1996/11/13 21:13:39 cgd Exp $ */ /* * Copyright (c) 1992, 1993 @@ -61,6 +61,7 @@ #include <sys/syslog.h> #include <sys/systm.h> #include <sys/tty.h> +#include <sys/signalvar.h> #include <machine/autoconf.h> @@ -71,6 +72,8 @@ #include <alpha/wscons/wsconsvar.h> #include <alpha/wscons/kbd.h> +void kbd_repeat __P((void *)); + struct kbd_softc { struct device *k_idev; /* the input device */ struct wscons_idev_spec k_ispec; /* the input device information */ diff --git a/sys/arch/alpha/wscons/kbd.h b/sys/arch/alpha/wscons/kbd.h index e2bcf6ed5af..a0bd8205746 100644 --- a/sys/arch/alpha/wscons/kbd.h +++ b/sys/arch/alpha/wscons/kbd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: kbd.h,v 1.1 1996/10/30 22:41:41 niklas Exp $ */ +/* $OpenBSD: kbd.h,v 1.2 1997/01/24 19:58:26 niklas Exp $ */ /* * Copyright (c) 1996 Niklas Hallqvist @@ -32,18 +32,10 @@ */ extern void kbdattach __P((struct device *, struct wscons_idev_spec *)); -extern void kbd_repeat __P((void *)); extern void kbd_input __P((int)); -extern int kbdopen __P((dev_t, int, int, struct proc *)); -extern int kbdclose __P((dev_t, int, int, struct proc *p)); -extern int kbdread __P((dev_t, struct uio *, int)); -extern int kbdwrite __P((dev_t, struct uio *, int)); -extern int kbdioctl __P((dev_t, u_long, caddr_t, int, struct proc *)); -#ifdef notyet -extern int kbdpoll __P((dev_t, int, struct proc *)); -#else -extern int kbdselect __P((dev_t, int, struct proc *)); -#endif + +cdev_decl(kbd); + extern int kbd_cngetc __P((dev_t)); extern void kbd_cnpollc __P((dev_t, int)); extern void wscons_kbd_bell __P((void)); diff --git a/sys/arch/alpha/wscons/ms.c b/sys/arch/alpha/wscons/ms.c index 938cffd4b8d..76a72d67721 100644 --- a/sys/arch/alpha/wscons/ms.c +++ b/sys/arch/alpha/wscons/ms.c @@ -1,5 +1,5 @@ -/* $OpenBSD: ms.c,v 1.3 1996/10/30 22:41:43 niklas Exp $ */ -/* $NetBSD: ms.c,v 1.2 1996/09/15 17:15:29 cgd Exp $ */ +/* $OpenBSD: ms.c,v 1.4 1997/01/24 19:58:27 niklas Exp $ */ +/* $NetBSD: ms.c,v 1.3 1996/11/13 21:13:40 cgd Exp $ */ /* * Copyright (c) 1992, 1993 diff --git a/sys/arch/alpha/wscons/ms.h b/sys/arch/alpha/wscons/ms.h index cedfd65f73b..fa69749e73c 100644 --- a/sys/arch/alpha/wscons/ms.h +++ b/sys/arch/alpha/wscons/ms.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ms.h,v 1.1 1996/10/30 22:41:44 niklas Exp $ */ +/* $OpenBSD: ms.h,v 1.2 1997/01/24 19:58:28 niklas Exp $ */ /* * Copyright (c) 1996 Niklas Hallqvist @@ -33,13 +33,5 @@ extern void msattach __P((struct device *, struct wscons_mdev_spec *)); extern void ms_event __P((char, int, int)); -extern int msopen __P((dev_t, int, int, struct proc *)); -extern int msclose __P((dev_t, int, int, struct proc *)); -extern int msread __P((dev_t, struct uio *, int)); -extern int mswrite __P((dev_t, struct uio *, int)); -extern int msioctl __P((dev_t, u_long, caddr_t, int, struct proc *)); -#ifdef notyet -extern int mspoll __P((dev_t, int, struct proc *)); -#else -extern int msselect __P((dev_t, int, struct proc *)); -#endif + +cdev_decl(ms); diff --git a/sys/arch/alpha/wscons/wscons.c b/sys/arch/alpha/wscons/wscons.c index c86feeea15e..1bc38095b02 100644 --- a/sys/arch/alpha/wscons/wscons.c +++ b/sys/arch/alpha/wscons/wscons.c @@ -1,5 +1,5 @@ -/* $OpenBSD: wscons.c,v 1.3 1996/10/30 22:41:46 niklas Exp $ */ -/* $NetBSD: wscons.c,v 1.7 1996/10/13 03:00:45 christos Exp $ */ +/* $OpenBSD: wscons.c,v 1.4 1997/01/24 19:58:30 niklas Exp $ */ +/* $NetBSD: wscons.c,v 1.10 1996/12/05 01:39:47 cgd Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -61,11 +61,16 @@ struct wscons_softc { struct wscons_emul_data *sc_emul_data; struct tty *sc_tty; + void *sc_fn_cookie; wscons_ioctl_t sc_ioctl; wscons_mmap_t sc_mmap; }; +#ifdef __BROKEN_INDIRECT_CONFIG int wsconsmatch __P((struct device *, void *, void *)); +#else +int wsconsmatch __P((struct device *, struct cfdata *, void *)); +#endif void wsconsattach __P((struct device *, struct device *, void *)); struct cfattach wscons_ca = { @@ -110,13 +115,23 @@ int wsconsparam __P((struct tty *, struct termios *)); */ int +#ifdef __BROKEN_INDIRECT_CONFIG wsconsmatch(parent, cfdata, aux) +#else +wsconsmatch(parent, cf, aux) +#endif struct device *parent; +#ifdef __BROKEN_INDIRECT_CONFIG void *cfdata; +#else + struct cfdata *cf; +#endif void *aux; { struct wscons_attach_args *waa = aux; +#ifdef __BROKEN_INDIRECT_CONFIG struct cfdata *cf = cfdata; +#endif if (waa->waa_isconsole && wscons_console_unit != -1) panic("wsconsmatch: multiple consoles?"); @@ -182,6 +197,7 @@ wsconsattach(parent, self, aux) /* * Record other relevant information: ioctl and mmap functions. */ + sc->sc_fn_cookie = waa->waa_odev_spec.wo_miscfuncs_cookie; sc->sc_ioctl = waa->waa_odev_spec.wo_ioctl; sc->sc_mmap = waa->waa_odev_spec.wo_mmap; @@ -347,7 +363,7 @@ wsconsioctl(dev, cmd, data, flag, p) /* then the underlying frame buffer device ioctls */ if (sc->sc_ioctl != NULL) - error = (*sc->sc_ioctl)(sc->sc_dev.dv_parent, cmd, data, + error = (*sc->sc_ioctl)(sc->sc_fn_cookie, cmd, data, flag, p); if (error >= 0) return error; diff --git a/sys/arch/alpha/wscons/wscons_emul.c b/sys/arch/alpha/wscons/wscons_emul.c index 0fd4450c4a3..fc40d12638c 100644 --- a/sys/arch/alpha/wscons/wscons_emul.c +++ b/sys/arch/alpha/wscons/wscons_emul.c @@ -1,5 +1,5 @@ -/* $OpenBSD: wscons_emul.c,v 1.3 1996/10/30 22:41:47 niklas Exp $ */ -/* $NetBSD: wscons_emul.c,v 1.4 1996/10/13 03:00:47 christos Exp $ */ +/* $OpenBSD: wscons_emul.c,v 1.4 1997/01/24 19:58:31 niklas Exp $ */ +/* $NetBSD: wscons_emul.c,v 1.7 1996/11/19 05:23:13 cgd Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -34,6 +34,7 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/conf.h> #include <alpha/wscons/wsconsvar.h> #include <alpha/wscons/wscons_emul.h> #include <alpha/wscons/kbd.h> @@ -48,6 +49,11 @@ static __inline void wscons_emul_docontrol static __inline int wscons_emul_input_control __P((struct wscons_emul_data *, char)); +static int wscons_emul_input_normal __P((struct wscons_emul_data *, char)); +static int wscons_emul_input_haveesc __P((struct wscons_emul_data *, char)); +static void wscons_emul_docontrol __P((struct wscons_emul_data *, char)); +static int wscons_emul_input_control __P((struct wscons_emul_data *, char)); + void wscons_emul_attach(we, wo) struct wscons_emul_data *we; @@ -58,19 +64,20 @@ wscons_emul_attach(we, wo) #ifdef DIAGNOSTIC if (we == NULL || wo == NULL) panic("wscons_emul_attach: bogus args"); - if (wo->wo_ef == NULL) + if (wo->wo_emulfuncs == NULL) panic("wscons_emul_attach: bogus emul functions"); #endif - if (wo->wo_nrows < 0 || wo->wo_ncols < 0) - panic("wscons_emul_attach: bogus size"); + if (wo->wo_nrows <= 0 || wo->wo_ncols <= 0) + panic("wscons_emul_attach: bogus size (%d/%d)", + wo->wo_nrows, wo->wo_ncols); if (wo->wo_crow < 0 || wo->wo_ccol < 0 || wo->wo_crow >= wo->wo_nrows || wo->wo_ccol >= wo->wo_ncols) panic("wscons_emul_attach: bogus location (n: %d/%d, c: %d/%d", wo->wo_nrows, wo->wo_ncols, wo->wo_crow, wo->wo_ccol); we->ac_state = ANSICONS_STATE_NORMAL; - we->ac_ef = wo->wo_ef; - we->ac_efa = wo->wo_efa; + we->ac_ef = wo->wo_emulfuncs; + we->ac_efa = wo->wo_emulfuncs_cookie; we->ac_nrow = wo->wo_nrows; we->ac_ncol = wo->wo_ncols; diff --git a/sys/arch/alpha/wscons/wscons_rinit.c b/sys/arch/alpha/wscons/wscons_rinit.c index 3556c285800..f6911f17118 100644 --- a/sys/arch/alpha/wscons/wscons_rinit.c +++ b/sys/arch/alpha/wscons/wscons_rinit.c @@ -1,5 +1,5 @@ -/* $OpenBSD: wscons_rinit.c,v 1.3 1996/10/30 22:41:54 niklas Exp $ */ -/* $NetBSD: wscons_rinit.c,v 1.2 1996/07/09 00:55:50 cgd Exp $ */ +/* $OpenBSD: wscons_rinit.c,v 1.4 1997/01/24 19:58:32 niklas Exp $ */ +/* $NetBSD: wscons_rinit.c,v 1.3 1996/11/13 21:13:42 cgd Exp $ */ /* * Copyright (c) 1991, 1993 @@ -56,6 +56,8 @@ void rcons_initfont __P((struct rcons *, struct raster_font *)); +void rcons_initfont __P((struct rcons *, struct raster_font *)); + void rcons_initfont(rc, fp) struct rcons *rc; diff --git a/sys/arch/alpha/wscons/wsconsvar.h b/sys/arch/alpha/wscons/wsconsvar.h index 27db5939d40..27a14d3f96d 100644 --- a/sys/arch/alpha/wscons/wsconsvar.h +++ b/sys/arch/alpha/wscons/wsconsvar.h @@ -1,5 +1,5 @@ -/* $OpenBSD: wsconsvar.h,v 1.3 1996/10/30 22:41:56 niklas Exp $ */ -/* $NetBSD: wsconsvar.h,v 1.2 1996/04/12 06:10:36 cgd Exp $ */ +/* $OpenBSD: wsconsvar.h,v 1.4 1997/01/24 19:58:33 niklas Exp $ */ +/* $NetBSD: wsconsvar.h,v 1.4 1996/11/19 05:17:00 cgd Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -33,9 +33,9 @@ struct device; -typedef int (*wscons_ioctl_t) __P((struct device *dev, u_long cmd, +typedef int (*wscons_ioctl_t) __P((void *v, u_long cmd, caddr_t data, int flag, struct proc *p)); -typedef int (*wscons_mmap_t) __P((struct device *dev, off_t off, +typedef int (*wscons_mmap_t) __P((void *v, off_t off, int prot)); struct wscons_emulfuncs { @@ -54,14 +54,15 @@ struct wscons_emulfuncs { }; struct wscons_odev_spec { - const struct wscons_emulfuncs *wo_ef; /* emulation functions */ - void *wo_efa; /* emulation function cookie */ - - int wo_nrows, wo_ncols; /* number of rows & cols */ - int wo_crow, wo_ccol; /* current row & col */ + const struct wscons_emulfuncs *wo_emulfuncs; /* emulation functions */ + void *wo_emulfuncs_cookie; wscons_ioctl_t wo_ioctl; wscons_mmap_t wo_mmap; + void *wo_miscfuncs_cookie; + + int wo_nrows, wo_ncols; /* number of rows & cols */ + int wo_crow, wo_ccol; /* current row & col */ }; struct wsconsio_bell_data; @@ -109,4 +110,15 @@ void wscons_attach_input __P((struct device *, */ void wscons_input __P((char *)); +void msattach __P((struct device *, struct wscons_mdev_spec *)); +void ms_event __P((char, int, int)); + +void kbdattach __P((struct device *, struct wscons_idev_spec *)); +void kbd_input __P((int)); +void wscons_kbd_bell __P((void)); +int kbd_cngetc __P((dev_t)); +void kbd_cnpollc __P((dev_t, int)); +int kbdioctl __P((dev_t dev, u_long cmd, register caddr_t data, + int flag, struct proc *p)); + #endif /* _ALPHA_WSCONS_WSCONSVAR_H_ */ |