summaryrefslogtreecommitdiffstats
path: root/html.h
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-04-05 08:51:56 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-04-05 08:51:56 +0000
commit7712235518f4f0e8306d12c39d6a78320510875b (patch)
treef6df32231d7b6d34114657b25ee5882db7cc8222 /html.h
parent18c5ee1fd1578e342a34f2beeaf097da8ad27692 (diff)
downloadmandoc-7712235518f4f0e8306d12c39d6a78320510875b.tar.gz
Fix in `Mt' mailto from a patch by Tim van der Molen.
Fixed PAIR_xxx_INIT macros -- this are to be unified. Have `Vt', `Fn', `Ft', and `Fo' print whitespace afterward, instead of before.
Diffstat (limited to 'html.h')
-rw-r--r--html.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/html.h b/html.h
index 41755bbc..bf421cee 100644
--- a/html.h
+++ b/html.h
@@ -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,