diff options
author | jkh <jkh@FreeBSD.org> | 1995-01-10 12:36:44 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-01-10 12:36:44 +0000 |
commit | dfe96532e99073d7250eff8dae5b04dcaecbbcad (patch) | |
tree | e065a51499b3a3bf6683a5cb688430a7cd06c229 /lib/libforms/examples/test.c | |
parent | 59fbb0c594ff480682721cdb93975a0f1a6ae9fd (diff) | |
download | FreeBSD-src-dfe96532e99073d7250eff8dae5b04dcaecbbcad.zip FreeBSD-src-dfe96532e99073d7250eff8dae5b04dcaecbbcad.tar.gz |
As long as I can't figure out why this doesn't work, I might as well
add some error checking to it and clean this up a bit.
Diffstat (limited to 'lib/libforms/examples/test.c')
-rw-r--r-- | lib/libforms/examples/test.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libforms/examples/test.c b/lib/libforms/examples/test.c index 1fc3836..92e65a8 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))); |