![]() |
![]() |
|
|
Fextread, Fextread32(3fml)
Name
Fextread(), Fextread32() - build fielded buffer from printed format
Synopsis
#include <stdio.h>
#include "fml.h"
int
Fextread(FBFR *fbfr, FILE *iop)
#include "fml32.h"
int
Fextread32(FBFR32 *fbfr, FILE *iop)
Description
Fextread() may be used to construct a fielded buffer from its printed format (that is, from the output of Fprint()). The parameters are a pointer to a fielded buffer, fbfr, and a pointer to a file stream, iop. The input file format is basically the same as the output format of Fprint(), that is:
[flag] fldname or fldid tab> fldval (or fldname, if flag is \Q\Q='')
The optional flags and their meanings are as follows:
If no flag is specified, a new occurrence of the field named by fldname with value fldval is added to the fielded buffer. A trailing newline (-) must be provided after each completed input buffer.
For values of type FLD_FML32 and FLD_VIEW32, Fextread32() generates nested FML32 buffers and VIEW32 fields, respectively. This function ignores the FLD_PTR field type. No error is returned if a value of type FLD_PTR is supplied to the function.
Fextread32() is used with 32-bit FML.
A thread in a multithreaded application may issue a call to Fextread() or Fextread32() while running in any context state, including TPINVALIDCONTEXT.
Return Values
This function returns -1 on error and sets Ferror to indicate the error condition.
Errors
Under the following conditions, Fextread() fails and sets Ferror to:
The buffer does not begin on the proper boundary.
The buffer is not a fielded buffer or has not been initialized by Finit().
A field value is to be added or changed in a field buffer but there is not enough space remaining in the buffer.
A field number is specified which is not valid.
A UNIX system call error occurred. The external integer errno should have been set to indicate the error by the system call, and the external integer Uunixerr (values defined in Uunix.h) is set to the system call that returned the error.
A field name is specified which cannot be found in the field tables.
A syntax error was found in the external buffer format. Possible errors are: an unexpected end-of-file indicator, input lines not in the form fieldid or name tab> value two control characters, field values greater than 1000 characters, or an invalid hex escape sequence.
A field to be deleted is not found in the fielded buffer.
Allocation of space dynamically using malloc() failed.
The value of iop is NULL.
Portability
This function is not supported using the BEA Tuxedo System Workstation DLL for Windows.
See Also
Introduction to FML Functions, Fprint, Fprint32(3fml)
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|