Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37422275
en ru br
Репозитории ALT
S:1.13a-alt6.20140908
4.1: 1.10a-alt3
4.0: 1.10a-alt3
3.0: 1.10a-alt2
www.altlinux.org/Changes

Группа :: Офис
Пакет: magicpoint

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: magicpoint-1.13a-alt-i18n.patch
Скачать


--- magicpoint-1.13a/print.c.fix3	2009-12-08 03:25:26 +0300
+++ magicpoint-1.13a/print.c	2009-12-08 03:25:27 +0300
@@ -302,16 +302,130 @@ static const char *latin2def = 
 " /cacute /ccedilla /ccaron /eacute /eogonek /edieresis /ecaron /iacute /icircumflex /dcaron\n"
 " /dbar /nacute /ncaron /oacute /ocircumflex /ohungarumlaut /odieresis /divide /rcaron /uring\n"
 " /uacute /uhungarumlaut /udieresis /yacute /tcedilla /dotaccent] /isolatin2encoding exch def\n";
 
+static const char *koi8rdef = 
+"[\n"
+"/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n"
+"/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n"
+"/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n"
+"/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n"
+"/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle\n"
+"/parenleft /parenright /asterisk /plus /comma /minus /period /slash\n"
+"/zero /one /two /three /four /five /six /seven\n"
+"/eight /nine /colon /semicolon /less /equal /greater /question\n"
+"/at /A /B /C /D /E /F /G\n"
+"/H /I /J /K /L /M /N /O\n"
+"/P /Q /R /S /T /U /V /W\n"
+"/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore\n"
+"/grave /a /b /c /d /e /f /g\n"
+"/h /i /j /k /l /m /n /o\n"
+"/p /q /r /s /t /u /v /w\n"
+"/x /y /z /braceleft /bar /braceright /asciitilde /.notdef\n"
+"/SF100000 /SF110000 /SF010000 /SF030000 /SF020000 /SF040000 /SF080000 /SF090000\n"
+"/SF060000 /SF070000 /SF050000 /upblock /dnblock /block /lfblock /rtblock\n"
+"/ltshade /shade /dkshade /integraltp /filledbox /bullet /radical /approxequal\n"
+"/lessequal /greaterequal /space /integralbt /degree /twosuperior /periodcentered /divide\n"
+"/SF430000 /SF240000 /SF510000 /afii10071 /SF520000 /SF390000 /SF220000 /SF210000\n"
+"/SF250000 /SF500000 /SF490000 /SF380000 /SF280000 /SF270000 /SF260000 /SF360000\n"
+"/SF370000 /SF420000 /SF190000 /afii10023 /SF200000 /SF230000 /SF470000 /SF480000\n"
+"/SF410000 /SF450000 /SF460000 /SF400000 /SF540000 /SF530000 /SF440000 /copyright\n"
+"/afii10096 /afii10065 /afii10066 /afii10088 /afii10069 /afii10070 /afii10086 /afii10068\n"
+"/afii10087 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080\n"
+"/afii10081 /afii10097 /afii10082 /afii10083 /afii10084 /afii10085 /afii10072 /afii10067\n"
+"/afii10094 /afii10093 /afii10073 /afii10090 /afii10095 /afii10091 /afii10089 /afii10092\n"
+"/afii10048 /afii10017 /afii10018 /afii10040 /afii10021 /afii10022 /afii10038 /afii10020\n"
+"/afii10039 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032\n"
+"/afii10033 /afii10049 /afii10034 /afii10035 /afii10036 /afii10037 /afii10024 /afii10019\n"
+"/afii10046 /afii10045 /afii10025 /afii10042 /afii10047 /afii10043 /afii10041 /afii10044\n"
+"] /koi8rencoding exch def\n";
+
+static const char *koi8udef = 
+"[\n"
+"/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n"
+"/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n"
+"/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n"
+"/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n"
+"/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle\n"
+"/parenleft /parenright /asterisk /plus /comma /minus /period /slash\n"
+"/zero /one /two /three /four /five /six /seven\n"
+"/eight /nine /colon /semicolon /less /equal /greater /question\n"
+"/at /A /B /C /D /E /F /G\n"
+"/H /I /J /K /L /M /N /O\n"
+"/P /Q /R /S /T /U /V /W\n"
+"/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore\n"
+"/grave /a /b /c /d /e /f /g\n"
+"/h /i /j /k /l /m /n /o\n"
+"/p /q /r /s /t /u /v /w\n"
+"/x /y /z /braceleft /bar /braceright /asciitilde /.notdef\n"
+"/SF100000 /SF110000 /SF010000 /SF030000 /SF020000 /SF040000 /SF080000 /SF090000\n"
+"/SF060000 /SF070000 /SF050000 /upblock /dnblock /block /lfblock /rtblock\n"
+"/ltshade /shade /dkshade /integraltp /filledbox /bullet /radical /approxequal\n"
+"/lessequal /greaterequal /space /integralbt /degree /twosuperior /periodcentered /divide\n"
+"/SF430000 /SF240000 /SF510000 /afii10071 /afii10101 /SF390000 /afii10103 /afii10104\n"
+"/SF250000 /SF500000 /SF490000 /SF380000 /SF280000 /afii10098 /SF260000 /SF360000\n"
+"/SF370000 /SF420000 /SF190000 /afii10023 /afii10053 /SF230000 /afii10055 /afii10056\n"
+"/SF410000 /SF450000 /SF460000 /SF400000 /SF540000 /afii10050 /SF440000 /copyright\n"
+"/afii10096 /afii10065 /afii10066 /afii10088 /afii10069 /afii10070 /afii10086 /afii10068\n"
+"/afii10087 /afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080\n"
+"/afii10081 /afii10097 /afii10082 /afii10083 /afii10084 /afii10085 /afii10072 /afii10067\n"
+"/afii10094 /afii10093 /afii10073 /afii10090 /afii10095 /afii10091 /afii10089 /afii10092\n"
+"/afii10048 /afii10017 /afii10018 /afii10040 /afii10021 /afii10022 /afii10038 /afii10020\n"
+"/afii10039 /afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032\n"
+"/afii10033 /afii10049 /afii10034 /afii10035 /afii10036 /afii10037 /afii10024 /afii10019\n"
+"/afii10046 /afii10045 /afii10025 /afii10042 /afii10047 /afii10043 /afii10041 /afii10044\n"
+"] /koi8uencoding exch def\n";
+
+static const char *cp1251def = 
+"[\n"
+"/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n"
+"/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n"
+"/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n"
+"/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n"
+"/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle\n"
+"/parenleft /parenright /asterisk /plus /comma /minus /period /slash\n"
+"/zero /one /two /three /four /five /six /seven\n"
+"/eight /nine /colon /semicolon /less /equal /greater /question\n"
+"/at /A /B /C /D /E /F /G\n"
+"/H /I /J /K /L /M /N /O\n"
+"/P /Q /R /S /T /U /V /W\n"
+"/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore\n"
+"/grave /a /b /c /d /e /f /g\n"
+"/h /i /j /k /l /m /n /o\n"
+"/p /q /r /s /t /u /v /w\n"
+"/x /y /z /braceleft /bar /braceright /asciitilde /.notdef\n"
+"/afii10051 /afii10052 /quotesinglbase /afii10100 /quotedblbase /ellipsis /dagger /daggerdbl\n"
+"/Euro /perthousand /afii10058 /guilsinglleft /afii10059 /afii10061 /afii10060 /afii10145\n"
+"/afii10099 /quoteleft /quoteright /quotedblleft /quotedblright /bullet /endash /emdash\n"
+"/.notdef /trademark /afii10106 /guilsinglright /afii10107 /afii10109 /afii10108 /afii10193\n"
+"/space /afii10062 /afii10110 /afii10057 /currency /afii10050 /brokenbar /section\n"
+"/afii10023 /copyright /afii10053 /guillemotleft /logicalnot /hyphen /registered /afii10056\n"
+"/degree /plusminus /afii10055 /afii10103 /afii10098 /mu /paragraph /periodcentered\n"
+"/afii10071 /afii61352 /afii10101 /guillemotright /afii10105 /afii10054 /afii10102 /afii10104\n"
+"/afii10017 /afii10018 /afii10019 /afii10020 /afii10021 /afii10022 /afii10024 /afii10025\n"
+"/afii10026 /afii10027 /afii10028 /afii10029 /afii10030 /afii10031 /afii10032 /afii10033\n"
+"/afii10034 /afii10035 /afii10036 /afii10037 /afii10038 /afii10039 /afii10040 /afii10041\n"
+"/afii10042 /afii10043 /afii10044 /afii10045 /afii10046 /afii10047 /afii10048 /afii10049\n"
+"/afii10065 /afii10066 /afii10067 /afii10068 /afii10069 /afii10070 /afii10072 /afii10073\n"
+"/afii10074 /afii10075 /afii10076 /afii10077 /afii10078 /afii10079 /afii10080 /afii10081\n"
+"/afii10082 /afii10083 /afii10084 /afii10085 /afii10086 /afii10087 /afii10088 /afii10089\n"
+"/afii10090 /afii10091 /afii10092 /afii10093 /afii10094 /afii10095 /afii10096 /afii10097\n"
+"] /cp1251encoding exch def\n";
+
 static struct encoding {
 	char *name;
 	char *defstr;
 } encodings[] = {
 	{ "iso-8859-1",	"isolatin1encoding", },
 	{ "latin1",	"isolatin1encoding", },
 	{ "iso-8859-2",	"isolatin2encoding", },
 	{ "latin2",	"isolatin2encoding", },
+	{ "koi8r",	"koi8rencoding", },
+	{ "koi8-r",	"koi8rencoding", },
+	{ "koi8u",	"koi8uencoding", },
+	{ "koi8-u",	"koi8uencoding", },
+	{ "cp1251",	"cp1251encoding", },
+	{ "microsoft-cp1251",	"cp1251encoding", },
 	{ NULL, NULL, },
 };
 struct encoding *encoding = NULL;
 
