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