aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit7ac873295958b94652c6afe6869cab75433c5e4d (patch)
tree38c4d40d57aa18ae01acd6e839207abe6db8a10e /html.h
parentedb196b9dfc9d3801bcadd24bd2fcf409f6e5c9c (diff)
downloadmandoc-7ac873295958b94652c6afe6869cab75433c5e4d.tar.gz
mandoc-7ac873295958b94652c6afe6869cab75433c5e4d.tar.zst
mandoc-7ac873295958b94652c6afe6869cab75433c5e4d.zip
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.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,