summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/html.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2010-04-07 23:15:06 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2010-04-07 23:15:06 +0000
commit7137104835ca81318a9a2f20dbb47bfad38ea829 (patch)
tree851045dd0fa48e8867b4ee036b854bd6c4b80a15 /usr.bin/mandoc/html.h
parent87cc166866f92a490fc02f4168d4ce0f3af45a70 (diff)
Merge the good parts of 1.9.23,
avoid the bad parts of 1.9.23, and keep local patches. Input in general: * Basic handling of roff-style font escapes \f, \F. * Quoted punctuation does not count as punctuation. mdoc(7) parser: * Make .Pf callable; noted by Claus Assmann. * Let .Bd and .Bl ignore unknown arguments; noted by deraadt@. * Do not warn when .Er is used outside certain sections. * Replace mdoc_node_free[list] by mdoc_node_delete. * Replace #define by enum for rew*() return values. man(7) parser: * When .TH is missing, use default section and date. Output in general: * Curly braces do not count as punctuation. * No space after .Fl w/o args when a macro follows on the same line. HTML output: * Unify PAIR_*_INIT macros, introduce new PAIR_ID_INIT(). * Print whitespace after, not before .Vt .Fn .Ft .Fo. Checked that all manuals in base still build.
Diffstat (limited to 'usr.bin/mandoc/html.h')
-rw-r--r--usr.bin/mandoc/html.h25
1 files changed, 12 insertions, 13 deletions
diff --git a/usr.bin/mandoc/html.h b/usr.bin/mandoc/html.h
index 2ac9402ef75..7bb789c98d0 100644
--- a/usr.bin/mandoc/html.h
+++ b/usr.bin/mandoc/html.h
@@ -1,4 +1,4 @@
-/* $Id: html.h,v 1.5 2010/02/18 02:11:26 schwarze Exp $ */
+/* $Id: html.h,v 1.6 2010/04/07 23:15:05 schwarze 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,