Index: kit/CHANGELOG
diff -u kit/CHANGELOG:1.9 kit/CHANGELOG:removed
--- kit/CHANGELOG:1.9	Sat Sep  5 00:11:21 1998
+++ kit/CHANGELOG	Mon Jul 10 05:10:04 2000
@@ -1,51 +0,0 @@
-CHANGELOG for magicpoint
-$Id: CHANGELOG,v 1.9 1998/09/04 15:11:21 onoe Exp $
-
-Fri Sep  5 1998  onoe@sm.sony.co.jp
-	* handle key inputs from invoked terminal as pressed on Xserver,
-	  even if the Xserver is running on a remote host.
-
-Mon Aug 26 1998  itojun@iijlab.net
-	* new copyright. (BSDish copyright without clause 3)
-
-Mon Aug 25 1998  itojun@iijlab.net
-	* print.c: better x11/freetype/vflib -> postscript font mapping.
-
-Mon Aug 23 1998  kato@wide.ad.jp
-	* embedded image support (added mgpembed.pl and embed.c)
-
-Mon Aug 22 1998  itojun@iijlab.net
-	* added contrib/xmindpath, MindPath PocketPoint user-level driver.
-
-Fri Jul 10 11:57:59 JST 1998  itojun@iijlab.net
-	* cache gs-generated image file.
-	  Suggested by: luigi@FreeBSD.org
-
-Mon Jul  6 11:38:32 JST 1998  itojun@iijlab.net
-	* capable of handling GB2312 and KSC5601 encoding.
-	  they must be encoded by using iso-2022 like escape sequences.
-	  EUC-cn or EUC-kr does not work.
-	* -x option is added.
-
-Thu Jul  2 18:04:16 JST 1998  itojun@iijlab.net
-	* eliminate gsview.
-	* revamp "xfont" directive. (see SYNTAX for detail)
-
-Thu Jun 25 13:10:28 JST 1998  itojun@iijlab.net
-	* print.c: color postscript support by "mgp2ps -c".
-
-changes between 1.02a and 1.03a:
-	* To allow color name that has space inbetween ("dark blue"), 
-	  color name after directives SHOULD come with doublequote.
-	  Therefore,
-		%fore blue
-	  should be
-		%fore "blue"
-	  At this moment, doublequote can be ommitted for backward
-	  compatibility.  We may require to have doublequote in the future.
-	  Font names and other string parameter obeys the same rule.
-	* %image is now capable of rendering encapsulated postscript files
-	  (*.eps).
-		%image foo.eps
-	  should work fine.
-	  By using -X option, you can specify device name for ghostscript.
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 Jul 10 05:10:06 2000
@@ -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/draw.c
diff -u kit/draw.c:1.171 kit/draw.c:1.173
--- kit/draw.c:1.171	Thu May 11 17:01:50 2000
+++ kit/draw.c	Sat Jul  8 05:04:08 2000
@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  */
 /*
- * $Id: draw.c,v 1.171 2000/05/11 08:01:50 itojun Exp $
+ * $Id: draw.c,v 1.173 2000/07/07 20:04:08 nishida Exp $
  */
 
 #include "mgp.h"
@@ -540,11 +540,11 @@
 
 #ifdef FREETYPE
 	case CTL_TFONT:
-		tfc_setfont(cp->ctc_value, 0);
+		tfc_setfont(cp->ctc2_value1, 0, cp->ctc2_value2);
 		break;
 
 	case CTL_TMFONT:
-		tfc_setfont(cp->ctc_value, 1);
+		tfc_setfont(cp->ctc_value, 1, NULL);
 		break;
 
 #endif /*FREETYPE*/
@@ -758,6 +758,15 @@
 		}
 		break;
 
+	case CTL_CHARSET:
+		if (get_regid(cp->ctc_value) < 0){
+			fprintf(stderr, "invalid charset \"%s\". ignored\n", 
+				cp->ctc_value);
+			break;
+		}
+		strcpy(mgp_charset, cp->ctc_value);
+		break;
+
 	default:
 		fprintf(stderr,
 			"undefined directive %d at page %d line %d:\n\t",
@@ -2384,12 +2393,12 @@
 }
 
 static u_int
-draw_onechar_x(state, code, x, y, size, registry, lastchar)
+draw_onechar_x(state, code, x, y, size, argregistry, lastchar)
 	struct render_state *state;
 	u_int code;
 	int x, y;
 	int size;
