Funindex, Funindex32 - discard fielded buffer's index
#include <stdio.h> #include "fml.h" FLDOCC Funindex(FBFR *fbfr) #include "fml32.h" FLDOCC32 Funindex32(FBFR32 *fbfr)
Funindex() discards a fielded buffer's index. fbfr is a pointer to a fielded buffer. When the function returns successfully, the buffer is unindexed. As a result, none of the buffer's space is allocated to an index and more space is available to user fields (at the cost of potentially slower access time). Unindexing a buffer is useful when it is to be stored on disk or to be transmitted somewhere. In the first case disk space is conserved, in the second, transmission costs may be reduced.
The number of significant bytes from the buffer start, after a buffer has been unindexed is determined by the function call: Fused(fbfr)
Funindex32 is used with 32-bit FML.
Funindex() returns the number of index elements the buffer has before the index is stripped.
This function returns -1 on error and sets Ferror to indicate the error condition.
Under the following conditions, Funindex() fails and sets Ferror to:
Fintro(3fml),
Findex(3fml),
Frstrindex(3fml),
Fsizeof(3fml),
Funused(3fml)