cfp_getcur(3) manual page
Table of Contents
cfp_getcur - retrieve current value of item being parsed
#include <cfht/cfht.h>#include <cfht/cfp.h>int cfp_getcur(id, name, addr, type,
size)FILE_ID id;char *name;char *addr; /* RETURNED */int type;int size;
libcfht.a
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 in 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 return value will be a history indicator for those that care
about where the value has come from. In the event of an error, FAIL will
be returned. Valid histories are:
- CFP_CURRENT
- Original value from configuration
file.
- CFP_DEFAULT
- Value from the default field has been used.
- CFP_ENVIRONMENT
- Environment
variable has overridden.
- CFP_FOUND_CURRENT
- The option token was found but
the original value is returned.
- CFP_FOUND_DEFAULT
- The option token was found
but the default value is returned.
- CFP_FOUND_SUPPLIED
- The option token was
found but supplied field is returned.
- CFP_FOUND_ARGV
- The option token was
found, and an argument was present.
- CFP_SET
- The value has been changed programmatically.
- [EIO]
- Something failed for an unknown reason.
cfp(4)
.
Table of Contents