changeset 1316:732083928afb

Enclose macro parameters names with _ to differentiate them from variable names.
author zas_
date Tue, 24 Feb 2009 18:00:45 +0000
parents c1d108ab3388
children cd7204a18f14
files src/rcfile.h
diffstat 1 files changed, 21 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/src/rcfile.h	Tue Feb 24 17:47:45 2009 +0000
+++ b/src/rcfile.h	Tue Feb 24 18:00:45 2009 +0000
@@ -31,33 +31,33 @@
 void write_bool_option(GString *str, gint indent, gchar *label, gint n);
 gboolean read_bool_option(const gchar *option, const gchar *label, const gchar *value, gint *n);
 
-#define WRITE_BOOL(source, _name_) write_bool_option(outstr, indent, #_name_, (source)._name_)
-#define WRITE_INT(source, _name_) write_int_option(outstr, indent, #_name_, (source)._name_)
-#define WRITE_UINT(source, _name_) write_uint_option(outstr, indent, #_name_, (source)._name_)
-#define WRITE_INT_UNIT(source, _name_, _unit_) write_int_unit_option(outstr, indent, #_name_, (source)._name_, _unit_)
-#define WRITE_CHAR(source, _name_) write_char_option(outstr, indent, #_name_, (source)._name_)
-#define WRITE_COLOR(source, _name_) write_color_option(outstr, indent, #_name_, &(source)._name_)
+#define WRITE_BOOL(_source_, _name_) write_bool_option(outstr, indent, #_name_, (_source_)._name_)
+#define WRITE_INT(_source_, _name_) write_int_option(outstr, indent, #_name_, (_source_)._name_)
+#define WRITE_UINT(_source_, _name_) write_uint_option(outstr, indent, #_name_, (_source_)._name_)
+#define WRITE_INT_UNIT(_source_, _name_, _unit_) write_int_unit_option(outstr, indent, #_name_, (_source_)._name_, _unit_)
+#define WRITE_CHAR(_source_, _name_) write_char_option(outstr, indent, #_name_, (_source_)._name_)
+#define WRITE_COLOR(_source_, _name_) write_color_option(outstr, indent, #_name_, &(_source_)._name_)
 
 #define WRITE_SEPARATOR() g_string_append(outstr, "\n")
 #define WRITE_SUBTITLE(_title_) g_string_append_printf(outstr, "\n\n<!-- "_title_" -->\n\n")
 #define WRITE_STRING(_str_) do { write_indent(outstr, indent); g_string_append_printf(outstr, _str_); } while (0)
 
-#define READ_BOOL(target, _name_) read_bool_option(option, #_name_, value, &(target)._name_)
-#define READ_INT(target, _name_) read_int_option(option, #_name_, value, &(target)._name_)
-#define READ_UINT(target, _name_) read_uint_option(option, #_name_, value, &(target)._name_)
-#define READ_INT_CLAMP(target, _name_, _min_, _max_) read_int_option_clamp(option, #_name_, value, &(target)._name_, _min_, _max_)
-#define READ_UINT_CLAMP(target, _name_, _min_, _max_) read_uint_option_clamp(option, #_name_, value, &(target)._name_, _min_, _max_)
-#define READ_INT_UNIT(target, _name_, _unit_) read_int_unit_option(option, #_name_, value, &(target)._name_, _unit_)
-#define READ_CHAR(target, _name_) read_char_option(option, #_name_, value, &(target)._name_)
-#define READ_COLOR(target, _name_) read_color_option(option, #_name_, value, &(target)._name_)
+#define READ_BOOL(_target_, _name_) read_bool_option(option, #_name_, value, &(_target_)._name_)
+#define READ_INT(_target_, _name_) read_int_option(option, #_name_, value, &(_target_)._name_)
+#define READ_UINT(_target_, _name_) read_uint_option(option, #_name_, value, &(_target_)._name_)
+#define READ_INT_CLAMP(_target_, _name_, _min_, _max_) read_int_option_clamp(option, #_name_, value, &(_target_)._name_, _min_, _max_)
+#define READ_UINT_CLAMP(_target_, _name_, _min_, _max_) read_uint_option_clamp(option, #_name_, value, &(_target_)._name_, _min_, _max_)
+#define READ_INT_UNIT(_target_, _name_, _unit_) read_int_unit_option(option, #_name_, value, &(_target_)._name_, _unit_)
+#define READ_CHAR(_target_, _name_) read_char_option(option, #_name_, value, &(_target_)._name_)
+#define READ_COLOR(_target_, _name_) read_color_option(option, #_name_, value, &(_target_)._name_)
 
-#define READ_BOOL_FULL(name, target) read_bool_option(option, name, value, &(target))
-#define READ_INT_FULL(name, target) read_int_option(option, name, value, &(target))
-#define READ_UINT_FULL(name, target) read_uint_option(option, name, value, &(target))
-#define READ_INT_CLAMP_FULL(name, target, _min_, _max_) read_int_option_clamp(option, name, value, &(target), _min_, _max_)
-#define READ_INT_UNIT_FULL(name, target, _unit_) read_int_unit_option(option, name, value, &(target), _unit_)
-#define READ_CHAR_FULL(name, target) read_char_option(option, name, value, &(target))
-#define READ_COLOR_FULL(name, target) read_color_option(option, name, value, &(target))
+#define READ_BOOL_FULL(_name_, _target_) read_bool_option(option, _name_, value, &(_target_))
+#define READ_INT_FULL(_name_, _target_) read_int_option(option, _name_, value, &(_target_))
+#define READ_UINT_FULL(_name_, _target_) read_uint_option(option, _name_, value, &(_target_))
+#define READ_INT_CLAMP_FULL(_name_, _target_, _min_, _max_) read_int_option_clamp(option, _name_, value, &(_target_), _min_, _max_)
+#define READ_INT_UNIT_FULL(_name_, _target_, _unit_) read_int_unit_option(option, _name_, value, &(_target_), _unit_)
+#define READ_CHAR_FULL(_name_, _target_) read_char_option(option, _name_, value, &(_target_))
+#define READ_COLOR_FULL(_name_, _target_) read_color_option(option, _name_, value, &(_target_))