Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

set_field_status(3) [netbsd man page]

FORMS(3)						   BSD Library Functions Manual 						  FORMS(3)

NAME
field_buffer, field_status, set_field_buffer, set_field_printf, set_field_status, set_max_field -- form library LIBRARY
Curses Form Library (libform, -lform) SYNOPSIS
#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); DESCRIPTION
The field_buffer() function returns the contents of the buffer number specified by buffer for the given field. If the requested buffer num- ber exceeds the number of buffers attached to the field then NULL will be returned. If the field option O_REFORMAT is 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_REFORMAT field 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 TRUE otherwise FALSE is 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. 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 values: E_OK The function was successful. E_BAD_ARGUMENT A bad parameter was passed to the function. E_SYSTEM_ERROR A system error occurred performing the function. SEE ALSO
curses(3), forms(3) NOTES
The header <form.h> automatically includes both <curses.h> and <eti.h>. The function set_field_printf() is a NetBSD extension and must not be used in portable code. BSD
October 15, 2005 BSD

Check Out this Related Man Page

form_field_buffer(3CURSES)				     Curses Library Functions					form_field_buffer(3CURSES)

NAME
form_field_buffer, set_field_buffer, field_buffer, set_field_status, field_status, set_max_field - set and get forms field attributes SYNOPSIS
cc [ flag... ] file... -lform -lcurses [ library... ] #include <form.h> int set_field_buffer(FIELD *field, int buf, char *value); char *field_buffer(FIELD *field, int buf); int set_field_status(FIELD *field, int status); int field_status(FIELD *field); int set_max_field(FIELD *field, int max); DESCRIPTION
set_field_buffer() sets buffer buf of field to value. Buffer 0 stores the displayed contents of the field. Buffers other than 0 are appli- cation specific and not used by the forms library routines. field_buffer() returns the value of field buffer buf. Every field has an associated status flag that is set whenever the contents of field buffer 0 changes. set_field_status() sets the status flag of field to status. field_status() returns the status of field. set_max_field() sets a maximum growth on a dynamic field, or if max=0 turns off any maximum growth. RETURN VALUES
field_buffer() returns NULL on error. field_status() returns TRUE or FALSE. set_field_buffer(), set_field_status(), and set_max_field() return one of the following: E_OK Thefunction returned successfully. E_SYSTEM_ERROR System error E_BAD_ARGUMENT An argument is incorrect. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
curses(3CURSES), forms(3CURSES), attributes(5) NOTES
The header <form.h> automatically includes the headers <eti.h> and <curses.h>. SunOS 5.11 31 Dec 1996 form_field_buffer(3CURSES)
Man Page