-	char *registry;
+	char *argregistry;
 	int lastchar;
 {
 	u_int charlen;
@@ -2398,9 +2407,15 @@
 	XCharStruct *cs;
 	char *metricsource;
 	char *seed;
+	char *registry;
 
+	if (code >= 0xa0 && ((!argregistry || !argregistry[0]) && mgp_charset))
+		registry = mgp_charset;
+	else 
+		registry = argregistry;
 	seed = x_findseed(state, registry);
 	xfontstruct = x_setfont(seed, char_size[caching], registry, NULL);
+
 	if (xfontstruct == NULL)
 		return 0;
 
@@ -4157,4 +4172,19 @@
 		cleanup(-1);
 		break;
 	}
+}
+
+int
+get_regid(registry)
+    char *registry;
+{
+	char *p;
+
+	if (!registry || registry[0] == '\0') return 0;
+	if (strlen(registry) == 9 && !strncmp("iso8859-", registry, 8) &&
+		registry[8] >= '1' && registry[8] <= '4') {
+			p = registry + 8;
+			return atoi(p) -1;
+	} else
+		return -1;
 }
Index: kit/globals.c
diff -u kit/globals.c:1.41 kit/globals.c:1.42
--- kit/globals.c:1.41	Sun Mar  5 16:26:33 2000
+++ kit/globals.c	Sat Jul  8 05:04:11 2000
@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  */
 /*
- * $Id: globals.c,v 1.41 2000/03/05 07:26:33 nishida Exp $
+ * $Id: globals.c,v 1.42 2000/07/07 20:04:11 nishida Exp $
  */
 
 #include "mgp.h"
@@ -82,6 +82,8 @@
 u_long ctrl_color[2];
 u_int b_quality[2] = {DEFAULT_BQUALITY, DEFAULT_BQUALITY};
 u_int quality_flag = 0;
+
+char mgp_charset[256];
 
 struct alloc_color image_clr = {0, NULL};
 struct alloc_color back_clr = {0, NULL};
Index: kit/grammar.y
diff -u kit/grammar.y:1.33 kit/grammar.y:1.34
--- kit/grammar.y:1.33	Fri Sep 10 16:13:41 1999
+++ kit/grammar.y	Sat Jul  8 02:58:16 2000
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 /*
- * $Id: grammar.y,v 1.33 1999/09/10 07:13:41 itojun Exp $
+ * $Id: grammar.y,v 1.34 2000/07/07 17:58:16 nishida Exp $
  */
 /*
  * partly derived from lbl libpcap source code, which has the following
@@ -801,13 +801,23 @@
 				}
 	| KW_TFONT STRorID	{
 #ifdef FREETYPE
-				  $$ = gen_str(CTL_TFONT, $2);
+				  $$ = gen_str2(CTL_TFONT, $2, "iso8859-1");
 #else
-				  $$ = gen_str(CTL_NOOP, $2);
+				  $$ = gen_str2(CTL_NOOP, $2, "iso8859-1");
+				  yywarn("directive \"tfont\" not supported "
+					"in this configuration");
+#endif
+				}
+	| KW_TFONT STRorID	STRorID {
+#ifdef FREETYPE
+				  $$ = gen_str2(CTL_TFONT, $2, $3);
+#else
+				  $$ = gen_str2(CTL_NOOP, $2, $3);
 				  yywarn("directive \"tfont\" not supported "
 					"in this configuration");
 #endif
 				}
+
 	| KW_TMFONT STRorID	{
 #ifdef FREETYPE
 				  $$ = gen_str(CTL_TMFONT, $2);
Index: kit/mgp.c
diff -u kit/mgp.c:1.112 kit/mgp.c:1.113
--- kit/mgp.c:1.112	Thu Mar  9 15:04:00 2000
+++ kit/mgp.c	Fri Jul  7 21:30:38 2000
@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  */
 /*
- * $Id: mgp.c,v 1.112 2000/03/09 06:04:00 kazu Exp $
+ * $Id: mgp.c,v 1.113 2000/07/07 12:30:38 nishida Exp $
  */
 
 static char *mgp_version = "1.07a (20000309)";
@@ -81,6 +81,7 @@
 char *freetypemfont0 = NULL;	/* font name to be used as a last resort */
 
 int unicode_map[65536];
