[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    cfp_getval(3) manual page Table of Contents

Name

cfp_getval - retrieve specified value of item being parsed

Synopsis


#include <cfht/cfht.h>#include <cfht/cfp.h>int cfp_getval(id, name, addr, type,
size, valnum)FILE_ID id;char *name;char *addr;     /* RETURNED */int type;int
size;int valnum;
libcfht.a

Description

Id is the previously acquired handle for the configuration file. Name is a string to match in the configuration file for item identification. Addr is a pointer to the user supplied place for the value to be retrieved into. Type specifies both the type of pointer really passed in and the conversion that should be done on the value. Valid types are:


CFP_BOOLEAN
CFP_INTEGER
CFP_DOUBLE
CFP_STRING

Note that CFP_BOOLEAN is really an integer, but only TRUE or FALSE will be returned into addr. Size is the number of bytes that addr really points to. This is either the size of a string or the result of a sizeof() .

The only differences between this function and cfp_getcur() are the valnum argument and the return value. Valnum allows specification of which field in the parse line to acquire (e.g., 0 for the options field, 1 for current, 2 for default, 3 for supplied, 4 for minimum, or 5 for maximum.)

Return Value

The return value will be PASS or FAIL.

Errors

See Also

cfp(4) .

Warnings


Table of Contents