version 1.1.1.1, 2017/01/24 14:48:55
|
version 1.1.1.2, 2021/03/17 00:49:17
|
Line 256 greeting Bye
|
Line 256 greeting Bye
|
in the configuration file. First it will find the "Hello" section. |
in the configuration file. First it will find the "Hello" section. |
It prints the title of the section, "Hello", retrieved with |
It prints the title of the section, "Hello", retrieved with |
<function>cfg_title()</function>. Then the targets are printed just |
<function>cfg_title()</function>. Then the targets are printed just |
as in the previous exemples, but this time the values are retrieved | as in the previous examples, but this time the values are retrieved |
from the cfg_greet section. Next, the section titled "Bye" is |
from the cfg_greet section. Next, the section titled "Bye" is |
found, and the values are retrieved from that section. |
found, and the values are retrieved from that section. |
</para> |
</para> |
Line 383 typedef int (*cfg_validate_callback_t)(cfg_t *cfg, cfg
|
Line 383 typedef int (*cfg_validate_callback_t)(cfg_t *cfg, cfg
|
<para> |
<para> |
A value parsing callback is another kind of callback function |
A value parsing callback is another kind of callback function |
available in libConfuse. This function is used to map a string into |
available in libConfuse. This function is used to map a string into |
some other other value. One example is to extend a boolean option | some other value. One example is to extend a boolean option |
to accept the values "yes", "no" and "ask" (or perhaps "true", |
to accept the values "yes", "no" and "ask" (or perhaps "true", |
"false" and "maybe"). Those values should be mapped to the integers |
"false" and "maybe"). Those values should be mapped to the integers |
1, 2 and 3. |
1, 2 and 3. |