+int latin_unicode_map[3][256]; /* currently we have iso8859-2-4 map */
 #endif
 
 static char *tsfile = NULL;
Index: kit/mgp.h
diff -u kit/mgp.h:1.118 kit/mgp.h:1.121
--- kit/mgp.h:1.118	Sun Mar  5 16:26:36 2000
+++ kit/mgp.h	Sat Jul  8 05:04:12 2000
@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  */
 /*
- * $Id: mgp.h,v 1.118 2000/03/05 07:26:36 nishida Exp $
+ * $Id: mgp.h,v 1.121 2000/07/07 20:04:12 nishida Exp $
  */
 
 #include <stdio.h>
@@ -540,6 +540,8 @@
 extern u_int b_quality[2];
 extern u_int quality_flag;
 
+extern char mgp_charset[256];
+
 #define VERT_GAP(s)		((s) * vert_gap[caching] / 100)
 #define HORIZ_GAP(s)		((s) * horiz_gap[caching] / 100)
 #define VERT_STEP(s)		((s) + VERT_GAP(s))
@@ -593,6 +595,7 @@
 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];
+extern int latin_unicode_map[3][256];
 #endif
 #ifdef TTY_KEYINPUT
 extern volatile int ttykey_enable;
@@ -624,6 +627,7 @@
 extern Bool draw_one __P((struct render_state *, XEvent *));
 extern void timebar __P((struct render_state *));
 extern void draw_reinit __P((struct render_state *));
+extern int get_regid __P((char *));
 
 /*parse.c*/
 extern void load_file __P((char *));
@@ -681,7 +685,7 @@
 /* tfont.c */
 extern int tfc_setsize __P((u_int));
 extern struct tfont *tfc_get __P((u_int, u_int, int, char *, int));
-extern void tfc_setfont __P((char *, int));
+extern void tfc_setfont __P((char *, int, char *));
 extern XImage *tfc_image __P((struct tfont *, long, long, XImage *, int, int));
 
 /* embed.c */
Index: kit/parse.c
diff -u kit/parse.c:1.82 kit/parse.c:1.83
--- kit/parse.c:1.82	Sun Mar  5 16:26:37 2000
+++ kit/parse.c	Sat Jul  8 02:58:19 2000
@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  */
 /*
- * $Id: parse.c,v 1.82 2000/03/05 07:26:37 nishida Exp $
+ * $Id: parse.c,v 1.83 2000/07/07 17:58:19 nishida Exp $
  */
 
 #include "mgp.h"
@@ -803,7 +803,8 @@
 	tmpstr[2]->ctc2_value2 = strdup("iso8859-1");
 #ifdef FREETYPE
 	tmpstr[3] = ctlalloc1(CTL_TFONT);
-	tmpstr[3]->ctc_value = strdup(freetypefont0 ? freetypefont0 : "arial.ttf");
+	tmpstr[3]->ctc2_value1 = strdup(freetypefont0 ? freetypefont0 :"arial.ttf");
+	tmpstr[3]->ctc2_value2 = strdup("iso8859-1");
 #else
 	tmpstr[3] = ctlalloc1(CTL_NOOP);	/* CTL_TFONT */
 	tmpstr[3]->ctc_value = strdup("");
Index: kit/tfont.c
diff -u kit/tfont.c:1.34 kit/tfont.c:1.38
--- kit/tfont.c:1.34	Fri Mar  3 03:24:52 2000
+++ kit/tfont.c	Sat Jul  8 05:04:14 2000
@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  */
 /*
- * $Id: tfont.c,v 1.34 2000/03/02 18:24:52 nishida Exp $
+ * $Id: tfont.c,v 1.38 2000/07/07 20:04:14 nishida Exp $
  */
 
 #include "mgp.h"
@@ -48,7 +48,7 @@
 static TT_Engine		engine;
 static XImage *xim;
 
-static char *tf_curname = NULL;
+static char *tf_curname[4]; /* contains iso8859-[2-4] fonts */
 static char *tf_mcurname = NULL;
 static int tfcinitdone;
 static int tfcachecnt;
@@ -59,6 +59,7 @@
 static int tfcachemiss = 0;
 static int tfcuridx = -1;
 static char tfloadedfont[1024][TFFONT_NUM];
