Deleted Added
full compact
form_field_buffer.3x (166125) form_field_buffer.3x (184989)
1'\" t
2.\"***************************************************************************
1'\" t
2.\"***************************************************************************
3.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
3.\" Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. *
4.\" *
5.\" Permission is hereby granted, free of charge, to any person obtaining a *
6.\" copy of this software and associated documentation files (the *
7.\" "Software"), to deal in the Software without restriction, including *
8.\" without limitation the rights to use, copy, modify, merge, publish, *
9.\" distribute, distribute with modifications, sublicense, and/or sell *
10.\" copies of the Software, and to permit persons to whom the Software is *
11.\" furnished to do so, subject to the following conditions: *

--- 10 unchanged lines hidden (view full) ---

22.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
23.\" *
24.\" Except as contained in this notice, the name(s) of the above copyright *
25.\" holders shall not be used in advertising or otherwise to promote the *
26.\" sale, use or other dealings in this Software without prior written *
27.\" authorization. *
28.\"***************************************************************************
29.\"
4.\" *
5.\" Permission is hereby granted, free of charge, to any person obtaining a *
6.\" copy of this software and associated documentation files (the *
7.\" "Software"), to deal in the Software without restriction, including *
8.\" without limitation the rights to use, copy, modify, merge, publish, *
9.\" distribute, distribute with modifications, sublicense, and/or sell *
10.\" copies of the Software, and to permit persons to whom the Software is *
11.\" furnished to do so, subject to the following conditions: *

--- 10 unchanged lines hidden (view full) ---

22.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
23.\" *
24.\" Except as contained in this notice, the name(s) of the above copyright *
25.\" holders shall not be used in advertising or otherwise to promote the *
26.\" sale, use or other dealings in this Software without prior written *
27.\" authorization. *
28.\"***************************************************************************
29.\"
30.\" $Id: form_field_buffer.3x,v 1.14 2006/11/04 17:12:00 tom Exp $
30.\" $Id: form_field_buffer.3x,v 1.15 2008/10/18 18:35:17 tom Exp $
31.TH form_field_buffer 3X ""
32.SH NAME
33\fBform_field_buffer\fR - field buffer control
34.SH SYNOPSIS
35\fB#include <form.h>\fR
36.br
37int set_field_buffer(FIELD *field, int buf, const char *value);
38.br
39char *field_buffer(const FIELD *field, int buffer);
40.br
41int set_field_status(FIELD *field, bool status);
42.br
43bool field_status(const FIELD *field);
44.br
45int set_max_field(FIELD *field, int max);
46.br
47.SH DESCRIPTION
48The function \fBset_field_buffer\fR sets the numbered buffer of the given field
31.TH form_field_buffer 3X ""
32.SH NAME
33\fBform_field_buffer\fR - field buffer control
34.SH SYNOPSIS
35\fB#include <form.h>\fR
36.br
37int set_field_buffer(FIELD *field, int buf, const char *value);
38.br
39char *field_buffer(const FIELD *field, int buffer);
40.br
41int set_field_status(FIELD *field, bool status);
42.br
43bool field_status(const FIELD *field);
44.br
45int set_max_field(FIELD *field, int max);
46.br
47.SH DESCRIPTION
48The function \fBset_field_buffer\fR sets the numbered buffer of the given field
49to contain a given string. Buffer 0 is the displayed value of the field; other
50numbered buffers may be allocated by applications through the \fBnbuf\fR
51argument of (see \fBform_field_new\fR(3X)) but are not manipulated by the forms
52library. The function \fBfield_buffer\fR returns the address of the buffer.
53Please note that this buffer has always the length of the buffer, that means
54that it may typically contain trailing spaces. If you entered leading spaces
55the buffer may also contain them. If you want the raw data, you must write your
49to contain a given string:
50.RS 3
51.TP 3
52-
53Buffer 0 is the displayed value of the field.
54.TP 3
55-
56Other numbered buffers may be allocated by applications through the \fBnbuf\fR
57argument of (see \fBform_field_new\fR(3X))
58but are not manipulated by the forms library.
59.RE
60.PP
61The function \fBfield_buffer\fR returns a pointer to
62the contents of the given numbered buffer:
63.RS 3
64.TP 3
65-
66The buffer contents always have the same length,
67and are padded with trailing spaces
68as needed to ensure this length is the same.
69.TP 3
70-
71The buffer may contain leading spaces, depending on how it was set.
72.TP 3
73-
74The buffer contents are set with \fBset_field_buffer\fP,
75or as a side effect of any editing operations on the corresponding field.
76.TP 3
77-
78Editing operations are based on the \fIwindow\fP which displays the field,
79rather than a \fIstring\fP.
80The window contains only printable characters, and is filled with blanks.
81If you want the raw data, you must write your
56own routine that copies the value out of the buffer and removes the leading
82own routine that copies the value out of the buffer and removes the leading
57and trailing spaces. Please note also, that subsequent operations on the form
58will probably change the content of the buffer. So do not use it for long term
59storage of the entered form data.
83and trailing spaces.
84.TP 3
85-
86Because editing operations change the content of the buffer to
87correspond to the window, you should not rely on using buffers
88for long-term storage of form data.
89.RE
60.PP
61The function \fBset_field_status\fR sets the associated status flag of
62\fIfield\fR; \fBfield_status\fR gets the current value. The status flag
63is set to a nonzero value whenever the field changes.
64.PP
65The function \fBset_max_field\fR sets the maximum size for a dynamic field.
66An argument of 0 turns off any maximum size threshold for that field.
67.SH RETURN VALUE

--- 45 unchanged lines hidden ---
90.PP
91The function \fBset_field_status\fR sets the associated status flag of
92\fIfield\fR; \fBfield_status\fR gets the current value. The status flag
93is set to a nonzero value whenever the field changes.
94.PP
95The function \fBset_max_field\fR sets the maximum size for a dynamic field.
96An argument of 0 turns off any maximum size threshold for that field.
97.SH RETURN VALUE

--- 45 unchanged lines hidden ---