svn commit: r235618 - stable/9/games/morse

Dimitry Andric dim at FreeBSD.org
Fri May 18 18:34:30 UTC 2012


Author: dim
Date: Fri May 18 18:34:29 2012
New Revision: 235618
URL: http://svn.freebsd.org/changeset/base/235618

Log:
  MFC r230131:
  
  Reencode morse.c to UTF-8. This does not make it Unicode aware.
  
  No changes in resulting object file. Moved user-visible symbols into
  comment table, so you can see all chars, not just the ones matching your
  (fallback) locale.

Modified:
  stable/9/games/morse/morse.c
Directory Properties:
  stable/9/games/morse/   (props changed)

Modified: stable/9/games/morse/morse.c
==============================================================================
--- stable/9/games/morse/morse.c	Fri May 18 18:32:44 2012	(r235617)
+++ stable/9/games/morse/morse.c	Fri May 18 18:34:29 2012	(r235618)
@@ -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_7ta
 	 * ;	..-.-
 	 * !	--..--
 	 */
-	{'á', ".-"},	/* 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', ""}
 };


More information about the svn-src-all mailing list