[Top] [Prev] [Next] [Bottom]

change_atts(3)

change_atts(3)

Name

change_atts-change field attributes on form

Synopsis

#include <fml.h>
int change_atts(fbfr,fldid,occno,atts)
FBFR *fbfr;
FLDID fldid;
int occno;
char *atts;

Description

change_atts is a function called by a server to alter dynamically field attributes on a form displayed by a data entry program. change_atts() adds a special field to fbfr, which is interpreted by a data entry program upon receiving the fielded buffer. fldid and occno specify the field on the form whose attributes are to change. If two fields on the form have identical fldid and occno, both will change. atts should point to a string of attributes. The available attributes are those allowed in the flags field of a UFORM script, with the exception of the H and I attributes, which are not allowed. Literal fields may not be altered to become protected or unprotected fields, and protected and unprotected fields may not be altered to become literal fields. It is not necessary for atts to point to a complete list of attributes. Only those attributes which are to change need be included. For example, a field that is described as secret and unprotected on the UFORM script, can be changed to secret and protected with a P as its atts argument. atts may also point to the string RESTORE, in which case all of the original attributes specified by the UFORM script are restored, and the dynamic attributes are forgotten.

Servers in which change_atts() is called must link in libtfrm.a with the -f option of buildserver(1).

Examples

The following changes a field from secret and bold to non-secret and non-bold. change_atts(fbfr, fldid, occno, "N0");

Any code that uses change_atts() must link in libtfrm.a. The following example shows how libtfrm.a should be specified on a buildserver(1) command line.

buildserver -s PRTFORM -f ${TUXDIR}/lib/formprint.o -f lib/libtfrm.a

Diagnostics

change_atts() returns a 1 on success. It has two return codes to indicate failure. It returns a zero on a failed fielded buffer operation. In this case, Ferror contains the reason for failure. It returns a \-1 on all other failures.

See Also

buildserver(1), compilation(5), TUXEDO Data Entry System Guide



[Top] [Prev] [Next] [Bottom]