From b3ea03504ba905470ba5c486ba69062c89034488 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Mon, 10 Jan 2011 14:40:30 +0000 Subject: First, make extra data cells be thrown away. This makes "dp->layout" always hold, which cleans up the table stuff a bit. Second, set a "spans" value per data cell consisting of the number of skipped TBL_CELL_SPAN layout cells. Third, make tbl_term.c understand how to skip over spanned sections when iterating over the header queue. What remains is to calculate the widths of spanned cells. --- mandoc.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'mandoc.h') diff --git a/mandoc.h b/mandoc.h index 9dd448e6..260ce40a 100644 --- a/mandoc.h +++ b/mandoc.h @@ -1,4 +1,4 @@ -/* $Id: mandoc.h,v 1.49 2011/01/06 13:45:47 kristaps Exp $ */ +/* $Id: mandoc.h,v 1.50 2011/01/10 14:40:30 kristaps Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons * @@ -100,9 +100,6 @@ enum mandocerr { MANDOCERR_BADESCAPE, /* unknown escape sequence */ MANDOCERR_BADQUOTE, /* unterminated quoted string */ - /* related to tables */ - MANDOCERR_TBLEXTRADAT, /* extra data cells */ - MANDOCERR_ERROR, /* ===== start of errors ===== */ /* related to tables */ @@ -113,6 +110,7 @@ enum mandocerr { MANDOCERR_TBLNODATA, /* no table data cells specified */ MANDOCERR_TBLIGNDATA, /* ignore data in cell */ MANDOCERR_TBLBLOCK, /* data block still open */ + MANDOCERR_TBLEXTRADAT, /* ignoring extra data cells */ MANDOCERR_ROFFLOOP, /* input stack limit exceeded, infinite loop? */ MANDOCERR_BADCHAR, /* skipping bad character */ @@ -238,6 +236,7 @@ enum tbl_datt { */ struct tbl_dat { struct tbl_cell *layout; /* layout cell: CAN BE NULL */ + int spans; /* how many spans follow */ struct tbl_dat *next; char *string; enum tbl_datt pos; -- cgit v1.2.3-56-ge451