comparison src/rcfile.h @ 1461:e015b6573d36

improved config file formatting
author nadvornik
date Thu, 19 Mar 2009 22:12:14 +0000
parents 732083928afb
children 9c16a93a0fdf
comparison
equal deleted inserted replaced
1460:8178ef34d257 1461:e015b6573d36
36 #define WRITE_UINT(_source_, _name_) write_uint_option(outstr, indent, #_name_, (_source_)._name_) 36 #define WRITE_UINT(_source_, _name_) write_uint_option(outstr, indent, #_name_, (_source_)._name_)
37 #define WRITE_INT_UNIT(_source_, _name_, _unit_) write_int_unit_option(outstr, indent, #_name_, (_source_)._name_, _unit_) 37 #define WRITE_INT_UNIT(_source_, _name_, _unit_) write_int_unit_option(outstr, indent, #_name_, (_source_)._name_, _unit_)
38 #define WRITE_CHAR(_source_, _name_) write_char_option(outstr, indent, #_name_, (_source_)._name_) 38 #define WRITE_CHAR(_source_, _name_) write_char_option(outstr, indent, #_name_, (_source_)._name_)
39 #define WRITE_COLOR(_source_, _name_) write_color_option(outstr, indent, #_name_, &(_source_)._name_) 39 #define WRITE_COLOR(_source_, _name_) write_color_option(outstr, indent, #_name_, &(_source_)._name_)
40 40
41 #define WRITE_NL() write_indent(outstr, indent)
41 #define WRITE_SEPARATOR() g_string_append(outstr, "\n") 42 #define WRITE_SEPARATOR() g_string_append(outstr, "\n")
42 #define WRITE_SUBTITLE(_title_) g_string_append_printf(outstr, "\n\n<!-- "_title_" -->\n\n") 43 #define WRITE_SUBTITLE(_title_) g_string_append_printf(outstr, "\n\n<!-- "_title_" -->\n\n")
43 #define WRITE_STRING(_str_) do { write_indent(outstr, indent); g_string_append_printf(outstr, _str_); } while (0) 44 #define WRITE_STRING(_str_) g_string_append_printf(outstr, _str_)
44 45
45 #define READ_BOOL(_target_, _name_) read_bool_option(option, #_name_, value, &(_target_)._name_) 46 #define READ_BOOL(_target_, _name_) read_bool_option(option, #_name_, value, &(_target_)._name_)
46 #define READ_INT(_target_, _name_) read_int_option(option, #_name_, value, &(_target_)._name_) 47 #define READ_INT(_target_, _name_) read_int_option(option, #_name_, value, &(_target_)._name_)
47 #define READ_UINT(_target_, _name_) read_uint_option(option, #_name_, value, &(_target_)._name_) 48 #define READ_UINT(_target_, _name_) read_uint_option(option, #_name_, value, &(_target_)._name_)
48 #define READ_INT_CLAMP(_target_, _name_, _min_, _max_) read_int_option_clamp(option, #_name_, value, &(_target_)._name_, _min_, _max_) 49 #define READ_INT_CLAMP(_target_, _name_, _min_, _max_) read_int_option_clamp(option, #_name_, value, &(_target_)._name_, _min_, _max_)