[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mgp-users 00806] PATCH: support for iso-8859-2 printing



Hi,

I do not know where to send patches for MagicPoint, so here it is.  This
patch adds support for iso-8859-2 charset printing.

diff -ur magicpoint.orig/mgp2ps.man magicpoint/mgp2ps.man
--- magicpoint.orig/mgp2ps.man	Mon Mar  4 18:52:28 2002
+++ magicpoint/mgp2ps.man	Mon Mar  4 19:13:53 2002
@@ -61,7 +61,7 @@
 The following options are available:
 .Bl -tag -width indent
 .It Fl c
-Generate color postscript file (experimental).
+Generate color PostScript file (experimental).
 By default
 .Nm
 will generate monochrome postscript file.
@@ -105,8 +105,8 @@
 .It Fl t
 Use truetypefont instead of psfont (ASCII font only).
 .It Fl e
-Specify encodings. At this moment, "iso-8859-1" and "latin1" are supported
-as encodings.
+Specify encodings. At this moment, "iso-8859-1", "latin1", "iso-8859-2"
+"and latin-2" are supported as encodings.
 .El
 .Sh SEE ALSO
 .Xr mgp 1
@@ -114,5 +114,5 @@
 .Nm mgp2ps
 was created so that Kazu Yamamoto could
 submit his tutorial document to the committee of
-Intenret Week '97.
+Internet Week '97.
 
Only in magicpoint: mgp2ps.man.~1.9.~
diff -ur magicpoint.orig/print.c magicpoint/print.c
--- magicpoint.orig/print.c	Mon Mar  4 18:52:28 2002
+++ magicpoint/print.c	Mon Mar  4 19:11:45 2002
@@ -215,12 +215,42 @@
 " /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave\n"
 " /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis] /isolatin1encoding exch def\n";
 
+static const char *latin2def = 
+"[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n"
+" /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n"
+" /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n"
+" /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright\n"
+" /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one\n"
+" /two /three /four /five /six /seven /eight /nine /colon /semicolon\n"
+" /less /equal /greater /question /at /A /B /C /D /E\n"
+" /F /G /H /I /J /K /L /M /N /O\n"
+" /P /Q /R /S /T /U /V /W /X /Y\n"
+" /Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c\n"
+" /d /e /f /g /h /i /j /k /l /m\n"
+" /n /o /p /q /r /s /t /u /v /w\n"
+" /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef\n"
+" /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n"
+" /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n"
+" /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef\n"
+" /space /Aogonek /breve /Lslash /currency /Lcaron /Sacute /section /dieresis /Scaron\n"
+" /Scedilla /Tcaron /Zacute /hyphen /Zcaron /Zdotaccent /degree /aogonek /ogonek /lslash\n"
+" /acute /lcaron /sacute /caron /cedilla /scaron /scedilla /tcaron /zacute /hungarumlaut\n"
+" /zcaron /zdotaccent /Racute /Aacute /Acircumflex /Abreve /Adieresis /Lacute /Cacute /Ccedilla\n"
+" /Ccaron /Eacute /Eogonek /Edieresis /Ecaron /Iacute /Icircumflex /Dcaron /Dbar /Nacute\n"
+" /Ncaron /Oacute /Ocircumflex /Ohungarumlaut /Odieresis /multiply /Rcaron /Uring /Uacute /Uhungarumlaut\n"
+" /Udieresis /Yacute /Tcedilla /germandbls /racute /aacute /acircumflex /abreve /adieresis /lacute\n"
+" /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 struct encoding {
 	char *name;
 	char *defstr;
 } encodings[] = {
 	{ "iso-8859-1",	"isolatin1encoding", },
 	{ "latin1",	"isolatin1encoding", },
+	{ "iso-8859-2",	"isolatin2encoding", },
+	{ "latin2",	"isolatin2encoding", },
 	{ NULL, NULL, },
 };
 struct encoding *encoding = NULL;
@@ -579,6 +609,8 @@
 	/* emit character encoding definition, if necessary */
 	if (encoding && strcmp(encoding->defstr, "isolatin1encoding") == 0)
 		fprintf(fp, "%s", latin1def);
+	if (encoding && strcmp(encoding->defstr, "isolatin2encoding") == 0)
+		fprintf(fp, "%s", latin2def);
 }
 
 static void
Only in magicpoint: print.c.~1.97.~
-- 
Pavel Janík

printk("; corrupted filesystem mounted read/write - your computer
          will explode within 20 seconds ... but you wanted it so!\n");
                  -- 2.4.3 fs/hpfs/super.c