-/* $Id: mdoc_html.c,v 1.25 2009/10/07 14:50:28 kristaps Exp $ */
+/* $Id: mdoc_html.c,v 1.29 2009/10/13 10:57:25 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
#include "out.h"
#include "html.h"
#include "mdoc.h"
+#include "main.h"
#define INDENT 5
#define HALFINDENT 3
static void a2width(const char *, struct roffsu *);
static void a2offs(const char *, struct roffsu *);
+
static int a2list(const struct mdoc_node *);
static void mdoc_root_post(MDOC_ARGS);
static int mdoc_root_pre(MDOC_ARGS);
-static int mdoc_it_block_pre(MDOC_ARGS, int,
- struct roffsu *, int,
- struct roffsu *);
-static int mdoc_it_head_pre(MDOC_ARGS, int,
- struct roffsu *);
-static int mdoc_it_body_pre(MDOC_ARGS, int);
static void mdoc__x_post(MDOC_ARGS);
static int mdoc__x_pre(MDOC_ARGS);
static int mdoc_fo_pre(MDOC_ARGS);
static int mdoc_ic_pre(MDOC_ARGS);
static int mdoc_in_pre(MDOC_ARGS);
+static int mdoc_it_block_pre(MDOC_ARGS, int, int,
+ struct roffsu *, struct roffsu *);
+static int mdoc_it_head_pre(MDOC_ARGS, int,
+ struct roffsu *);
+static int mdoc_it_body_pre(MDOC_ARGS, int);
static int mdoc_it_pre(MDOC_ARGS);
static int mdoc_lb_pre(MDOC_ARGS);
static int mdoc_li_pre(MDOC_ARGS);
/* ARGSUSED */
static int
-mdoc_it_block_pre(MDOC_ARGS, int type, struct roffsu *offs,
- int comp, struct roffsu *width)
+mdoc_it_block_pre(MDOC_ARGS, int type, int comp,
+ struct roffsu *offs, struct roffsu *width)
{
struct htmlpair tag;
const struct mdoc_node *nn;
if (MDOC_BODY == n->type)
return(mdoc_it_body_pre(m, n, h, type));
if (MDOC_BLOCK == n->type)
- return(mdoc_it_block_pre(m, n, h, type,
- &offs, comp, &width));
+ return(mdoc_it_block_pre(m, n, h, type, comp,
+ &offs, &width));
/* Override column widths. */
{
struct htmlpair tag;
+ print_otag(h, TAG_DIV, 0, NULL);
PAIR_CLASS_INIT(&tag, "config");
print_otag(h, TAG_SPAN, 1, &tag);
return(1);
assert(n->child->string);
sp = n->child->string;
- if ((ep = strchr(sp, ' '))) {
+ ep = strchr(sp, ' ');
+ if (NULL != ep) {
PAIR_CLASS_INIT(&tag[0], "ftype");
t = print_otag(h, TAG_SPAN, 1, tag);