c++11 tidying.
[libsub.git] / src / iso6937_tables.cc
1 /*
2     Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
3
4     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.
8
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
13
14     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software
16     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 */
19
20 /* THIS FILE WAS AUTO-GENERATED BY iso6937.py */
21
22 #include <map>
23 #include "iso6937_tables.h"
24
25 using std::map;
26
27 map<char, wchar_t> sub::iso6937::grave;
28 map<char, wchar_t> sub::iso6937::acute;
29 map<char, wchar_t> sub::iso6937::circumflex;
30 map<char, wchar_t> sub::iso6937::tilde;
31 map<char, wchar_t> sub::iso6937::macron;
32 map<char, wchar_t> sub::iso6937::breve;
33 map<char, wchar_t> sub::iso6937::dot;
34 map<char, wchar_t> sub::iso6937::diaeresis;
35 map<char, wchar_t> sub::iso6937::ring;
36 map<char, wchar_t> sub::iso6937::cedilla;
37 map<char, wchar_t> sub::iso6937::double_acute;
38 map<char, wchar_t> sub::iso6937::ogonek;
39 map<char, wchar_t> sub::iso6937::caron;
40 map<char, wchar_t> sub::iso6937::main;
41 map<char, map<char, wchar_t> *> sub::iso6937::diacriticals;
42
43 void
44 sub::make_iso6937_tables ()
45 {
46         using namespace sub::iso6937;
47
48         grave['A'] = 0x00C0;
49         grave['E'] = 0x00C8;
50         grave['I'] = 0x00CC;
51         grave['O'] = 0x00D2;
52         grave['U'] = 0x00D9;
53         grave['a'] = 0x00E0;
54         grave['e'] = 0x00E8;
55         grave['i'] = 0x00EC;
56         grave['o'] = 0x00F2;
57         grave['u'] = 0x00F9;
58
59         acute['A'] = 0x00C1;
60         acute['C'] = 0x0106;
61         acute['E'] = 0x00C9;
62         acute['I'] = 0x00CD;
63         acute['L'] = 0x0139;
64         acute['N'] = 0x0143;
65         acute['O'] = 0x00D3;
66         acute['R'] = 0x0154;
67         acute['S'] = 0x015A;
68         acute['U'] = 0x00DA;
69         acute['Y'] = 0x00DD;
70         acute['Z'] = 0x0179;
71         acute['a'] = 0x00E1;
72         acute['c'] = 0x0107;
73         acute['e'] = 0x00E9;
74         acute['g'] = 0x01F5;
75         acute['i'] = 0x00ED;
76         acute['l'] = 0x013A;
77         acute['n'] = 0x0144;
78         acute['o'] = 0x00F3;
79         acute['r'] = 0x0155;
80         acute['s'] = 0x015B;
81         acute['u'] = 0x00FA;
82         acute['y'] = 0x00FD;
83         acute['z'] = 0x017A;
84
85         circumflex['A'] = 0x00C2;
86         circumflex['C'] = 0x0108;
87         circumflex['E'] = 0x00CA;
88         circumflex['G'] = 0x011C;
89         circumflex['H'] = 0x0124;
90         circumflex['I'] = 0x00CE;
91         circumflex['J'] = 0x0134;
92         circumflex['O'] = 0x00D4;
93         circumflex['S'] = 0x015C;
94         circumflex['U'] = 0x00DB;
95         circumflex['W'] = 0x0174;
96         circumflex['Y'] = 0x0176;
97         circumflex['a'] = 0x00E2;
98         circumflex['c'] = 0x0109;
99         circumflex['e'] = 0x00EA;
100         circumflex['g'] = 0x011D;
101         circumflex['h'] = 0x0125;
102         circumflex['i'] = 0x00EE;
103         circumflex['j'] = 0x0135;
104         circumflex['o'] = 0x00F4;
105         circumflex['s'] = 0x015D;
106         circumflex['u'] = 0x00FB;
107         circumflex['w'] = 0x0175;
108         circumflex['y'] = 0x0177;
109
110         tilde['A'] = 0x00C3;
111         tilde['I'] = 0x0128;
112         tilde['N'] = 0x00D1;
113         tilde['O'] = 0x00D5;
114         tilde['U'] = 0x0168;
115         tilde['a'] = 0x00E3;
116         tilde['i'] = 0x0129;
117         tilde['n'] = 0x00F1;
118         tilde['o'] = 0x00F5;
119         tilde['u'] = 0x0169;
120
121         macron['A'] = 0x0100;
122         macron['E'] = 0x0112;
123         macron['I'] = 0x012A;
124         macron['O'] = 0x014C;
125         macron['U'] = 0x016A;
126         macron['a'] = 0x0101;
127         macron['e'] = 0x0113;
128         macron['i'] = 0x012B;
129         macron['o'] = 0x014D;
130         macron['u'] = 0x016B;
131
132         breve['A'] = 0x0102;
133         breve['G'] = 0x011E;
134         breve['U'] = 0x016C;
135         breve['a'] = 0x0103;
136         breve['g'] = 0x011F;
137         breve['u'] = 0x016D;
138
139         dot['C'] = 0x010A;
140         dot['E'] = 0x0116;
141         dot['G'] = 0x0120;
142         dot['I'] = 0x0130;
143         dot['Z'] = 0x017B;
144         dot['c'] = 0x010B;
145         dot['e'] = 0x0117;
146         dot['g'] = 0x0121;
147         dot['z'] = 0x017C;
148
149         diaeresis['A'] = 0x00C4;
150         diaeresis['E'] = 0x00CB;
151         diaeresis['I'] = 0x00CF;
152         diaeresis['O'] = 0x00D6;
153         diaeresis['U'] = 0x00DC;
154         diaeresis['Y'] = 0x0178;
155         diaeresis['a'] = 0x00E4;
156         diaeresis['e'] = 0x00EB;
157         diaeresis['i'] = 0x00EF;
158         diaeresis['o'] = 0x00F6;
159         diaeresis['u'] = 0x00FC;
160         diaeresis['y'] = 0x00FF;
161
162         ring['A'] = 0x00C5;
163         ring['U'] = 0x016E;
164         ring['a'] = 0x00E5;
165         ring['u'] = 0x016F;
166
167         cedilla['C'] = 0x00C7;
168         cedilla['G'] = 0x0122;
169         cedilla['K'] = 0x0136;
170         cedilla['L'] = 0x013B;
171         cedilla['N'] = 0x0145;
172         cedilla['R'] = 0x0156;
173         cedilla['S'] = 0x015E;
174         cedilla['T'] = 0x0162;
175         cedilla['c'] = 0x00E7;
176         cedilla['k'] = 0x0137;
177         cedilla['l'] = 0x013C;
178         cedilla['n'] = 0x0146;
179         cedilla['r'] = 0x0157;
180         cedilla['s'] = 0x015F;
181         cedilla['t'] = 0x0163;
182
183         double_acute['O'] = 0x0150;
184         double_acute['U'] = 0x0170;
185         double_acute['o'] = 0x0151;
186         double_acute['u'] = 0x0171;
187
188         ogonek['A'] = 0x0104;
189         ogonek['E'] = 0x0118;
190         ogonek['I'] = 0x012E;
191         ogonek['U'] = 0x0172;
192         ogonek['a'] = 0x0105;
193         ogonek['e'] = 0x0119;
194         ogonek['u'] = 0x0173;
195         ogonek['i'] = 0x012F;
196
197         caron['C'] = 0x010C;
198         caron['D'] = 0x010E;
199         caron['E'] = 0x011A;
200         caron['L'] = 0x013D;
201         caron['N'] = 0x0147;
202         caron['R'] = 0x0158;
203         caron['S'] = 0x0160;
204         caron['T'] = 0x0164;
205         caron['Z'] = 0x017D;
206         caron['c'] = 0x010D;
207         caron['d'] = 0x010F;
208         caron['e'] = 0x011B;
209         caron['l'] = 0x013E;
210         caron['n'] = 0x0148;
211         caron['r'] = 0x0159;
212         caron['s'] = 0x0161;
213         caron['t'] = 0x0165;
214         caron['z'] = 0x017E;
215
216         main[10] = 0x000A;
217         main[' '] = 0x0020;
218         main['!'] = 0x0021;
219         main['"'] = 0x0022;
220         main['#'] = 0x0023;
221         main['$'] = 0x0024;
222         main['%'] = 0x0025;
223         main['&'] = 0x0026;
224         main['\''] = 0x0027;
225         main['('] = 0x0028;
226         main[')'] = 0x0029;
227         main['*'] = 0x002a;
228         main['+'] = 0x002b;
229         main[','] = 0x002c;
230         main['-'] = 0x002d;
231         main['.'] = 0x002e;
232         main['/'] = 0x002f;
233         main['0'] = 0x0030;
234         main['1'] = 0x0031;
235         main['2'] = 0x0032;
236         main['3'] = 0x0033;
237         main['4'] = 0x0034;
238         main['5'] = 0x0035;
239         main['6'] = 0x0036;
240         main['7'] = 0x0037;
241         main['8'] = 0x0038;
242         main['9'] = 0x0039;
243         main[':'] = 0x003a;
244         main[';'] = 0x003b;
245         main['<'] = 0x003c;
246         main['='] = 0x003d;
247         main['>'] = 0x003e;
248         main['?'] = 0x003f;
249         main['@'] = 0x0040;
250         main['A'] = 0x0041;
251         main['B'] = 0x0042;
252         main['C'] = 0x0043;
253         main['D'] = 0x0044;
254         main['E'] = 0x0045;
255         main['F'] = 0x0046;
256         main['G'] = 0x0047;
257         main['H'] = 0x0048;
258         main['I'] = 0x0049;
259         main['J'] = 0x004a;
260         main['K'] = 0x004b;
261         main['L'] = 0x004c;
262         main['M'] = 0x004d;
263         main['N'] = 0x004e;
264         main['O'] = 0x004f;
265         main['P'] = 0x0050;
266         main['Q'] = 0x0051;
267         main['R'] = 0x0052;
268         main['S'] = 0x0053;
269         main['T'] = 0x0054;
270         main['U'] = 0x0055;
271         main['V'] = 0x0056;
272         main['W'] = 0x0057;
273         main['X'] = 0x0058;
274         main['Y'] = 0x0059;
275         main['Z'] = 0x005a;
276         main['['] = 0x005b;
277         main['\\'] = 0x005c;
278         main[']'] = 0x005d;
279         main['^'] = 0x005e;
280         main['_'] = 0x005f;
281         main['`'] = 0x0060;
282         main['a'] = 0x0061;
283         main['b'] = 0x0062;
284         main['c'] = 0x0063;
285         main['d'] = 0x0064;
286         main['e'] = 0x0065;
287         main['f'] = 0x0066;
288         main['g'] = 0x0067;
289         main['h'] = 0x0068;
290         main['i'] = 0x0069;
291         main['j'] = 0x006a;
292         main['k'] = 0x006b;
293         main['l'] = 0x006c;
294         main['m'] = 0x006d;
295         main['n'] = 0x006e;
296         main['o'] = 0x006f;
297         main['p'] = 0x0070;
298         main['q'] = 0x0071;
299         main['r'] = 0x0072;
300         main['s'] = 0x0073;
301         main['t'] = 0x0074;
302         main['u'] = 0x0075;
303         main['v'] = 0x0076;
304         main['w'] = 0x0077;
305         main['x'] = 0x0078;
306         main['y'] = 0x0079;
307         main['z'] = 0x007a;
308         main['{'] = 0x007b;
309         main['|'] = 0x007c;
310         main['}'] = 0x007d;
311         main['~'] = 0x007e;
312         main[161] = 0x00A1;
313         main[162] = 0x00A2;
314         main[163] = 0x00A3;
315         main[164] = 0x0024;
316         main[165] = 0x00A5;
317         main[167] = 0x00A7;
318         main[168] = 0x00A4;
319         main[169] = 0x2018;
320         main[170] = 0x201C;
321         main[171] = 0x00AB;
322         main[172] = 0x2190;
323         main[173] = 0x2191;
324         main[174] = 0x2192;
325         main[175] = 0x2193;
326         main[176] = 0x00B0;
327         main[177] = 0x00B1;
328         main[178] = 0x00B2;
329         main[179] = 0x00B3;
330         main[180] = 0x00D7;
331         main[181] = 0x00B5;
332         main[182] = 0x00B6;
333         main[183] = 0x00B7;
334         main[184] = 0x00F7;
335         main[185] = 0x2019;
336         main[186] = 0x201D;
337         main[187] = 0x00BB;
338         main[188] = 0x00BC;
339         main[189] = 0x00BD;
340         main[190] = 0x00BE;
341         main[191] = 0x00BF;
342         main[193] = 0x0300;
343         main[194] = 0x0301;
344         main[195] = 0x0302;
345         main[196] = 0x0303;
346         main[197] = 0x0304;
347         main[198] = 0x0306;
348         main[199] = 0x0307;
349         main[200] = 0x0308;
350         main[202] = 0x030A;
351         main[203] = 0x0327;
352         main[205] = 0x030B;
353         main[206] = 0x032B;
354         main[207] = 0x030C;
355         main[208] = 0x2015;
356         main[209] = 0x00B9;
357         main[210] = 0x00AE;
358         main[211] = 0x00A9;
359         main[212] = 0x2122;
360         main[213] = 0x266A;
361         main[214] = 0x00AC;
362         main[215] = 0x00A6;
363         main[220] = 0x215B;
364         main[221] = 0x215C;
365         main[222] = 0x215D;
366         main[223] = 0x215E;
367         main[224] = 0x2126;
368         main[225] = 0x00C6;
369         main[226] = 0x0110;
370         main[227] = 0x00AA;
371         main[228] = 0x0126;
372         main[230] = 0x0132;
373         main[231] = 0x013F;
374         main[232] = 0x0141;
375         main[233] = 0x00D8;
376         main[234] = 0x0152;
377         main[235] = 0x00BA;
378         main[236] = 0x00DE;
379         main[237] = 0x0166;
380         main[238] = 0x014A;
381         main[239] = 0x0149;
382         main[240] = 0x0138;
383         main[241] = 0x00E6;
384         main[242] = 0x0111;
385         main[243] = 0x00F0;
386         main[244] = 0x0127;
387         main[245] = 0x0131;
388         main[246] = 0x0133;
389         main[247] = 0x0140;
390         main[248] = 0x0142;
391         main[249] = 0x00F8;
392         main[250] = 0x0153;
393         main[251] = 0x00DF;
394         main[252] = 0x00FE;
395         main[253] = 0x0167;
396         main[254] = 0x014B;
397         main[255] = 0x00AD;
398
399         diacriticals[0xc1] = &grave;
400         diacriticals[0xc2] = &acute;
401         diacriticals[0xc3] = &circumflex;
402         diacriticals[0xc4] = &tilde;
403         diacriticals[0xc5] = &macron;
404         diacriticals[0xc6] = &breve;
405         diacriticals[0xc7] = &dot;
406         diacriticals[0xc8] = &diaeresis;
407         diacriticals[0xca] = &ring;
408         diacriticals[0xcb] = &cedilla;
409         diacriticals[0xcd] = &double_acute;
410         diacriticals[0xce] = &ogonek;
411         diacriticals[0xcf] = &caron;
412 }