[Top] [Prev] [Next] [Bottom]

Fvsinit (3FML)

Fvsinit (3FML)

Name

Fvsinit, Fvsinit32-initialize C structure to null

Synopsis

#include <stdio.h>  
#include "fml.h"

int
Fvsinit(char *cstruct, char *view)

#include "fml32.h"

int
Fvsinit32(char *cstruct, char *view)

Description

Fvsinit() initializes all members in a C structure to the null values specified in the view description, view. cstruct is a pointer to a C structure. view is a pointer to a compiled view description.

Fvsinit() sets the associated count member of an element to 0 if the C flag was used when the view was compiled, and sets the associated length member to the length of the associated null value if the L flag was used in the view file.

Fvsinit32 is used for views defined with viewc32 or VIEW32 typed buffers for larger views with more fields.

Return Values

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

Errors

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

[FEINVAL]
"invalid argument to function"
One of the arguments to the function invoked was invalid, (for example, specifying a NULL cstruct parameter invalid Fvsinit).

[FBADVIEW]
"cannot find or get view"
The view description specified was NULL or was not found in the files specified by VIEWDIR or VIEWFILES.

See Also

Fintro(3), Fvselinit(3), viewfile(5)



[Top] [Prev] [Next] [Bottom]