tbl_html.c revision 95c635efb7c3b86efc493e0447eaec7aecca3f0f
/* $Id: tbl_html.c,v 1.9 2011/09/18 14:14:15 schwarze Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "mandoc.h"
#include "out.h"
#include "html.h"
static size_t html_tbl_strlen(const char *, void *);
/* ARGSUSED */
static size_t
{
return(sz);
}
/* ARGSUSED */
static size_t
html_tbl_strlen(const char *p, void *arg)
{
return(strlen(p));
}
static void
{
}
bufinit(h);
PAIR_STYLE_INIT(&tag, h);
}
}
void
print_tblclose(struct html *h)
{
print_tagq(h, h->tblt);
}
void
{
/* Inhibit printing of spaces: we do padding ourselves. */
html_tblopen(h, sp);
h->flags |= HTML_NONOSPACE;
h->flags |= HTML_NOSPACE;
case (TBL_SPAN_HORIZ):
/* FALLTHROUGH */
case (TBL_SPAN_DHORIZ):
break;
default:
print_stagq(h, tt);
case (TBL_HEAD_VERT):
/* FALLTHROUGH */
case (TBL_HEAD_DVERT):
continue;
case (TBL_HEAD_DATA):
break;
break;
}
}
break;
}
print_tagq(h, tt);
h->flags &= ~HTML_NONOSPACE;
print_tblclose(h);
}
}