@@ -762,10 +876,16 @@ print_init()
 
 	/* emit character encoding definition, if necessary */
 	if (encoding && strcmp(encoding->defstr, "isolatin1encoding") == 0)
 		fprintf(fp, "%s", latin1def);
-	if (encoding && strcmp(encoding->defstr, "isolatin2encoding") == 0)
+	else if (encoding && strcmp(encoding->defstr, "isolatin2encoding") == 0)
 		fprintf(fp, "%s", latin2def);
+	else if (encoding && strcmp(encoding->defstr, "koi8rencoding") == 0)
+		fprintf(fp, "%s", koi8rdef);
+	else if (encoding && strcmp(encoding->defstr, "koi8uencoding") == 0)
+		fprintf(fp, "%s", koi8udef);
+	else if (encoding && strcmp(encoding->defstr, "cp1251encoding") == 0)
+		fprintf(fp, "%s", cp1251def);
 }
 
 static void
 print_pageinit(page)
@@ -2409,9 +2529,9 @@ main(argc, argv)
 		case 'e':
 			for (encoding = &encodings[0];
 			     encoding->name;
 			     encoding++) {
-				if (strcmp(encoding->name, optarg) == 0)
+				if (strcasecmp(encoding->name, optarg) == 0)
 					break;
 			}
 			if (!encoding->name) {
 				fprintf(stderr, "unknown encoding %s\n", optarg);
--- magicpoint-1.13a/draw.c.fix3	2009-12-08 03:25:26 +0300
+++ magicpoint-1.13a/draw.c	2009-12-08 03:25:27 +0300
@@ -654,9 +654,9 @@ process_direc(state, seenpause)
 #endif /*VFLIB*/
 
 #ifdef FREETYPE
 	case CTL_TFONT:
-		tfc_setfont(cp->ctc2_value1, 0, cp->ctc2_value2);
+		tfc_setfont(cp->ctc2_value1, 0, cp->ctc2_value2 ?: mgp_charset);
 		break;
 
 	case CTL_TMFONT:
 		tfc_setfont(cp->ctc_value, 1, NULL);
@@ -1283,8 +1283,11 @@ draw_string(state, data)
 		"iso8859-1",		/* ESC - A */
 		"iso8859-2",		/* ESC - B */
 		"iso8859-3",		/* ESC - C */
 		"iso8859-4",		/* ESC - D */
+		"koi8-r",		/* ESC - E */
+		"microsoft-cp1251",	/* ESC - F */
+		"koi8-u",		/* ESC - G */
 	};
 #define RTAB96_MAX	(sizeof(rtab96)/sizeof(rtab96[0]))
 	static char *rtab9494[] = {
 		"jisx0208.1978-*",	/* ESC $ @ or ESC $ ( @ */
@@ -1344,9 +1347,9 @@ draw_string(state, data)
 			continue;
 		}
 
 		if (!registry && isspace(p[0])) {
-			draw_fragment(state, p, 1, registry, 0);
+			draw_fragment(state, p, 1, registry ?: mgp_charset, 0);
 			p++;
 			continue;
 		}
 
