man.bsd.lv manual page server

Manual Page Search Parameters

FORMS(3) Library Functions Manual FORMS(3)

field_opts, field_opts_off, field_opts_on, set_field_optsform library

library “libform”

#include <form.h>

Form_Options
field_opts(FIELD *field);

int
field_opts_off(FIELD *field, Form_Options options);

int
field_opts_on(FIELD *field, Form_Options options);

int
set_field_opts(FIELD *field, Form_Options options);

The function () returns the current options settings for the given field. The () will turn the options given in options off for the given field, options not specified in options will remain unchanged. Conversely, the function () will turn on the options given in 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 options by calling the () function. Options may only be changed if the field given is not the currently active one.

The following options are available for a field:

The field is visible, hence is displayed when the form is posted.
The field is active in the form, meaning that it can be visited during form processing.
The contents of the field are echoed to the screen.
The contents of the field can be modified
The contents of the field are wrapped on a word boundary, if this option is off then the field will be wrapped on a character boundary.
Blank the field on new data being entered if and only if the field cursor is at the left hand side of the field.
Skip to the next field when the current field reaches its maximum size.
The field is allowed to contain no data
The field is not dynamic, it has a fixed size.
An unmodified field is allowed.
Retain the formatting of a field when the buffer is retrieved. If this option is not set then the buffer returned will be a single string with no line breaks. When this option is set newline characters will be inserted at the point where the string has been wrapped in a multiline field. This option is an extension to the forms library and must not be used in portable code. See the field_buffer(3) man page for how this option modifies the behaviour of ().

The following options are on by default for a field: O_VISIBLE, O_ACTIVE, O_PUBLIC, O_EDIT, O_WRAP, O_BLANK, O_AUTOSKIP, O_NULLOK, O_PASSOK, and O_STATIC.

Functions returning pointers will return NULL if an error is detected. The functions that return an int will return one of the following error values:

E_OK
The function was successful.
E_CURRENT
The field specified is the currently active one in the form.

curses(3), forms(3)

The header <form.h> automatically includes both <curses.h> and <eti.h>. The option O_REFORMAT is a NetBSD
extension and must not be used in portable code.

November 24, 2004 NetBSD-9.2