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, 675 Mass Ave, Cambridge, MA 02139, USA. */
24 static int next_index
;
25 charinfo
*translation
;
29 unsigned char special_translation
;
30 unsigned char hyphenation_code
;
32 unsigned char ascii_code
;
34 char transparent_translate
; // non-zero means translation applies to
35 // to transparent throughput
41 OVERLAPS_HORIZONTALLY
= 8,
42 OVERLAPS_VERTICALLY
= 16,
50 TRANSLATE_STRETCHABLE_SPACE
,
51 TRANSLATE_HYPHEN_INDICATOR
57 int overlaps_vertically();
58 int overlaps_horizontally();
59 int can_break_before();
60 int can_break_after();
62 unsigned char get_hyphenation_code();
63 unsigned char get_ascii_code();
64 void set_hyphenation_code(unsigned char);
65 void set_ascii_code(unsigned char);
66 charinfo
*get_translation(int = 0);
67 void set_translation(charinfo
*, int);
68 void set_flags(unsigned char);
69 void set_special_translation(int, int);
70 int get_special_translation(int = 0);
71 macro
*set_macro(macro
*);
73 int first_time_not_found();
79 charinfo
*get_charinfo(symbol
);
80 extern charinfo
*charset_table
[];
81 charinfo
*get_charinfo_by_number(int);
83 inline int charinfo::overlaps_horizontally()
85 return flags
& OVERLAPS_HORIZONTALLY
;
88 inline int charinfo::overlaps_vertically()
90 return flags
& OVERLAPS_VERTICALLY
;
93 inline int charinfo::can_break_before()
95 return flags
& BREAK_BEFORE
;
98 inline int charinfo::can_break_after()
100 return flags
& BREAK_AFTER
;
103 inline int charinfo::ends_sentence()
105 return flags
& ENDS_SENTENCE
;
108 inline int charinfo::transparent()
110 return flags
& TRANSPARENT
;
113 inline int charinfo::numbered()
115 return flags
& NUMBERED
;
118 inline charinfo
*charinfo::get_translation(int transparent_throughput
)
120 return (transparent_throughput
&& !transparent_translate
125 inline unsigned char charinfo::get_hyphenation_code()
127 return hyphenation_code
;
130 inline unsigned char charinfo::get_ascii_code()
135 inline void charinfo::set_flags(unsigned char c
)
140 inline int charinfo::get_index()
145 inline int charinfo::get_special_translation(int transparent_throughput
)
147 return (transparent_throughput
&& !transparent_translate
149 : special_translation
);
152 inline macro
*charinfo::get_macro()
157 inline int charinfo::first_time_not_found()