/* Copyright (C) 1989, 1990 Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.uucp)
This file is part of groff.
groff is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 1, or (at your option) any later
groff is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
You should have received a copy of the GNU General Public License along
with groff; see the file LICENSE. If not, write to the Free Software
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
unsigned char hyphenation_code
;
hyphen_list(unsigned char code
, hyphen_list
*p
= 0);
void hyphenate(hyphen_list
*, unsigned);
enum hyphenation_type
{ HYPHEN_MIDDLE
, HYPHEN_BOUNDARY
, HYPHEN_INHIBIT
};
class diverted_space_node
;
node
*add_char(charinfo
*c
, environment
*, hunits
*widthp
);
virtual node
*copy() = 0;
virtual hunits
subscript_correction();
virtual hunits
italic_correction();
virtual hunits
left_italic_correction();
virtual int merge_space(hunits
);
virtual vunits
vertical_width();
virtual node
*last_char_node();
virtual void vertical_extent(vunits
*min
, vunits
*max
);
virtual int character_type();
virtual void set_vertical_size(vertical_size
*);
virtual int ends_sentence();
virtual node
*merge_self(node
*);
virtual node
*add_discretionary_hyphen();
virtual node
*add_self(node
*, hyphen_list
**);
virtual hyphen_list
*get_hyphen_list(hyphen_list
*s
= 0);
virtual void ascii_print(ascii_output_file
*);
virtual void asciify(macro
*);
virtual int discardable();
virtual void spread_space(int *, hunits
*);
virtual void freeze_space();
virtual breakpoint
*get_breakpoints(hunits width
, int nspaces
,
virtual void split(int, node
**, node
**);
virtual hyphenation_type
get_hyphenation_type();
virtual int reread(int *);
virtual token_node
*get_token_node();
virtual int overlaps_vertically();
virtual int overlaps_horizontally();
virtual int interpret(macro
*);
virtual node
*merge_glyph_node(glyph_node
*);
virtual tfont
*get_tfont();
virtual void tprint(troff_output_file
*);
virtual void zero_width_tprint(troff_output_file
*);
node
*add_italic_correction(hunits
*);
virtual int same(node
*) = 0;
virtual const char *type() = 0;
inline node::node() : next(0)
inline node::node(node
*n
) : next(n
)
// 0 means it doesn't, 1 means it does, 2 means it's transparent
int node_list_ends_sentence(node
*);
class line_start_node
: public node
{
node
*copy() { return new line_start_node
; }
class space_node
: public node
{
static space_node
*free_list
;
void operator delete(void *);
space_node(hunits
, int, node
* = 0);
space_node(hunits d
, node
*p
= 0);
void *operator new(size_t);
void spread_space(int*, hunits
*);
void tprint(troff_output_file
*);
breakpoint
*get_breakpoints(hunits width
, int nspaces
, breakpoint
*rest
= 0,
void split(int, node
**, node
**);
void ascii_print(ascii_output_file
*);
class word_space_node
: public space_node
{
word_space_node(hunits
, int, node
* = 0);
word_space_node(hunits
, node
* = 0);
void tprint(troff_output_file
*);
class diverted_space_node
: public node
{
diverted_space_node(vunits d
, node
*p
= 0);
class diverted_copy_file_node
: public node
{
diverted_copy_file_node(symbol s
, node
*p
= 0);
class extra_size_node
: public node
{
extra_size_node(vunits i
) : n(i
) {}
void set_vertical_size(vertical_size
*);
class vertical_size_node
: public node
{
vertical_size_node(vunits i
) : n(i
) {}
void set_vertical_size(vertical_size
*);
class hmotion_node
: public node
{
hmotion_node(hunits i
, node
*next
= 0) : node(next
), n(i
) {}
void tprint(troff_output_file
*);
void ascii_print(ascii_output_file
*);
class space_char_hmotion_node
: public hmotion_node
{
space_char_hmotion_node(hunits i
, node
*next
= 0);
void ascii_print(ascii_output_file
*);
class vmotion_node
: public node
{
vmotion_node(vunits i
) : n(i
) {}
void tprint(troff_output_file
*);
class hline_node
: public node
{
hline_node(hunits i
, node
*c
, node
*next
= 0) : node(next
), x(i
), n(c
) {}
void tprint(troff_output_file
*);
class vline_node
: public node
{
vline_node(vunits i
, node
*c
, node
*next
= 0) : node(next
), x(i
), n(c
) {}
void tprint(troff_output_file
*);
void vertical_extent(vunits
*, vunits
*);
class dummy_node
: public node
{
dummy_node(node
*nd
= 0) : node(nd
) {}
hyphenation_type
get_hyphenation_type();
class transparent_dummy_node
: public node
{
transparent_dummy_node() {}
hyphenation_type
get_hyphenation_type();
class zero_width_node
: public node
{
zero_width_node(node
*gn
);
void tprint(troff_output_file
*);
void vertical_extent(vunits
*min
, vunits
*max
);
class left_italic_corrected_node
: public node
{
left_italic_corrected_node(node
* = 0);
~left_italic_corrected_node();
void tprint(troff_output_file
*);
void ascii_print(ascii_output_file
*);
void vertical_extent(vunits
*, vunits
*);
int overlaps_horizontally();
int overlaps_vertically();
hyphenation_type
get_hyphenation_type();
hunits
italic_correction();
hunits
subscript_correction();
hyphen_list
*get_hyphen_list(hyphen_list
*ss
= 0);
node
*add_self(node
*, hyphen_list
**);
node
*merge_glyph_node(glyph_node
*);
class overstrike_node
: public node
{
void tprint(troff_output_file
*);
void overstrike(node
*); // add another node to be overstruck
class bracket_node
: public node
{
void tprint(troff_output_file
*);
void bracket(node
*); // add another node to be overstruck
class special_node
: public node
{
void tprint_start(troff_output_file
*);
void tprint_char(troff_output_file
*, unsigned char);
void tprint_end(troff_output_file
*);
special_node(const macro
&);
void tprint(troff_output_file
*);
class composite_node
: public node
{
composite_node(node
*, charinfo
*, font_size
, node
* = 0);
void tprint(troff_output_file
*);
hyphenation_type
get_hyphenation_type();
int overlaps_horizontally();
int overlaps_vertically();
void ascii_print(ascii_output_file
*);
hyphen_list
*get_hyphen_list(hyphen_list
*tail
);
node
*add_self(node
*, hyphen_list
**);
void vertical_extent(vunits
*, vunits
*);
class draw_node
: public node
{
draw_node(char, hvpair
*, int, font_size
);
void tprint(troff_output_file
*);
node
*make_node(charinfo
*ci
, environment
*);
int character_exists(charinfo
*, environment
*);
int same_node_list(node
*n1
, node
*n2
);
node
*reverse_node_list(node
*n
);
void delete_node_list(node
*);
node
*copy_node_list(node
*);
hunits
env_digit_width(environment
*);
hunits
env_space_width(environment
*);
hunits
env_narrow_space_width(environment
*);
hunits
env_half_narrow_space_width(environment
*);
int get_bold_fontno(int f
);
inline hyphen_list::hyphen_list(unsigned char code
, hyphen_list
*p
)
: hyphenation_code(code
), next(p
), hyphen(0), breakable(0)
extern int mount_font(int n
, symbol
, symbol
= NULL_SYMBOL
);
extern void mount_style(int n
, symbol
);
extern int is_good_fontno(int n
);
extern int symbol_fontno(symbol
);
extern int next_available_font_position();
extern void init_size_table(int *);
extern int get_underline_fontno();
char make_g_plus_plus_shut_up
;
virtual void flush() = 0;
virtual void transparent_char(unsigned char) = 0;
virtual void print_line(hunits x
, vunits y
, node
*n
,
vunits before
, vunits after
) = 0;
virtual void begin_page(int pageno
, vunits page_length
) = 0;
virtual void copy_file(hunits x
, vunits y
, const char *filename
) = 0;
virtual int is_printing() = 0;
virtual void vjustify(vunits
, symbol
);
extern char *pipe_command
;
extern output_file
*the_output
;
extern void init_output();
int in_output_page_list(int n
);
static void invalidate_fontno(int);
friend void invalidate_fontno(int);
font_family
*lookup_family(symbol
);