summaryrefslogtreecommitdiffstats
path: root/lib/libforms/examples/tform.c
diff options
context:
space:
mode:
authorpaul <paul@FreeBSD.org>1994-11-13 06:45:44 +0000
committerpaul <paul@FreeBSD.org>1994-11-13 06:45:44 +0000
commitec3127d29c777128be8df287d32e7ba0f04fb5a7 (patch)
treecd0c6245017543bfc740dc61d4255fac3130ed97 /lib/libforms/examples/tform.c
parentf427ece6c5f21d208351c2b2a3e1a7eddad1150d (diff)
downloadFreeBSD-src-ec3127d29c777128be8df287d32e7ba0f04fb5a7.zip
FreeBSD-src-ec3127d29c777128be8df287d32e7ba0f04fb5a7.tar.gz
The start of a forms editor library. Currently implements text and
input fields. It reads a template file passed to init_forms(char *) and creates a curses based form editor. See the examples directory for a basic demo.
Diffstat (limited to 'lib/libforms/examples/tform.c')
-rw-r--r--lib/libforms/examples/tform.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/libforms/examples/tform.c b/lib/libforms/examples/tform.c
new file mode 100644
index 0000000..48f4d48
--- /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);
+}
OpenPOWER on IntegriCloud