1 '\" te
   2 .\" Copyright 1989 AT&T
   3 .\" Portions Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved.
   4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   7 .TH FORM_FIELD_BUFFER 3CURSES "Dec 31, 1996"
   8 .SH NAME
   9 form_field_buffer, set_field_buffer, field_buffer, set_field_status,
  10 field_status, set_max_field \- set and get forms field attributes
  11 .SH SYNOPSIS
  12 .LP
  13 .nf
  14 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lform\fR \fB -lcurses \fR [ \fIlibrary\fR... ]
  15 #include <form.h>
  16 
  17 
  18 
  19 \fBint\fR \fBset_field_buffer\fR(\fBFIELD *\fR\fIfield\fR, \fBint\fR \fIbuf\fR, \fBchar *\fR\fIvalue\fR);
  20 .fi
  21 
  22 .LP
  23 .nf
  24 \fBchar *\fR\fBfield_buffer\fR(\fBFIELD *\fR\fIfield\fR, \fBint\fR \fIbuf\fR);
  25 .fi
  26 
  27 .LP
  28 .nf
  29 \fBint\fR \fBset_field_status\fR(\fBFIELD *\fR\fIfield\fR, \fBint\fR \fIstatus\fR);
  30 .fi
  31 
  32 .LP
  33 .nf
  34 \fBint\fR \fBfield_status\fR(\fBFIELD *\fR\fIfield\fR);
  35 .fi
  36 
  37 .LP
  38 .nf
  39 \fBint\fR \fBset_max_field\fR(\fBFIELD *\fR\fIfield\fR, \fBint\fR \fImax\fR);
  40 .fi
  41 
  42 .SH DESCRIPTION
  43 .LP
  44 \fBset_field_buffer()\fR sets buffer \fIbuf\fR of \fIfield\fR to \fIvalue\fR.
  45 Buffer 0 stores the displayed contents of the field. Buffers other than 0 are
  46 application specific and not used by the \fBforms\fR library routines.
  47 \fBfield_buffer()\fR returns the value of \fIfield\fR buffer \fIbuf\fR.
  48 .sp
  49 .LP
  50 Every field has an associated status flag that is set whenever the contents of
  51 field buffer 0 changes. \fBset_field_status()\fR sets the status flag of
  52 \fIfield\fR to \fIstatus\fR. \fBfield_status()\fR returns the status of
  53 \fIfield\fR.
  54 .sp
  55 .LP
  56 \fBset_max_field()\fR sets a maximum growth on a dynamic field, or if
  57 \fImax=\fR\fB0\fR turns off any maximum growth.
  58 .SH RETURN VALUES
  59 .LP
  60 \fBfield_buffer()\fR returns \fINULL\fR on error.
  61 .sp
  62 .LP
  63 \fBfield_status()\fR returns \fBTRUE\fR or \fBFALSE\fR.
  64 .sp
  65 .LP
  66 \fBset_field_buffer()\fR, \fBset_field_status()\fR, and \fBset_max_field()\fR
  67 return one of the following:
  68 .sp
  69 .ne 2
  70 .na
  71 \fBE_OK\fR
  72 .ad
  73 .RS 18n
  74 The function returned successfully.
  75 .RE
  76 
  77 .sp
  78 .ne 2
  79 .na
  80 \fBE_SYSTEM_ERROR\fR
  81 .ad
  82 .RS 18n
  83 System error
  84 .RE
  85 
  86 .sp
  87 .ne 2
  88 .na
  89 \fBE_BAD_ARGUMENT\fR
  90 .ad
  91 .RS 18n
  92 An argument is incorrect.
  93 .RE
  94 
  95 .SH ATTRIBUTES
  96 .LP
  97 See \fBattributes\fR(5) for descriptions of the following attributes:
  98 .sp
  99 
 100 .sp
 101 .TS
 102 box;
 103 c | c
 104 l | l .
 105 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 106 _
 107 MT-Level        Unsafe
 108 .TE
 109 
 110 .SH SEE ALSO
 111 .LP
 112 \fBcurses\fR(3CURSES), \fBforms\fR(3CURSES), \fBattributes\fR(5)
 113 .SH NOTES
 114 .LP
 115 The header \fB<form.h>\fR automatically includes the headers  \fB<eti.h>\fR and
 116 \fB<curses.h>\fR\&.