Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/settings.h @ 341:dea407d53fe6
Improve configuration file reading
* Move cfg_file() to settings.c, cfg_read_file()
* Optimize the function
* Remove parsecfg.[ch]
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Tue, 19 Jul 2005 17:54:03 +0100 |
parents | 871e53769084 |
children | 998b63be6e6b |
comparison
equal
deleted
inserted
replaced
340:2362167ac0f3 | 341:dea407d53fe6 |
---|---|
24 #define SETTINGS_TYPE_BINDING 3 | 24 #define SETTINGS_TYPE_BINDING 3 |
25 | 25 |
26 #define settings_opt_get(k) settings_get(SETTINGS_TYPE_OPTION, k) | 26 #define settings_opt_get(k) settings_get(SETTINGS_TYPE_OPTION, k) |
27 #define settings_opt_get_int(k) settings_get_int(SETTINGS_TYPE_OPTION, k) | 27 #define settings_opt_get_int(k) settings_get_int(SETTINGS_TYPE_OPTION, k) |
28 | 28 |
29 int cfg_read_file(char *filename); | |
29 guint parse_assigment(gchar *assignment, | 30 guint parse_assigment(gchar *assignment, |
30 const gchar **pkey, const gchar **pval); | 31 const gchar **pkey, const gchar **pval); |
31 void settings_set(guint type, const gchar *key, const gchar *value); | 32 void settings_set(guint type, const gchar *key, const gchar *value); |
32 void settings_del(guint type, const gchar *key); | 33 void settings_del(guint type, const gchar *key); |
33 const gchar *settings_get(guint type, const gchar *key); | 34 const gchar *settings_get(guint type, const gchar *key); |