summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-03-28 10:42:09 +0000
committerjkh <jkh@FreeBSD.org>1995-03-28 10:42:09 +0000
commit837a13ef49870fa05d73202221429506a98f974e (patch)
tree542fda88de7562d44280d29f76f935709743ed22 /lib
parentce961aa18e9bc19e11a4cfd9ad282d9998e1e854 (diff)
downloadFreeBSD-src-837a13ef49870fa05d73202221429506a98f974e.zip
FreeBSD-src-837a13ef49870fa05d73202221429506a98f974e.tar.gz
Tweak a few things just to show how form traversal might work fully.
Fix some spelling errors in the example.c file and make error handling a little more explanatory.
Diffstat (limited to 'lib')
-rw-r--r--lib/libforms/examples/example.c6
-rw-r--r--lib/libforms/examples/example.frm10
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/libforms/examples/example.c b/lib/libforms/examples/example.c
index bfc7d92..39c4432 100644
--- a/lib/libforms/examples/example.c
+++ b/lib/libforms/examples/example.c
@@ -52,7 +52,7 @@ main()
form = form_start("example");
if (!form) {
- err(-1, "No form returned");
+ err(-1, "No form `example' in example.frm returned");
exit(0);
}
@@ -62,7 +62,7 @@ main()
tuple = form_get_tuple(global_bindings, "example", FT_FORM);
if (!tuple)
- err(0, "No such form");
+ err(0, "No such form: example");
else
form = (struct Form *)tuple->addr;
@@ -82,7 +82,7 @@ main()
wrefresh(form->window);
if (form->status == FS_EXIT) {
- printf("You're entries were:\n\n");
+ printf("Your entries were:\n\n");
tuple = form_get_tuple(form->bindings, "input1", FT_FIELD_INST);
printf("Input 1 = %s\n", ((struct Field *)tuple->addr)->field.input->input);
tuple = form_get_tuple(form->bindings, "input2", FT_FIELD_INST);
diff --git a/lib/libforms/examples/example.frm b/lib/libforms/examples/example.frm
index f28b2c6..513ced2 100644
--- a/lib/libforms/examples/example.frm
+++ b/lib/libforms/examples/example.frm
@@ -46,9 +46,9 @@ Form example at 0,0 {
field4 at 11, 2
field6 at 15, 2
- input1 {field3} at 7,45, next=input2
- input2 {field5} at 11,45, next=menu1
- menu1 {field7} at 15,45, next=quit
- quit {field8} at 20,20, up = menu1, right = cancel
- cancel {field9} at 20,43, next=input1
+ input1 {field3} at 7,45, next=input2,down=input2,up=quit,right=input2
+ input2 {field5} at 11,45, next=menu1,down=menu1,up=input1,right=menu1
+ menu1 {field7} at 15,45, next=quit,down=quit,up=input2,right=quit
+ quit {field8} at 20,20, next=cancel,down=input1,up=menu1,right=cancel
+ cancel {field9} at 20,43, next=input1,down=input1,up=menu1,right=input1
}
OpenPOWER on IntegriCloud