summaryrefslogtreecommitdiffstats
path: root/sys/teken/teken.c
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2011-05-09 16:27:39 +0000
committered <ed@FreeBSD.org>2011-05-09 16:27:39 +0000
commita42bf7d6cd085fcc310938672242fb996a5d8859 (patch)
tree982b102e875149ab6f283138dde03e668b420bf0 /sys/teken/teken.c
parent123df40267b7a490c45762b08babb5d166a7f6f9 (diff)
downloadFreeBSD-src-a42bf7d6cd085fcc310938672242fb996a5d8859.zip
FreeBSD-src-a42bf7d6cd085fcc310938672242fb996a5d8859.tar.gz
Add proper build infrastructure for teken.
I'm not sure whether we should install teken as a library on any stock FreeBSD installation, but I can imagine people want to tinker around with it now and then. Create a /sys/teken/libteken, which holds a Makefile to install a shared library version of the terminal emulator, complete with a manpage. Also add Makefiles for the demo/stress applications, to build it against the shared library.
Diffstat (limited to 'sys/teken/teken.c')
-rw-r--r--sys/teken/teken.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/sys/teken/teken.c b/sys/teken/teken.c
index 91d706f..cdc2cb3 100644
--- a/sys/teken/teken.c
+++ b/sys/teken/teken.c
@@ -32,7 +32,6 @@
#include <sys/lock.h>
#include <sys/systm.h>
#define teken_assert(x) MPASS(x)
-#define teken_printf(x,...)
#else /* !(__FreeBSD__ && _KERNEL) */
#include <sys/types.h>
#include <assert.h>
@@ -40,14 +39,11 @@
#include <stdio.h>
#include <string.h>
#define teken_assert(x) assert(x)
-#define teken_printf(x,...) do { \
- if (df != NULL) \
- fprintf(df, x, ## __VA_ARGS__); \
-} while (0)
-/* debug messages */
-static FILE *df;
#endif /* __FreeBSD__ && _KERNEL */
+/* debug messages */
+#define teken_printf(x,...)
+
/* Private flags for t_stateflags. */
#define TS_FIRSTDIGIT 0x0001 /* First numeric digit in escape sequence. */
#define TS_INSERT 0x0002 /* Insert mode. */
@@ -153,12 +149,6 @@ teken_init(teken_t *t, const teken_funcs_t *tf, void *softc)
{
teken_pos_t tp = { .tp_row = 24, .tp_col = 80 };
-#if !(defined(__FreeBSD__) && defined(_KERNEL))
- df = fopen("teken.log", "w");
- if (df != NULL)
- setvbuf(df, NULL, _IOLBF, BUFSIZ);
-#endif /* !(__FreeBSD__ && _KERNEL) */
-
t->t_funcs = tf;
t->t_softc = softc;
OpenPOWER on IntegriCloud