summaryrefslogtreecommitdiff
path: root/src/html/html_form_element.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/html/html_form_element.c')
-rw-r--r--src/html/html_form_element.c60
1 files changed, 32 insertions, 28 deletions
diff --git a/src/html/html_form_element.c b/src/html/html_form_element.c
index 0688cd6..d0a453d 100644
--- a/src/html/html_form_element.c
+++ b/src/html/html_form_element.c
@@ -184,42 +184,46 @@ dom_exception dom_html_form_element_get_length(dom_html_form_element *ele,
return dom_html_collection_get_length(ele->col, len);
}
-#define SIMPLE_GET_SET(fattr,attr) \
-dom_exception dom_html_form_element_get_##fattr(dom_html_form_element *element, \
- dom_string **fattr) \
-{ \
- dom_exception ret; \
- dom_string *_memo_##attr; \
+#define SIMPLE_GET_SET(attr) \
+ dom_exception dom_html_form_element_get_##attr( \
+ dom_html_form_element *element, \
+ dom_string **attr) \
+ { \
+ dom_exception ret; \
+ dom_string *_memo_##attr; \
\
- _memo_##attr = \
- ((struct dom_html_document *) \
- ((struct dom_node_internal *)element)->owner)->memoised[hds_##attr]; \
+ _memo_##attr = \
+ ((struct dom_html_document *) \
+ ((struct dom_node_internal *)element)->owner)->\
+ memoised[hds_##attr]; \
\
- ret = dom_element_get_attribute(element, _memo_##attr, fattr); \
+ ret = dom_element_get_attribute(element, _memo_##attr, attr); \
\
- return ret; \
-} \
+ return ret; \
+ } \
\
-dom_exception dom_html_form_element_set_##fattr(dom_html_form_element *element, \
- dom_string *fattr) \
-{ \
- dom_exception ret; \
- dom_string *_memo_##attr; \
+ dom_exception dom_html_form_element_set_##attr( \
+ dom_html_form_element *element, \
+ dom_string *attr) \
+ { \
+ dom_exception ret; \
+ dom_string *_memo_##attr; \
\
- _memo_##attr = \
- ((struct dom_html_document *) \
- ((struct dom_node_internal *)element)->owner)->memoised[hds_##attr]; \
+ _memo_##attr = \
+ ((struct dom_html_document *) \
+ ((struct dom_node_internal *)element)->owner)->\
+ memoised[hds_##attr]; \
\
- ret = dom_element_set_attribute(element, _memo_##attr, fattr); \
+ ret = dom_element_set_attribute(element, _memo_##attr, attr); \
\
- return ret; \
-}
+ return ret; \
+ }
-SIMPLE_GET_SET(accept_charset,accept_charset)
-SIMPLE_GET_SET(action,action)
-SIMPLE_GET_SET(enctype,enctype)
-SIMPLE_GET_SET(method,method)
-SIMPLE_GET_SET(target,target)
+SIMPLE_GET_SET(accept_charset)
+SIMPLE_GET_SET(action)
+SIMPLE_GET_SET(enctype)
+SIMPLE_GET_SET(method)
+SIMPLE_GET_SET(target)
/**