Index: kit/ctlwords.pl
diff -u kit/ctlwords.pl:1.2 kit/ctlwords.pl:removed
--- kit/ctlwords.pl:1.2	Sat Sep  5 06:05:08 1998
+++ kit/ctlwords.pl	Mon Jan 18 05:10:05 1999
@@ -1,12 +0,0 @@
-#! /usr/bin/perl
-$counter = 0;	# 0 origin
-print "/* generated by ctlwords.awk. do not edit by hand. */\n";
-
-while (<>) {
-	next if (!/^\/\*CTL\*\//);
-	next if ($_ !~ /(CTL_[A-Z0-9]+)/);
-
-	$word = $1;
-	print "#define $word\t$counter\n";
-	$counter++;
-}
Index: kit/keywords.pl
diff -u kit/keywords.pl:1.1 kit/keywords.pl:removed
--- kit/keywords.pl:1.1	Tue Nov 11 15:07:40 1997
+++ kit/keywords.pl	Mon Jan 18 05:10:06 1999
@@ -1,14 +0,0 @@
-@keywords = ();
-
-die if (@ARGV != 1);
-open(IN, "< $ARGV[0]") || die;
-while (<IN>) {
-	next if (! /^\/\*CTL\*\//);
-	next if (! /CTL_([A-Z0-9]+),/);
-	$t = $1;
-	$t =~ tr/A-Z/a-z/;
-	push(@keywords, $t);
-}
-close(IN);
-
-print join(' ', @keywords) . "\n";
Index: kit/print.c
diff -u kit/print.c:1.73 kit/print.c:1.75
--- kit/print.c:1.73	Mon Dec 28 17:22:40 1998
+++ kit/print.c	Mon Jan 11 22:12:39 1999
@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  */
 /*
- * $Id: print.c,v 1.73 1998/12/28 08:22:40 itojun Exp $
+ * $Id: print.c,v 1.75 1999/01/11 13:12:39 itojun Exp $
  */
 /*
  * Paper size selection code is based on psutil.c by Angus J. C. Duggan
@@ -174,6 +174,44 @@
 	{ NULL,	0, 0 }
 };
 
+static const char *latin1def = 
+"[ /.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 /hyphen /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 /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright\n"
+" /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior\n"
+" /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf\n"
+" /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla\n"
+" /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde\n"
+" /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex\n"
+" /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring\n"
+" /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis\n"
+" /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave\n"
+" /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis] /isolatin1encoding exch def\n";
+
+static struct encoding {
+	char *name;
+	char *defstr;
+} encodings[] = {
+	{ "iso-8859-1",	"isolatin1encoding", },
+	{ "latin1",	"isolatin1encoding", },
+	{ NULL, NULL, },
+};
+struct encoding *encoding = NULL;
+
 static Paper *paper;
 static int w_width, w_height;
 static int paper_xmargin = 10;
@@ -485,6 +523,10 @@
 	fprintf(fp, "  b4_Inc_state restore\n");
 	fprintf(fp, "}bind def\n");
 	fprintf(fp, "%%\n");
+
+	/* emit character encoding definition, if necessary */
+	if (encoding && strcmp(encoding->defstr, "isolatin1encoding") == 0)
+		fprintf(fp, "%s", latin1def);
 }
 
 static void
@@ -1401,7 +1443,7 @@
 	char	*name;
 {
 	fprintf(stderr, "Usage: %s [-cirV] [-f psfile] [-p paper] "
-		"[-x xmargin] [-y ymargin] mgpfile\n", name);
+		"[-x xmargin] [-y ymargin] [-e encoding] mgpfile\n", name);
 	exit(0);
 }
 
@@ -1710,7 +1752,7 @@
 	/* set default paper size */
 	paper = findpaper(DEFAULT_PAPER_SIZE);
 
-	while ((opt = getopt(argc, argv, "ciVrf:x:y:p:")) != -1) {
+	while ((opt = getopt(argc, argv, "ciVrf:x:y:p:e:")) != -1) {
 		switch (opt) {
 		case 'c':
 			colorps++;
@@ -1750,6 +1792,19 @@
 			}
 			break;
 
+		case 'e':
+			for (encoding = &encodings[0];
+			     encoding->name;
+			     encoding++) {
+				if (strcmp(encoding->name, optarg) == 0)
+					break;
+			}
+			if (!encoding->name) {
+				fprintf(stderr, "unknown encoding %s\n", optarg);
+				exit(1);
+			}
+			break;
+
 		default:
 			print_usage(progname);
 			/*NOTREACHED*/
@@ -1871,9 +1926,23 @@
 	if (mgp_flag & FL_VERBOSE) {
 		fprintf(fp, "%% loading font \"%s\" for %s\n",
 			font->psfont, font->font);
+	}
+	if (font->lang == ASCII && encoding) {
+		fprintf(fp,
+"/%s%s\n"
+"	/%s findfont\n"
+"		dup length dict begin\n"
+"		{1 index /FID ne {def} {pop pop} ifelse} forall\n"
+"		/Encoding %s def\n"
+"	currentdict end\n"
+"definefont pop\n",
+			fontstring(font), "t", font->psfont, encoding->defstr);
+		fprintf(fp, "/%s {/%s%s findfont exch scalefont setfont} def\n",
+			fontstring(font), fontstring(font), "t");
+	} else {
+		fprintf(fp, "/%s {/%s findfont exch scalefont setfont} def\n",
+			fontstring(font), font->psfont);
 	}
-	fprintf(fp, "/%s {/%s findfont exch scalefont setfont} def\n",
-		fontstring(font), font->psfont);
 	font->loaded = 1;
 }
 