+static int tfloadedregistry[TFFONT_NUM];
 
 #define TFC_INSHASH(tfc) { \
 	struct tfont *h, *n;						\
@@ -112,6 +113,7 @@
 	tfclru.lrunext = tfclru.lruprev = &tfclru;
 	tfcinitdone ++;
 
+	latin_unicode_map_init();
 #ifdef FREETYPE_CHARSET16
 	unicode_map_init();
 #endif
@@ -161,14 +163,20 @@
 	int charset16;
 {
 	struct tfont *tfc, *ntfc;
+	int	regid;
 
 	if (!tfcinitdone)
 		tfc_init();
 
 	if (charset16)
 		tfc = tfc_lookup(code, size, tf_mcurname);
-	else
-		tfc = tfc_lookup(code, size, tf_curname);
+	else {
+		if (code >= 0xa0 && ((!registry || !registry[0]) && mgp_charset)){
+			regid = get_regid(mgp_charset);
+		} else 
+			regid = get_regid(registry);
+		tfc = tfc_lookup(code, size, tf_curname[regid]);
+	}
 
 	if (tfc == NULL) {
 		/* XXX */
@@ -189,18 +197,19 @@
 		if (charset16)
 			tfc = tfc_alloc(code, size, tf_mcurname, registry);
 		else
-			tfc = tfc_alloc(code, size, tf_curname, registry);
+			tfc = tfc_alloc(code, size, tf_curname[regid], registry);
 	}
 	return tfc;
 }
 
 void
-tfc_setfont(name, charset16)
+tfc_setfont(name, charset16, registry)
 	char *name;
 	int charset16;  /*2-octet charset?*/
+	char *registry;
 {
 	char *fontname = NULL;
-	u_int i;
+	u_int i, regid;
 	int res = 96; /* XXX */
 	char pathname[MAXPATHLEN];
 	int trial;
@@ -259,8 +268,10 @@
 				tfcuridx = i;
 				if (charset16)
 					tf_mcurname = tfloadedfont[i];
-				else
-					tf_curname = tfloadedfont[i];
+				else {
+					regid = get_regid(registry);
+					tf_curname[regid] = tfloadedfont[i];
+				}
 #if 0
 				tfc_setsize(char_size);
 #endif
@@ -321,6 +332,13 @@
 			fontname);
 	}
 
+	/* get registry id */
+	if ((regid = get_regid(registry)) < 0){
+		fprintf(stderr, "font \"%s\" has irregal registry\n", fontname);
+			goto fail2;	
+	}
+
+	tfloadedregistry[tffontcnt] = regid;
 	strcpy(tfloadedfont[tffontcnt], fontname);
 	tfcuridx = tffontcnt;
 	face[tfcuridx] = tface;
@@ -360,8 +378,15 @@
 cached:
 	if (charset16)
 		tf_mcurname = tfloadedfont[tfcuridx];
-	else
-		tf_curname = tfloadedfont[tfcuridx];
+	else {
+		if (registry)
+			tf_curname[regid] = tfloadedfont[tfcuridx];
+		else {
+			/* this should be default font */
+			for (i = 0; i < 4; i ++)
+				tf_curname[i] = tfloadedfont[tfcuridx];
+		}
+	}
 	if (tfc_setsize(char_size[caching]) < 0)
 		goto fail2;
 
@@ -372,7 +397,7 @@
 	TT_Close_Face(tface);
 	tffontcnt--;
 fail:
-	tf_curname = "";
+	tf_curname[regid] = "";
 	tfcuridx = -1;
 	return;
 }
@@ -422,7 +447,7 @@
 	if (!tffontcnt) {
 		if (verbose)
 			fprintf(stderr, "no fontcount\n");
-		tfc_setfont(NULL, 0);
+		tfc_setfont(NULL, 0, NULL);
 	}
 
 	/* font out of bounds, suggests no font was available */
@@ -517,6 +542,8 @@
 	TT_CharMap      char_map;
 	unsigned short  i, n;
 	unsigned short  platform, encoding;
+	unsigned int	regid;
+	char			p;
 
 	/* First, look for a Unicode charmap */
 #ifdef HAVE_TT_FACE_PROPERTIES_CHARMAPS
@@ -525,7 +552,7 @@
 	n = TT_Get_CharMap_Count(face[tfcuridx]);
 #endif
 
