34 typedef const char *(*secfile_enum_name_fn_t)(
int enumerator);
36 int (*strcmp_fn)(
const char *,
44 #define SPECLIST_TAG section
46 #define section_list_iterate(seclist, psection) \
47 TYPED_LIST_ITERATE(struct section, seclist, psection)
48 #define section_list_iterate_end LIST_ITERATE_END
49 #define section_list_iterate_rev(seclist, psection) \
50 TYPED_LIST_ITERATE_REV(struct section, seclist, psection)
51 #define section_list_iterate_rev_end LIST_ITERATE_REV_END
54 #define SPECLIST_TAG entry
56 #define entry_list_iterate(entlist, pentry) \
57 TYPED_LIST_ITERATE(struct entry, entlist, pentry)
58 #define entry_list_iterate_end LIST_ITERATE_END
76 bool allow_replace,
const char *path,
79 #define secfile_insert_bool(secfile, value, path, ...) \
80 secfile_insert_bool_full(secfile, value, nullptr, false, path, \
82 #define secfile_insert_bool_comment(secfile, value, comment, path, ...) \
83 secfile_insert_bool_full(secfile, value, comment, false, path, \
85 #define secfile_replace_bool(secfile, value, path, ...) \
86 secfile_insert_bool_full(secfile, value, nullptr, true, path, \
88 #define secfile_replace_bool_comment(secfile, value, comment, path, ...) \
89 secfile_insert_bool_full(secfile, value, comment, true, path, \
92 const bool *values,
size_t dim,
93 const char *
comment,
bool allow_replace,
94 const char *path, ...)
96 #define secfile_insert_bool_vec(secfile, values, dim, path, ...) \
97 secfile_insert_bool_vec_full(secfile, values, dim, nullptr, false, path, \
99 #define secfile_insert_bool_vec_comment(secfile, values, dim, comment, \
101 secfile_insert_bool_vec_full(secfile, values, dim, comment, false, path, \
103 #define secfile_replace_bool_vec(secfile, values, dim, path, ...) \
104 secfile_insert_bool_vec_full(secfile, values, dim, nullptr, true, path, \
106 #define secfile_replace_bool_vec_comment(secfile, values, dim, comment, \
108 secfile_insert_bool_vec_full(secfile, values, comment, true, path, \
113 bool allow_replace,
const char *path,
116 #define secfile_insert_int(secfile, value, path, ...) \
117 secfile_insert_int_full(secfile, value, nullptr, false, path, \
119 #define secfile_insert_int_comment(secfile, value, comment, path, ...) \
120 secfile_insert_int_full(secfile, value, comment, false, path, \
122 #define secfile_replace_int(secfile, value, path, ...) \
123 secfile_insert_int_full(secfile, value, nullptr, true, path, ##__VA_ARGS__)
124 #define secfile_replace_int_comment(secfile, value, comment, path, ...) \
125 secfile_insert_int_full(secfile, value, comment, true, path, ##__VA_ARGS__)
127 const int *values,
size_t dim,
128 const char *
comment,
bool allow_replace,
129 const char *path, ...)
131 #define secfile_insert_int_vec(secfile, values, dim, path, ...) \
132 secfile_insert_int_vec_full(secfile, values, dim, nullptr, false, path, \
134 #define secfile_insert_int_vec_comment(secfile, values, dim, comment, path, \
136 secfile_insert_int_vec_full(secfile, values, dim, comment, false, path, \
138 #define secfile_replace_int_vec(secfile, values, dim, path, ...) \
139 secfile_insert_int_vec_full(secfile, values, dim, nullptr, true, path, \
141 #define secfile_replace_int_vec_comment(secfile, values, dim, comment, \
143 secfile_insert_int_vec_full(secfile, values, dim, comment, true, path, \
148 bool allow_replace,
const char *path,
151 #define secfile_insert_float(secfile, value, path, ...) \
152 secfile_insert_float_full(secfile, value, nullptr, false, path, \
156 const char *filename);
159 const char *comment);
162 const char *str,
const char *
comment,
163 bool allow_replace,
bool no_escape,
165 const char *path, ...)
167 #define secfile_insert_str(secfile, string, path, ...) \
168 secfile_insert_str_full(secfile, string, nullptr, false, false, \
169 EST_NORMAL, path, ##__VA_ARGS__)
170 #define secfile_insert_str_noescape(secfile, string, path, ...) \
171 secfile_insert_str_full(secfile, string, nullptr, false, true, \
172 EST_NORMAL, path, ##__VA_ARGS__)
173 #define secfile_insert_str_comment(secfile, string, comment, path, ...) \
174 secfile_insert_str_full(secfile, string, comment, false, true, \
175 EST_NORMAL, path, ##__VA_ARGS__)
176 #define secfile_insert_str_noescape_comment(secfile, string, comment, path, \
178 secfile_insert_str_full(secfile, string, comment, false, true, \
179 EST_NORMAL, path, ##__VA_ARGS__)
180 #define secfile_replace_str(secfile, string, path, ...) \
181 secfile_insert_str_full(secfile, string, nullptr, true, false, \
182 EST_NORMAL, path, ##__VA_ARGS__)
183 #define secfile_replace_str_noescape(secfile, string, path, ...) \
184 secfile_insert_str_full(secfile, string, nullptr, true, true, EST_NORMAL, \
186 #define secfile_replace_str_comment(secfile, string, comment, path, ...) \
187 secfile_insert_str_full(secfile, string, comment, true, true, EST_NORMAL, \
189 #define secfile_replace_str_noescape_comment(secfile, string, comment, \
191 secfile_insert_str_full(secfile, string, comment, true, true, EST_NORMAL, \
194 const char *
const *strings,
size_t dim,
195 const char *
comment,
bool allow_replace,
196 bool no_escape,
const char *path, ...)
199 const
QVector<QString> &strings,
200 size_t dim, const
char *
comment,
201 bool allow_replace,
bool no_escape,
202 const
char *path, ...)
204 #define secfile_insert_str_vec(secfile, strings, dim, path, ...) \
205 secfile_insert_str_vec_full(secfile, strings, dim, nullptr, false, false, \
207 #define secfile_insert_str_vec_noescape(secfile, strings, dim, path, ...) \
208 secfile_insert_str_vec_full(secfile, strings, dim, nullptr, false, true, \
210 #define secfile_insert_str_vec_comment(secfile, strings, dim, comment, \
212 secfile_insert_str_vec_full(secfile, strings, dim, comment, false, true, \
214 #define secfile_insert_str_vec_noescape_comment(secfile, strings, dim, \
215 comment, path, ...) \
216 secfile_insert_str_vec_full(secfile, strings, dim, comment, false, true, \
218 #define secfile_replace_str_vec(secfile, strings, dim, path, ...) \
219 secfile_insert_str_vec_full(secfile, strings, dim, nullptr, true, false, \
221 #define secfile_replace_str_vec_noescape(secfile, strings, dim, path, ...) \
222 secfile_insert_str_vec_full(secfile, strings, dim, nullptr, true, true, \
224 #define secfile_replace_str_vec_comment(secfile, strings, dim, comment, \
226 secfile_insert_str_vec_full(secfile, strings, dim, comment, true, true, \
228 #define secfile_replace_str_vec_noescape_comment(secfile, strings, dim, \
229 comment, path, ...) \
230 secfile_insert_str_vec_full(secfile, strings, dim, comment, true, true, \
236 const char *path, ...)
fc__attribute((__format__(__printf__, 6, 7)));
241 const
char *
comment,
bool allow_replace, const
char *path, ...)
243 #define secfile_insert_enum_full(secfile, enumerator, specenum_type, \
244 comment, allow_replace, path, ...) \
245 (specenum_type##_is_bitwise() \
246 ? secfile_insert_bitwise_enum_full( \
247 secfile, enumerator, \
248 (secfile_enum_name_fn_t) specenum_type##_name, \
249 (secfile_enum_iter_fn_t) specenum_type##_begin, \
250 (secfile_enum_iter_fn_t) specenum_type##_end, \
251 (secfile_enum_next_fn_t) specenum_type##_next, comment, \
252 allow_replace, path, ##__VA_ARGS__) \
253 : secfile_insert_plain_enum_full( \
254 secfile, enumerator, \
255 (secfile_enum_name_fn_t) specenum_type##_name, comment, \
256 allow_replace, path, ##__VA_ARGS__))
257 #define secfile_insert_enum(secfile, enumerator, specenum_type, path, ...) \
258 secfile_insert_enum_full(secfile, enumerator, specenum_type, nullptr, \
259 false, path, ##__VA_ARGS__)
260 #define secfile_insert_enum_comment(secfile, enumerator, specenum_type, \
261 comment, path, ...) \
262 secfile_insert_enum_full(secfile, enumerator, specenum_type, comment, \
263 false, path, ##__VA_ARGS__)
264 #define secfile_replace_enum(secfile, enumerator, specenum_type, path, ...) \
265 secfile_insert_enum_full(secfile, enumerator, specenum_type, nullptr, \
266 true, path, ##__VA_ARGS__)
267 #define secfile_replace_enum_comment(secfile, enumerator, specenum_type, \
268 comment, path, ...) \
269 secfile_insert_enum_full(secfile, enumerator, specenum_type, comment, \
270 true, path, ##__VA_ARGS__)
272 struct section_file *secfile,
const int *enumurators,
size_t dim,
274 const char *path, ...)
fc__attribute((__format__(__printf__, 7, 8)));
276 struct
section_file *secfile, const
int *bitwise_vals,
size_t dim,
279 const
char *
comment,
bool allow_replace, const
char *path, ...)
281 #define secfile_insert_enum_vec_full(secfile, enumerators, dim, \
282 specenum_type, comment, allow_replace, \
284 (specenum_type##_is_bitwise() \
285 ? secfile_insert_bitwise_enum_vec_full( \
286 secfile, (const int *) enumerators, dim, \
287 (secfile_enum_name_fn_t) specenum_type##_name, \
288 (secfile_enum_iter_fn_t) specenum_type##_begin, \
289 (secfile_enum_iter_fn_t) specenum_type##_end, \
290 (secfile_enum_next_fn_t) specenum_type##_next, comment, \
291 allow_replace, path, ##__VA_ARGS__) \
292 : secfile_insert_plain_enum_vec_full( \
293 secfile, (const int *) enumerators, dim, \
294 (secfile_enum_name_fn_t) specenum_type##_name, comment, \
295 allow_replace, path, ##__VA_ARGS__))
296 #define secfile_insert_enum_vec(secfile, enumerators, dim, specenum_type, \
298 secfile_insert_enum_vec_full(secfile, enumerators, dim, specenum_type, \
299 nullptr, false, path, ##__VA_ARGS__)
300 #define secfile_insert_enum_vec_comment(secfile, enumerators, dim, \
301 specenum_type, comment, path, ...) \
302 secfile_insert_enum_vec_full(secfile, enumerators, dim, specenum_type, \
303 comment, false, path, ##__VA_ARGS__)
304 #define secfile_replace_enum_vec(secfile, enumerators, dim, specenum_type, \
306 secfile_insert_enum_vec_full(secfile, enumerators, dim, specenum_type, \
307 nullptr, true, path, ##__VA_ARGS__)
308 #define secfile_replace_enum_vec_comment(secfile, enumerators, dim, \
309 specenum_type, comment, path, ...) \
310 secfile_insert_enum_vec_full(secfile, enumerators, dim, specenum_type, \
311 comment, true, path, ##__VA_ARGS__)
316 const char *
comment,
bool allow_replace,
const char *path, ...)
318 #define secfile_insert_enum_data(secfile, value, bitwise, name_fn, data, \
320 secfile_insert_enum_data_full(secfile, value, bitwise, name_fn, data, \
321 nullptr, false, path, ##__VA_ARGS__)
322 #define secfile_insert_enum_data_comment(secfile, value, bitwise, name_fn, \
324 secfile_insert_enum_data_full(secfile, value, bitwise, name_fn, data, \
325 comment, false, path, ##__VA_ARGS__)
326 #define secfile_replace_enum_data(secfile, value, bitwise, name_fn, data, \
328 secfile_insert_enum_data_full(secfile, value, bitwise, name_fn, data, \
329 nullptr, true, path, ##__VA_ARGS__)
330 #define secfile_replace_enum_data_comment(secfile, value, bitwise, name_fn, \
332 secfile_insert_enum_data_full(secfile, value, bitwise, name_fn, data, \
333 comment, true, path, ##__VA_ARGS__)
335 struct section_file *secfile,
const int *values,
size_t dim,
337 const char *
comment,
bool allow_replace,
const char *path, ...)
339 #define secfile_insert_enum_vec_data(secfile, values, dim, bitwise, \
340 name_fn, data, path, ...) \
341 secfile_insert_enum_vec_data_full(secfile, values, dim, bitwise, name_fn, \
342 data, nullptr, false, path, \
344 #define secfile_insert_enum_vec_data_comment(secfile, values, dim, bitwise, \
345 name_fn, data, path, ...) \
346 secfile_insert_enum_vec_data_full(secfile, values, dim, bitwise, name_fn, \
347 data, comment, false, path, \
349 #define secfile_replace_enum_vec_data(secfile, values, dim, bitwise, \
350 name_fn, data, path, ...) \
351 secfile_insert_enum_vec_data_full(secfile, values, dim, bitwise, name_fn, \
352 data, nullptr, true, path, \
354 #define secfile_replace_enum_vec_data_comment( \
355 secfile, values, dim, bitwise, name_fn, data, path, ...) \
356 secfile_insert_enum_vec_data_full(secfile, values, dim, bitwise, name_fn, \
357 data, comment, true, path, \
361 const char *filename,
362 const char *path, ...)
373 const
char *path, ...)
380 bool def, const
char *path,
391 int defval,
int minval,
int maxval,
403 const
char *def, const
char *path,
407 size_t *dim, const
char *path, ...)
424 #define secfile_lookup_enum(secfile, enumerator, specenum_type, path, ...) \
425 (specenum_type##_is_bitwise() \
426 ? secfile_lookup_bitwise_enum_full( \
427 secfile, FC_ENUM_PTR(enumerator), \
428 (secfile_enum_is_valid_fn_t) specenum_type##_is_valid, \
429 (secfile_enum_by_name_fn_t) specenum_type##_by_name, path, \
431 : secfile_lookup_plain_enum_full( \
432 secfile, FC_ENUM_PTR(enumerator), \
433 (secfile_enum_is_valid_fn_t) specenum_type##_is_valid, \
434 (secfile_enum_by_name_fn_t) specenum_type##_by_name, path, \
448 #define secfile_lookup_enum_default(secfile, defval, specenum_type, path, \
450 (specenum_type##_is_bitwise() \
451 ? secfile_lookup_bitwise_enum_default_full( \
453 (secfile_enum_is_valid_fn_t) specenum_type##_is_valid, \
454 (secfile_enum_by_name_fn_t) specenum_type##_by_name, path, \
456 : secfile_lookup_plain_enum_default_full( \
458 (secfile_enum_is_valid_fn_t) specenum_type##_is_valid, \
459 (secfile_enum_by_name_fn_t) specenum_type##_by_name, path, \
473 #define secfile_lookup_enum_vec(secfile, dim, specenum_type, path, ...) \
474 (specenum_type##_is_bitwise() \
475 ? (enum specenum_type *) secfile_lookup_bitwise_enum_vec_full( \
477 (secfile_enum_is_valid_fn_t) specenum_type##_is_valid, \
478 (secfile_enum_by_name_fn_t) specenum_type##_by_name, path, \
480 : (enum specenum_type *) secfile_lookup_plain_enum_vec_full( \
482 (secfile_enum_is_valid_fn_t) specenum_type##_is_valid, \
483 (secfile_enum_by_name_fn_t) specenum_type##_by_name, path, \
487 int *pvalue,
bool bitwise,
493 int defval,
bool bitwise,
503 const
char *path, ...)
505 const struct section_list *
507 struct section_list *
const char * section_name(const struct section *psection)
Returns the section name.
bool secfile_save(const struct section_file *secfile, QString filename)
Save the previously filled in section_file to disk.
bool int secfile_lookup_enum_default_data(const struct section_file *secfile, int defval, bool bitwise, secfile_enum_name_data_fn_t name_fn, secfile_data_t data, const char *path,...) fc__warn_unused_result fc__attribute((__format__(__printf__
struct entry bool bool bool int int int const char * secfile_lookup_str(const struct section_file *secfile, const char *path,...) fc__warn_unused_result fc__attribute((__format__(__printf__
const char * entry_comment(const struct entry *pentry)
Returns the comment associated to this entry.
struct entry bool bool bool int int int const char const char const char bool secfile_lookup_plain_enum_full(const struct section_file *secfile, int *penumerator, secfile_enum_is_valid_fn_t is_valid_fn, secfile_enum_by_name_fn_t by_name_fn, const char *path,...) fc__warn_unused_result fc__attribute((__format__(__printf__
struct section * secfile_section_lookup(const struct section_file *secfile, const char *path,...) fc__attribute((__format__(__printf__
bool entry_bool_get(const struct entry *pentry, bool *value)
Gets an boolean value.
void section_destroy(struct section *psection)
Remove this section from the secfile.
struct section * entry_section(const struct entry *pentry)
Returns the parent section of this entry.
void secfile_check_unused(const struct section_file *secfile)
Print log messages for any entries in the file which have not been looked up – ie,...
int entry_path(const struct entry *pentry, char *buf, size_t buf_len)
Build the entry path.
size_t size_t secfile_insert_bitwise_enum_vec_full(struct section_file *secfile, const int *bitwise_vals, size_t dim, secfile_enum_name_fn_t name_fn, secfile_enum_iter_fn_t begin_fn, secfile_enum_iter_fn_t end_fn, secfile_enum_next_fn_t next_fn, const char *comment, bool allow_replace, const char *path,...) fc__attribute((__format__(__printf__
struct entry bool secfile_lookup_bool(const struct section_file *secfile, bool *bval, const char *path,...) fc__warn_unused_result fc__attribute((__format__(__printf__
struct entry * secfile_insert_int_full(struct section_file *secfile, int value, const char *comment, bool allow_replace, const char *path,...) fc__attribute((__format__(__printf__
struct section_file * secfile_from_stream(QIODevice *stream, bool allow_duplicates)
Create a section file from a stream.
struct entry * secfile_insert_str_full(struct section_file *secfile, const char *str, const char *comment, bool allow_replace, bool no_escape, enum entry_special_type stype, const char *path,...) fc__attribute((__format__(__printf__
struct entry * section_entry_float_new(struct section *psection, const QString &entry_name, float value)
Returns a new entry of type ENTRY_FLOAT.
size_t secfile_insert_int_vec_full(struct section_file *secfile, const int *values, size_t dim, const char *comment, bool allow_replace, const char *path,...) fc__attribute((__format__(__printf__
struct entry bool bool bool secfile_lookup_int(const struct section_file *secfile, int *ival, const char *path,...) fc__warn_unused_result fc__attribute((__format__(__printf__
const char * entry_name(const struct entry *pentry)
Returns the name of this entry.
struct entry * secfile_insert_float_full(struct section_file *secfile, float value, const char *comment, bool allow_replace, const char *path,...) fc__attribute((__format__(__printf__
bool entry_bool_set(struct entry *pentry, bool value)
Sets an boolean value.
struct section * secfile_section_new(struct section_file *secfile, const QString §ion_name)
Create a new section in the secfile.
struct entry bool bool secfile_lookup_bool_default(const struct section_file *secfile, bool def, const char *path,...) fc__warn_unused_result fc__attribute((__format__(__printf__
bool entry_float_get(const struct entry *pentry, float *value)
Gets an floating value.
int int * secfile_lookup_bitwise_enum_vec_full(const struct section_file *secfile, size_t *dim, secfile_enum_is_valid_fn_t is_valid_fn, secfile_enum_by_name_fn_t by_name_fn, const char *path,...) fc__warn_unused_result fc__attribute((__format__(__printf__
size_t secfile_insert_bool_vec_full(struct section_file *secfile, const bool *values, size_t dim, const char *comment, bool allow_replace, const char *path,...) fc__attribute((__format__(__printf__
struct entry * secfile_insert_filereference(struct section_file *secfile, const char *filename, const char *path,...) fc__attribute((__format__(__printf__
bool entry_str_get(const struct entry *pentry, const char **value)
Gets an string value.
int * secfile_lookup_plain_enum_vec_full(const struct section_file *secfile, size_t *dim, secfile_enum_is_valid_fn_t is_valid_fn, secfile_enum_by_name_fn_t by_name_fn, const char *path,...) fc__warn_unused_result fc__attribute((__format__(__printf__
struct entry * section_entry_int_new(struct section *psection, const QString &entry_name, int value)
Returns a new entry of type ENTRY_INT.
bool entry_str_set_gt_marking(struct entry *pentry, bool gt_marking)
Sets if the string should get gettext marking.
struct entry * secfile_entry_lookup(const struct section_file *secfile, const char *path,...) fc__attribute((__format__(__printf__
bool(* secfile_enum_is_valid_fn_t)(int enumerator)
void entry_destroy(struct entry *pentry)
Entry structure destructor.
int int secfile_lookup_bitwise_enum_default_full(const struct section_file *secfile, int defval, secfile_enum_is_valid_fn_t is_valid_fn, secfile_enum_by_name_fn_t by_name_fn, const char *path,...) fc__warn_unused_result fc__attribute((__format__(__printf__
void section_clear_all(struct section *psection)
Remove all entries.
const char * secfile_name(const struct section_file *secfile)
Return the filename the section file was loaded as, or "(anonymous)" if this sectionfile was created ...
bool entry_float_set(struct entry *pentry, float value)
Sets an floating value.
bool secfile_lookup_enum_data(const struct section_file *secfile, int *pvalue, bool bitwise, secfile_enum_name_data_fn_t name_fn, secfile_data_t data, const char *path,...) fc__warn_unused_result fc__attribute((__format__(__printf__
struct section_file * secfile_load_section(const QString &filename, const QString §ion, bool allow_duplicates)
Create a section file from a file, read only one particular section.
struct section * secfile_insert_long_comment(struct section_file *secfile, const char *comment)
Insert a long comment entry.
bool entry_int_set(struct entry *pentry, int value)
Sets an integer value.
struct entry * secfile_insert_bool_full(struct section_file *secfile, bool value, const char *comment, bool allow_replace, const char *path,...) fc__attribute((__format__(__printf__
struct entry bool struct entry * secfile_entry_by_path(const struct section_file *secfile, const char *path)
Returns the entry by the name or nullptr if not matched.
struct entry bool bool bool int int int * secfile_lookup_int_vec(const struct section_file *secfile, size_t *dim, const char *path,...) fc__warn_unused_result fc__attribute((__format__(__printf__
int secfile_lookup_plain_enum_default_full(const struct section_file *secfile, int defval, secfile_enum_is_valid_fn_t is_valid_fn, secfile_enum_by_name_fn_t by_name_fn, const char *path,...) fc__warn_unused_result fc__attribute((__format__(__printf__
bool entry_int_get(const struct entry *pentry, int *value)
Gets an integer value.
bool entry_set_name(struct entry *pentry, const char *entry_name)
Sets the name of the entry.
struct entry bool bool bool int int int const char const char const char ** secfile_lookup_str_vec(const struct section_file *secfile, size_t *dim, const char *path,...) fc__attribute((__format__(__printf__
struct entry bool bool bool int int int const char const char const char bool bool secfile_lookup_bitwise_enum_full(const struct section_file *secfile, int *penumerator, secfile_enum_is_valid_fn_t is_valid_fn, secfile_enum_by_name_fn_t by_name_fn, const char *path,...) fc__warn_unused_result fc__attribute((__format__(__printf__
size_t secfile_insert_str_vec_full(struct section_file *secfile, const char *const *strings, size_t dim, const char *comment, bool allow_replace, bool no_escape, const char *path,...) fc__attribute((__format__(__printf__
size_t secfile_insert_enum_vec_data_full(struct section_file *secfile, const int *values, size_t dim, bool bitwise, secfile_enum_name_data_fn_t name_fn, secfile_data_t data, const char *comment, bool allow_replace, const char *path,...) fc__attribute((__format__(__printf__
struct section * secfile_insert_include(struct section_file *secfile, const char *filename)
Insert a include entry.
struct entry bool bool bool int secfile_lookup_int_default(const struct section_file *secfile, int def, const char *path,...) fc__warn_unused_result fc__attribute((__format__(__printf__
bool entry_str_set(struct entry *pentry, const char *value)
Sets an string value.
struct entry * section_entry_str_new(struct section *psection, const QString &entry_name, const QString &value, bool escaped)
Returns a new entry of type ENTRY_STR.
struct entry bool bool bool int int secfile_lookup_int_def_min_max(const struct section_file *secfile, int defval, int minval, int maxval, const char *path,...) fc__warn_unused_result fc__attribute((__format__(__printf__
struct entry * section_entry_by_name(const struct section *psection, const QString &entry_name)
Returns the first entry matching the name.
int(* secfile_enum_by_name_fn_t)(const char *enum_name, int(*strcmp_fn)(const char *, const char *))
struct entry * secfile_insert_enum_data_full(struct section_file *secfile, int value, bool bitwise, secfile_enum_name_data_fn_t name_fn, secfile_data_t data, const char *comment, bool allow_replace, const char *path,...) fc__attribute((__format__(__printf__
struct entry struct entry * secfile_insert_bitwise_enum_full(struct section_file *secfile, int bitwise_val, secfile_enum_name_fn_t name_fn, secfile_enum_iter_fn_t begin_fn, secfile_enum_iter_fn_t end_fn, secfile_enum_next_fn_t next_fn, const char *comment, bool allow_replace, const char *path,...) fc__attribute((__format__(__printf__
const char *(* secfile_enum_name_fn_t)(int enumerator)
size_t secfile_insert_plain_enum_vec_full(struct section_file *secfile, const int *enumurators, size_t dim, secfile_enum_name_fn_t name_fn, const char *comment, bool allow_replace, const char *path,...) fc__attribute((__format__(__printf__
bool int struct section * secfile_section_by_name(const struct section_file *secfile, const QString §ion_name)
Returns the first section matching the name.
struct section_list * secfile_sections_by_name_prefix(const struct section_file *secfile, const char *prefix)
Returns the list of sections which match the name prefix.
int(* secfile_enum_iter_fn_t)()
const struct entry_list * section_entries(const struct section *psection)
Returns a list containing all the entries.
void entry_set_comment(struct entry *pentry, const QString &comment)
Sets a comment for the entry.
struct entry bool secfile_entry_delete(struct section_file *secfile, const char *path,...) fc__attribute((__format__(__printf__
struct entry * section_entry_bool_new(struct section *psection, const QString &entry_name, bool value)
Returns a new entry of type ENTRY_BOOL.
const char *(* secfile_enum_name_data_fn_t)(secfile_data_t data, int enumerator)
struct section const struct section_list * secfile_sections(const struct section_file *secfile)
Returns the list of sections.
int(* secfile_enum_next_fn_t)(int enumerator)
struct entry bool bool bool int int int const char const char * secfile_lookup_str_default(const struct section_file *secfile, const char *def, const char *path,...) fc__warn_unused_result fc__attribute((__format__(__printf__
struct entry * secfile_insert_plain_enum_full(struct section_file *secfile, int enumerator, secfile_enum_name_fn_t name_fn, const char *comment, bool allow_replace, const char *path,...) fc__attribute((__format__(__printf__
const void * secfile_data_t
enum entry_type entry_type_get(const struct entry *pentry)
Returns the type of this entry or ENTRY_ILLEGAL or error.
struct section * psection
struct section_file * secfile
int fc__attribute((nonnull(1, 3)))
#define fc__warn_unused_result