![]() |
![]() |
|
|
Fgetsa, Fgetsa32(3fml)
Name
Fgetsa(), Fgetsa32() - use malloc() to allocate space and get converted value
Synopsis
#include <stdio.h>
#include "fml.h"
char *
Fgetsa(FBFR *fbfr, FLDID fieldid, FLDOCC oc, FLDLEN *extra)
#include "fml32.h"
char *
Fgetsa32(FBFR32 *fbfr, FLDID32 fieldid, FLDOCC32 oc, FLDLEN32
*extra)
Description
Fgetsa() is a macro that calls CFgetalloc(). fbfr is a pointer to a fielded buffer. fieldid is a field identifier. oc is the occurrence number of the field. The function uses malloc() (in UNIX system programmer's reference manuals) to allocate space for the retireved field value that has been converted to a string. If extra is not NULL, it specifies the extra space to allocate in addition to the field value size; the total size is returned in extra.
It is the responsibility of the user to free() (in UNIX system reference manuals) the space malloc()'d.
Fgetsa32() is used with 32-bit FML.
A thread in a multithreaded application may issue a call to Fgetsa() or Fgetsa32() while running in any context state, including TPINVALIDCONTEXT.
Return Values
On success, the function returns a pointer to the allocated buffer.
This function returns NULL on error and sets Ferror to indicate the error condition.
Errors
Under the following conditions, Fgetsa() 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 occurrence is requested but the specified field and/or occurrence was not found in the fielded buffer.
A field identifier is specified which is not valid.
A field identifier is specified which is not valid.
Allocation of space dynamically using malloc() failed.
See Also
Introduction to FML Functions, CFget, CFget32(3fml), Fget, Fget32(3fml), Fgetlast, Fgetlast32(3fml), Fgets, Fgets32(3fml)
free(3), malloc(3) in a UNIX system reference manual
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|