summary refs log tree commit diff
path: root/ui.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ui.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ui.c b/ui.c
index e9ca3ef..6d1338b 100644
--- a/ui.c
+++ b/ui.c
@@ -109,6 +109,7 @@ static struct Window *windowFor(size_t id) {
 
 	window->id = id;
 	window->pad = newpad(BufferCap, COLS);
+	if (!window->pad) err(EX_OSERR, "newpad");
 	scrollok(window->pad, true);
 	wmove(window->pad, BufferCap - 1, 0);
 	window->scroll = BufferCap;
@@ -211,20 +212,25 @@ void uiInit(void) {
 	disableFlowControl();
 	def_prog_mode();
 	atexit(errExit);
+	colorInit();
 
 	if (!to_status_line && !strncmp(termname(), "xterm", 5)) {
 		to_status_line = "\33]2;";
 		from_status_line = "\7";
 	}
+
 #define X(id, seq) define_key(seq, id);
 	ENUM_KEY
 #undef X
 
-	colorInit();
 	status = newwin(1, COLS, 0, 0);
+	if (!status) err(EX_OSERR, "newwin");
+
 	input = newpad(1, 512);
+	if (!input) err(EX_OSERR, "newpad");
 	keypad(input, true);
 	nodelay(input, true);
+
 	windows.active = windowFor(Network);
 	uiShow();
 }
tsJune McEnroe 2017-09-06Fix bin/Makefile FreeBSD compatibilityJune McEnroe 2017-09-06Remove C code from link scriptJune McEnroe 2017-09-06Move C code to bin, Makefile, AGPLJune McEnroe 2017-09-05Pass final NULL to execlpJune McEnroe 2017-09-05Add watch.cJune McEnroe 2017-09-02Remove Scala highlightingJune McEnroe 2017-08-31Fix Linux console Tarmak 3June McEnroe 2017-08-31Use Tarmak 3 on Linux consoleJune McEnroe 2017-08-25Install ddateJune McEnroe 2017-08-19Move nethack options to envJune McEnroe 2017-08-17Remove scala syntax fileJune McEnroe 2017-08-06Add wakeJune McEnroe 2017-08-04Use $() in install.shJune McEnroe 2017-08-02Create Code Tarmak 3 layoutJune McEnroe 2017-07-31Add tupJune McEnroe 2017-07-31Use designated initializer for hnel tableJune McEnroe 2017-07-30Add juneJune McEnroe 2017-07-30Play nethack as ValkyrieJune McEnroe 2017-07-28Add toggle to hnelJune McEnroe 2017-07-28Install slJune McEnroe 2017-07-25Add up, supJune McEnroe 2017-07-24Autopickup ringsJune McEnroe 2017-07-24Name dogJune McEnroe 2017-07-23Add nethackrcJune McEnroe 2017-07-23Remove useless setuid in briJune McEnroe 2017-07-23Clean up hnel a tiny bitJune McEnroe 2017-07-21Set window size in hnelJune McEnroe 2017-07-21Add hnelJune McEnroe 2017-07-19chmod 600 in dtchJune McEnroe