#include "libut/ut.h" int UT_var_bindc(char *name, void *cvar);
This function provides a convenient way for a C program to have access to a
configuration variable without having to call UT_var_get(3)
to read it every
time. Instead, this function enacts a ``binding'' from a configuration variable
created using UT_var_create(3)
to a variable in the C program. When the
configuration variable changes value, the updated value is stored in the given C
variable.
The C variable whose address is passed as cvar must be of the proper type, i.e., matching the defined type of the configuration variable. In other words,
The C variable should be considered a read-only value. The only valid way for a C program to set a configuration variable is to use UT_var_set(3).
The return value is always 0. If name refers to a configuration variable that doesn't exist, it logged as a Fatal error, and the application exits with exit status -1.
The var control port command lists and sets the configuration variables.
UT_var_create(3), UT_var_set(3), UT_var_get(3), UT_var_reg_cb(3),
UT_var_restrict(3)
Troy D. Hanson <thanson@users.sourceforge.net>