annotate src/audacious/configdb.c @ 3112:4c758281fe8f trunk

Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
author William Pitcock <nenolod@atheme-project.org>
date Thu, 19 Jul 2007 19:59:04 -0500
parents d226b83fa329
children 3b6d316f8b09
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3112
4c758281fe8f Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents: 2865
diff changeset
1 /* This program is free software; you can redistribute it and/or modify
4c758281fe8f Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents: 2865
diff changeset
2 * it under the terms of the GNU General Public License as published by
4c758281fe8f Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents: 2865
diff changeset
3 * the Free Software Foundation; either version 2 of the License, or
4c758281fe8f Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents: 2865
diff changeset
4 * (at your option) any later version.
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
5 *
3112
4c758281fe8f Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents: 2865
diff changeset
6 * This program is distributed in the hope that it will be useful,
4c758281fe8f Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents: 2865
diff changeset
7 * but WITHOUT ANY WARRANTY; without even the implied warranty of
4c758281fe8f Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents: 2865
diff changeset
8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4c758281fe8f Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents: 2865
diff changeset
9 * GNU General Public License for more details.
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
10 *
3112
4c758281fe8f Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents: 2865
diff changeset
11 * You should have received a copy of the GNU General Public License
4c758281fe8f Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents: 2865
diff changeset
12 * along with this program; if not, write to the Free Software
4c758281fe8f Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents: 2865
diff changeset
13 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
14 */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
15
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
16 #ifdef HAVE_CONFIG_H
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
17 # include "config.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
18 #endif
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
19
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
20 #include "configdb.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
21
2314
d5d95a459a19 [svn] - fix: E:configdb_rcfile.c(45) [bmp_cfg_db_open]:Autoconversion of integer to pointer is not allowed in C99
nenolod
parents: 2313
diff changeset
22 #include <stdlib.h>
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
23 #include <string.h>
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
24
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
25 #include <libmcs/mcs.h>
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
26
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
27
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
28 #define RCFILE_DEFAULT_SECTION_NAME "audacious"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
29
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
30 static gboolean mcs_initted = FALSE;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
31
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
32 struct _ConfigDb
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
33 {
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
34 mcs_handle_t *handle;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
35 };
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
36
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
37
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
38 ConfigDb *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
39 bmp_cfg_db_open()
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
40 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
41 ConfigDb *db;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
42
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
43 db = g_new(ConfigDb, 1);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
44
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
45 if (!mcs_initted)
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
46 {
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
47 mcs_init();
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
48 mcs_initted = TRUE;
2325
63c9a2724e73 [svn] - revert r3646 because it is not a user-friendly method of transitioning.
nenolod
parents: 2318
diff changeset
49 }
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
50
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
51 db->handle = mcs_new(RCFILE_DEFAULT_SECTION_NAME);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
52
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
53 return db;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
54 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
55
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
56 void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
57 bmp_cfg_db_close(ConfigDb * db)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
58 {
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
59 mcs_destroy(db->handle);
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
60 g_free(db);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
61 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
62
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
63 gboolean
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
64 bmp_cfg_db_get_string(ConfigDb * db,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
65 const gchar * section,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
66 const gchar * key,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
67 gchar ** value)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
68 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
69 if (!section)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
70 section = RCFILE_DEFAULT_SECTION_NAME;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
71
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
72 return mcs_get_string(db->handle, section, key, value);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
73 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
74
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
75 gboolean
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
76 bmp_cfg_db_get_int(ConfigDb * db,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
77 const gchar * section, const gchar * key, gint * value)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
78 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
79 if (!section)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
80 section = RCFILE_DEFAULT_SECTION_NAME;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
81
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
82 return mcs_get_int(db->handle, section, key, value);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
83 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
84
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
85 gboolean
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
86 bmp_cfg_db_get_bool(ConfigDb * db,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
87 const gchar * section,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
88 const gchar * key,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
89 gboolean * value)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
90 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
91 if (!section)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
92 section = RCFILE_DEFAULT_SECTION_NAME;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
93
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
94 return mcs_get_bool(db->handle, section, key, value);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
95 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
96
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
97 gboolean
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
98 bmp_cfg_db_get_float(ConfigDb * db,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
99 const gchar * section,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
100 const gchar * key,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
101 gfloat * value)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
102 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
103 if (!section)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
104 section = RCFILE_DEFAULT_SECTION_NAME;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
105
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
106 return mcs_get_float(db->handle, section, key, value);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
107 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
108
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
109 gboolean
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
110 bmp_cfg_db_get_double(ConfigDb * db,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
111 const gchar * section,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
112 const gchar * key,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
113 gdouble * value)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
114 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
115 if (!section)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
116 section = RCFILE_DEFAULT_SECTION_NAME;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
117
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
118 return mcs_get_double(db->handle, section, key, value);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
119 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
120
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
121 void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
122 bmp_cfg_db_set_string(ConfigDb * db,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
123 const gchar * section,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
124 const gchar * key,
2346
0b98ad8c8b17 [svn] removed xmms_create_dirbrowser, small config db fixes
mf0102
parents: 2326
diff changeset
125 const gchar * value)
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
126 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
127 if (!section)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
128 section = RCFILE_DEFAULT_SECTION_NAME;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
129
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
130 mcs_set_string(db->handle, section, key, value);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
131 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
132
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
133 void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
134 bmp_cfg_db_set_int(ConfigDb * db,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
135 const gchar * section,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
136 const gchar * key,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
137 gint value)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
138 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
139 if (!section)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
140 section = RCFILE_DEFAULT_SECTION_NAME;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
141
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
142 mcs_set_int(db->handle, section, key, value);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
143 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
144
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
145 void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
146 bmp_cfg_db_set_bool(ConfigDb * db,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
147 const gchar * section,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
148 const gchar * key,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
149 gboolean value)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
150 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
151 if (!section)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
152 section = RCFILE_DEFAULT_SECTION_NAME;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
153
2359
75598f596c92 [svn] - support for libmcs (pass --enable-mcs to configure)
nenolod
parents: 2358
diff changeset
154 mcs_set_bool(db->handle, section, key, value);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
155 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
156
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
157 void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
158 bmp_cfg_db_set_float(ConfigDb * db,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
159 const gchar * section,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
160 const gchar * key,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
161 gfloat value)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
162 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
163 if (!section)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
164 section = RCFILE_DEFAULT_SECTION_NAME;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
165
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
166 mcs_set_float(db->handle, section, key, value);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
167 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
168
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
169 void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
170 bmp_cfg_db_set_double(ConfigDb * db,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
171 const gchar * section,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
172 const gchar * key,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
173 gdouble value)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
174 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
175 if (!section)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
176 section = RCFILE_DEFAULT_SECTION_NAME;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
177
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
178 mcs_set_double(db->handle, section, key, value);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
179 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
180
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
181 void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
182 bmp_cfg_db_unset_key(ConfigDb * db,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
183 const gchar * section,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
184 const gchar * key)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
185 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
186 g_return_if_fail(db != NULL);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
187 g_return_if_fail(key != NULL);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
188
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
189 if (!section)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
190 section = RCFILE_DEFAULT_SECTION_NAME;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
191
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
192 mcs_unset_key(db->handle, section, key);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
193 }