Exemplo n.º 1
0
double option_get_double(char *ini_section, char *ini_key, char *cmdline_key,
                         double def, char *description)
{
        char *str = cmdline_get_value(cmdline_key);
        double val = cmdline_get_double(cmdline_key, def, description);

        if (!str)
                return ini_get_int(ini_section, ini_key, def);
        else
                return val;
}
Exemplo n.º 2
0
int option_get_int(char *ini_section, char *ini_key, char *cmdline_key, int def,
                   char *description)
{
        /* *str is only used to check wether the cmdline option is actually set. */
        char *str = cmdline_get_value(cmdline_key);

        /* we call cmdline_get_int even when the option isn't set in order to
         * add the usage info */
        int val = cmdline_get_int(cmdline_key, def, description);

        if (!str)
                return ini_get_int(ini_section, ini_key, def);
        else
                return val;
}
Exemplo n.º 3
0
int
enna_config_int_get (const char *section, const char *key)
{
    return ini_get_int(cfg_ini, section, key);
}