Fix broken pointer arithmetic.
Being here, add hooks for the highly-desired-but-not-yet-done vt100 emulation.
This commit is contained in:
parent
7d839991bd
commit
7560f4c5d7
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wsemulconf.c,v 1.2 1998/04/17 00:17:27 thorpej Exp $ */
|
||||
/* $NetBSD: wsemulconf.c,v 1.3 1998/06/15 17:10:37 drochner Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
|
||||
|
@ -33,12 +33,13 @@
|
|||
static const char _copyright[] __attribute__ ((unused)) =
|
||||
"Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.";
|
||||
static const char _rcsid[] __attribute__ ((unused)) =
|
||||
"$NetBSD: wsemulconf.c,v 1.2 1998/04/17 00:17:27 thorpej Exp $";
|
||||
"$NetBSD: wsemulconf.c,v 1.3 1998/06/15 17:10:37 drochner Exp $";
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
||||
#include <dev/wscons/wsdisplayvar.h>
|
||||
#include <dev/wscons/wsksymvar.h>
|
||||
#include <dev/wscons/wsemulvar.h> /* pulls in opt_wsemul.h */
|
||||
#include <dev/wscons/wscons_callbacks.h>
|
||||
|
||||
|
@ -46,6 +47,9 @@ static const struct wsemul_ops *wsemul_conf[] = {
|
|||
#ifdef WSEMUL_SUN
|
||||
&wsemul_sun_ops,
|
||||
#endif
|
||||
#ifdef WSEMUL_VT100
|
||||
&wsemul_vt100_ops,
|
||||
#endif
|
||||
#ifndef WSEMUL_NO_DUMB
|
||||
&wsemul_dumb_ops,
|
||||
#endif
|
||||
|
@ -56,7 +60,7 @@ const struct wsemul_ops *
|
|||
wsemul_pick(name)
|
||||
const char *name;
|
||||
{
|
||||
const struct wsemul_ops *ops;
|
||||
const struct wsemul_ops **ops;
|
||||
|
||||
if (name == NULL) {
|
||||
/* default */
|
||||
|
@ -67,9 +71,9 @@ wsemul_pick(name)
|
|||
#endif
|
||||
}
|
||||
|
||||
for (ops = wsemul_conf[0]; ops != NULL; ops++)
|
||||
if (strcmp(name, ops->name) == 0)
|
||||
for (ops = &wsemul_conf[0]; *ops != NULL; ops++)
|
||||
if (strcmp(name, (*ops)->name) == 0)
|
||||
break;
|
||||
|
||||
return (ops);
|
||||
return (*ops);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue