summaryrefslogtreecommitdiff
path: root/lib/libform
diff options
context:
space:
mode:
authorwiz <wiz@NetBSD.org>2002-10-01 19:15:15 +0000
committerwiz <wiz@NetBSD.org>2002-10-01 19:15:15 +0000
commit03c12ea0f30c1ed7b7bd3a77696b154ec3fbbf81 (patch)
tree292811845f8edd8e9a7210c9375fb27474c16e37 /lib/libform
parentbe5fafec51d94220759dd2466195083c951bcb94 (diff)
New sentence, new line. From Robert Elz.
Diffstat (limited to 'lib/libform')
-rw-r--r--lib/libform/form_data.35
-rw-r--r--lib/libform/form_driver.323
-rw-r--r--lib/libform/form_field.314
-rw-r--r--lib/libform/form_field_attributes.313
-rw-r--r--lib/libform/form_field_buffer.317
-rw-r--r--lib/libform/form_field_info.319
-rw-r--r--lib/libform/form_field_just.318
-rw-r--r--lib/libform/form_field_new.38
-rw-r--r--lib/libform/form_field_opts.314
-rw-r--r--lib/libform/form_field_validation.35
-rw-r--r--lib/libform/form_fieldtype.322
-rw-r--r--lib/libform/form_hook.314
-rw-r--r--lib/libform/form_new.39
-rw-r--r--lib/libform/form_opts.39
-rw-r--r--lib/libform/form_page.316
-rw-r--r--lib/libform/form_post.35
-rw-r--r--lib/libform/form_win.313
-rw-r--r--lib/libform/forms.339
18 files changed, 153 insertions, 110 deletions
diff --git a/lib/libform/form_data.3 b/lib/libform/form_data.3
index 780070c2342..c2e4890a2f2 100644
--- a/lib/libform/form_data.3
+++ b/lib/libform/form_data.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: form_data.3,v 1.4 2002/02/20 11:30:58 wiz Exp $
+.\" $NetBSD: form_data.3,v 1.5 2002/10/01 19:15:15 wiz Exp $
.\"
.\" Copyright (c) 2001
.\" Brett Lymn - blymn@baea.com.au, brett_lymn@yahoo.com.au
@@ -47,7 +47,8 @@
If there is data offscreen to the right of the current field of the
given form then
.Fn data_ahead
-will return TRUE, otherwise FALSE is returned. Similarly, if there is
+will return TRUE, otherwise FALSE is returned.
+Similarly, if there is
data offscreen to the left of the current field of the given form then
.Fn data_behind
will return TRUE.
diff --git a/lib/libform/form_driver.3 b/lib/libform/form_driver.3
index d662be618a9..b25f007427d 100644
--- a/lib/libform/form_driver.3
+++ b/lib/libform/form_driver.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: form_driver.3,v 1.5 2002/08/06 12:44:34 wiz Exp $
+.\" $NetBSD: form_driver.3,v 1.6 2002/10/01 19:15:15 wiz Exp $
.\"
.\" Copyright (c) 2001
.\" Brett Lymn - blymn@baea.com.au, brett_lymn@yahoo.com.au
@@ -47,10 +47,11 @@ The
is the heart of the forms library, it takes commands in the
.Fa request
parameter that is either a request to the driver to perform some
-action or is a character to be inserted into the current field. The
-form driver will attempt to insert any printable character passed to
-it into the current field. This may or may not succeed depending on
-the state of the current field. If the character passed is not
+action or is a character to be inserted into the current field.
+The form driver will attempt to insert any printable character passed to
+it into the current field.
+This may or may not succeed depending on the state of the current field.
+If the character passed is not
printable then the driver attempts to process it as a driver request.
If the character passed is not a valid request then the driver will
return an unknown command error.
@@ -144,7 +145,8 @@ Enter overlay mode, characters added to the field will replace the
ones already there.
.It REQ_INS_MODE
Enter insert mode, characters will be inserted at the current cursor
-position. Any characters to the right of the cursor will be moved
+position.
+Any characters to the right of the cursor will be moved
right to accomodate the new characters.
.It REQ_SCR_FLINE
Scroll the field forward one line.
@@ -172,9 +174,9 @@ Scroll the field horizontally forward half a field line.
Scroll the field horizontally backward half a field line.
.It REQ_VALIDATION
Request the contents of the current field be validated using any field
-validation function that has been set for the field. Normally, the
-field is validated before the current field changes. This request
-allows the current field to be validated.
+validation function that has been set for the field.
+Normally, the field is validated before the current field changes.
+This request allows the current field to be validated.
.It REQ_PREV_CHOICE
Select the previous choice in an enumerated type field.
.It REQ_NEXT_CHOICE
@@ -211,7 +213,8 @@ validation for the current field.
.Sh NOTES
Field sorting is done by location of the field on the form page, the
fields are sorted by position starting with the top-most, left-most
-field and progressing left to right. For the purposes of sorting, the
+field and progressing left to right.
+For the purposes of sorting, the
fields top left corner is used as the sort criteria.
The header
.Pa \*[Lt]form.h\*[Gt]
diff --git a/lib/libform/form_field.3 b/lib/libform/form_field.3
index a0c839f19c2..1e1c4d440b3 100644
--- a/lib/libform/form_field.3
+++ b/lib/libform/form_field.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: form_field.3,v 1.5 2002/08/06 12:44:34 wiz Exp $
+.\" $NetBSD: form_field.3,v 1.6 2002/10/01 19:15:15 wiz Exp $
.\"
.\" Copyright (c) 2001
.\" Brett Lymn - blymn@baea.com.au, brett_lymn@yahoo.com.au
@@ -56,7 +56,8 @@ The
function returns the number of fields that are attached to the given
form, if the form argument passed is NULL then
.Fn field_count
-will return -1. The function
+will return -1.
+The function
.Fn form_fields
will return a pointer to array of attach fields for the given form,
this array is not NULL terminated, fields may be attached to the given
@@ -65,10 +66,11 @@ form by calling
The
.Fa fields
argument in this function is a pointer to a NULL terminated array of
-fields that will be attached to the form. If there are already fields
-attached to the form then they will be detached before the new fields
-are attached. The new fields given must not be attached to any other
-form. The
+fields that will be attached to the form.
+If there are already fields attached to the form then they will be
+detached before the new fields are attached.
+The new fields given must not be attached to any other form.
+The
.Fn move_field
function will move the given field to the location specified by
.Fa frow
diff --git a/lib/libform/form_field_attributes.3 b/lib/libform/form_field_attributes.3
index 55d97ff8210..0e2e3fc91c6 100644
--- a/lib/libform/form_field_attributes.3
+++ b/lib/libform/form_field_attributes.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: form_field_attributes.3,v 1.5 2002/08/06 12:44:34 wiz Exp $
+.\" $NetBSD: form_field_attributes.3,v 1.6 2002/10/01 19:15:15 wiz Exp $
.\"
.\" Copyright (c) 2001
.\" Brett Lymn - blymn@baea.com.au, brett_lymn@yahoo.com.au
@@ -62,16 +62,17 @@ Calling the function
will return the character attributes that will be applied to a field
that is not the current field, these attributes can be set by the
.Fn set_field_back
-function. The
+function.
+The
.Fn field_fore
function returns the character attributes that will be used to
indicate that a field is the currently active one on the form, this
attribute may be set by using the
.Fn set_field_fore
-function. The
-pad character for a field is the character that will be printed in all
-field locations not occupied with actual field contents. The pad
-character can be retrieved by calling the
+function.
+The pad character for a field is the character that will be printed in all
+field locations not occupied with actual field contents.
+The pad character can be retrieved by calling the
.Fn field_pad
function, the pad character is set by using the
.Fn set_field_pad
diff --git a/lib/libform/form_field_buffer.3 b/lib/libform/form_field_buffer.3
index 642536fe0bf..f8b44f39111 100644
--- a/lib/libform/form_field_buffer.3
+++ b/lib/libform/form_field_buffer.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: form_field_buffer.3,v 1.6 2002/08/09 14:15:13 blymn Exp $
+.\" $NetBSD: form_field_buffer.3,v 1.7 2002/10/01 19:15:16 wiz Exp $
.\"
.\" Copyright (c) 2001
.\" Brett Lymn - blymn@baea.com.au, brett_lymn@yahoo.com.au
@@ -59,22 +59,25 @@ The
.Fn field_buffer
function returns the contents of the buffer number specified by
.Fa buffer
-for the given field. If the requested buffer number exceeds the
+for the given field.
+If the requested buffer number exceeds the
number of buffers attached to the field then NULL will be returned.
The field buffer may be set by calling
.Fn set_field_buffer
which will set the given buffer number to the contents of the string
-passed. A buffer may also be set by calling
+passed.
+A buffer may also be set by calling
.Fn set_field_printf
which sets the buffer using the format arg
.Fa fmt
after being expanded using the subsequent arguments in the same manner
as
.Xr sprintf 3
-does. Calling
+does.
+Calling
.Fn field_status
-will return the status of the first buffer attached to the field. If
-the field has been modified then the function will return TRUE
+will return the status of the first buffer attached to the field.
+If the field has been modified then the function will return TRUE
otherwise FALSE is returned, the status of the first buffer may be
programmatically set by calling
.Fn set_field_status .
@@ -107,6 +110,6 @@ and
.Pa \*[Lt]eti.h\*[Gt] .
The function
.Fn set_field_printf
-is a
+is a
.Nx
extension and must not be used in portable code.
diff --git a/lib/libform/form_field_info.3 b/lib/libform/form_field_info.3
index 3497da308b3..290e58a6b9f 100644
--- a/lib/libform/form_field_info.3
+++ b/lib/libform/form_field_info.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: form_field_info.3,v 1.5 2002/08/06 12:35:39 wiz Exp $
+.\" $NetBSD: form_field_info.3,v 1.6 2002/10/01 19:15:16 wiz Exp $
.\"
.\" Copyright (c) 2001
.\" Brett Lymn - blymn@baea.com.au, brett_lymn@yahoo.com.au
@@ -48,13 +48,15 @@
.Sh DESCRIPTION
The function
.Fn dynamic_field_info
-returns the sizing information for the field given. The function will
-return the number of rows, columns and the maximum growth of the field
-in the storage pointed to by the drows, dcols and max parameters
-respectively. Dynamic field information cannot be requested for the
-default field. If the field given is not dynamic then
+returns the sizing information for the field given.
+The function will return the number of rows, columns and the maximum
+growth of the field in the storage pointed to by the drows, dcols and max
+parameters respectively.
+Dynamic field information cannot be requested for the default field.
+If the field given is not dynamic then
.Fn dynamic_field_info
-will simply return the size of the actual field. The
+will simply return the size of the actual field.
+The
.Fn field_info
will return the number or rows, columns, field starting row, field
starting column, number of off screen rows and number of buffers in
@@ -67,8 +69,7 @@ and
.Fa nbuf
respectively.
.Sh RETURN VALUES
-The functions will return one of the following error
-values:
+The functions will return one of the following error values:
.Pp
.Bl -tag -width E_UNKNOWN_COMMAND -compact
.It Er E_OK
diff --git a/lib/libform/form_field_just.3 b/lib/libform/form_field_just.3
index 11712871797..9704e500b43 100644
--- a/lib/libform/form_field_just.3
+++ b/lib/libform/form_field_just.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: form_field_just.3,v 1.5 2002/08/06 12:44:34 wiz Exp $
+.\" $NetBSD: form_field_just.3,v 1.6 2002/10/01 19:15:16 wiz Exp $
.\"
.\" Copyright (c) 2001
.\" Brett Lymn - blymn@baea.com.au, brett_lymn@yahoo.com.au
@@ -46,8 +46,10 @@
.Fn set_field_just "FIELD *field" "int justification"
.Sh DESCRIPTION
Field justification is only applied to static fields, a dynamic field
-will not be justified. The default justification for a field is
-NO_JUSTIFICATION. The
+will not be justified.
+The default justification for a field is
+NO_JUSTIFICATION.
+The
.Fn field_just
will return the current justification value of the given field and the
justification may be set by calling the
@@ -58,13 +60,15 @@ The following are the valid justifications for a field:
.Pp
.Bl -tag -width NO_JUSTIFICATION -compact
.It NO_JUSTIFICATION
-No justification is to be applied to the field. In practice, this is
-the same as JUSTIFY_LEFT.
+No justification is to be applied to the field.
+In practice, this is the same as JUSTIFY_LEFT.
.It JUSTIFY_RIGHT
-The field will be right justified. That is, the end of each line will
+The field will be right justified.
+That is, the end of each line will
be butted up against the right hand side of the field.
.It JUSTIFY_LEFT
-The field will be left justified. That is, the start of each line
+The field will be left justified.
+That is, the start of each line
will be butted up against the left hand side of the field.
.It JUSTIFY_CENTER
The field will be centre justified, padding will be applied to either
diff --git a/lib/libform/form_field_new.3 b/lib/libform/form_field_new.3
index 5a2a478f702..c181aa20b11 100644
--- a/lib/libform/form_field_new.3
+++ b/lib/libform/form_field_new.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: form_field_new.3,v 1.6 2002/08/06 12:44:35 wiz Exp $
+.\" $NetBSD: form_field_new.3,v 1.7 2002/10/01 19:15:16 wiz Exp $
.\"
.\" Copyright (c) 2001
.\" Brett Lymn - blymn@baea.com.au, brett_lymn@yahoo.com.au
@@ -64,7 +64,8 @@ function duplicates the given field, including any buffers associated
with the field and returns the pointer to the newly created field.
.Fn free_field
destroys the field and frees any allocated resources associated with
-the field. The function
+the field.
+The function
.Fn link_field
copies the given field to a new field at the location
.Fa frow
@@ -84,7 +85,8 @@ on the page, the argument
specified the number of off screen rows the field has and the
.Fa nbuf
parameter specifies the number of extra buffers attached to the
-field. There will always be one buffer associated with a field.
+field.
+There will always be one buffer associated with a field.
.Sh RETURN VALUES
On error
.Fn dup_field
diff --git a/lib/libform/form_field_opts.3 b/lib/libform/form_field_opts.3
index 087e59ce5f7..15803e1e28e 100644
--- a/lib/libform/form_field_opts.3
+++ b/lib/libform/form_field_opts.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: form_field_opts.3,v 1.5 2002/08/06 12:44:35 wiz Exp $
+.\" $NetBSD: form_field_opts.3,v 1.6 2002/10/01 19:15:16 wiz Exp $
.\"
.\" Copyright (c) 2001
.\" Brett Lymn - blymn@baea.com.au, brett_lymn@yahoo.com.au
@@ -53,21 +53,25 @@
.Sh DESCRIPTION
The function
.Fn field_opts
-returns the current options settings for the given field. The
+returns the current options settings for the given field.
+The
.Fn field_opts_off
will turn the options given in
.Fa options
off for the given field, options not specified in
.Fa options
-will remain unchanged. Conversely, the function
+will remain unchanged.
+Conversely, the function
.Fn field_opts_on
will turn on the options given in
.Fa options
for the specified field, again, any options not specified will remain
-unchanged. The options for a field may be set to a specific set of
+unchanged.
+The options for a field may be set to a specific set of
options by calling the
.Fn set_field_opts
-function. Options may only be changed if the field given is not the
+function.
+Options may only be changed if the field given is not the
currently active one.
.Sh PARAMETERS
The following options are available for a field:
diff --git a/lib/libform/form_field_validation.3 b/lib/libform/form_field_validation.3
index c0888eaca9b..7151029425b 100644
--- a/lib/libform/form_field_validation.3
+++ b/lib/libform/form_field_validation.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: form_field_validation.3,v 1.5 2002/08/06 12:44:35 wiz Exp $
+.\" $NetBSD: form_field_validation.3,v 1.6 2002/10/01 19:15:16 wiz Exp $
.\"
.\" Copyright (c) 2001
.\" Brett Lymn - blymn@baea.com.au, brett_lymn@yahoo.com.au
@@ -51,7 +51,8 @@
The
.Fn field_arg
function returns the field type arguments that are associated with the
-given field. The
+given field.
+The
.Fn field_type
function returns the field type structure associated with the given
field, this type can be set by calling the
diff --git a/lib/libform/form_fieldtype.3 b/lib/libform/form_fieldtype.3
index a57991e1a31..634a2042a71 100644
--- a/lib/libform/form_fieldtype.3
+++ b/lib/libform/form_fieldtype.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: form_fieldtype.3,v 1.5 2002/08/06 12:44:35 wiz Exp $
+.\" $NetBSD: form_fieldtype.3,v 1.6 2002/10/01 19:15:16 wiz Exp $
.\"
.\" Copyright (c) 2001
.\" Brett Lymn - blymn@baea.com.au, brett_lymn@yahoo.com.au
@@ -68,8 +68,8 @@
.Sh DESCRIPTION
The function
.Fn free_fieldtype
-frees the storage associated with the field type and destroys it. The
-function
+frees the storage associated with the field type and destroys it.
+The function
.Fn link_fieldtype
links together the two given field types to produce a new field type.
A new field type can be created by calling
@@ -77,17 +77,20 @@ A new field type can be created by calling
which requires pointers to two functions which perform validation, the
.Fa field_check
function must validate the field contents and return TRUE if they are
-acceptable and FALSE if they are not. The
+acceptable and FALSE if they are not.
+The
.Fa char_check
validates the character input into the field, this function will be
called for each character entered, if the character can be entered
into the field then
.Fa char_check
-must return TRUE. Neither
+must return TRUE.
+Neither
.Fa field_check
nor
.Fa char_check
-may be NULL. The functions for handling the field type arguments can
+may be NULL.
+The functions for handling the field type arguments can
be defined by using the
.Fn set_fieldtype_arg
function, the
@@ -98,8 +101,8 @@ is used to copy the fieldtype arguments to a new arguments structure
and
.Fa free_args
is used to destroy the fieldtype arguments and release any associated
-storage, none of these function pointers may be NULL. The field type
-choice functions can be set by calling
+storage, none of these function pointers may be NULL.
+The field type choice functions can be set by calling
.Fn set_fieldtype_choice ,
the
.Fa next_choice
@@ -108,7 +111,8 @@ and
specify the next and previous choice functions for the field type.
These functions must perform the necessary actions to select the next
or previous choice for the field, updating the field buffer if
-necessary. The choice functions must return TRUE if the function
+necessary.
+The choice functions must return TRUE if the function
succeeded and FALSE otherwise.
.Sh RETURN VALUES
Functions returning pointers will return NULL if an error is detected.
diff --git a/lib/libform/form_hook.3 b/lib/libform/form_hook.3
index c8e4ad348dd..45e6403644d 100644
--- a/lib/libform/form_hook.3
+++ b/lib/libform/form_hook.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: form_hook.3,v 1.5 2002/08/06 12:44:35 wiz Exp $
+.\" $NetBSD: form_hook.3,v 1.6 2002/10/01 19:15:17 wiz Exp $
.\"
.\" Copyright (c) 2001
.\" Brett Lymn - blymn@baea.com.au, brett_lymn@yahoo.com.au
@@ -69,25 +69,29 @@ function returns a pointer to the function that will be called just
after the current field changes and just before the form is posted,
this function may be set by using the
.Fn set_field_init
-function. Similarly, the function
+function.
+Similarly, the function
.Fn field_term
will return a pointer to the function that will be called just before
the current field changes and just after the form is unposted, this
function pointer may be set by using the
.Fn set_field_term
-function. The
+function.
+The
.Fn form_init
function will return a pointer to the function that will be called
just before the form is posted to the screen, this function can be set
by calling the
.Fn set_form_init
-function. The
+function.
+The
.Fn form_term
function will return a pointer to the function that will be called
just after the form is unposted from the screen, this function may be
set by using the
.Fn set_form_term
-function. By default, the init and term function pointers are NULL.
+function.
+By default, the init and term function pointers are NULL.
.Sh RETURN VALUES
Functions returning pointers will return NULL if an error is detected.
The functions that return an int will return one of the following error
diff --git a/lib/libform/form_new.3 b/lib/libform/form_new.3
index 88062a287c8..6c9e299daa1 100644
--- a/lib/libform/form_new.3
+++ b/lib/libform/form_new.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: form_new.3,v 1.4 2002/02/20 11:30:59 wiz Exp $
+.\" $NetBSD: form_new.3,v 1.5 2002/10/01 19:15:17 wiz Exp $
.\"
.\" Copyright (c) 2001
.\" Brett Lymn - blymn@baea.com.au, brett_lymn@yahoo.com.au
@@ -48,11 +48,12 @@
The function
.Fn free_form
frees all the resources associated with the form and destroys the
-form. Calling
+form.
+Calling
.Fn new_form
will create a new form, set the form parameters to the current
-defaults and attach the passed fields to the form. The array of
-fields passed to
+defaults and attach the passed fields to the form.
+The array of fields passed to
.Fn new_form
must be terminated with a NULL pointer to indicate the end of the
fields.
diff --git a/lib/libform/form_opts.3 b/lib/libform/form_opts.3
index 3a3c592541b..63b717f43ca 100644
--- a/lib/libform/form_opts.3
+++ b/lib/libform/form_opts.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: form_opts.3,v 1.5 2002/08/06 12:44:35 wiz Exp $
+.\" $NetBSD: form_opts.3,v 1.6 2002/10/01 19:15:17 wiz Exp $
.\"
.\" Copyright (c) 2001
.\" Brett Lymn - blymn@baea.com.au, brett_lymn@yahoo.com.au
@@ -53,7 +53,8 @@
.Sh DESCRIPTION
The function
.Fn form_opts
-returns the current options that are set on the given form. The
+returns the current options that are set on the given form.
+The
.Fn form_opts_off
will turn off the form options given in
.Fa options
@@ -61,8 +62,8 @@ for the form, similarly,
.Fn form_opts_on
will turn on the options specified in
.Fa options
-for the given form. The form options can be set to an explicit set by
-calling
+for the given form.
+The form options can be set to an explicit set by calling
.Fn set_form_opts .
.Sh PARAMETERS
The following form options are valid:
diff --git a/lib/libform/form_page.3 b/lib/libform/form_page.3
index e0961a91342..cc725316f80 100644
--- a/lib/libform/form_page.3
+++ b/lib/libform/form_page.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: form_page.3,v 1.5 2002/08/06 12:44:35 wiz Exp $
+.\" $NetBSD: form_page.3,v 1.6 2002/10/01 19:15:17 wiz Exp $
.\"
.\" Copyright (c) 1999
.\" Brett Lymn - blymn@baea.com.au, brett_lymn@yahoo.com.au
@@ -60,11 +60,14 @@
The
.Fn current_field
returns a pointer to the structure for the field that is currently
-active on the page. If there is an error,
+active on the page.
+If there is an error,
.Fn current_field
-will return NULL. Calling
+will return NULL.
+Calling
.Fn field_index
-will return the index of the given field in the form field array. The
+will return the index of the given field in the form field array.
+The
current page the form is on can be determined by using
.Fn form_page ,
the current page of a form can be programmatically set by calling
@@ -74,9 +77,8 @@ calling the function
.Fn form_max_page
but note that this function is a
.Nx
-extension and must not be used
-in portable forms library programs. The current field on the form may
-be set by calling
+extension and must not be used in portable forms library programs.
+The current field on the form may be set by calling
.Fn set_current_field
which will set the current field to the one given.
.Sh RETURN VALUES
diff --git a/lib/libform/form_post.3 b/lib/libform/form_post.3
index 54059918b9e..71d6d0f67ef 100644
--- a/lib/libform/form_post.3
+++ b/lib/libform/form_post.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: form_post.3,v 1.4 2002/02/20 11:30:59 wiz Exp $
+.\" $NetBSD: form_post.3,v 1.5 2002/10/01 19:15:17 wiz Exp $
.\"
.\" Copyright (c) 2001
.\" Brett Lymn - blymn@baea.com.au, brett_lymn@yahoo.com.au
@@ -48,7 +48,8 @@
The
.Fn post_form
function performs the actions necessary to present the form on the
-curses screen. If there are any init functions that need to be called
+curses screen.
+If there are any init functions that need to be called
then they will be called prior to the form being posted and the cursor
will be positioned on the first active field that can be visited.
Conversely, the function
diff --git a/lib/libform/form_win.3 b/lib/libform/form_win.3
index 2b3cc882b30..ff43084e6f5 100644
--- a/lib/libform/form_win.3
+++ b/lib/libform/form_win.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: form_win.3,v 1.5 2002/08/06 12:44:35 wiz Exp $
+.\" $NetBSD: form_win.3,v 1.6 2002/10/01 19:15:17 wiz Exp $
.\"
.\" Copyright (c) 2001
.\" Brett Lymn - blymn@baea.com.au, brett_lymn@yahoo.com.au
@@ -55,8 +55,8 @@
.Fn set_form_win "FORM *form" "WINDOW *window"
.Sh DESCRIPTION
All output to the screen done by the forms library is handled by the
-curses library routines. By default, the forms library will output to
-the curses
+curses library routines.
+By default, the forms library will output to the curses
.Fa stdscr ,
but if the forms window has been set via
.Fn set_form_win
@@ -66,14 +66,15 @@ unless the forms subwindow has been set using
.Fn set_form_sub .
If a subwindow has been specified using
.Fn set_form_sub
-then it will be used by the forms library to for screen output. The
-current setting for the form window can be retrieved by calling
+then it will be used by the forms library to for screen output.
+The current setting for the form window can be retrieved by calling
.Fn form_win .
If the forms window has not been set then NULL will be returned.
Similarly, the forms subwindow can be found by calling the
.Fn form_sub
function, again, if the subwindow has not been set then NULL will be
-returned. The
+returned.
+The
.Fn scale_form
function will return the minimum number of rows and columns that will
entirely contain the given form.
diff --git a/lib/libform/forms.3 b/lib/libform/forms.3
index d8c1cc14c0c..3d6b5247e2a 100644
--- a/lib/libform/forms.3
+++ b/lib/libform/forms.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: forms.3,v 1.9 2002/08/09 14:15:13 blymn Exp $
+.\" $NetBSD: forms.3,v 1.10 2002/10/01 19:15:17 wiz Exp $
.\"
.\" Copyright (c) 2001
.\" Brett Lymn - blymn@baea.com.au, brett_lymn@yahoo.com.au
@@ -44,13 +44,15 @@ The
.Nm
library provides a terminal independent form system using the
.Xr curses 3
-library. Before using the
+library.
+Before using the
.Nm
functions the terminal must be set up by
.Xr curses 3
using the
.Fn initscr
-function or similar. Programs using
+function or similar.
+Programs using
.Nm
functions must be linked with the
.Xr curses 3
@@ -67,11 +69,12 @@ The
.Nm
library allows any settable attribute or option of both the form and field
objects to be defined such that any new form or field automatically inherits
-the value as default. Setting the default value will not affect any field or
+the value as default.
+Setting the default value will not affect any field or
form that has already been created but will be applied to subsequent objects.
To set the default attribute or option the set routine is passed a NULL
-pointer in the field or form parameter when calling the set routine. The
-current default value can be retrieved by calling the get routine with a
+pointer in the field or form parameter when calling the set routine.
+The current default value can be retrieved by calling the get routine with a
NULL pointer for the field or form parameter.
.Pp
.ta 20
@@ -157,9 +160,8 @@ unpost_form form_post(3)
.br
.ne 8
.Sh RETURN VALUES
-Any function returning a string pointer will return NULL if an error
-occurs. Functions returning an integer will return one of the
-following:
+Any function returning a string pointer will return NULL if an error occurs.
+Functions returning an integer will return one of the following:
.Pp
.ta 20
.nf
@@ -189,8 +191,8 @@ E_CURRENT The field is the active one on the form.
.Xr menus 3
.Sh NOTES
This implementation of the forms library does depart in behaviour
-subtly from the original AT \*[Am] T implementation. Some of the more
-notable departures are:
+subtly from the original AT \*[Am] T implementation.
+Some of the more notable departures are:
.Pp
.Bl -tag -width "circular fields" -compact
.It field wrapping
@@ -202,9 +204,11 @@ regardless of whether the field has been validated or not.
.It circular fields
In the AT\*[Am]T implementation fields are circular on a page, that is, a
next field from the last field will go to the first field on the
-curent page. In this implementation a next field request on the last
+curent page.
+In this implementation a next field request on the last
field of a page will result in the forms library positioning the
-cursor on the first field of the next page. If the field is the last
+cursor on the first field of the next page.
+If the field is the last
field in the form then going to the next field will be denied, in the
AT\*[Am]T it would result in the cursor being placed on the first field of
the first page.
@@ -215,12 +219,15 @@ contents of the field padded to the size of the field with the pad
character.
.It The TAB character
The handling of the TAB character in fields varies between
-implementations. In ncurses attempting to set a field contents with a
+implementations.
+In ncurses attempting to set a field contents with a
string containing a TAB will result in an error and will not allow a
-TAB to be entered into a field. The AT\*[Am]T library statically
+TAB to be entered into a field.
+The AT\*[Am]T library statically
converts tabs to the equivalent number of spaces when the field buffer
is set but the form driver will not allow a TAB to be inserted into
-the field buffer. This implementation allows TAB when setting the
+the field buffer.
+This implementation allows TAB when setting the
field buffer and also will allow TAB to be inserted into a field
buffer via the form driver and correctly calculates the cursor
position allowing for expansion of the TAB character.