Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/wscons Sort out the inclusion of wscons source files...
details: https://anonhg.NetBSD.org/src/rev/9bac6fca389a
branches: trunk
changeset: 472965:9bac6fca389a
user: drochner <drochner%NetBSD.org@localhost>
date: Fri May 14 16:01:11 1999 +0000
description:
Sort out the inclusion of wscons source files: the files are only
compiled if the corresponding devices are configured.
(Files calling wscons functions have to check whether these are present.)
diffstat:
sys/dev/wscons/files.wscons | 48 ++++++++++----------------------
sys/dev/wscons/wsdisplay.c | 46 +------------------------------
sys/dev/wscons/wskbd.c | 65 ++++++++++++++++++++++++++------------------
3 files changed, 55 insertions(+), 104 deletions(-)
diffs (truncated from 573 to 300 lines):
diff -r 7f696a5470ae -r 9bac6fca389a sys/dev/wscons/files.wscons
--- a/sys/dev/wscons/files.wscons Fri May 14 15:54:16 1999 +0000
+++ b/sys/dev/wscons/files.wscons Fri May 14 16:01:11 1999 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.wscons,v 1.13 1999/04/01 11:50:02 drochner Exp $
+# $NetBSD: files.wscons,v 1.14 1999/05/14 16:01:11 drochner Exp $
#
# "Workstation Console" glue; attaches frame buffer to emulator & keyboard,
@@ -31,38 +31,20 @@
device wsmouse
attach wsmouse at wsmousedev
-file dev/wscons/wscons_glue.c
- wsdisplaydev | wsemuldisplaydev | wskbddev
-file dev/wscons/wsdisplay.c
- wsdisplay | wsdisplaydev | wsemuldisplaydev | wskbddev
- needs-flag
-file dev/wscons/wsdisplay_compat_usl.c
- (wsdisplay | wsdisplaydev | wsemuldisplaydev | wskbddev) &
- wsdisplay_compat_usl
-file dev/wscons/wsemulconf.c
- wsdisplaydev | wsemuldisplaydev | wskbddev
-file dev/wscons/wsemul_dumb.c
- (wsdisplaydev | wsemuldisplaydev | wskbddev) & !wsemul_no_dumb
-file dev/wscons/wsemul_sun.c
- (wsdisplaydev | wsemuldisplaydev | wskbddev) & wsemul_sun
-file dev/wscons/wsemul_vt100.c
- (wsdisplaydev | wsemuldisplaydev | wskbddev) & wsemul_vt100
-file dev/wscons/wsemul_vt100_subr.c
- (wsdisplaydev | wsemuldisplaydev | wskbddev) & wsemul_vt100
-file dev/wscons/wsemul_vt100_chars.c
- (wsdisplaydev | wsemuldisplaydev | wskbddev) & wsemul_vt100
-file dev/wscons/wsemul_vt100_keys.c
- (wsdisplaydev | wsemuldisplaydev | wskbddev) & wsemul_vt100
-file dev/wscons/wsevent.c
- wskbddev | wsmousedev
-file dev/wscons/wskbd.c
- wskbd | wsdisplaydev | wsemuldisplaydev | wskbddev
- needs-flag
-file dev/wscons/wskbdutil.c
- wskbd | wsdisplaydev | wsemuldisplaydev | wskbddev
- needs-flag
-file dev/wscons/wsmouse.c
- wsmouse | wsmousedev needs-flag
+file dev/wscons/wscons_glue.c wsdisplay & wskbd
+file dev/wscons/wsdisplay.c wsdisplay needs-flag
+file dev/wscons/wsdisplay_compat_usl.c wsdisplay & wsdisplay_compat_usl
+file dev/wscons/wsemulconf.c wsdisplay
+file dev/wscons/wsemul_dumb.c wsdisplay & !wsemul_no_dumb
+file dev/wscons/wsemul_sun.c wsdisplay & wsemul_sun
+file dev/wscons/wsemul_vt100.c wsdisplay & wsemul_vt100
+file dev/wscons/wsemul_vt100_subr.c wsdisplay & wsemul_vt100
+file dev/wscons/wsemul_vt100_chars.c wsdisplay & wsemul_vt100
+file dev/wscons/wsemul_vt100_keys.c wsdisplay & wsemul_vt100
+file dev/wscons/wsevent.c wskbd | wsmouse
+file dev/wscons/wskbd.c wskbd needs-flag
+file dev/wscons/wskbdutil.c wskbd needs-flag
+file dev/wscons/wsmouse.c wsmouse needs-flag
# rcons bit-depth options
defopt opt_rcons.h RCONS_2BPP RCONS_16BPP
diff -r 7f696a5470ae -r 9bac6fca389a sys/dev/wscons/wsdisplay.c
--- a/sys/dev/wscons/wsdisplay.c Fri May 14 15:54:16 1999 +0000
+++ b/sys/dev/wscons/wsdisplay.c Fri May 14 16:01:11 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsdisplay.c,v 1.22 1999/03/23 15:56:56 drochner Exp $ */
+/* $NetBSD: wsdisplay.c,v 1.23 1999/05/14 16:01:11 drochner Exp $ */
/*
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
@@ -33,7 +33,7 @@
static const char _copyright[] __attribute__ ((unused)) =
"Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.";
static const char _rcsid[] __attribute__ ((unused)) =
- "$NetBSD: wsdisplay.c,v 1.22 1999/03/23 15:56:56 drochner Exp $";
+ "$NetBSD: wsdisplay.c,v 1.23 1999/05/14 16:01:11 drochner Exp $";
#include <sys/param.h>
#include <sys/conf.h>
@@ -60,8 +60,6 @@
#include "opt_wsdisplay_compat.h"
-#include "wsdisplay.h"
-
struct wsscreen_internal {
const struct wsdisplay_emulops *emulops;
void *emulcookie;
@@ -130,9 +128,7 @@
#endif
};
-#if NWSDISPLAY > 0
extern struct cfdriver wsdisplay_cd;
-#endif /* NWSDISPLAY > 0 */
/* Autoconfiguration definitions. */
static int wsdisplay_emul_match __P((struct device *, struct cfdata *,
@@ -159,10 +155,8 @@
/* Exported tty- and cdevsw-related functions. */
cdev_decl(wsdisplay);
-#if NWSDISPLAY > 0
static void wsdisplaystart __P((struct tty *));
static int wsdisplayparam __P((struct tty *, struct termios *));
-#endif /* NWSDISPLAY > 0 */
/* Internal macros, functions, and variables. */
@@ -648,7 +642,6 @@
int flag, mode;
struct proc *p;
{
-#if NWSDISPLAY > 0
struct wsdisplay_softc *sc;
struct tty *tp;
int unit, newopen, error;
@@ -704,9 +697,6 @@
scr->scr_flags |= SCR_OPEN;
return (0);
-#else
- return (ENXIO);
-#endif /* NWSDISPLAY > 0 */
}
int
@@ -715,7 +705,6 @@
int flag, mode;
struct proc *p;
{
-#if NWSDISPLAY > 0
struct wsdisplay_softc *sc;
struct tty *tp;
int unit;
@@ -767,9 +756,6 @@
scr->scr_flags &= ~SCR_OPEN;
return (0);
-#else
- return (ENXIO);
-#endif /* NWSDISPLAY > 0 */
}
int
@@ -778,7 +764,6 @@
struct uio *uio;
int flag;
{
-#if NWSDISPLAY > 0
struct wsdisplay_softc *sc;
struct tty *tp;
int unit;
@@ -797,9 +782,6 @@
tp = scr->scr_tty;
return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
-#else
- return (ENXIO);
-#endif /* NWSDISPLAY > 0 */
}
int
@@ -808,7 +790,6 @@
struct uio *uio;
int flag;
{
-#if NWSDISPLAY > 0
struct wsdisplay_softc *sc;
struct tty *tp;
int unit;
@@ -827,16 +808,12 @@
tp = scr->scr_tty;
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
-#else
- return (ENXIO);
-#endif /* NWSDISPLAY > 0 */
}
struct tty *
wsdisplaytty(dev)
dev_t dev;
{
-#if NWSDISPLAY > 0
struct wsdisplay_softc *sc;
int unit;
struct wsscreen *scr;
@@ -850,9 +827,6 @@
scr = sc->sc_scr[WSDISPLAYSCREEN(dev)];
return (scr->scr_tty);
-#else
- return (NULL);
-#endif /* NWSDISPLAY > 0 */
}
int
@@ -863,7 +837,6 @@
int flag;
struct proc *p;
{
-#if NWSDISPLAY > 0
struct wsdisplay_softc *sc;
struct tty *tp;
int unit, error;
@@ -901,9 +874,6 @@
error = wsdisplay_internal_ioctl(sc, scr, cmd, data, flag, p);
return (error != -1 ? error : ENOTTY);
-#else
- return (ENXIO);
-#endif /* NWSDISPLAY > 0 */
}
int
@@ -1059,7 +1029,6 @@
int offset; /* XXX */
int prot;
{
-#if NWSDISPLAY > 0
struct wsdisplay_softc *sc = wsdisplay_cd.cd_devs[WSDISPLAYUNIT(dev)];
struct wsscreen *scr;
@@ -1073,9 +1042,6 @@
/* pass mmap to display */
return ((*sc->sc_accessops->mmap)(sc->sc_accesscookie, offset, prot));
-#else
- return (-1);
-#endif /* NWSDISPLAY > 0 */
}
int
@@ -1084,7 +1050,6 @@
int events;
struct proc *p;
{
-#if NWSDISPLAY > 0
struct wsdisplay_softc *sc = wsdisplay_cd.cd_devs[WSDISPLAYUNIT(dev)];
struct wsscreen *scr;
@@ -1097,12 +1062,8 @@
return (ttpoll(dev, events, p));
else
return (0);
-#else
- return (0);
-#endif /* NWSDISPLAY > 0 */
}
-#if NWSDISPLAY > 0
void
wsdisplaystart(tp)
register struct tty *tp;
@@ -1173,7 +1134,6 @@
}
splx(s);
}
-#endif /* NWSDISPLAY > 0 */
void
wsdisplaystop(tp, flag)
@@ -1189,7 +1149,6 @@
splx(s);
}
-#if NWSDISPLAY > 0
/* Set line parameters. */
int
wsdisplayparam(tp, t)
@@ -1202,7 +1161,6 @@
tp->t_cflag = t->c_cflag;
return 0;
}
-#endif /* NWSDISPLAY > 0 */
/*
* Callbacks for the emulation code.
diff -r 7f696a5470ae -r 9bac6fca389a sys/dev/wscons/wskbd.c
--- a/sys/dev/wscons/wskbd.c Fri May 14 15:54:16 1999 +0000
+++ b/sys/dev/wscons/wskbd.c Fri May 14 16:01:11 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wskbd.c,v 1.20 1999/03/27 11:22:23 drochner Exp $ */
+/* $NetBSD: wskbd.c,v 1.21 1999/05/14 16:01:12 drochner Exp $ */
/*
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
@@ -36,7 +36,7 @@
static const char _copyright[] __attribute__ ((unused)) =
"Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.";
static const char _rcsid[] __attribute__ ((unused)) =
- "$NetBSD: wskbd.c,v 1.20 1999/03/27 11:22:23 drochner Exp $";
+ "$NetBSD: wskbd.c,v 1.21 1999/05/14 16:01:12 drochner Exp $";
/*
* Copyright (c) 1992, 1993
@@ -112,7 +112,7 @@
Home |
Main Index |
Thread Index |
Old Index