Sortix nightly manual
This manual documents Sortix nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.
|FORMS(3)||Library Functions Manual||FORMS(3)|
form libraryCurses Form Library (libform, -lform)
#include <form.h>char *
field_buffer(FIELD *field, int buffer); int
field_status(FIELD *field); int
set_field_buffer(FIELD *field, int buffer, char *value); int
set_field_printf(FIELD *field, int buffer, char *fmt, ...); int
set_field_status(FIELD *field, int status); int
set_max_field(FIELD *field, int max);
field_buffer() function returns the contents of the buffer number specified by buffer for the given field. If the requested buffer number exceeds the number of buffers attached to the field then
NULLwill be returned. If the field option
O_REFORMATis enabled on the given field then storage will be allocated to hold the reformatted buffer. This storage must be release by calling free(3) when it is no longer required. If the
O_REFORMATfield option is not set then no extra storage is allocated. The field buffer may be set by calling
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
set_field_printf() which sets the buffer using the format arg fmt after being expanded using the subsequent arguments in the same manner as sprintf(3) does. Calling
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
FALSEis returned, the status of the first buffer may be programmatically set by calling
set_field_status(). The maximum growth of a dynamic field can be set by calling
set_max_field() which limits the fields rows if the field is a multiline field or the fields columns if the field only has a single row.
NULLif an error is detected. The functions that return an int will return one of the following error values:
- The function was successful.
- A bad parameter was passed to the function.
- A system error occurred performing the function.
<form.h>automatically includes both
<eti.h>. The function
set_field_printf() is a NetBSD extension and must not be used in portable code.
|October 15, 2005||Debian|