-#if 0
+#if 1
 	if (verbose) {
 		fprintf(stderr, "%d charmaps for font %s code %04x\n",
 			n, tfloadedfont[tfcuridx], code & 0xffff);
@@ -549,6 +576,20 @@
 			if (code > 256)
 				code = unicode_map[code];
 #endif /* FREETYPE_CHARSET16 */
+
+#if 1 /* latin2-4 encoding processing */
+			if (code > 0xa0) {
+				if (registry)
+					regid = get_regid(registry) -1;
+				else {
+					if (mgp_charset)
+						regid = get_regid(mgp_charset) -1;
+				}
+				if (latin_unicode_map[regid][code])
+					code = latin_unicode_map[regid][code];
+			}
+#endif
+
 			return TT_Char_Index(char_map, (short) code);
 		}
 #ifdef FREETYPE_CHARSET16
@@ -563,7 +604,7 @@
 					return TT_Char_Index(char_map, (u_short) jistosjis(code));
 			} else {
 				if (platform == 1 && encoding == 0) {
-					if (code > 256) continue;
+					if (code >= 0xa0) continue;
 					TT_Get_CharMap(face[tfcuridx], i, &char_map);
 					return TT_Char_Index(char_map, (short) code);
 				}
@@ -720,6 +761,5 @@
 
 	return (((c1 + 1) >> 1) + rowOffset) * 256 + c2 + cellOffset;
 }
-
 
 #endif /* FRRETYPE */
Index: kit/unimap.c
diff -u kit/unimap.c:1.1 kit/unimap.c:1.2
--- kit/unimap.c:1.1	Mon Apr 12 03:14:27 1999
+++ kit/unimap.c	Fri Jul  7 21:30:43 2000
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 /*
- * $Id: unimap.c,v 1.1 1999/04/11 18:14:27 nishida Exp $
+ * $Id: unimap.c,v 1.2 2000/07/07 12:30:43 nishida Exp $
  */
 
 #include "mgp.h"
@@ -3480,3 +3480,80 @@
 }
 
 #endif /* FREETYPE_CHARSET16 */
