gda-util

Name

gda-util -- Convenient functions

Synopsis



GList*      gda_util_hash_to_list           (GHashTable *hash_table);
gboolean    gda_util_destroy_hash_pair      (gchar *key,
                                             gpointer value,
                                             GFreeFunc free_func);
gchar*      gda_util_load_file              (const gchar *filename);
gboolean    gda_util_save_file              (const gchar *filename,
                                             const gchar *text);

Description

Details

gda_util_hash_to_list ()

GList*      gda_util_hash_to_list           (GHashTable *hash_table);

Convert a GHashTable into a GList. It only adds to the list the hash table's keys, not the data associated with it. Another thing this function assumes is that the keys are strings (that is, zero-delimited sequence of characters)

hash_table : a hash table
Returns : the newly created GList


gda_util_destroy_hash_pair ()

gboolean    gda_util_destroy_hash_pair      (gchar *key,
                                             gpointer value,
                                             GFreeFunc free_func);

key : 
value : 
free_func : 
Returns : 


gda_util_load_file ()

gchar*      gda_util_load_file              (const gchar *filename);

Load a file from disk, and return its contents as a newly-allocated string. You must then free it yourself when no longer needed

filename : file name
Returns : 


gda_util_save_file ()

gboolean    gda_util_save_file              (const gchar *filename,
                                             const gchar *text);

Save the given text into a file

filename : file name
text : file contents
Returns :