summaryrefslogtreecommitdiffstats
path: root/html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-10-13 10:21:24 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-10-13 10:21:24 +0000
commitfd6f541ce489626cb695b97a00cee1e243aa40a4 (patch)
treee6351231ae08a23c10a8cc87c61d52fa63093132 /html.c
parent734d66a40fa33f6cc0d644258eac531c1774e3b6 (diff)
downloadmandoc-fd6f541ce489626cb695b97a00cee1e243aa40a4.tar.gz
Clean up consts (noted by Joerg Sonnenberger and Ulrich Sporlein).
Diffstat (limited to 'html.c')
-rw-r--r--html.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/html.c b/html.c
index 3ae5e7b2..2c2f65da 100644
--- a/html.c
+++ b/html.c
@@ -21,6 +21,7 @@
#include <err.h>
#include <stdio.h>
#include <stdarg.h>
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@@ -29,11 +30,13 @@
#include "chars.h"
#include "html.h"
+#define UNCONST(a) ((void *)(uintptr_t)(const void *)(a))
+
#define DOCTYPE "-//W3C//DTD HTML 4.01//EN"
#define DTD "http://www.w3.org/TR/html4/strict.dtd"
struct htmldata {
- char *name;
+ const char *name;
int flags;
#define HTML_CLRLINE (1 << 0)
#define HTML_NOSTACK (1 << 1)
@@ -87,7 +90,8 @@ void *
html_alloc(char *outopts)
{
struct html *h;
- char *toks[4], *v;
+ const char *toks[4];
+ char *v;
toks[0] = "style";
toks[1] = "man";
@@ -106,7 +110,7 @@ html_alloc(char *outopts)
}
while (outopts && *outopts)
- switch (getsubopt(&outopts, toks, &v)) {
+ switch (getsubopt(&outopts, UNCONST(toks), &v)) {
case (0):
h->style = v;
break;
@@ -600,7 +604,7 @@ void
bufcat_su(struct html *h, const char *p, const struct roffsu *su)
{
double v;
- char *u;
+ const char *u;
v = su->scale;