4 <!-- Manpage converted by man2html 3.0.1 -->
8 <B>form_field_buffer</B> - field buffer control
12 <H2>SYNOPSIS</H2><PRE>
13 <B>#include</B> <B><form.h></B>
14 int set_field_buffer(FIELD *field, int buf, const char
16 char *field_buffer(const FIELD *field, int buffer);
17 int set_field_status(FIELD *field, bool status);
18 bool field_status(const FIELD *field);
19 int set_max_field(FIELD *field, int max);
23 <H2>DESCRIPTION</H2><PRE>
24 The function <B>set_field_buffer</B> sets the numbered buffer of
25 the given field to contain a given string. Buffer 0 is
26 the displayed value of the field; other numbered buffers
27 may be allocated by applications through the <B>nbuf</B> argument
28 of (see <B><A HREF="form_field_new.3x.html">form_field_new(3x)</A></B>) but are not manipulated by the
29 forms library. The function <B>field_buffer</B> returns the
30 address of the buffer. Please note that this buffer has
31 always the length of the buffer, that means that it may
32 typically contain trailing spaces. If you entered leading
33 spaces the buffer may also contain them. If you want the
34 raw data, you must write your own routine that copies the
35 value out of the buffer and removes the leading and trail-
36 ing spaces. Please note also, that subsequent operations
37 on the form will probably change the content of the
38 buffer. So don't use it for long term storage of the
41 The function <B>set_field_status</B> sets the associated status
42 flag of <I>field</I>; <B>field_status</B> gets the current value. The
43 status flag is set to a nonzero value whenever the field
46 The function <B>set_max_field</B> sets the maximum size for a
47 dynamic field. An argument of 0 turns off any maximum
48 size threshold for that field.
52 <H2>RETURN VALUE</H2><PRE>
53 The <B>field_buffer</B> function returns NULL on error.
55 The <B>field_status</B> function returns <B>TRUE</B> or <B>FALSE</B>.
57 The remaining routines return one of the following:
59 <B>E_OK</B> The routine succeeded.
62 System error occurred (see <B>errno</B>).
65 Routine detected an incorrect or out-of-range argu-
70 <H2>SEE ALSO</H2><PRE>
71 <B><A HREF="ncurses.3x.html">curses(3x)</A></B> and 3x pages whose names begin "form_" for
72 detailed descriptions of the entry points.
77 The header file <B><form.h></B> automatically includes the header
78 file <B><curses.h></B>.
82 <H2>PORTABILITY</H2><PRE>
83 These routines emulate the System V forms library. They
84 were not supported on Version 7 or BSD versions.
89 Juergen Pfeifer. Manual pages and adaptation for new
90 curses by Eric S. Raymond.
133 Man(1) output converted with
134 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>