]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/form_field_buffer.3x.html
ncurses 5.2
[ncurses.git] / doc / html / man / form_field_buffer.3x.html
1 <HTML>
2 <BODY>
3 <PRE>
4 <!-- Manpage converted by man2html 3.0.1 -->
5
6 </PRE>
7 <H2>NAME</H2><PRE>
8        <B>form_field_buffer</B> - field buffer control
9
10
11 </PRE>
12 <H2>SYNOPSIS</H2><PRE>
13        <B>#include</B> <B>&lt;form.h&gt;</B>
14        int  set_field_buffer(FIELD  *field,  int  buf, const char
15        *value);
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);
20
21
22 </PRE>
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
39        entered form data.
40
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
44        changes.
45
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.
49
50
51 </PRE>
52 <H2>RETURN VALUE</H2><PRE>
53        The <B>field_buffer</B> function returns NULL on error.
54
55        The <B>field_status</B> function returns <B>TRUE</B> or <B>FALSE</B>.
56
57        The remaining routines return one of the following:
58
59        <B>E_OK</B> The routine succeeded.
60
61        <B>E_SYSTEM_ERROR</B>
62             System error occurred (see <B>errno</B>).
63
64        <B>E_BAD_ARGUMENT</B>
65             Routine detected an incorrect or  out-of-range  argu-
66             ment.
67
68
69 </PRE>
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.
73
74
75 </PRE>
76 <H2>NOTES</H2><PRE>
77        The header file <B>&lt;form.h&gt;</B> automatically includes the header
78        file <B>&lt;curses.h&gt;</B>.
79
80
81 </PRE>
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.
85
86
87 </PRE>
88 <H2>AUTHORS</H2><PRE>
89        Juergen Pfeifer.  Manual  pages  and  adaptation  for  new
90        curses by Eric S. Raymond.
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130 </PRE>
131 <HR>
132 <ADDRESS>
133 Man(1) output converted with
134 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
135 </ADDRESS>
136 </BODY>
137 </HTML>