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 | |
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')
-rw-r--r-- | lib/libforms/examples/Makefile | 9 | ||||
-rw-r--r-- | lib/libforms/examples/test.c | 7 |
2 files changed, 14 insertions, 2 deletions
diff --git a/lib/libforms/examples/Makefile b/lib/libforms/examples/Makefile index 36e782ea..9a79a06 100644 --- a/lib/libforms/examples/Makefile +++ b/lib/libforms/examples/Makefile @@ -4,6 +4,13 @@ NOMAN = yet SRCS = test.c CFLAGS = -LDADD = -lforms -lncurses -lmytinfo + +.if exists(${.CURDIR}/../obj) +FORMDIR=${.CURDIR}/../obj +.else +FORMDIR=${.CURDIR}/.. +.endif + +LDADD = -L${FORMDIR} -lforms -lncurses -lmytinfo .include <bsd.prog.mk> 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))); |