summaryrefslogtreecommitdiffstatshomepage
path: root/html.h
diff options
context:
space:
mode:
Diffstat (limited to 'html.h')
-rw-r--r--html.h25
1 files changed, 12 insertions, 13 deletions
diff --git a/html.h b/html.h
index 92fbeaee..5f462d97 100644
--- a/html.h
+++ b/html.h
@@ -1,4 +1,4 @@
-/* $Id: html.h,v 1.22 2010/01/29 14:39:38 kristaps Exp $ */
+/* $Id: html.h,v 1.23 2010/04/05 08:51:56 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -90,18 +90,17 @@ struct htmlpair {
const char *val;
};
-#define PAIR_CLASS_INIT(p, v) \
- do { (p)->key = ATTR_CLASS; \
- (p)->val = (v); } while (/* CONSTCOND */ 0)
-#define PAIR_HREF_INIT(p, v) \
- do { (p)->key = ATTR_HREF; \
- (p)->val = (v); } while (/* CONSTCOND */ 0)
-#define PAIR_STYLE_INIT(p, h) \
- do { (p)->key = ATTR_STYLE; \
- (p)->val = (h)->buf; } while (/* CONSTCOND */ 0)
-#define PAIR_SUMMARY_INIT(p, v) \
- do { (p)->key = ATTR_SUMMARY; \
- (p)->val = (v); } while (/* CONSTCOND */ 0)
+#define PAIR_INIT(p, t, v) \
+ do { \
+ (p)->key = (t); \
+ (p)->val = (v); \
+ } while (/* CONSTCOND */ 0)
+
+#define PAIR_ID_INIT(p, v) PAIR_INIT(p, ATTR_ID, v)
+#define PAIR_CLASS_INIT(p, v) PAIR_INIT(p, ATTR_CLASS, v)
+#define PAIR_HREF_INIT(p, v) PAIR_INIT(p, ATTR_HREF, v)
+#define PAIR_STYLE_INIT(p, h) PAIR_INIT(p, ATTR_STYLE, (h)->buf)
+#define PAIR_SUMMARY_INIT(p, v) PAIR_INIT(p, ATTR_SUMMARY, v)
enum htmltype {
HTML_HTML_4_01_STRICT,