summary refs log tree commit diff
path: root/term.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-08-12 23:07:16 -0400
committerJune McEnroe <june@causal.agency>2019-08-12 23:07:16 -0400
commitbd7e5d10bab7a00e3b48d42e6a71abeea7fec621 (patch)
tree6e5e70a54efae41203361ec6a79ab1759e14a2b1 /term.c
parentRemove main in term.c (diff)
downloadstream-bd7e5d10bab7a00e3b48d42e6a71abeea7fec621.tar.gz
stream-bd7e5d10bab7a00e3b48d42e6a71abeea7fec621.zip
Set up afl-fuzz
Diffstat (limited to 'term.c')
-rw-r--r--term.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/term.c b/term.c
index c77d4f1..a557725 100644
--- a/term.c
+++ b/term.c
@@ -554,3 +554,17 @@ fail:
 	fclose(file);
 	return -1;
 }
+
+#ifdef TERM_MAIN
+#include <locale.h>
+
+int main(void) {
+	setlocale(LC_CTYPE, "");
+	struct Term *term = termAlloc(24, 80);
+	wint_t ch;
+	while (WEOF != (ch = getwchar())) {
+		termUpdate(term, ch);
+	}
+}
+
+#endif