PURPOSE

Fchgs, Fchgs32 - change field occurrence - caller presents string

SYNOPSIS

#include <stdio.h>
#include "fml.h"
int
Fchgs(FBFR *fbfr, FLDID fieldid, FLDOCC oc, char *value)
#include "fml32.h"
int
Fchgs32(FBFR32 *fbfr, FLDID32 fieldid, int oc, char *value)

DESCRIPTION

Fchgs(), is provided to handle the case of conversion from a user type of FLD_STRING. fbfr is a pointer to a fielded buffer. fieldid is a field identifier. oc is the occurrence number of the field. value is a pointer to the string to be added. The function calls its non-string-function counterpart, CFchg(3fml), providing a type of FLD_STRING, and a len of 0 to convert from a string to the field type of fieldid.

Fchgs32 is used with 32-bit FML.

RETURN VALUES

This function returns -1 on error and sets Ferror to indicate the error condition.

ERRORS

Under the following conditions, Fchgs() fails and sets Ferror to:

[FALIGNERR]
"fielded buffer not aligned"
The buffer does not begin on the proper boundary.
 
[FNOTFLD]
"buffer not fielded"
The buffer is not a fielded buffer or has not been initialized by Finit().
 
[FNOSPACE]
"no space in fielded buffer"
A field value is to be added or changed in a fielded buffer but there is not enough space remaining in the buffer.
 
[FBADFLD]
"unknown field number or type"
A field identifier is specified which is not valid.
 
[FTYPERR]
"invalid field type"
A field identifier is specified which is not valid.

SEE ALSO

Fintro(3fml),
CFchg(3fml),
Fchg(3fml)