1 /* ---------------------------------------------------------------------------
2 
3    pcallang.h
4 
5    Notes:
6 
7       This file contains various definitions and declarations of items
8       associated with supporting the various languages.
9 
10    Revision history:
11 
12 	4.11.0
13 		B.Marr		2007-12-15
14 
15 		Add support for Slovak language, thanks to Zdenko Podobny.
16 
17 		Add support for Hawaiian language, thanks to Eric Nichols.
18 
19 	4.10.0
20 		B.Marr		2006-07-19
21 
22 		Split actual data definitions from 'pcallang.h', moving them
23 		to new file 'pcallang.c', and left just the external
24 		references here.
25 
26 		Since most of the comments in this file apply to the items
27 		moved to 'pcallang.c', those comments were moved to that file.
28 
29 		Reformatted comments and code to match my standards.
30 
31 */
32 
33 /* ---------------------------------------------------------------------------
34 
35    Header Files
36 
37 */
38 
39 /* ---------------------------------------------------------------------------
40 
41    Type, Struct, & Enum Declarations
42 
43 */
44 
45 /* ---------------------------------------------------------------------------
46 
47    Constant Declarations
48 
49 */
50 
51 #define NUM_LANGUAGES           24      /* *** Change this if adding languages *** */
52 #define LANG_ENGLISH            0
53 #define LANG_GREEK              1
54 #define LANG_ITALIAN            2
55 #define LANG_FRENCH             3
56 #define LANG_GERMAN             4
57 #define LANG_ESPERANTO          5
58 #define LANG_SPANISH            6
59 #define LANG_FINNISH            7
60 #define LANG_SWEDISH            8
61 #define LANG_PORTUGUESE         9
62 #define LANG_UKRAINIAN          10
63 #define LANG_ESTONIAN           11
64 #define LANG_RUSSIAN            12
65 #define LANG_LATVIAN            13
66 #define LANG_LITHUANIAN         14
67 #define LANG_CZECH              15
68 #define LANG_HUNGARIAN          16
69 #define LANG_CATALAN            17
70 #define LANG_POLISH             18
71 #define LANG_DUTCH              19
72 #define LANG_ROMANIAN           20
73 #define LANG_DANISH             21
74 #define LANG_SLOVAK             22
75 #define LANG_HAWAIIAN           23
76 
77 
78 #ifndef LANG_DEFAULT
79 #define LANG_DEFAULT    LANG_ENGLISH
80 #endif
81 
82 /* Define the maximum length of the strings in the 'days_ml[]' array... */
83 #define DAY_LENGTH_MAX_CHARS 20
84 
85 /* Define the maximum length of the strings in the 'lang_id[]' array... */
86 #define LANG_LENGTH_MAX_CHARS 20
87 
88 
89 /* If 'MAPFONTS' is defined, generate PostScript code to re-map text fonts
90  * (cf. pcalinit.ps) according to the definitions of the specified 8-bit
91  * character set.  Note that the overhead to do this slows PostScript down --
92  * especially for small jobs -- so users in English-speaking countries might
93  * prefer to leave 'MAPFONTS' undefined.
94  *
95  * Speakers of languages other than English may select any of the available
96  * remappings by defining 'MAPFONTS' as described in the 'Makefile'.
97  *
98  * Here's a list of the supported remappings...
99  *
100  *    Character Encoding	A.K.A.		Regions/Languages
101  *    ----------------------------------------------------------------
102  *
103  *	ISO 8859-1		Latin1		Western Europe
104  *
105  *						(e.g. Italian, French, German,
106  *						Spanish, Finnish, Swedish,
107  *						Portuguese, Estonian, Catalan,
108  *						etc)
109  *
110  *	ISO 8859-2		Latin2		Central European, Slavic
111  *
112  *						(e.g. Czech, Hungarian)
113  *
114  *	ISO 8859-3		Latin3		South European, Esperanto,
115  *						Galician, Maltest, Turkish
116  *
117  *	ISO 8859-4		Latin4		North European, Old Baltic
118  *
119  *						(e.g. Latvian, Lithuanian)
120  *
121  *	ISO 8859-5		Cyrillic
122  *
123  *	ISO 8859-7		Greek		Modern Greek
124  *
125  *	ISO 8859-9		Latin5		Turkish
126  *
127  *	ISO 8859-10		Latin6		Nordic
128  *
129  *	ISO 8859-11		Thai
130  *
131  *	ISO 8859-13		Latin7		Baltic Rim
132  *
133  *	ISO 8859-14		Latin8		Celtic
134  *
135  *	ISO 8859-15		Latin9/Latin0	Western Europe
136  *						(Latin1 + 'Euro' symbol)
137  *
138  *	KOI8-R					Russian
139  *
140  *	KOI8-U					Ukrainian
141  *
142  *	Roman8
143  *
144  */
145 
146 /*
147  * Define enumerations for each of the available character encodings
148  * (mappings).
149  *
150  * The 'Arabic', 'Hebrew', and 'Latin-10' character encodings are not enabled
151  * because we currently (Aug 2005) have no PostScript encoding vector (see
152  * 'pcalinit.ps') for those character sets.
153  *
154  * 'ISO 8859-12' is not included because that was a draft for 'Latin-7' that
155  * was never implemented and was therefore skipped.
156  *
157  */
158 #define ENC_NONE                0       /* no re-mapping */
159 #define ENC_LATIN_1             1       /* ISO 8859-1 */
160 #define ENC_LATIN_2             2       /* ISO 8859-2 */
161 #define ENC_LATIN_3             3       /* ISO 8859-3 */
162 #define ENC_LATIN_4             4       /* ISO 8859-4 */
163 #define ENC_CYRILLIC            5       /* ISO 8859-5 */
164 #define ENC_ARABIC              6       /* ISO 8859-6 (NOT SUPPORTED) */
165 #define ENC_GREEK               7       /* ISO 8859-7 */
166 #define ENC_HEBREW              8       /* ISO 8859-8 (NOT SUPPORTED) */
167 #define ENC_LATIN_5             9       /* ISO 8859-9 */
168 #define ENC_LATIN_6             10      /* ISO 8859-10 */
169 #define ENC_THAI                11      /* ISO 8859-11 */
170 #define ENC_LATIN_7             12      /* ISO 8859-13 */
171 #define ENC_LATIN_8             13      /* ISO 8859-14 */
172 #define ENC_LATIN_9             14      /* ISO 8859-15 */
173 #define ENC_LATIN_10            15      /* ISO 8859-16 (NOT SUPPORTED) */
174 #define ENC_KOI8_R              16      /* KOI8-R */
175 #define ENC_KOI8_U              17      /* KOI8-U */
176 #define ENC_ROMAN8              18      /* Roman8 */
177 
178 /*
179  * Define the strings which can be used as values for the '-r' (remap
180  * character set) option.
181  */
182 #define MAPPING_LATIN_1         "Latin1"
183 #define MAPPING_LATIN_2         "Latin2"
184 #define MAPPING_LATIN_3         "Latin3"
185 #define MAPPING_LATIN_4         "Latin4"
186 #define MAPPING_CYRILLIC        "Cyrillic"
187 /* #define MAPPING_ARABIC       "Arabic" */
188 #define MAPPING_GREEK           "Greek"
189 /* #define MAPPING_HEBREW       "Hebrew" */
190 #define MAPPING_LATIN_5         "Latin5"
191 #define MAPPING_LATIN_6         "Latin6"
192 #define MAPPING_THAI            "Thai"
193 #define MAPPING_LATIN_7         "Latin7"
194 #define MAPPING_LATIN_8         "Latin8"
195 #define MAPPING_LATIN_9         "Latin9"
196 /* #define MAPPING_LATIN_10     "Latin10" */
197 #define MAPPING_KOI8_R          "KOI8-R"
198 #define MAPPING_KOI8_U          "KOI8-U"
199 #define MAPPING_ROMAN8          "Roman8"
200 
201 /*
202  * If 'MAPFONTS' is defined in the 'Makefile', make sure it's set to one of
203  * the legal values or else invalidate it...
204  */
205 #ifdef MAPFONTS
206 #if     ( \
207         (MAPFONTS != ENC_LATIN_1)      && \
208         (MAPFONTS != ENC_LATIN_2)      && \
209         (MAPFONTS != ENC_LATIN_3)      && \
210         (MAPFONTS != ENC_LATIN_4)      && \
211         (MAPFONTS != ENC_CYRILLIC)     && \
212         /* (MAPFONTS != ENC_ARABIC)    && */ \
213         (MAPFONTS != ENC_GREEK)        && \
214         /* (MAPFONTS != ENC_HEBREW)    && */ \
215         (MAPFONTS != ENC_LATIN_5)      && \
216         (MAPFONTS != ENC_LATIN_6)      && \
217         (MAPFONTS != ENC_THAI)         && \
218         (MAPFONTS != ENC_LATIN_7)      && \
219         (MAPFONTS != ENC_LATIN_8)      && \
220         (MAPFONTS != ENC_LATIN_9)      && \
221         /* (MAPFONTS != ENC_LATIN_10)  && */ \
222         (MAPFONTS != ENC_KOI8_R)       && \
223         (MAPFONTS != ENC_KOI8_U)       && \
224         (MAPFONTS != ENC_ROMAN8)       \
225         )
226 #undef MAPFONTS
227 #define MAPFONTS        ENC_NONE
228 #endif
229 #else
230 #define MAPFONTS        ENC_NONE
231 #endif
232 
233 /* ---------------------------------------------------------------------------
234 
235    Macro Definitions
236 
237 */
238 
239 /* ---------------------------------------------------------------------------
240 
241    Data Declarations (including externals)
242 
243 */
244 
245 extern int input_language;
246 extern int output_language;
247 extern char *months_ml[NUM_LANGUAGES][12];
248 extern char days_ml[NUM_LANGUAGES][7][DAY_LENGTH_MAX_CHARS];
249 extern char days_ml_short[NUM_LANGUAGES][7][DAY_LENGTH_MAX_CHARS];
250 extern char lang_id[NUM_LANGUAGES][LANG_LENGTH_MAX_CHARS];
251 extern int lang_mapping[NUM_LANGUAGES];
252 
253 /* ---------------------------------------------------------------------------
254 
255    External Routine References & Function Prototypes
256 
257 */
258 
259