summaryrefslogtreecommitdiff
path: root/lib/libforms/examples/test.c
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1995-01-10 12:36:44 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1995-01-10 12:36:44 +0000
commit4c0b41ec3bc54b6bf01f4f5a18996cfe4b0b8cb3 (patch)
treee065a51499b3a3bf6683a5cb688430a7cd06c229 /lib/libforms/examples/test.c
parent8b9d60735d11b03eac340f1e7802ff8c86742f92 (diff)
Notes
Diffstat (limited to 'lib/libforms/examples/test.c')
-rw-r--r--lib/libforms/examples/test.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libforms/examples/test.c b/lib/libforms/examples/test.c
index 1fc3836a2f84..92e65a8ae981 100644
--- a/lib/libforms/examples/test.c
+++ b/lib/libforms/examples/test.c
@@ -12,6 +12,7 @@
* its use.
*/
+#include <stdio.h>
#include "../forms.h"
main()
@@ -68,7 +69,11 @@ main()
initscr();
initfrm(&form);
-
+ if (!form.window) {
+ fprintf(stderr, "\nUnable to initialize forms library.\n");
+ endwin();
+ exit(1);
+ }
keypad(form.window, TRUE);
while (!(res = update_form(&form)));