Fchgs, Fchgs32-change field occurrence - caller presents string
#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)
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(3), 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.
This function returns -1 on error and sets Ferror to indicate the error condition.
Under the following conditions, Fchgs() fails and sets Ferror to:
[FALIGNERR]
[FNOTFLD]
Finit().
[FNOSPACE]
[FBADFLD]
[FTYPERR]
Fintro(3), Fchg(3), CFchg(3)