diff options
| author | cvs2svn <cvs2svn@FreeBSD.org> | 1994-11-21 07:33:22 +0000 |
|---|---|---|
| committer | cvs2svn <cvs2svn@FreeBSD.org> | 1994-11-21 07:33:22 +0000 |
| commit | 01233029edba45b14c75afe36248d0df998b3cc3 (patch) | |
| tree | e3246a9664c2bcea9329b550600f6612589b3cd0 /lib/libforms/examples | |
| parent | c264e2c65c3f4fe911fa70df828625a6b19c6d84 (diff) | |
Notes
Diffstat (limited to 'lib/libforms/examples')
| -rw-r--r-- | lib/libforms/examples/Makefile | 7 | ||||
| -rw-r--r-- | lib/libforms/examples/example.frm | 6 | ||||
| -rw-r--r-- | lib/libforms/examples/tform.c | 18 |
3 files changed, 31 insertions, 0 deletions
diff --git a/lib/libforms/examples/Makefile b/lib/libforms/examples/Makefile new file mode 100644 index 000000000000..5e175b5c4398 --- /dev/null +++ b/lib/libforms/examples/Makefile @@ -0,0 +1,7 @@ +PROG = tform + +CFLAGS = -Wall -I. -I${.CURDIR} +LDADD = -lforms -lncurses -ll +DPADD = ${LIBFORMS} ${LIBNCURSES} ${LIBL} + +.include <bsd.prog.mk> diff --git a/lib/libforms/examples/example.frm b/lib/libforms/examples/example.frm new file mode 100644 index 000000000000..f09ded5ea535 --- /dev/null +++ b/lib/libforms/examples/example.frm @@ -0,0 +1,6 @@ +Form template: 0 0 24 79 +Text 0 0 "This is non-editable text field" +Input 1 2 4 2 3 3 2 2 8 "Prompt1:" 2 20 10 25 "First" +Input 2 3 1 4 2 2 5 2 8 "Prompt2:" 5 20 10 25 "Second" +Input 3 4 2 4 1 1 2 40 8 "Prompt3:" 2 50 10 25 "Third" +Input 4 1 2 1 4 4 10 2 8 "Prompt4:" 10 20 10 25 "Fourth" diff --git a/lib/libforms/examples/tform.c b/lib/libforms/examples/tform.c new file mode 100644 index 000000000000..48f4d48bab0a --- /dev/null +++ b/lib/libforms/examples/tform.c @@ -0,0 +1,18 @@ +#include <stdio.h> +#include <stdlib.h> +#include <ncurses.h> +#include <dialog.h> +#include <forms.h> + +extern struct form *form; + +void +main() +{ + printf("Testing forms code\n"); + + if (init_forms("example.frm") == -1) + exit(1); + + edit_form(form); +} |
