diff options
| author | Paul Richards <paul@FreeBSD.org> | 1994-11-13 06:45:44 +0000 |
|---|---|---|
| committer | Paul Richards <paul@FreeBSD.org> | 1994-11-13 06:45:44 +0000 |
| commit | 0d18307afca544b6250284329283bc0978ad4a86 (patch) | |
| tree | cd0c6245017543bfc740dc61d4255fac3130ed97 /lib/libforms/examples | |
| parent | e2855afccaeed52b6103338d332094fc7d05d18e (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 0000000000000..5e175b5c43980 --- /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 0000000000000..f09ded5ea535f --- /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 0000000000000..48f4d48bab0a6 --- /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); +} |
