| 1702 | Keep track of this total so we know when to stop printing */ |
| 1703 | |
| 1704 | static void |
| 1705 | init_page (void) |
| 1706 | { |
| 1707 | int j; |
| 1708 | COLUMN *p; |
| 1709 | |
| 1710 | if (storing_columns) |
| 1711 | { |
| 1712 | store_columns (); |
| 1713 | for (j = columns - 1, p = column_vector; j; --j, ++p) |
| 1714 | { |
| 1715 | p->lines_to_print = p->lines_stored; |
| 1716 | } |
| 1717 | |
| 1718 | /* Last column. */ |
| 1719 | if (balance_columns) |
| 1720 | { |
| 1721 | p->lines_to_print = p->lines_stored; |
| 1722 | } |
| 1723 | /* Since we're not balancing columns, we don't need to store |
| 1724 | the rightmost column. Read it straight from the file. */ |
| 1725 | else |
| 1726 | { |
| 1727 | if (p->status == OPEN) |
| 1728 | { |
| 1729 | p->lines_to_print = lines_per_body; |
| 1730 | } |
| 1731 | else |
| 1732 | p->lines_to_print = 0; |
| 1733 | } |
| 1734 | } |
| 1735 | else |
| 1736 | for (j = columns, p = column_vector; j; --j, ++p) |
| 1737 | if (p->status == OPEN) |
| 1738 | { |
| 1739 | p->lines_to_print = lines_per_body; |
| 1740 | } |
| 1741 | else |
| 1742 | p->lines_to_print = 0; |
| 1743 | } |
| 1744 | |
| 1745 | /* Align empty columns and print separators. |
| 1746 | Empty columns will be formed by files with status ON_HOLD or CLOSED |
no test coverage detected