summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2000-08-01 13:51:20 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2000-08-01 13:51:20 +0000
commite6c966b615696f7a8f4d3c2c3fda5dcaed7d3f67 (patch)
tree42de716832f0c4a3c4e616390572a4a8d679dbd2 /sys/dev
parent389a0a4582e6890e967b7827708a1462222bcaf5 (diff)
update wscons, nothing serious, mostly api fixes for us; from netbsd through aaron@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/wscons/wscons_callbacks.h4
-rw-r--r--sys/dev/wscons/wscons_rops.c4
-rw-r--r--sys/dev/wscons/wsconsio.h8
-rw-r--r--sys/dev/wscons/wsdisplay.c54
-rw-r--r--sys/dev/wscons/wsdisplay_compat_usl.c4
-rw-r--r--sys/dev/wscons/wsdisplayvar.h4
-rw-r--r--sys/dev/wscons/wsemul_vt100.c16
-rw-r--r--sys/dev/wscons/wsemul_vt100_subr.c38
-rw-r--r--sys/dev/wscons/wsemul_vt100var.h4
-rw-r--r--sys/dev/wscons/wsevent.c6
-rw-r--r--sys/dev/wscons/wskbd.c17
-rw-r--r--sys/dev/wscons/wsksymdef.h10
-rw-r--r--sys/dev/wscons/wsksymvar.h6
-rw-r--r--sys/dev/wscons/wsmouse.c15
-rw-r--r--sys/dev/wscons/wsmousevar.h13
-rw-r--r--sys/dev/wscons/wsmux.c13
-rw-r--r--sys/dev/wscons/wsmuxvar.h7
17 files changed, 127 insertions, 96 deletions
diff --git a/sys/dev/wscons/wscons_callbacks.h b/sys/dev/wscons/wscons_callbacks.h
index 2200143507b..4eeee0ea451 100644
--- a/sys/dev/wscons/wscons_callbacks.h
+++ b/sys/dev/wscons/wscons_callbacks.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: wscons_callbacks.h,v 1.1 2000/05/16 23:49:10 mickey Exp $ */
-/* $NetBSD: wscons_callbacks.h,v 1.11 1999/12/01 23:22:59 augustss Exp $ */
+/* $OpenBSD: wscons_callbacks.h,v 1.2 2000/08/01 13:51:17 mickey Exp $ */
+/* $NetBSD: wscons_callbacks.h,v 1.12 2000/03/06 21:37:16 thorpej Exp $ */
/*
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
diff --git a/sys/dev/wscons/wscons_rops.c b/sys/dev/wscons/wscons_rops.c
index 487d0dcd43c..c398e7a7449 100644
--- a/sys/dev/wscons/wscons_rops.c
+++ b/sys/dev/wscons/wscons_rops.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: wscons_rops.c,v 1.6 2000/05/16 23:49:11 mickey Exp $ */
-/* $NetBSD: wscons_rops.c,v 1.5 1999/02/12 11:25:23 drochner Exp $ */
+/* $OpenBSD: wscons_rops.c,v 1.7 2000/08/01 13:51:17 mickey Exp $ */
+/* $NetBSD: wscons_rops.c,v 1.6 2000/03/30 12:45:44 augustss Exp $ */
/*
* Copyright (c) 1991, 1993
diff --git a/sys/dev/wscons/wsconsio.h b/sys/dev/wscons/wsconsio.h
index cf3059524f5..352bfc9ec58 100644
--- a/sys/dev/wscons/wsconsio.h
+++ b/sys/dev/wscons/wsconsio.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: wsconsio.h,v 1.2 2000/06/30 05:08:06 mickey Exp $ */
-/* $NetBSD: wsconsio.h,v 1.30 2000/06/02 23:45:13 matt Exp $ */
+/* $OpenBSD: wsconsio.h,v 1.3 2000/08/01 13:51:17 mickey Exp $ */
+/* $NetBSD: wsconsio.h,v 1.31.2.1 2000/07/07 09:49:17 hannken Exp $ */
/*
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
@@ -140,8 +140,8 @@ struct wskbd_map_data {
};
#define WSKBDIO_GETMAP _IOWR('W', 13, struct wskbd_map_data)
#define WSKBDIO_SETMAP _IOW('W', 14, struct wskbd_map_data)
-#define WSKBDIO_GETENCODING _IOR('W', 15, int)
-#define WSKBDIO_SETENCODING _IOW('W', 16, int)
+#define WSKBDIO_GETENCODING _IOR('W', 15, kbd_t)
+#define WSKBDIO_SETENCODING _IOW('W', 16, kbd_t)
/* internal use only */
#define WSKBDIO_SETMODE _IOW('W', 19, int)
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c
index 6aaa1c66bea..3488ce4963e 100644
--- a/sys/dev/wscons/wsdisplay.c
+++ b/sys/dev/wscons/wsdisplay.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: wsdisplay.c,v 1.3 2000/07/19 13:58:17 art Exp $ */
-/* $NetBSD: wsdisplay.c,v 1.36 2000/03/23 07:01:47 thorpej Exp $ */
+/* $OpenBSD: wsdisplay.c,v 1.4 2000/08/01 13:51:17 mickey Exp $ */
+/* $NetBSD: wsdisplay.c,v 1.37.4.1 2000/06/30 16:27:53 simonb Exp $ */
/*
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
@@ -140,12 +140,10 @@ struct wsdisplay_softc {
extern struct cfdriver wsdisplay_cd;
/* Autoconfiguration definitions. */
-static int wsdisplay_emul_match __P((struct device *, struct cfdata *,
- void *));
+static int wsdisplay_emul_match __P((struct device *, void *, void *));
static void wsdisplay_emul_attach __P((struct device *, struct device *,
void *));
-static int wsdisplay_noemul_match __P((struct device *, struct cfdata *,
- void *));
+static int wsdisplay_noemul_match __P((struct device *, void *, void *));
static void wsdisplay_noemul_attach __P((struct device *, struct device *,
void *));
@@ -155,13 +153,13 @@ struct cfdriver wsdisplay_cd = {
struct cfattach wsdisplay_emul_ca = {
sizeof (struct wsdisplay_softc),
- (cfmatch_t)wsdisplay_emul_match,
+ wsdisplay_emul_match,
wsdisplay_emul_attach,
};
struct cfattach wsdisplay_noemul_ca = {
sizeof (struct wsdisplay_softc),
- (cfmatch_t)wsdisplay_noemul_match,
+ wsdisplay_noemul_match,
wsdisplay_noemul_attach,
};
@@ -207,7 +205,7 @@ static void (*wsdisplay_cons_kbd_pollc) __P((dev_t, int));
static struct consdev wsdisplay_cons = {
NULL, NULL, wsdisplay_getc_dummy, wsdisplay_cnputc,
- wsdisplay_pollc, NODEV, CN_NORMAL
+ wsdisplay_pollc, NULL, NODEV, CN_NORMAL
};
#ifndef WSDISPLAY_DEFAULTSCREENS
@@ -486,18 +484,19 @@ wsdisplay_delscreen(sc, idx, flags)
int
wsdisplay_emul_match(parent, match, aux)
struct device *parent;
- struct cfdata *match;
+ void *match;
void *aux;
{
+ struct cfdata *cf = match;
struct wsemuldisplaydev_attach_args *ap = aux;
- if (match->wsemuldisplaydevcf_console !=
+ if (cf->wsemuldisplaydevcf_console !=
WSEMULDISPLAYDEVCF_CONSOLE_UNK) {
/*
* If console-ness of device specified, either match
* exactly (at high priority), or fail.
*/
- if (match->wsemuldisplaydevcf_console != 0 &&
+ if (cf->wsemuldisplaydevcf_console != 0 &&
ap->console != 0)
return (10);
else
@@ -553,7 +552,7 @@ wsemuldisplaydevprint(aux, pnp)
int
wsdisplay_noemul_match(parent, match, aux)
struct device *parent;
- struct cfdata *match;
+ void *match;
void *aux;
{
#if 0 /* -Wunused */
@@ -1146,6 +1145,26 @@ wsdisplaymmap(dev, offset, prot)
return ((*sc->sc_accessops->mmap)(sc->sc_accesscookie, offset, prot));
}
+int
+wsdisplayselect(dev, events, p)
+ dev_t dev;
+ int events;
+ struct proc *p;
+{
+ struct wsdisplay_softc *sc = wsdisplay_cd.cd_devs[WSDISPLAYUNIT(dev)];
+ struct wsscreen *scr;
+
+ if (ISWSDISPLAYCTL(dev))
+ return (0);
+
+ scr = sc->sc_scr[WSDISPLAYSCREEN(dev)];
+
+ if (WSSCREEN_HAS_TTY(scr))
+ return (ttselect(dev, events, p));
+ else
+ return (0);
+}
+
void
wsdisplaystart(tp)
struct tty *tp;
@@ -1229,7 +1248,8 @@ wsdisplaystop(tp, flag)
if (!ISSET(tp->t_state, TS_TTSTOP))
SET(tp->t_state, TS_FLUSH);
splx(s);
- return 0;
+
+ return (0);
}
/* Set line parameters. */
@@ -1753,7 +1773,7 @@ wsdisplay_set_cons_kbd(get, poll, bell)
void (*bell) __P((dev_t, u_int, u_int, u_int));
{
wsdisplay_cons.cn_getc = get;
- /* wsdisplay_cons.cn_bell = bell; XXX */
+ wsdisplay_cons.cn_bell = bell;
wsdisplay_cons_kbd_pollc = poll;
}
@@ -1761,8 +1781,8 @@ void
wsdisplay_unset_cons_kbd()
{
wsdisplay_cons.cn_getc = wsdisplay_getc_dummy;
- /* wsdisplay_cons.cn_bell = NULL; XXX */
- wsdisplay_cons_kbd_pollc = NULL;
+ wsdisplay_cons.cn_bell = NULL;
+ wsdisplay_cons_kbd_pollc = 0;
}
/*
diff --git a/sys/dev/wscons/wsdisplay_compat_usl.c b/sys/dev/wscons/wsdisplay_compat_usl.c
index fe2a847a8f6..633ceff003f 100644
--- a/sys/dev/wscons/wsdisplay_compat_usl.c
+++ b/sys/dev/wscons/wsdisplay_compat_usl.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: wsdisplay_compat_usl.c,v 1.2 2000/07/05 22:50:11 mickey Exp $ */
-/* $NetBSD: wsdisplay_compat_usl.c,v 1.11 1999/12/06 18:52:23 drochner Exp $ */
+/* $OpenBSD: wsdisplay_compat_usl.c,v 1.3 2000/08/01 13:51:18 mickey Exp $ */
+/* $NetBSD: wsdisplay_compat_usl.c,v 1.12 2000/03/23 07:01:47 thorpej Exp $ */
/*
* Copyright (c) 1998
diff --git a/sys/dev/wscons/wsdisplayvar.h b/sys/dev/wscons/wsdisplayvar.h
index 7a52fca9b09..9c17be47862 100644
--- a/sys/dev/wscons/wsdisplayvar.h
+++ b/sys/dev/wscons/wsdisplayvar.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: wsdisplayvar.h,v 1.1 2000/05/16 23:49:11 mickey Exp $ */
-/* $NetBSD: wsdisplayvar.h,v 1.14 1999/12/06 18:52:23 drochner Exp $ */
+/* $OpenBSD: wsdisplayvar.h,v 1.2 2000/08/01 13:51:18 mickey Exp $ */
+/* $NetBSD: wsdisplayvar.h,v 1.14.4.1 2000/06/30 16:27:53 simonb Exp $ */
/*
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
diff --git a/sys/dev/wscons/wsemul_vt100.c b/sys/dev/wscons/wsemul_vt100.c
index 3de01d30a0f..4e6b5b1a66e 100644
--- a/sys/dev/wscons/wsemul_vt100.c
+++ b/sys/dev/wscons/wsemul_vt100.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: wsemul_vt100.c,v 1.1 2000/05/16 23:49:11 mickey Exp $ */
-/* $NetBSD: wsemul_vt100.c,v 1.12 1999/11/03 15:55:29 mycroft Exp $ */
+/* $OpenBSD: wsemul_vt100.c,v 1.2 2000/08/01 13:51:18 mickey Exp $ */
+/* $NetBSD: wsemul_vt100.c,v 1.13 2000/04/28 21:56:16 mycroft Exp $ */
/*
* Copyright (c) 1998
@@ -220,7 +220,7 @@ wsemul_vt100_attach(console, type, cookie, ccol, crow, cbcookie, defattr)
edp->tabs = malloc(edp->ncols, M_DEVBUF, M_NOWAIT);
edp->dblwid = malloc(edp->nrows, M_DEVBUF, M_NOWAIT);
- bzero(edp->dblwid, edp->nrows);
+ memset(edp->dblwid, 0, edp->nrows);
edp->dw = 0;
edp->dcsarg = malloc(DCS_MAXLEN, M_DEVBUF, M_NOWAIT);
edp->isolatin1tab = malloc(128 * sizeof(int), M_DEVBUF, M_NOWAIT);
@@ -294,7 +294,7 @@ wsemul_vt100_reset(edp)
edp->scrreg_startrow = 0;
edp->scrreg_nrows = edp->nrows;
if (edp->tabs) {
- bzero(edp->tabs, edp->ncols);
+ memset(edp->tabs, 0, edp->ncols);
for (i = 8; i < edp->ncols; i += 8)
edp->tabs[i] = 1;
}
@@ -418,14 +418,14 @@ wsemul_vt100_output_c0c1(edp, c, kernel)
case CSI: /* 8-bit */
/* XXX cancel current escape sequence */
edp->nargs = 0;
- bzero(edp->args, sizeof (edp->args));
+ memset(edp->args, 0, sizeof (edp->args));
edp->modif1 = edp->modif2 = '\0';
edp->state = VT100_EMUL_STATE_CSI;
break;
case DCS: /* 8-bit */
/* XXX cancel current escape sequence */
edp->nargs = 0;
- bzero(edp->args, sizeof (edp->args));
+ memset(edp->args, 0, sizeof (edp->args));
edp->state = VT100_EMUL_STATE_DCS;
break;
case ST: /* string end 8-bit */
@@ -456,7 +456,7 @@ wsemul_vt100_output_esc(edp, c)
switch (c) {
case '[': /* CSI */
edp->nargs = 0;
- bzero(edp->args, sizeof (edp->args));
+ memset(edp->args, 0, sizeof (edp->args));
edp->modif1 = edp->modif2 = '\0';
newstate = VT100_EMUL_STATE_CSI;
break;
@@ -538,7 +538,7 @@ wsemul_vt100_output_esc(edp, c)
break;
case 'P': /* DCS */
edp->nargs = 0;
- bzero(edp->args, sizeof (edp->args));
+ memset(edp->args, 0, sizeof (edp->args));
newstate = VT100_EMUL_STATE_DCS;
break;
case 'c': /* RIS */
diff --git a/sys/dev/wscons/wsemul_vt100_subr.c b/sys/dev/wscons/wsemul_vt100_subr.c
index bd276387281..8e251259b66 100644
--- a/sys/dev/wscons/wsemul_vt100_subr.c
+++ b/sys/dev/wscons/wsemul_vt100_subr.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: wsemul_vt100_subr.c,v 1.1 2000/05/16 23:49:11 mickey Exp $ */
-/* $NetBSD: wsemul_vt100_subr.c,v 1.6 2000/02/25 17:42:51 mycroft Exp $ */
+/* $OpenBSD: wsemul_vt100_subr.c,v 1.2 2000/08/01 13:51:18 mickey Exp $ */
+/* $NetBSD: wsemul_vt100_subr.c,v 1.7 2000/04/28 21:56:16 mycroft Exp $ */
/*
* Copyright (c) 1998
@@ -68,16 +68,16 @@ wsemul_vt100_scrollup(edp, n)
edp->scrreg_startrow + n,
edp->scrreg_startrow,
help);
- if (edp->dblwid)
- memmove(&edp->dblwid[edp->scrreg_startrow],
- &edp->dblwid[edp->scrreg_startrow + n],
+ if (edp->dblwid) /* XXX OVERLAPS */
+ bcopy(&edp->dblwid[edp->scrreg_startrow + n],
+ &edp->dblwid[edp->scrreg_startrow],
help);
}
(*edp->emulops->eraserows)(edp->emulcookie,
edp->scrreg_startrow + help, n,
edp->bkgdattr);
if (edp->dblwid)
- bzero(&edp->dblwid[edp->scrreg_startrow + help], n);
+ memset(&edp->dblwid[edp->scrreg_startrow + help], 0, n);
CHECK_DW;
}
@@ -100,16 +100,16 @@ wsemul_vt100_scrolldown(edp, n)
edp->scrreg_startrow,
edp->scrreg_startrow + n,
help);
- if (edp->dblwid)
- memmove(&edp->dblwid[edp->scrreg_startrow + n],
- &edp->dblwid[edp->scrreg_startrow],
+ if (edp->dblwid) /* XXX OVERLAPS */
+ bcopy(&edp->dblwid[edp->scrreg_startrow],
+ &edp->dblwid[edp->scrreg_startrow + n],
help);
}
(*edp->emulops->eraserows)(edp->emulcookie,
edp->scrreg_startrow, n,
edp->bkgdattr);
if (edp->dblwid)
- bzero(&edp->dblwid[edp->scrreg_startrow], n);
+ memset(&edp->dblwid[edp->scrreg_startrow], 0, n);
CHECK_DW;
}
@@ -132,7 +132,7 @@ wsemul_vt100_ed(edp, arg)
edp->crow + 1, n,
edp->bkgdattr);
if (edp->dblwid)
- bzero(&edp->dblwid[edp->crow + 1], n);
+ memset(&edp->dblwid[edp->crow + 1], 0, n);
}
break;
case 1: /* beginning to cursor */
@@ -141,7 +141,7 @@ wsemul_vt100_ed(edp, arg)
0, edp->crow,
edp->bkgdattr);
if (edp->dblwid)
- bzero(&edp->dblwid[0], edp->crow);
+ memset(&edp->dblwid[0], 0, edp->crow);
}
ERASECOLS(0, edp->ccol + 1, edp->bkgdattr);
break;
@@ -150,7 +150,7 @@ wsemul_vt100_ed(edp, arg)
0, edp->nrows,
edp->bkgdattr);
if (edp->dblwid)
- bzero(&edp->dblwid[0], edp->nrows);
+ memset(&edp->dblwid[0], 0, edp->nrows);
break;
default:
#ifdef VT100_PRINTUNKNOWN
@@ -468,7 +468,7 @@ wsemul_vt100_handle_csi(edp, c)
edp->tabs[edp->ccol] = 0;
break;
case 3:
- bzero(edp->tabs, edp->ncols);
+ memset(edp->tabs, 0, edp->ncols);
break;
default:
#ifdef VT100_PRINTUNKNOWN
@@ -693,8 +693,12 @@ vt100_selectattribute(edp, flags, fgcol, bgcol, attr, bkgdattr)
#endif
}
}
- return ((*edp->emulops->alloc_attr)(edp->emulcookie, fgcol, bgcol,
- flags, attr));
+ error = (*edp->emulops->alloc_attr)(edp->emulcookie, fgcol, bgcol,
+ flags, attr);
+ if (error)
+ return (error);
+
+ return (0);
}
/*
@@ -712,7 +716,7 @@ wsemul_vt100_handle_dcs(edp)
return;
case DCSTYPE_TABRESTORE:
KASSERT(edp->tabs != 0);
- bzero(edp->tabs, edp->ncols);
+ memset(edp->tabs, 0, edp->ncols);
pos = 0;
for (i = 0; i < edp->dcspos; i++) {
char c = edp->dcsarg[i];
diff --git a/sys/dev/wscons/wsemul_vt100var.h b/sys/dev/wscons/wsemul_vt100var.h
index ea3880cd47a..0795cb8a302 100644
--- a/sys/dev/wscons/wsemul_vt100var.h
+++ b/sys/dev/wscons/wsemul_vt100var.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: wsemul_vt100var.h,v 1.1 2000/05/16 23:49:11 mickey Exp $ */
-/* $NetBSD: wsemul_vt100var.h,v 1.4 1998/12/04 20:48:04 drochner Exp $ */
+/* $OpenBSD: wsemul_vt100var.h,v 1.2 2000/08/01 13:51:18 mickey Exp $ */
+/* $NetBSD: wsemul_vt100var.h,v 1.5 2000/04/28 21:56:17 mycroft Exp $ */
/*
* Copyright (c) 1998
diff --git a/sys/dev/wscons/wsevent.c b/sys/dev/wscons/wsevent.c
index 8efece5980f..83b4f728e59 100644
--- a/sys/dev/wscons/wsevent.c
+++ b/sys/dev/wscons/wsevent.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: wsevent.c,v 1.1 2000/05/16 23:49:12 mickey Exp $ */
-/* $NetBSD: wsevent.c,v 1.4 2000/01/05 11:19:37 drochner Exp $ */
+/* $OpenBSD: wsevent.c,v 1.2 2000/08/01 13:51:18 mickey Exp $ */
+/* $NetBSD: wsevent.c,v 1.5 2000/03/30 12:45:44 augustss Exp $ */
/*
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
@@ -104,7 +104,7 @@ wsevent_init(ev)
ev->get = ev->put = 0;
ev->q = malloc((u_long)WSEVENT_QSIZE * sizeof(struct wscons_event),
M_DEVBUF, M_WAITOK);
- bzero((caddr_t)ev->q, WSEVENT_QSIZE * sizeof(struct wscons_event));
+ memset((caddr_t)ev->q, 0, WSEVENT_QSIZE * sizeof(struct wscons_event));
}
/*
diff --git a/sys/dev/wscons/wskbd.c b/sys/dev/wscons/wskbd.c
index 45dd0e9092c..37381dd4068 100644
--- a/sys/dev/wscons/wskbd.c
+++ b/sys/dev/wscons/wskbd.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: wskbd.c,v 1.1 2000/05/16 23:49:12 mickey Exp $ */
-/* $NetBSD: wskbd.c,v 1.35 2000/01/05 11:19:37 drochner Exp $ */
+/* $OpenBSD: wskbd.c,v 1.2 2000/08/01 13:51:18 mickey Exp $ */
+/* $NetBSD: wskbd.c,v 1.38 2000/03/23 07:01:47 thorpej Exp $ */
/*
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
@@ -202,7 +202,7 @@ struct wskbd_softc {
#define MOD_ONESET(id, mask) (((id)->t_modifiers & (mask)) != 0)
#define MOD_ALLSET(id, mask) (((id)->t_modifiers & (mask)) == (mask))
-int wskbd_match __P((struct device *, struct cfdata *, void *));
+int wskbd_match __P((struct device *, void *, void *));
void wskbd_attach __P((struct device *, struct device *, void *));
int wskbd_detach __P((struct device *, int));
int wskbd_activate __P((struct device *, enum devact));
@@ -232,10 +232,12 @@ struct cfdriver wskbd_cd = {
};
struct cfattach wskbd_ca = {
- sizeof (struct wskbd_softc), (cfmatch_t)wskbd_match, wskbd_attach,
+ sizeof (struct wskbd_softc), wskbd_match, wskbd_attach,
wskbd_detach, wskbd_activate
};
+extern struct cfdriver wskbd_cd;
+
#ifndef WSKBD_DEFAULT_BELL_PITCH
#define WSKBD_DEFAULT_BELL_PITCH 1500 /* 1500Hz */
#endif
@@ -321,17 +323,18 @@ wskbddevprint(aux, pnp)
int
wskbd_match(parent, match, aux)
struct device *parent;
- struct cfdata *match;
+ void *match;
void *aux;
{
+ struct cfdata *cf = match;
struct wskbddev_attach_args *ap = aux;
- if (match->wskbddevcf_console != WSKBDDEVCF_CONSOLE_UNK) {
+ if (cf->wskbddevcf_console != WSKBDDEVCF_CONSOLE_UNK) {
/*
* If console-ness of device specified, either match
* exactly (at high priority), or fail.
*/
- if (match->wskbddevcf_console != 0 && ap->console != 0)
+ if (cf->wskbddevcf_console != 0 && ap->console != 0)
return (10);
else
return (0);
diff --git a/sys/dev/wscons/wsksymdef.h b/sys/dev/wscons/wsksymdef.h
index 0a1b1472fbb..cd69d8efe0e 100644
--- a/sys/dev/wscons/wsksymdef.h
+++ b/sys/dev/wscons/wsksymdef.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: wsksymdef.h,v 1.2 2000/06/30 05:32:12 mickey Exp $ */
-/* $NetBSD: wsksymdef.h,v 1.32 2000/05/13 12:16:35 bjh21 Exp $ */
+/* $OpenBSD: wsksymdef.h,v 1.3 2000/08/01 13:51:18 mickey Exp $ */
+/* $NetBSD: wsksymdef.h,v 1.34.4.1 2000/07/07 09:49:54 hannken Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -455,11 +455,11 @@
(((k) & 0xf800) == 0xf000 ? ((k) & 0x00ff) : (k)))
/*
- * Keyboard types: 8bit encoding, 8bit variant
+ * Keyboard types: 8bit encoding, 24bit variant
*/
-#define KB_ENCODING(e) ((e) & 0xff00)
-#define KB_VARIANT(e) ((e) & 0x00ff)
+#define KB_ENCODING(e) ((e) & 0x0000ff00)
+#define KB_VARIANT(e) ((e) & 0xffff00ff)
#define KB_USER 0x0100
#define KB_US 0x0200
diff --git a/sys/dev/wscons/wsksymvar.h b/sys/dev/wscons/wsksymvar.h
index 98b4821d72f..fe9ff330ab2 100644
--- a/sys/dev/wscons/wsksymvar.h
+++ b/sys/dev/wscons/wsksymvar.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: wsksymvar.h,v 1.1 2000/05/16 23:49:12 mickey Exp $ */
-/* $NetBSD: wsksymvar.h,v 1.8 1999/12/21 11:59:13 drochner Exp $ */
+/* $OpenBSD: wsksymvar.h,v 1.2 2000/08/01 13:51:18 mickey Exp $ */
+/* $NetBSD: wsksymvar.h,v 1.8.4.1 2000/07/07 09:50:21 hannken Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -45,7 +45,7 @@
#endif
typedef u_int16_t keysym_t;
-typedef u_int16_t kbd_t;
+typedef u_int32_t kbd_t;
struct wscons_keymap {
keysym_t command;
diff --git a/sys/dev/wscons/wsmouse.c b/sys/dev/wscons/wsmouse.c
index dad3c64dec9..c37953713c2 100644
--- a/sys/dev/wscons/wsmouse.c
+++ b/sys/dev/wscons/wsmouse.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: wsmouse.c,v 1.1 2000/05/16 23:49:12 mickey Exp $ */
-/* $NetBSD: wsmouse.c,v 1.11 2000/01/08 02:57:24 takemura Exp $ */
+/* $OpenBSD: wsmouse.c,v 1.2 2000/08/01 13:51:18 mickey Exp $ */
+/* $NetBSD: wsmouse.c,v 1.12 2000/05/01 07:36:58 takemura Exp $ */
/*
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
@@ -137,7 +137,7 @@ struct wsmouse_softc {
#endif
};
-int wsmouse_match __P((struct device *, struct cfdata *, void *));
+int wsmouse_match __P((struct device *, void *, void *));
void wsmouse_attach __P((struct device *, struct device *, void *));
int wsmouse_detach __P((struct device *, int));
int wsmouse_activate __P((struct device *, enum devact));
@@ -154,10 +154,14 @@ struct cfdriver wsmouse_cd = {
};
struct cfattach wsmouse_ca = {
- sizeof (struct wsmouse_softc), (cfmatch_t)wsmouse_match, wsmouse_attach,
+ sizeof (struct wsmouse_softc), wsmouse_match, wsmouse_attach,
wsmouse_detach, wsmouse_activate
};
+#if NWSMOUSE > 0
+extern struct cfdriver wsmouse_cd;
+#endif /* NWSMOUSE > 0 */
+
cdev_decl(wsmouse);
#if NWSMUX > 0
@@ -183,10 +187,9 @@ wsmousedevprint(aux, pnp)
int
wsmouse_match(parent, match, aux)
struct device *parent;
- struct cfdata *match;
+ void *match;
void *aux;
{
-
return (1);
}
diff --git a/sys/dev/wscons/wsmousevar.h b/sys/dev/wscons/wsmousevar.h
index f6d7583ef27..885fdb8fb59 100644
--- a/sys/dev/wscons/wsmousevar.h
+++ b/sys/dev/wscons/wsmousevar.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: wsmousevar.h,v 1.1 2000/05/16 23:49:12 mickey Exp $ */
-/* $NetBSD: wsmousevar.h,v 1.3 1999/07/29 18:20:03 augustss Exp $ */
+/* $OpenBSD: wsmousevar.h,v 1.2 2000/08/01 13:51:18 mickey Exp $ */
+/* $NetBSD: wsmousevar.h,v 1.4 2000/01/08 02:57:24 takemura Exp $ */
/*
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
@@ -57,7 +57,6 @@ struct wsmousedev_attach_args {
void *accesscookie; /* access cookie */
};
-#define WSMOUSEDEVCF_MUX 0
#define wsmousedevcf_mux cf_loc[WSMOUSEDEVCF_MUX]
/*
@@ -68,9 +67,9 @@ int wsmousedevprint __P((void *, const char *));
/*
* Callbacks from the mouse driver to the wsmouse interface driver.
*/
-#define WSMOUSE_INPUT_DELTA 0x00
-#define WSMOUSE_INPUT_ABSOLUTE_X 0x01
-#define WSMOUSE_INPUT_ABSOLUTE_Y 0x02
-#define WSMOUSE_INPUT_ABSOLUTE_Z 0x04
+#define WSMOUSE_INPUT_DELTA 0
+#define WSMOUSE_INPUT_ABSOLUTE_X (1<<0)
+#define WSMOUSE_INPUT_ABSOLUTE_Y (1<<1)
+#define WSMOUSE_INPUT_ABSOLUTE_Z (1<<2)
void wsmouse_input __P((struct device *kbddev, u_int btns,
int x, int y, int z, u_int flags));
diff --git a/sys/dev/wscons/wsmux.c b/sys/dev/wscons/wsmux.c
index f9243a1025c..996bc3c9083 100644
--- a/sys/dev/wscons/wsmux.c
+++ b/sys/dev/wscons/wsmux.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: wsmux.c,v 1.1 2000/05/16 23:49:12 mickey Exp $ */
-/* $NetBSD: wsmux.c,v 1.8 1999/11/08 10:10:25 augustss Exp $ */
+/* $OpenBSD: wsmux.c,v 1.2 2000/08/01 13:51:18 mickey Exp $ */
+/* $NetBSD: wsmux.c,v 1.9 2000/05/28 10:33:14 takemura Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -353,7 +353,7 @@ wsmux_create(name, unit)
sc = malloc(sizeof *sc, M_DEVBUF, M_NOWAIT);
if (!sc)
return (0);
- bzero(sc, sizeof *sc);
+ memset(sc, 0, sizeof *sc);
LIST_INIT(&sc->sc_reals);
snprintf(sc->sc_dv.dv_xname, sizeof sc->sc_dv.dv_xname,
"%s%d", name, unit);
@@ -601,6 +601,13 @@ wsmuxdoioctl(dv, cmd, data, flag, p)
DPRINTF(("wsmuxdoioctl: save rawkbd = %d\n", sc->sc_rawkbd));
break;
#endif
+ case FIOASYNC:
+ sc->sc_events.async = *(int *)data != 0;
+ return (0);
+ case TIOCSPGRP:
+ if (*(int *)data != sc->sc_events.io->p_pgid)
+ return (EPERM);
+ return (0);
default:
break;
}
diff --git a/sys/dev/wscons/wsmuxvar.h b/sys/dev/wscons/wsmuxvar.h
index bab2f13db45..37c57cdb2f9 100644
--- a/sys/dev/wscons/wsmuxvar.h
+++ b/sys/dev/wscons/wsmuxvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsmuxvar.h,v 1.1 2000/05/16 23:49:12 mickey Exp $ */
+/* $OpenBSD: wsmuxvar.h,v 1.2 2000/08/01 13:51:19 mickey Exp $ */
/* $NetBSD: wsmuxvar.h,v 1.1 1999/07/29 18:20:43 augustss Exp $ */
/*
@@ -37,9 +37,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef _DEV_WSCONS_WSMUXVAR_H_
-#define _DEV_WSCONS_WSMUXVAR_H_
-
struct wsdisplay_softc;
struct wsplink;
@@ -96,5 +93,3 @@ int wskbd_add_mux __P((int, struct wsmux_softc *));
int wskbd_rem_mux __P((int, struct wsmux_softc *));
int wsmouse_add_mux __P((int, struct wsmux_softc *));
int wsmouse_rem_mux __P((int, struct wsmux_softc *));
-
-#endif /* _DEV_WSCONS_WSMUXVAR_H_ */