Implement `x' specifier for expanded columns. Contrary to old DWB
commit0522c90cb7587305143f467b3dc127294ea85b9d
authorWerner LEMBERG <wl@gnu.org>
Sun, 16 Nov 2008 17:22:21 +0000 (16 17:22 +0000)
committerWerner LEMBERG <wl@gnu.org>
Sun, 16 Nov 2008 17:22:21 +0000 (16 17:22 +0000)
tree868773652633548fdf72624a373d15bdda83669a
parentcc2888e147cfe6d55ff6687f917badfb50772d48
Implement `x' specifier for expanded columns.  Contrary to old DWB
tbl, more than a single `x' specifier can be used.  At the same
time, remove most of the code from change 2007-02-09 which collides
with the new implementation.

* src/preproc/tbl/main.cpp (format): Add `expand' array.
(format::format, format::~format): Updated.
(input_entry_format): Add `expand' field.
(input_entry_format::input_entry_format): Updated.
(input_entry_format::debug_print): Handle `expand'.
(process_format): Handle `x' specifier.
(process_data): Updated.

* src/preproc/tbl/table.cpp (AVAILABLE_REG, COLCOUNT_REG): Remove.
(EXPAND_REG): New macro.
(table_entry::divert, block_entry::divert,
alphabetic_block_entry::divert): Add parameter to control whether
expanded columns shall be handled.
(block_entry::do_width): Remove.
(block_entry::do_divert): Add parameter to control whether expanded
columns shall be handled.
Treat expanded columns like columns with a minimum width.
Remove `experimental' code.
(table::table, table::~table, table::allocate): Updated.
(table::set_expand_column): New function.
(table::count_block_columns): Replace with...
(table::count_expand_columns): This function.
(table::divide_span): Handle expanded columns the same as equal
columns.
(table::sum_columns): Add parameter to control whether expanded
columns shall be handled.
(table::compute_available_block_width): Replace with...
(table::compute_expand_width): This function.
(table::compute_total_separation): New function, taking code from
`compute_separation_factor'.
(table::compute_separation_factor): Simpler code.  The check for the
`EXPAND' flag has been moved to the caller.
(table::compute_widths): Add `top-level' changes to handle expanded
blocks.

* src/preproc/tbl/table.h (table): New field `total_separation'.
Remove `blockflag' array.
Add `expand' array.
Update member function declarations.

* src/preproc/tbl/tbl.man: Document `x' specifier.
Expand documentation to cover all aspects of Lesk's tbl reference.

* NEWS: Document `x' specifier.
ChangeLog
NEWS
src/preproc/tbl/main.cpp
src/preproc/tbl/table.cpp
src/preproc/tbl/table.h
src/preproc/tbl/tbl.man