2 /* Copyright (C) 1989, 1990, 1991, 1992, 2001, 2002
3 Free Software Foundation, Inc.
4 Written by James Clark (jjc@jclark.com)
6 This file is part of groff.
8 groff is free software; you can redistribute it and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 2, or (at your option) any later
13 groff is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 You should have received a copy of the GNU General Public License along
19 with groff; see the file COPYING. If not, write to the Free Software
20 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
31 #include "stringclass.h"
40 struct entry_modifier {
41 inc_number point_size;
42 inc_number vertical_spacing;
44 enum { CENTER, TOP, BOTTOM } vertical_alignment;
64 struct entry_format : public entry_modifier {
67 entry_format(format_type);
69 void debug_print() const;
73 struct horizontal_span;
83 char decimal_point_char;
84 vertical_rule *vrule_list;
86 horizontal_span *span_list;
87 table_entry *entry_list;
88 table_entry **entry_list_tailp;
91 char *row_is_all_lines;
92 string *minimum_width;
93 int *column_separation;
98 void build_span_list();
99 void do_hspan(int r, int c);
100 void do_vspan(int r, int c);
101 void allocate(int r);
102 void compute_widths();
103 void divide_span(int, int);
104 void sum_columns(int, int);
105 void compute_separation_factor();
106 void compute_column_positions();
109 void add_stuff(stuff *);
112 void do_vertical_rules();
113 void build_vrule_list();
114 void add_vertical_rule(int, int, int, int);
115 void define_bottom_macro();
116 int vline_spanned(int r, int c);
117 int row_begins_section(int);
118 int row_ends_section(int);
119 void make_columns_equal();
120 void compute_vrule_top_adjust(int, int, string &);
121 void compute_vrule_bot_adjust(int, int, string &);
122 void determine_row_type();
134 table(int nc, unsigned flags, int linesize, char decimal_point_char);
137 void add_text_line(int r, const string &, const char *, int);
138 void add_single_hline(int r);
139 void add_double_hline(int r);
140 void add_entry(int r, int c, const string &, const entry_format *,
141 const char *, int lineno);
142 void add_vlines(int r, const char *);
145 void set_minimum_width(int c, const string &w);
146 void set_column_separation(int c, int n);
147 void set_equal_column(int c);
148 void set_delim(char c1, char c2);
149 void print_single_hline(int r);
150 void print_double_hline(int r);
154 void set_troff_location(const char *, int);