aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/html.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-01-17 15:32:43 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-01-17 15:32:43 +0000
commit6506abee45c903b6cd5093a2bf6ece5ac7aed4e3 (patch)
tree420d0dcbb8b9af88f08f2409068672f3b64b161f /html.h
parent24fd28849fa784bd04e3f5bbdb7152253c5d68ba (diff)
downloadmandoc-6506abee45c903b6cd5093a2bf6ece5ac7aed4e3.tar.gz
mandoc-6506abee45c903b6cd5093a2bf6ece5ac7aed4e3.tar.zst
mandoc-6506abee45c903b6cd5093a2bf6ece5ac7aed4e3.zip
Completely delete the buf field of struct html and all the buf*()
interfaces. Such a static buffer was a bad idea in the first place, causing unfixable truncation that was only prevented by triggering an assertion failure. Instead, let the small number of remaining users allocate and free their own, temporary dynamic buffers, or for the case of .Xr and .In, pass the original data to be assembled in print_otag().
Diffstat (limited to 'html.h')
-rw-r--r--html.h17
1 files changed, 1 insertions, 16 deletions
diff --git a/html.h b/html.h
index dfcfb534..ac82683b 100644
--- a/html.h
+++ b/html.h
@@ -1,4 +1,4 @@
-/* $Id: html.h,v 1.74 2017/01/17 01:47:51 schwarze Exp $ */
+/* $Id: html.h,v 1.75 2017/01/17 15:32:43 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -101,8 +101,6 @@ struct html {
char *base_man; /* base for manpage href */
char *base_includes; /* base for include href */
char *style; /* style-sheet URI */
- char buf[BUFSIZ]; /* see bufcat and friends */
- size_t buflen;
struct tag *metaf; /* current open font scope */
enum htmlfont metal; /* last used font */
enum htmlfont metac; /* current font mode */
@@ -125,17 +123,4 @@ void print_tbl(struct html *, const struct tbl_span *);
void print_eqn(struct html *, const struct eqn *);
void print_paragraph(struct html *);
-void bufcat_fmt(struct html *, const char *, ...)
- __attribute__((__format__ (printf, 2, 3)));
-void bufcat(struct html *, const char *);
-void bufcat_id(struct html *, const char *);
-void bufcat_style(struct html *,
- const char *, const char *);
-void bufcat_su(struct html *, const char *,
- const struct roffsu *);
-void bufinit(struct html *);
-void buffmt_man(struct html *,
- const char *, const char *);
-void buffmt_includes(struct html *, const char *);
-
int html_strlen(const char *);