Logo Search packages:      
Sourcecode: mathwar version File versions  Download package

gchar* ini_get_string ( const gchar *  ini_file,
const gchar *  section,
const gchar *  label,
const gchar *  def_val 
)

Get the given string value from the ini file. The value returned should be freed with g_free() when it is no longer needed.

Parameters:
ini_file The name of the INI file
section The section within the INI file
label The data label within the INI file
def_val The default value to use if the given value does not exist
Returns:
The value from the INI file if it exists, def_val if it does not. The string that is returned must be g_free()'ed.

Definition at line 78 of file ini_defs.c.

{
   GString  *str;
   gchar    *rtn;

   str = g_string_new ("");
   g_string_sprintf (str, CONF_WITH_STR_DEF, ini_file,
                     section, label, def_val);

   rtn = gnome_config_get_string (str->str);
   g_string_free (str, TRUE);

   return rtn;
}


Generated by  Doxygen 1.6.0   Back to index