annotate src/audacious/configdb.c @ 3059:f58cbfe8df1b

use create_dblsize_image for doueblesizing
author Tomasz Mon <desowin@gmail.com>
date Fri, 13 Jul 2007 12:52:36 +0200
parents d226b83fa329
children 4c758281fe8f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2865
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
1 /*
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
2 * audacious: Cross-platform multimedia player.
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
3 * configdb.c: Compatibility API for BMP's ConfigDB system.
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
4 *
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
5 * Copyright (c) 2005-2007 Audacious development team.
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
6 * Copyright (c) 2003-2005 BMP development team.
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
7 *
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
8 * Redistribution and use in source and binary forms, with or without
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
9 * modification, are permitted provided that the following conditions are
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
10 * met:
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
11 *
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
12 * 1. Redistributions of source code must retain the above copyright notice,
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
13 * this list of conditions and the following disclaimer.
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
14 *
2865
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
15 * 2. Redistributions in binary form must reproduce the above copyright
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
16 * notice, this list of conditions and the following disclaimer in the
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
17 * documentation and/or other materials provided with the distribution.
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
18 *
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
19 * 3. The name of the author may not be used to endorse or promote products
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
20 * derived from this software without specific prior written permission.
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
21 *
2865
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
24 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
25 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
26 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
27 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
30 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
31 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
d226b83fa329 BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents: 2712
diff changeset
32 * POSSIBILITY OF SUCH DAMAGE.
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
33 */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
34
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
35 #ifdef HAVE_CONFIG_H
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
36 # include "config.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
37 #endif
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
38
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
39 #include "configdb.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
40
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
41 #include <stdlib.h>
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
42 #include <string.h>
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
43
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
44 #include <libmcs/mcs.h>
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
45
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
46
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
47 #define RCFILE_DEFAULT_SECTION_NAME "audacious"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
48
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
49 static gboolean mcs_initted = FALSE;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
50
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
51 struct _ConfigDb
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
52 {
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
53 mcs_handle_t *handle;
2313
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
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
57 ConfigDb *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
58 bmp_cfg_db_open()
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
59 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
60 ConfigDb *db;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
61
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
62 db = g_new(ConfigDb, 1);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
63
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
64 if (!mcs_initted)
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
65 {
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
66 mcs_init();
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
67 mcs_initted = TRUE;
2325
63c9a2724e73 [svn] - revert r3646 because it is not a user-friendly method of transitioning.
nenolod
parents: 2318
diff changeset
68 }
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
69
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
70 db->handle = mcs_new(RCFILE_DEFAULT_SECTION_NAME);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
71
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
72 return db;
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 void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
76 bmp_cfg_db_close(ConfigDb * db)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
77 {
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
78 mcs_destroy(db->handle);
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
79 g_free(db);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
80 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
81
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
82 gboolean
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
83 bmp_cfg_db_get_string(ConfigDb * db,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
84 const gchar * section,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
85 const gchar * key,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
86 gchar ** value)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
87 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
88 if (!section)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
89 section = RCFILE_DEFAULT_SECTION_NAME;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
90
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
91 return mcs_get_string(db->handle, section, key, value);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
92 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
93
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
94 gboolean
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
95 bmp_cfg_db_get_int(ConfigDb * db,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
96 const gchar * section, const gchar * key, gint * value)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
97 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
98 if (!section)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
99 section = RCFILE_DEFAULT_SECTION_NAME;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
100
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
101 return mcs_get_int(db->handle, section, key, value);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
102 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
103
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
104 gboolean
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
105 bmp_cfg_db_get_bool(ConfigDb * db,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
106 const gchar * section,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
107 const gchar * key,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
108 gboolean * value)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
109 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
110 if (!section)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
111 section = RCFILE_DEFAULT_SECTION_NAME;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
112
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
113 return mcs_get_bool(db->handle, section, key, value);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
114 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
115
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
116 gboolean
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
117 bmp_cfg_db_get_float(ConfigDb * db,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
118 const gchar * section,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
119 const gchar * key,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
120 gfloat * value)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
121 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
122 if (!section)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
123 section = RCFILE_DEFAULT_SECTION_NAME;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
124
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
125 return mcs_get_float(db->handle, section, key, value);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
126 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
127
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
128 gboolean
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
129 bmp_cfg_db_get_double(ConfigDb * db,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
130 const gchar * section,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
131 const gchar * key,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
132 gdouble * value)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
133 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
134 if (!section)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
135 section = RCFILE_DEFAULT_SECTION_NAME;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
136
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
137 return mcs_get_double(db->handle, section, key, value);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
138 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
139
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
140 void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
141 bmp_cfg_db_set_string(ConfigDb * db,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
142 const gchar * section,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
143 const gchar * key,
2346
0b98ad8c8b17 [svn] removed xmms_create_dirbrowser, small config db fixes
mf0102
parents: 2326
diff changeset
144 const gchar * value)
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
145 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
146 if (!section)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
147 section = RCFILE_DEFAULT_SECTION_NAME;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
148
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
149 mcs_set_string(db->handle, section, key, value);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
150 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
151
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
152 void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
153 bmp_cfg_db_set_int(ConfigDb * db,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
154 const gchar * section,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
155 const gchar * key,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
156 gint value)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
157 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
158 if (!section)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
159 section = RCFILE_DEFAULT_SECTION_NAME;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
160
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
161 mcs_set_int(db->handle, section, key, value);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
162 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
163
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
164 void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
165 bmp_cfg_db_set_bool(ConfigDb * db,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
166 const gchar * section,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
167 const gchar * key,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
168 gboolean value)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
169 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
170 if (!section)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
171 section = RCFILE_DEFAULT_SECTION_NAME;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
172
2359
75598f596c92 [svn] - support for libmcs (pass --enable-mcs to configure)
nenolod
parents: 2358
diff changeset
173 mcs_set_bool(db->handle, section, key, value);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
174 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
175
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
176 void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
177 bmp_cfg_db_set_float(ConfigDb * db,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
178 const gchar * section,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
179 const gchar * key,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
180 gfloat value)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
181 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
182 if (!section)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
183 section = RCFILE_DEFAULT_SECTION_NAME;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
184
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
185 mcs_set_float(db->handle, section, key, value);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
186 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
187
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
188 void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
189 bmp_cfg_db_set_double(ConfigDb * db,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
190 const gchar * section,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
191 const gchar * key,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
192 gdouble value)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
193 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
194 if (!section)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
195 section = RCFILE_DEFAULT_SECTION_NAME;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
196
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
197 mcs_set_double(db->handle, section, key, value);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
198 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
199
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
200 void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
201 bmp_cfg_db_unset_key(ConfigDb * db,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
202 const gchar * section,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
203 const gchar * key)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
204 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
205 g_return_if_fail(db != NULL);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
206 g_return_if_fail(key != NULL);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
207
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
208 if (!section)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
209 section = RCFILE_DEFAULT_SECTION_NAME;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
210
2358
9c84ab3eb2c6 [svn] - add configdb backend based on libmcs.
nenolod
parents: 2346
diff changeset
211 mcs_unset_key(db->handle, section, key);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
212 }