+
+void
+latin_unicode_map_init(){
+
+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;
+latin_unicode_map[0][0xAA] = 0x015E; latin_unicode_map[0][0xAB] = 0x0164;
+latin_unicode_map[0][0xAC] = 0x0179; latin_unicode_map[0][0xAE] = 0x017D;
+latin_unicode_map[0][0xAF] = 0x017B; latin_unicode_map[0][0xB1] = 0x0105;
+latin_unicode_map[0][0xB2] = 0x02DB; latin_unicode_map[0][0xB3] = 0x0142;
+latin_unicode_map[0][0xB5] = 0x013E; latin_unicode_map[0][0xB6] = 0x015B;
+latin_unicode_map[0][0xB7] = 0x02C7; latin_unicode_map[0][0xB9] = 0x0161;
+latin_unicode_map[0][0xBA] = 0x015F; latin_unicode_map[0][0xBB] = 0x0165;
+latin_unicode_map[0][0xBC] = 0x017A; latin_unicode_map[0][0xBD] = 0x02DD;
+latin_unicode_map[0][0xBE] = 0x017E; latin_unicode_map[0][0xBF] = 0x017C;
+latin_unicode_map[0][0xC0] = 0x0154; latin_unicode_map[0][0xC3] = 0x0102;
+latin_unicode_map[0][0xC5] = 0x0139; latin_unicode_map[0][0xC6] = 0x0106;
+latin_unicode_map[0][0xC8] = 0x010C; latin_unicode_map[0][0xCA] = 0x0118;
+latin_unicode_map[0][0xCC] = 0x011A; latin_unicode_map[0][0xCF] = 0x010E;
+latin_unicode_map[0][0xD0] = 0x0110; latin_unicode_map[0][0xD1] = 0x0143;
+latin_unicode_map[0][0xD2] = 0x0147; latin_unicode_map[0][0xD5] = 0x0150;
+latin_unicode_map[0][0xD8] = 0x0158; latin_unicode_map[0][0xD9] = 0x016E;
+latin_unicode_map[0][0xDB] = 0x0170; latin_unicode_map[0][0xDE] = 0x0162;
+latin_unicode_map[0][0xDF] = 0x00DF; latin_unicode_map[0][0xE0] = 0x0155;
+latin_unicode_map[0][0xE3] = 0x0103; latin_unicode_map[0][0xE5] = 0x013A;
+latin_unicode_map[0][0xE6] = 0x0107; latin_unicode_map[0][0xE8] = 0x010D;
+latin_unicode_map[0][0xEA] = 0x0119; latin_unicode_map[0][0xEC] = 0x011B;
+latin_unicode_map[0][0xEF] = 0x010F; latin_unicode_map[0][0xF0] = 0x0111;
+latin_unicode_map[0][0xF1] = 0x0144; latin_unicode_map[0][0xF2] = 0x0148;
+latin_unicode_map[0][0xF5] = 0x0151; latin_unicode_map[0][0xF8] = 0x0159;
+latin_unicode_map[0][0xF9] = 0x016F; latin_unicode_map[0][0xFB] = 0x0171;
+latin_unicode_map[0][0xFE] = 0x0163; latin_unicode_map[0][0xFF] = 0x02D9;
+
+latin_unicode_map[1][0xA1] = 0x0126; latin_unicode_map[1][0xA2] = 0x02D8;
+latin_unicode_map[1][0xA6] = 0x0124; latin_unicode_map[1][0xA9] = 0x0130;
+latin_unicode_map[1][0xAA] = 0x015E; latin_unicode_map[1][0xAB] = 0x011E;
+latin_unicode_map[1][0xAC] = 0x0134; latin_unicode_map[1][0xAF] = 0x017B;
+latin_unicode_map[1][0xB1] = 0x0127; latin_unicode_map[1][0xB6] = 0x0125;
+latin_unicode_map[1][0xB9] = 0x0131; latin_unicode_map[1][0xBA] = 0x015F;
+latin_unicode_map[1][0xBB] = 0x011F; latin_unicode_map[1][0xBC] = 0x0135;
+latin_unicode_map[1][0xBF] = 0x017C; latin_unicode_map[1][0xC5] = 0x010A;
+latin_unicode_map[1][0xC6] = 0x0108; latin_unicode_map[1][0xD5] = 0x0120;
+latin_unicode_map[1][0xD8] = 0x011C; latin_unicode_map[1][0xDD] = 0x016C;
+latin_unicode_map[1][0xDE] = 0x015C; latin_unicode_map[1][0xDF] = 0x00DF;
+latin_unicode_map[1][0xE5] = 0x010B; latin_unicode_map[1][0xE6] = 0x0109;
+latin_unicode_map[1][0xF5] = 0x0121; latin_unicode_map[1][0xF8] = 0x011D;
+latin_unicode_map[1][0xFD] = 0x016D; latin_unicode_map[1][0xFE] = 0x015D;
+latin_unicode_map[1][0xFF] = 0x02D9; 
+
+latin_unicode_map[2][0xA1] = 0x0104; latin_unicode_map[2][0xA2] = 0x0138;
+latin_unicode_map[2][0xA3] = 0x0156; latin_unicode_map[2][0xA5] = 0x0128;
+latin_unicode_map[2][0xA6] = 0x013B; latin_unicode_map[2][0xA9] = 0x0160;
+latin_unicode_map[2][0xAA] = 0x0112; latin_unicode_map[2][0xAB] = 0x0122;
+latin_unicode_map[2][0xAC] = 0x0166; latin_unicode_map[2][0xAE] = 0x017D;
+latin_unicode_map[2][0xB1] = 0x0105; latin_unicode_map[2][0xB2] = 0x02DB;
+latin_unicode_map[2][0xB3] = 0x0157; latin_unicode_map[2][0xB5] = 0x0129;
+latin_unicode_map[2][0xB6] = 0x013C; latin_unicode_map[2][0xB7] = 0x02C7;
+latin_unicode_map[2][0xB9] = 0x0161; latin_unicode_map[2][0xBA] = 0x0113;
+latin_unicode_map[2][0xBB] = 0x0123; latin_unicode_map[2][0xBC] = 0x0167;
+latin_unicode_map[2][0xBD] = 0x014A; latin_unicode_map[2][0xBE] = 0x017E;
+latin_unicode_map[2][0xBF] = 0x014B; latin_unicode_map[2][0xC0] = 0x0100;
+latin_unicode_map[2][0xC7] = 0x012E; latin_unicode_map[2][0xC8] = 0x010C;
+latin_unicode_map[2][0xCA] = 0x0118; latin_unicode_map[2][0xCC] = 0x0116;
+latin_unicode_map[2][0xCF] = 0x012A; latin_unicode_map[2][0xD0] = 0x0110;
+latin_unicode_map[2][0xD1] = 0x0145; latin_unicode_map[2][0xD2] = 0x014C;
+latin_unicode_map[2][0xD3] = 0x0136; latin_unicode_map[2][0xD9] = 0x0172;
+latin_unicode_map[2][0xDD] = 0x0168; latin_unicode_map[2][0xDE] = 0x016A;
+latin_unicode_map[2][0xDF] = 0x00DF; latin_unicode_map[2][0xE0] = 0x0101;
+latin_unicode_map[2][0xE7] = 0x012F; latin_unicode_map[2][0xE8] = 0x010D;
+latin_unicode_map[2][0xEA] = 0x0119; latin_unicode_map[2][0xEC] = 0x0117;
+latin_unicode_map[2][0xEF] = 0x012B; latin_unicode_map[2][0xF0] = 0x0111;
+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; 
+}
Index: kit/image/gif.h
diff -u kit/image/gif.h:1.2 kit/image/gif.h:removed
--- kit/image/gif.h:1.2	Mon Dec 28 17:23:03 1998
+++ kit/image/gif.h	Mon Jul 10 05:10:21 2000
@@ -1,72 +0,0 @@
-/* gif.h:
- *
- * gifin.h
- * kirk johnson
- * november 1989
- * external interface to gifin.c
- *
- * Copyright 1989 Kirk L. Johnson (see the included file
- * "kljcpyrght.h" for complete copyright information)
- */
-
-/*
- * gifin return codes
- */
-#define GIFIN_SUCCESS       0   /* success */
-#define GIFIN_DONE          1   /* no more images */
-
-#define GIFIN_ERR_BAD_SD   -1   /* bad screen descriptor */
-#define GIFIN_ERR_BAD_SEP  -2   /* bad image separator */
-#define GIFIN_ERR_BAD_SIG  -3   /* bad signature */
-#define GIFIN_ERR_EOD      -4   /* unexpected end of raster data */
-#define GIFIN_ERR_EOF      -5   /* unexpected end of input stream */
-#define GIFIN_ERR_FAO      -6   /* file already open */
-#define GIFIN_ERR_IAO      -7   /* image already open */
-#define GIFIN_ERR_NFO      -8   /* no file open */
-#define GIFIN_ERR_NIO      -9   /* no image open */
-
-/*
- * colormap indices 
- */
-
-#define GIF_RED  0
-#define GIF_GRN  1
-#define GIF_BLU  2
-
-/*
- * typedef BYTE for convenience
- */
-
-typedef unsigned char BYTE;
-
-static int gifin_open_file();
-static int gifin_open_image();
-static int gifin_get_pixel();
-#if 0
-static int gifin_close_image();
-#endif
-static int gifin_close_file();
-static int gifin_load_cmap();
-static int gifin_skip_extension();
-static int gifin_read_data_block();
-static int gifin_push_string();
-static void gifin_add_string();
-static void gifin_fatal();
-
-/* #defines, typedefs, and such
- */
-
-#define GIF_SIG      "GIF87a"
-#define GIF_SIG_89   "GIF89a"
-#define GIF_SIG_LEN  6          /* GIF signature length */
-#define GIF_SD_SIZE  7          /* GIF screen descriptor size */
-#define GIF_ID_SIZE  9          /* GIF image descriptor size */
-
-#define GIF_SEPARATOR   ','     /* GIF image separator */
-#define GIF_EXTENSION   '!'     /* GIF extension block marker */
-#define GIF_TERMINATOR  ';'     /* GIF terminator */
-
-#define STAB_SIZE  4096         /* string table size */
-#define PSTK_SIZE  4096         /* pixel stack size */
-
-#define NULL_CODE  -1           /* string table null code */
Index: kit/sample/cloud.gif
Index: kit/sample/dad.gif
Index: kit/sample/mgp-old1.gif
Index: kit/sample/mgp-old2.gif
Index: kit/sample/mgp-old3.gif
Index: kit/sample/mgp1.gif
Index: kit/sample/mgp2.gif
Index: kit/sample/mgp3.gif
Index: kit/sample/v6header.gif