@@ -1376,9 +1379,9 @@ draw_string(state, data)
 					q++;
 			}
 		}
 
-		q = draw_fragment(state, p, q - p, registry, charset16);
+		q = draw_fragment(state, p, q - p, registry ?: mgp_charset, charset16);
 
 		p = q;
 	}
 }
@@ -1403,9 +1406,9 @@ draw_fragment(state, p, len, registry, c
 	char *p0;
 
 #ifdef USE_XFT2
 	if (!(mgp_flag & FL_NOXFT)){
-		p0 = xft_draw_fragment(state, p, len, registry, charset16);
+		p0 = xft_draw_fragment(state, p, len, registry ?: mgp_charset, charset16);
 		if (p0) return p0;
 	}
 #endif
 
@@ -5116,13 +5119,19 @@ get_regid(registry)
     char *registry;
 {
 	char *p;
 
-	if (!registry || registry[0] == '\0') return 0;
+	if (!registry || !*registry) return 0;
 	if (strlen(registry) == 9 && !strncmp("iso8859-", registry, 8) &&
 		registry[8] >= '1' && registry[8] <= '4') {
 			p = registry + 8;
 			return atoi(p) -1;
+	} else if (!strcmp("koi8-r",registry)) {
+		return 4;
+	} else if (!strcmp("microsoft-cp1251",registry)) {
+		return 5;
+	} else if (!strcmp("koi8-u",registry)) {
+		return 6;
 	} else
 		return -1;
 }
 
--- magicpoint-1.13a/mgp2ps.man.fix3	2009-12-08 03:25:26 +0300
+++ magicpoint-1.13a/mgp2ps.man	2009-12-08 03:28:36 +0300
@@ -105,9 +105,9 @@ specifies length of the margin area arou
 .It Fl t
 Use truetypefont instead of psfont (ASCII font only).
 .It Fl e
 Specify encodings. At this moment, "iso-8859-1", "latin1", "iso-8859-2"
-"and latin-2" are supported as encodings.
+"latin2", "koi8-r", "koi8-u" and "cp1251" are supported as encodings.
 .It Fl m
 emulate "%pause" directive.
 .It Fl X Ar engine
 Do not use rendering engine, specified by 
--- magicpoint-1.13a/grammar.y.fix3	2009-12-08 03:25:26 +0300
+++ magicpoint-1.13a/grammar.y	2009-12-08 03:25:27 +0300
@@ -931,9 +931,9 @@ cmd:	  KW_NOOP	{ $$ = gen_void(CTL_NOOP)
 					$$ = gen_str2(CTL_PSFONT, $2, "iso8859-1");
 				}
 	| KW_TFONT STRorID	{
 #ifdef FREETYPE
-				  $$ = gen_str2(CTL_TFONT, $2, "iso8859-1");
+				  $$ = gen_str2(CTL_TFONT, $2, mgp_charset ? mgp_charset : "iso8859-1");
 #else
 				  $$ = gen_str2(CTL_NOOP, $2, "iso8859-1");
 				  yywarn("directive \"tfont\" not supported "
 					"in this configuration");
--- magicpoint-1.13a/mgp.c.fix3	2009-12-08 03:25:26 +0300
+++ magicpoint-1.13a/mgp.c	2009-12-08 03:25:27 +0300
@@ -82,9 +82,9 @@ char *freetypefont0 = NULL;	/* font name
 char *freetypemfont0 = NULL;	/* font name to be used as a last resort */
 
 int unicode_map[65536];
 #endif
-int latin_unicode_map[3][256]; /* currently we have iso8859-2-4 map */
+int latin_unicode_map[6][256]; /* currently we have iso8859-2-4 map */
 
 static char *tsfile = NULL;
 static char *dumpdir = NULL;
 
--- magicpoint-1.13a/tfont.c.fix3	2009-12-08 03:25:26 +0300
+++ magicpoint-1.13a/tfont.c	2009-12-08 03:26:49 +0300
@@ -47,9 +47,9 @@ static TT_Glyph_Metrics		metrics;
 static TT_Error			error;
 static TT_Engine		engine;
 static XImage *xim;
 
-static char *tf_curname[4]; /* contains iso8859-[2-4] fonts */
+static char *tf_curname[7]; /* contains iso8859-[2-4] and koi8-r, cp1251, koi8-u fonts */
 static char *tf_mcurname = NULL;
 static int tfcinitdone;
 static int tfcachecnt;
 static struct tfont tfclru;
@@ -217,8 +217,10 @@ tfc_setfont(name, charset16, registry)
 
 	if (!tfcinitdone)
 		tfc_init();
 
+	if (!registry || !*registry) registry = mgp_charset;
+
 	if (TFFONT_NUM <= tffontcnt) {
 		fprintf(stderr, "internal error: "
 			"too many fonts opened (increase TFFONT_NUM)\n");
 		cleanup(-1);
@@ -482,9 +484,9 @@ tfc_alloc(code, size, fontname, registry
 	unicode = code;
 #endif
 	if (!unicode)
 		return NULL;
-	if ((error = LoadTrueTypeChar(unicode, 0))) {
+	if ((error = LoadTrueTypeChar(unicode, 1))) {
 		fprintf(stderr, "LoadTrueTypeChar fail %d\n", (int)error);
 		fprintf(stderr, "fontfile: \"%s\" char: '%c' (0x%04x)\n",
 			tfloadedfont[tfcuridx],
 			isprint(unicode) ? unicode : '?',
@@ -588,10 +590,10 @@ CharToUnicode(code, registry)
 			if (code > 256)
 				code = unicode_map[code];
 #endif /* FREETYPE_CHARSET16 */
 
-#if 1 /* latin2-4 encoding processing */
-			if (code > 0xa0 && code < 256) {
+#if 1 /* latin2-4 encoding processing and cyrillic encodings */
+			if (code > 0x7f && code < 256) {
 				int tempregid;
 				if (registry)
 					tempregid = get_regid(registry) -1;
 				else {
--- magicpoint-1.13a/unimap.c.fix3	2009-12-08 03:25:26 +0300
+++ magicpoint-1.13a/unimap.c	2009-12-08 03:25:27 +0300
@@ -3480,10 +3480,261 @@ unicode_map[0x7426] = 0x7199; 
 }
 
 #endif /* FREETYPE_CHARSET16 */
 
+static unsigned int koi8_r_charset2uni[256] = {
+	/* 0x00*/
+	0x0000, 0x0001, 0x0002, 0x0003,
+	0x0004, 0x0005, 0x0006, 0x0007,
+	0x0008, 0x0009, 0x000a, 0x000b,
+	0x000c, 0x000d, 0x000e, 0x000f,
+	/* 0x10*/
+	0x0010, 0x0011, 0x0012, 0x0013,
+	0x0014, 0x0015, 0x0016, 0x0017,
+	0x0018, 0x0019, 0x001a, 0x001b,
+	0x001c, 0x001d, 0x001e, 0x001f,
+	/* 0x20*/
+	0x0020, 0x0021, 0x0022, 0x0023,
+	0x0024, 0x0025, 0x0026, 0x0027,
+	0x0028, 0x0029, 0x002a, 0x002b,
+	0x002c, 0x002d, 0x002e, 0x002f,
+	/* 0x30*/
+	0x0030, 0x0031, 0x0032, 0x0033,
+	0x0034, 0x0035, 0x0036, 0x0037,
+	0x0038, 0x0039, 0x003a, 0x003b,
+	0x003c, 0x003d, 0x003e, 0x003f,
+	/* 0x40*/
+	0x0040, 0x0041, 0x0042, 0x0043,
+	0x0044, 0x0045, 0x0046, 0x0047,
+	0x0048, 0x0049, 0x004a, 0x004b,
+	0x004c, 0x004d, 0x004e, 0x004f,
+	/* 0x50*/
+	0x0050, 0x0051, 0x0052, 0x0053,
+	0x0054, 0x0055, 0x0056, 0x0057,
+	0x0058, 0x0059, 0x005a, 0x005b,
+	0x005c, 0x005d, 0x005e, 0x005f,
+	/* 0x60*/
+	0x0060, 0x0061, 0x0062, 0x0063,
+	0x0064, 0x0065, 0x0066, 0x0067,
+	0x0068, 0x0069, 0x006a, 0x006b,
+	0x006c, 0x006d, 0x006e, 0x006f,
+	/* 0x70*/
+	0x0070, 0x0071, 0x0072, 0x0073,
+	0x0074, 0x0075, 0x0076, 0x0077,
+	0x0078, 0x0079, 0x007a, 0x007b,
+	0x007c, 0x007d, 0x007e, 0x007f,
+	/* 0x80*/
+	0x2500, 0x2502, 0x250c, 0x2510,
+	0x2514, 0x2518, 0x251c, 0x2524,
+	0x252c, 0x2534, 0x253c, 0x2580,
+	0x2584, 0x2588, 0x258c, 0x2590,
+	/* 0x90*/
+	0x2591, 0x2592, 0x2593, 0x2320,
+	0x25a0, 0x2219, 0x221a, 0x2248,
+	0x2264, 0x2265, 0x00a0, 0x2321,
+	0x00b0, 0x00b2, 0x00b7, 0x00f7,
+	/* 0xa0*/
+	0x2550, 0x2551, 0x2552, 0x0451,
+	0x2553, 0x2554, 0x2555, 0x2556,
+	0x2557, 0x2558, 0x2559, 0x255a,
+	0x255b, 0x255c, 0x255d, 0x255e,
+	/* 0xb0*/
+	0x255f, 0x2560, 0x2561, 0x0401,
+	0x2562, 0x2563, 0x2564, 0x2565,
+	0x2566, 0x2567, 0x2568, 0x2569,
+	0x256a, 0x256b, 0x256c, 0x00a9,
+	/* 0xc0*/
+	0x044e, 0x0430, 0x0431, 0x0446,
+	0x0434, 0x0435, 0x0444, 0x0433,
+	0x0445, 0x0438, 0x0439, 0x043a,
+	0x043b, 0x043c, 0x043d, 0x043e,
+	/* 0xd0*/
+	0x043f, 0x044f, 0x0440, 0x0441,
+	0x0442, 0x0443, 0x0436, 0x0432,
+	0x044c, 0x044b, 0x0437, 0x0448,
+	0x044d, 0x0449, 0x0447, 0x044a,
+	/* 0xe0*/
+	0x042e, 0x0410, 0x0411, 0x0426,
+	0x0414, 0x0415, 0x0424, 0x0413,
+	0x0425, 0x0418, 0x0419, 0x041a,
+	0x041b, 0x041c, 0x041d, 0x041e,
+	/* 0xf0*/
+	0x041f, 0x042f, 0x0420, 0x0421,
+	0x0422, 0x0423, 0x0416, 0x0412,
+	0x042c, 0x042b, 0x0417, 0x0428,
+	0x042d, 0x0429, 0x0427, 0x042a,
+};
+
+
+static unsigned int microsoft_cp1251_charset2uni[256] = {
+	/* 0x00*/
+	0x0000, 0x0001, 0x0002, 0x0003, 
+	0x0004, 0x0005, 0x0006, 0x0007, 
+	0x0008, 0x0009, 0x000a, 0x000b, 
+	0x000c, 0x000d, 0x000e, 0x000f, 
+	/* 0x10*/
+	0x0010, 0x0011, 0x0012, 0x0013, 
+	0x0014, 0x0015, 0x0016, 0x0017, 
+	0x0018, 0x0019, 0x001a, 0x001b, 
+	0x001c, 0x001d, 0x001e, 0x001f, 
+	/* 0x20*/
+	0x0020, 0x0021, 0x0022, 0x0023, 
+	0x0024, 0x0025, 0x0026, 0x0027, 
+	0x0028, 0x0029, 0x002a, 0x002b, 
+	0x002c, 0x002d, 0x002e, 0x002f, 
+	/* 0x30*/
+	0x0030, 0x0031, 0x0032, 0x0033, 
+	0x0034, 0x0035, 0x0036, 0x0037, 
+	0x0038, 0x0039, 0x003a, 0x003b, 
+	0x003c, 0x003d, 0x003e, 0x003f, 
+	/* 0x40*/
+	0x0040, 0x0041, 0x0042, 0x0043, 
+	0x0044, 0x0045, 0x0046, 0x0047, 
+	0x0048, 0x0049, 0x004a, 0x004b, 
+	0x004c, 0x004d, 0x004e, 0x004f, 
+	/* 0x50*/
+	0x0050, 0x0051, 0x0052, 0x0053, 
+	0x0054, 0x0055, 0x0056, 0x0057, 
+	0x0058, 0x0059, 0x005a, 0x005b, 
+	0x005c, 0x005d, 0x005e, 0x005f, 
+	/* 0x60*/
+	0x0060, 0x0061, 0x0062, 0x0063, 
+	0x0064, 0x0065, 0x0066, 0x0067, 
+	0x0068, 0x0069, 0x006a, 0x006b, 
+	0x006c, 0x006d, 0x006e, 0x006f, 
+	/* 0x70*/
+	0x0070, 0x0071, 0x0072, 0x0073, 
+	0x0074, 0x0075, 0x0076, 0x0077, 
+	0x0078, 0x0079, 0x007a, 0x007b, 
+	0x007c, 0x007d, 0x007e, 0x007f, 
+	/* 0x80*/
+	0x0402, 0x0403, 0x201a, 0x0453, 
+	0x201e, 0x2026, 0x2020, 0x2021, 
+	0x20ac, 0x2030, 0x0409, 0x2039, 
+	0x040a, 0x040c, 0x040b, 0x040f, 
+	/* 0x90*/
+	0x0452, 0x2018, 0x2019, 0x201c, 
+	0x201d, 0x2022, 0x2013, 0x2014, 
+	0x0000, 0x2122, 0x0459, 0x203a, 
+	0x045a, 0x045c, 0x045b, 0x045f, 
+	/* 0xa0*/
+	0x00a0, 0x040e, 0x045e, 0x0408, 
+	0x00a4, 0x0490, 0x00a6, 0x00a7, 
+	0x0401, 0x00a9, 0x0404, 0x00ab, 
+	0x00ac, 0x00ad, 0x00ae, 0x0407, 
+	/* 0xb0*/
+	0x00b0, 0x00b1, 0x0406, 0x0456, 
+	0x0491, 0x00b5, 0x00b6, 0x00b7, 
+	0x0451, 0x2116, 0x0454, 0x00bb, 
+	0x0458, 0x0405, 0x0455, 0x0457, 
+	/* 0xc0*/
+	0x0410, 0x0411, 0x0412, 0x0413, 
+	0x0414, 0x0415, 0x0416, 0x0417, 
+	0x0418, 0x0419, 0x041a, 0x041b, 
+	0x041c, 0x041d, 0x041e, 0x041f, 
+	/* 0xd0*/
+	0x0420, 0x0421, 0x0422, 0x0423, 
+	0x0424, 0x0425, 0x0426, 0x0427, 
+	0x0428, 0x0429, 0x042a, 0x042b, 
+	0x042c, 0x042d, 0x042e, 0x042f, 
+	/* 0xe0*/
+	0x0430, 0x0431, 0x0432, 0x0433, 
+	0x0434, 0x0435, 0x0436, 0x0437, 
+	0x0438, 0x0439, 0x043a, 0x043b, 
+	0x043c, 0x043d, 0x043e, 0x043f, 
+	/* 0xf0*/
+	0x0440, 0x0441, 0x0442, 0x0443, 
+	0x0444, 0x0445, 0x0446, 0x0447, 
+	0x0448, 0x0449, 0x044a, 0x044b, 
+	0x044c, 0x044d, 0x044e, 0x044f, 
+};
+
+static unsigned int koi8_u_charset2uni[256] = {
+	/* 0x00*/
+	0x0000, 0x0001, 0x0002, 0x0003,
+	0x0004, 0x0005, 0x0006, 0x0007,
+	0x0008, 0x0009, 0x000a, 0x000b,
+	0x000c, 0x000d, 0x000e, 0x000f,
+	/* 0x10*/
+	0x0010, 0x0011, 0x0012, 0x0013,
+	0x0014, 0x0015, 0x0016, 0x0017,
+	0x0018, 0x0019, 0x001a, 0x001b,
+	0x001c, 0x001d, 0x001e, 0x001f,
+	/* 0x20*/
+	0x0020, 0x0021, 0x0022, 0x0023,
+	0x0024, 0x0025, 0x0026, 0x0027,
+	0x0028, 0x0029, 0x002a, 0x002b,
+	0x002c, 0x002d, 0x002e, 0x002f,
+	/* 0x30*/
+	0x0030, 0x0031, 0x0032, 0x0033,
+	0x0034, 0x0035, 0x0036, 0x0037,
+	0x0038, 0x0039, 0x003a, 0x003b,
+	0x003c, 0x003d, 0x003e, 0x003f,
+	/* 0x40*/
+	0x0040, 0x0041, 0x0042, 0x0043,
+	0x0044, 0x0045, 0x0046, 0x0047,
+	0x0048, 0x0049, 0x004a, 0x004b,
+	0x004c, 0x004d, 0x004e, 0x004f,
+	/* 0x50*/
+	0x0050, 0x0051, 0x0052, 0x0053,
+	0x0054, 0x0055, 0x0056, 0x0057,
+	0x0058, 0x0059, 0x005a, 0x005b,
+	0x005c, 0x005d, 0x005e, 0x005f,
+	/* 0x60*/
+	0x0060, 0x0061, 0x0062, 0x0063,
+	0x0064, 0x0065, 0x0066, 0x0067,
+	0x0068, 0x0069, 0x006a, 0x006b,
+	0x006c, 0x006d, 0x006e, 0x006f,
+	/* 0x70*/
+	0x0070, 0x0071, 0x0072, 0x0073,
+	0x0074, 0x0075, 0x0076, 0x0077,
+	0x0078, 0x0079, 0x007a, 0x007b,
+	0x007c, 0x007d, 0x007e, 0x007f,
+	/* 0x80*/
+	0x2500, 0x2502, 0x250c, 0x2510,
+	0x2514, 0x2518, 0x251c, 0x2524,
+	0x252c, 0x2534, 0x253c, 0x2580,
+	0x2584, 0x2588, 0x258c, 0x2590,
+	/* 0x90*/
+	0x2591, 0x2592, 0x2593, 0x2320,
+	0x25a0, 0x2219, 0x221a, 0x2248,
+	0x2264, 0x2265, 0x00a0, 0x2321,
+	0x00b0, 0x00b2, 0x00b7, 0x00f7,
+	/* 0xa0*/
+	0x2550, 0x2551, 0x2552, 0x0451,
+	0x0454, 0x2554, 0x0456, 0x0457,
+	0x2557, 0x2558, 0x2559, 0x255a,
+	0x255b, 0x0491, 0x255d, 0x255e,
+	/* 0xb0*/
+	0x255f, 0x2560, 0x2561, 0x0401,
+	0x0404, 0x2563, 0x0406, 0x0407,
+	0x2566, 0x2567, 0x2568, 0x2569,
+	0x256a, 0x0490, 0x256c, 0x00a9,
+	/* 0xc0*/
+	0x044e, 0x0430, 0x0431, 0x0446,
+	0x0434, 0x0435, 0x0444, 0x0433,
+	0x0445, 0x0438, 0x0439, 0x043a,
+	0x043b, 0x043c, 0x043d, 0x043e,
+	/* 0xd0*/
+	0x043f, 0x044f, 0x0440, 0x0441,
+	0x0442, 0x0443, 0x0436, 0x0432,
+	0x044c, 0x044b, 0x0437, 0x0448,
+	0x044d, 0x0449, 0x0447, 0x044a,
+	/* 0xe0*/
+	0x042e, 0x0410, 0x0411, 0x0426,
+	0x0414, 0x0415, 0x0424, 0x0413,
+	0x0425, 0x0418, 0x0419, 0x041a,
+	0x041b, 0x041c, 0x041d, 0x041e,
+	/* 0xf0*/
+	0x041f, 0x042f, 0x0420, 0x0421,
+	0x0422, 0x0423, 0x0416, 0x0412,
+	0x042c, 0x042b, 0x0417, 0x0428,
+	0x042d, 0x0429, 0x0427, 0x042a,
+};
+
 void
 latin_unicode_map_init(){
+unsigned i;
 
 latin_unicode_map[0][0xA1] = 0x0104; latin_unicode_map[0][0xA2] = 0x02D8;
 latin_unicode_map[0][0xA3] = 0x0141; latin_unicode_map[0][0xA5] = 0x013D;
 latin_unicode_map[0][0xA6] = 0x015A; latin_unicode_map[0][0xA9] = 0x0160;
@@ -3555,5 +3806,9 @@ latin_unicode_map[2][0xEF] = 0x012B; lat
 latin_unicode_map[2][0xF1] = 0x0146; latin_unicode_map[2][0xF2] = 0x014D;
 latin_unicode_map[2][0xF3] = 0x0137; latin_unicode_map[2][0xF9] = 0x0173;
 latin_unicode_map[2][0xFD] = 0x0169; latin_unicode_map[2][0xFE] = 0x016B;
 latin_unicode_map[2][0xFF] = 0x02D9; 
+
+for(i=0x80; i < 256; i++) latin_unicode_map[3][i]=koi8_r_charset2uni[i];
+for(i=0x80; i < 256; i++) latin_unicode_map[4][i]=microsoft_cp1251_charset2uni[i];
+for(i=0x80; i < 256; i++) latin_unicode_map[5][i]=koi8_u_charset2uni[i];
 }
--- magicpoint-1.13a/mgp.h.fix3	2009-12-08 03:25:26 +0300
+++ magicpoint-1.13a/mgp.h	2009-12-08 03:25:27 +0300
@@ -708,9 +708,9 @@ extern char *freetypefontdir;
 extern char *freetypefont0;	/* font name to be used as a last resort */
 extern char *freetypemfont0;	/* font name to be used as a last resort */
 extern int unicode_map[65536];
 #endif
-extern int latin_unicode_map[3][256];
+extern int latin_unicode_map[6][256];
 #ifdef TTY_KEYINPUT
 extern volatile int ttykey_enable;
 #endif
 extern char *back_clname;
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin