PURPOSE
Fvopt, Fvopt32 - change flag options of a mapping
entry
SYNOPSIS
#include <stdio.h>
#include "fml.h"
int
Fvopt(char *cname, int option, char *view)
#include "fml32.h"
int
Fvopt32(char *cname, int option, char *view)
DESCRIPTION
Fvopt() allows users to specify buffer-to-structure
mapping options at runtime. cname is a pointer to the name
of an element in a view description, view. option
specifies the desired setting for the mapping option. Valid
options and their meanings are:
- F_FTOS
one-way mapping from fielded buffer to structure, flag S
in the view description
- F_STOF
one-way mapping from structure to fielded buffer, flag F
in the view description
- F_OFF
no mapping between the fielded buffer and the structure,
flag N in the view description
- F_BOTH
two-way mapping between the fielded buffer and the
structure, flag S,F in the view description
Fvopt32 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, Fvopt() 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 cname or view
parameter or specifying an invalid option).
-
- [FBADVIEW]
- "cannot find or get view"
The view was not found in the files specified by VIEWDIR
and VIEWFILES.
-
- [FNOCNAME]
- "cname not found"
The C structure field name is not found in the view
description.
SEE ALSO
Fintro(3fml),
viewfile(5)