diff options
-rw-r--r-- | games/morse/morse.c | 175 |
1 files changed, 90 insertions, 85 deletions
diff --git a/games/morse/morse.c b/games/morse/morse.c index f6c95ee..03a09a6 100644 --- a/games/morse/morse.c +++ b/games/morse/morse.c @@ -143,26 +143,31 @@ static const struct morsetab mtab[] = { {'\0', ""} }; - +/* + * Code-points for some Latin1 chars in ISO-8859-1 encoding. + * UTF-8 encoded chars in the comments. + */ static const struct morsetab iso8859_1tab[] = { - {'', ".--.-"}, - {'', ".--.-"}, - {'', ".--.-"}, - {'', ".-.-"}, - {'', "-.-.."}, - {'', "..-.."}, - {'', "..-.."}, - {'', "-..-."}, - {'', "---."}, - {'', "..--"}, + {'\340', ".--.-"}, /* à */ + {'\341', ".--.-"}, /* á */ + {'\342', ".--.-"}, /* â */ + {'\344', ".-.-"}, /* ä */ + {'\347', "-.-.."}, /* ç */ + {'\350', "..-.."}, /* è */ + {'\351', "..-.."}, /* é */ + {'\352', "-..-."}, /* ê */ + {'\366', "---."}, /* ö */ + {'\374', "..--"}, /* ü */ {'\0', ""} }; +/* + * Code-points for some Greek chars in ISO-8859-7 encoding. + * UTF-8 encoded chars in the comments. + */ static const struct morsetab iso8859_7tab[] = { /* - * The Greek alphabet; you'll need an ISO8859-7 font in order - * to see the actual characters. * This table does not implement: * - the special sequences for the seven diphthongs, * - the punctuation differences. @@ -180,83 +185,83 @@ static const struct morsetab iso8859_7tab[] = { * ; ..-.- * ! --..-- */ - {'', ".-"}, /* alpha */ - {'', ".-"}, /* alpha with acute */ - {'', "-..."}, /* beta */ - {'', "--."}, /* gamma */ - {'', "-.."}, /* delta */ - {'', "."}, /* epsilon */ - {'', "."}, /* epsilon with acute */ - {'', "--.."}, /* zeta */ - {'', "...."}, /* eta */ - {'', "...."}, /* eta with acute */ - {'', "-.-."}, /* theta */ - {'', ".."}, /* iota */ - {'', ".."}, /* iota with acute */ - {'', ".."}, /* iota with diaeresis */ - {'', ".."}, /* iota with acute and diaeresis */ - {'', "-.-"}, /* kappa */ - {'', ".-.."}, /* lambda */ - {'', "--"}, /* mu */ - {'', "-."}, /* nu */ - {'', "-..-"}, /* xi */ - {'', "---"}, /* omicron */ - {'', "---"}, /* omicron with acute */ - {'', ".--."}, /* pi */ - {'', ".-."}, /* rho */ - {'', "..."}, /* sigma */ - {'', "..."}, /* final sigma */ - {'', "-"}, /* tau */ - {'', "-.--"}, /* upsilon */ - {'', "-.--"}, /* upsilon with acute */ - {'', "-.--"}, /* upsilon and diaeresis */ - {'', "-.--"}, /* upsilon with acute and diaeresis */ - {'', "..-."}, /* phi */ - {'', "----"}, /* chi */ - {'', "--.-"}, /* psi */ - {'', ".--"}, /* omega */ - {'', ".--"}, /* omega with acute */ + {'\341', ".-"}, /* α, alpha */ + {'\334', ".-"}, /* ά, alpha with acute */ + {'\342', "-..."}, /* β, beta */ + {'\343', "--."}, /* γ, gamma */ + {'\344', "-.."}, /* δ, delta */ + {'\345', "."}, /* ε, epsilon */ + {'\335', "."}, /* έ, epsilon with acute */ + {'\346', "--.."}, /* ζ, zeta */ + {'\347', "...."}, /* η, eta */ + {'\336', "...."}, /* ή, eta with acute */ + {'\350', "-.-."}, /* θ, theta */ + {'\351', ".."}, /* ι, iota */ + {'\337', ".."}, /* ί, iota with acute */ + {'\372', ".."}, /* ϊ, iota with diaeresis */ + {'\300', ".."}, /* ΐ, iota with acute and diaeresis */ + {'\352', "-.-"}, /* κ, kappa */ + {'\353', ".-.."}, /* λ, lambda */ + {'\354', "--"}, /* μ, mu */ + {'\355', "-."}, /* ν, nu */ + {'\356', "-..-"}, /* ξ, xi */ + {'\357', "---"}, /* ο, omicron */ + {'\374', "---"}, /* ό, omicron with acute */ + {'\360', ".--."}, /* π, pi */ + {'\361', ".-."}, /* ρ, rho */ + {'\363', "..."}, /* σ, sigma */ + {'\362', "..."}, /* ς, final sigma */ + {'\364', "-"}, /* τ, tau */ + {'\365', "-.--"}, /* υ, upsilon */ + {'\375', "-.--"}, /* ύ, upsilon with acute */ + {'\373', "-.--"}, /* ϋ, upsilon and diaeresis */ + {'\340', "-.--"}, /* ΰ, upsilon with acute and diaeresis */ + {'\366', "..-."}, /* φ, phi */ + {'\367', "----"}, /* χ, chi */ + {'\370', "--.-"}, /* ψ, psi */ + {'\371', ".--"}, /* ω, omega */ + {'\376', ".--"}, /* ώ, omega with acute */ {'\0', ""} }; +/* + * Code-points for the Cyrillic alphabet in KOI8-R encoding. + * UTF-8 encoded chars in the comments. + */ static const struct morsetab koi8rtab[] = { - /* - * The Cyrillic alphabet; you'll need a KOI8-R font in order - * to see the actual characters - */ - {'', ".-"}, /* a */ - {'', "-..."}, /* be */ - {'', ".--"}, /* ve */ - {'', "--."}, /* ge */ - {'', "-.."}, /* de */ - {'', "."}, /* ye */ - {'', "."}, /* yo, the same as ye */ - {'', "...-"}, /* she */ - {'', "--.."}, /* ze */ - {'', ".."}, /* i */ - {'', ".---"}, /* i kratkoye */ - {'', "-.-"}, /* ka */ - {'', ".-.."}, /* el */ - {'', "--"}, /* em */ - {'', "-."}, /* en */ - {'', "---"}, /* o */ - {'', ".--."}, /* pe */ - {'', ".-."}, /* er */ - {'', "..."}, /* es */ - {'', "-"}, /* te */ - {'', "..-"}, /* u */ - {'', "..-."}, /* ef */ - {'', "...."}, /* kha */ - {'', "-.-."}, /* ce */ - {'', "---."}, /* che */ - {'', "----"}, /* sha */ - {'', "--.-"}, /* shcha */ - {'', "-.--"}, /* yi */ - {'', "-..-"}, /* myakhkij znak */ - {'', "..-.."}, /* ae */ - {'', "..--"}, /* yu */ - {'', ".-.-"}, /* ya */ + {'\301', ".-"}, /* а, a */ + {'\302', "-..."}, /* б, be */ + {'\327', ".--"}, /* в, ve */ + {'\307', "--."}, /* г, ge */ + {'\304', "-.."}, /* д, de */ + {'\305', "."}, /* е, ye */ + {'\243', "."}, /* ё, yo, the same as ye */ + {'\326', "...-"}, /* ж, she */ + {'\332', "--.."}, /* з, ze */ + {'\311', ".."}, /* и, i */ + {'\312', ".---"}, /* й, i kratkoye */ + {'\313', "-.-"}, /* к, ka */ + {'\314', ".-.."}, /* л, el */ + {'\315', "--"}, /* м, em */ + {'\316', "-."}, /* н, en */ + {'\317', "---"}, /* о, o */ + {'\320', ".--."}, /* п, pe */ + {'\322', ".-."}, /* р, er */ + {'\323', "..."}, /* с, es */ + {'\324', "-"}, /* т, te */ + {'\325', "..-"}, /* у, u */ + {'\306', "..-."}, /* ф, ef */ + {'\310', "...."}, /* х, kha */ + {'\303', "-.-."}, /* ц, ce */ + {'\336', "---."}, /* ч, che */ + {'\333', "----"}, /* ш, sha */ + {'\335', "--.-"}, /* щ, shcha */ + {'\331', "-.--"}, /* ы, yi */ + {'\330', "-..-"}, /* ь, myakhkij znak */ + {'\334', "..-.."}, /* э, ae */ + {'\300', "..--"}, /* ю, yu */ + {'\321', ".-.-"}, /* я, ya */ {'\0', ""} }; |