]>
git.cameronkatri.com Git - mandoc.git/blob - tbl_html.c
1 /* $Id: tbl_html.c,v 1.1 2011/01/04 10:29:41 kristaps Exp $ */
3 * Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
31 print_tbl(struct html
*h
, const struct tbl_span
*sp
)
33 const struct tbl_head
*hp
;
34 const struct tbl_dat
*dp
;
38 case (TBL_SPAN_HORIZ
):
40 case (TBL_SPAN_DHORIZ
):
46 /* Inhibit printing of spaces: we do padding ourselves. */
48 h
->flags
|= HTML_NONOSPACE
;
49 h
->flags
|= HTML_NOSPACE
;
51 print_otag(h
, TAG_TABLE
, 0, NULL
);
52 print_otag(h
, TAG_TR
, 0, NULL
);
55 for (hp
= sp
->head
; hp
; hp
= hp
->next
) {
59 case (TBL_HEAD_DVERT
):
64 tt
= print_otag(h
, TAG_TD
, 0, NULL
);
66 print_text(h
, dp
->string
);
71 h
->flags
&= ~HTML_NONOSPACE
;