Index: kit/README
diff -u kit/README:1.32 kit/README:1.33
--- kit/README:1.32	Mon Apr 12 11:17:48 1999
+++ kit/README	Thu Jun 10 15:54:24 1999
@@ -1,6 +1,6 @@
 	     MagicPoint - an X11 based presentation tool
 
-			  September 4, 1998
+			    June 10, 1999
 
 MagicPoint is an X11 based presentation tool.  It is designed to make
 simple presentations easy while to make complicated presentations
@@ -8,21 +8,22 @@
 just text so that you can create presentation files quickly with your
 favorite editor (e.g. Emacs).
 
-This is alpha release of MagicPoint.  We're planing to add version
-control mechanism of .mgp file for forward compatibly.  But currently,
-such a mechanism is missing. Please use this package at your own risk.
+This is one of the alpha releases of MagicPoint.  We're planing to add
+a version control mechanism of .mgp file for forward compatibly.  But
+currently, such a mechanism is missing. Please use this package at
+your own risk.
 
 MagicPoint is completely free but absolutely no warranty. For more
 information, please refer to COPYRIGHT or COPYRIGHT.jp.  Please note
-that some of the source code is derived from other people's work, and
-may have different distribution policy.  Be sure to check the comment
-in the source code.
+that some of the source codes is derived from other people's works,
+and may have different distribution policies.  Be sure to check the
+comments in the source codes.
 
 
 			     INSTALLATION
 
-Since MagicPoint extensively uses fonts in various sizes we recommend
-you to have good font rendering capability in your system.  Please
+Since MagicPoint extensively uses fonts in various sizes, we recommend
+you to install good font rendering systems in your system.  Please
 refer to README.fonts for detail.
 
 - Short summary for non-Japanese readers:
@@ -30,11 +31,11 @@
 We recommend you to either:
 
     (1) compile MagicPoint with FreeType linked, or
-    (2) use X11 server with good outline font capability.
+    (2) use the X11 server with good outline font capabilities.
 
 The former one is recommended.  For the latter case, it should be okay
-if you have adobe Type1 font in X11 font directory.  There are some
-advanced methods, such as modified X11 server.
+if you have the adobe Type1 font in your X11 font directory.  There
+are some advanced methods, such as modified X11 servers.
 
 - Short summary to Japanese readers:
 
@@ -43,12 +44,12 @@
     (1) compile MagicPoint with FreeType and VFlib linked, or
     (2) compile MagicPoint with FreeType linked, or
     (3) compile MagicPoint with VFlib linked, or
-    (4) use X11 server with outline English/Japanese font capability.
+    (4) use an X11 server with outline English/Japanese font capabilities.
 
 At this moment, MagicPoint uses FreeType only for English fonts, and
 VFlib only for Japanese fonts.  Therefore, Approach (1) is the best.
-(4) needs some special software as standard X11 server will not render
-Japanese scalable font files.
+(4) needs some special software as a standard X11 server will not
+render Japanese scalable font files.
 
 
 Follow the steps below to make MagicPoint:
@@ -68,21 +69,23 @@
 
 	% ./configure --disable-freetype
 
-Note 3: if you have to use non-standard compiler, you must declare your
-compiler by using "env" command, like:
+Note 3: if you have to use a non-standard compiler, you must declare
+your compiler by using "env" command, like:
 
 	% env CC=gcc ./configure		# force gcc
 	% env CC=shlicc2 ./configure		# force shlicc2 (bsdi3)
 
-We cannot make a guess in configure script, since imake may dislike the
-compiler that was guessed by configure.  This applies to, for example,
-Solaris withous Sun compiler license (gcc-only environment).
+We cannot make a guess in the configure script, since "imake" may
+dislike the compiler that was guessed by configure.  This applies to,
+for example, Solaris without the Sun compiler license (gcc-only
+environment).
+
+Note 4: If you are willing to use the iso-8859-x character set
+(i.e. you would like setlocale() to be called at startup), specify 
+--enable-locale.
 
-Note 4: If you are willing to use iso-8859-x character set (i.e. you would
-like setlocale() to be called at startup), specify --enable-locale.
-
 Invoking `configure' updates Imakefile.  So, do NOT forget to invoke
-`xmkmf' every time you update Imakefile.
+`xmkmf' everytime you update Imakefile.
 
 It's a good idea to preview a sample file before installation.
 
@@ -96,8 +99,8 @@
 	# make install
 	# make install.man
 
-If you want to paste EPS figure into your presentation, you will need to
-install ghostscript or alike.
+If you want to paste EPS figures into your presentation, you will need
+to install "ghostscript" or "alike".
 
 			     FOR MORE INFO
 
@@ -107,12 +110,13 @@
 as well as this home page.
 
 Pre-release snapshots are generated weekly, to
-"ftp://sh.wide.ad.jp/WIDE/free-ware/mgp-snap/".  These snapshot MAY NOT
-WORK AT ALL, and these are just for people who would like to hack.
+"ftp://sh.wide.ad.jp/WIDE/free-ware/mgp-snap/".  These snapshots MAY
+NOT WORK AT ALL. Keep in your mind that these are just for people who
+would like to hack.
 
 Please send comments to the developer mailing-list "mgp@Mew.org".
 
-There are two mailing list for magicpoint users:
+There are two mailing lists for magicpoint users:
 	mgp-users@Mew.org	(language: English)
 	mgp-users-jp@Mew.org	(language: Japanese)
 For subscription, please send an email to
Index: kit/SYNTAX
diff -u kit/SYNTAX:1.25 kit/SYNTAX:1.28
--- kit/SYNTAX:1.25	Mon Jun  7 02:55:09 1999
+++ kit/SYNTAX	Tue Jun  8 15:39:35 1999
@@ -1,4 +1,4 @@
-$Id: SYNTAX,v 1.25 1999/06/06 17:55:09 nishida Exp $
+$Id: SYNTAX,v 1.28 1999/06/08 06:39:35 nishida Exp $
 
 placement restriction for directives:
 		.mgprc		preamble	main pages
@@ -196,8 +196,12 @@
 	gives you an green box on the leftmost column of line.
 	size is the percentage against the current character size.
 
-%bimage "imagefile"
+%bimage "imagefile" [ <screensize> ]
 	Specify the name of background image file
+	<screensize> :: auto resizing.
+			specify the original screen size by WIDTHxHEIGHT.
+			unless screensize is the same size of the physical
+			display, zoomrate is calculated automagically.
 
 %default <linenum> <list-of-directives>
 	Unless nodefault directive is specified, the directives in the
@@ -318,7 +322,7 @@
 			0 means disable forward page cache
 			1 means enable forward page cache
 	<mode> :: cache mode
-			0 means disable forward page cache
-			1 means enable forward page cache
-	<effect> :: type of 'special effect' in forward page cache (0-1)
+			0 means caching is executed after 2seconds idle.
+			1 means caching is executed immediately.
+	<effect> :: type of 'special effect' for the forward page cache (0-2)
 	<value> ::  speed of 'special effect'. value 1 means the highest speed.
Index: kit/configure
diff -u kit/configure:1.60 kit/configure:1.61
--- kit/configure:1.60	Thu May 27 12:22:50 1999
+++ kit/configure	Wed Jun  9 05:00:39 1999
@@ -2309,6 +2309,9 @@
 
 
 
+mgp_keywords=`$mgp_cv_path_perl $srcdir/keywords.pl $srcdir/globals.c`
+
+ 
 trap '' 1 2 15
 cat > confcache <<\EOF
 # This file is a shell script that caches the results of configure
@@ -2474,6 +2477,7 @@
 s%@mgp_cv_vflib_a@%$mgp_cv_vflib_a%g
 s%@CPP@%$CPP%g
 s%@LIBOBJS@%$LIBOBJS%g
+s%@mgp_keywords@%$mgp_keywords%g
 
 CEOF
 EOF
Index: kit/configure.in
diff -u kit/configure.in:1.57 kit/configure.in:1.58
--- kit/configure.in:1.57	Thu May 27 12:22:52 1999
+++ kit/configure.in	Wed Jun  9 05:00:41 1999
@@ -3,7 +3,7 @@
 dnl independent (using srcdir), however, xmkmf and Imake.tmpl do not
 dnl allow us to switch compilation directory.
 dnl
-dnl $Id: configure.in,v 1.57 1999/05/27 03:22:52 nishida Exp $
+dnl $Id: configure.in,v 1.58 1999/06/08 20:00:41 itojun Exp $
 AC_INIT(image/imagetypes.c)
 
 dnl Checks for programs.
@@ -241,6 +241,10 @@
 AC_CHECK_FUNCS(poll strstr _setbufend)
 AC_REPLACE_FUNCS(usleep strsep strdup mkstemp snprintf memcmp)
 
+dnl keyword substitution.
+mgp_keywords=`$mgp_cv_path_perl $srcdir/keywords.pl $srcdir/globals.c`
+AC_SUBST(mgp_keywords)
+ 
 AC_OUTPUT(Imakefile image/Imakefile sample/Imakefile
 	contrib/mgp2html.pl contrib/mgp2latex.pl contrib/mgpnet mgpembed.pl)
 
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 Jun 14 05:10:09 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/draw.c
diff -u kit/draw.c:1.150 kit/draw.c:1.151
--- kit/draw.c:1.150	Mon Jun  7 02:55:10 1999
+++ kit/draw.c	Tue Jun  8 11:43:58 1999
@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  */
 /*
- * $Id: draw.c,v 1.150 1999/06/06 17:55:10 nishida Exp $
+ * $Id: draw.c,v 1.151 1999/06/08 02:43:58 nishida Exp $
  */
 
 #include "mgp.h"
@@ -3951,7 +3951,7 @@
 	step = cache_value ? window_width / cache_value : 1;
 	if (!step) step = 1;
 
-	for (x = window_width; x > 0; x -= step){
+	for (x = window_width; x > step; x -= step){
 		XCopyArea(display, window, window, gc_cache,
 			step, 0,  window_width - step, window_height, 0, 0);
 
Index: kit/grammar.y
diff -u kit/grammar.y:1.30 kit/grammar.y:1.32
--- kit/grammar.y:1.30	Mon Jun  7 02:55:14 1999
+++ kit/grammar.y	Tue Jun  8 16:08:40 1999
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 /*
- * $Id: grammar.y,v 1.30 1999/06/06 17:55:14 nishida Exp $
+ * $Id: grammar.y,v 1.32 1999/06/08 07:08:40 nishida Exp $
  */
 /*
  * partly derived from lbl libpcap source code, which has the following
@@ -509,6 +509,8 @@
 	ct->ctch_mode = mode;
 	ct->ctch_effect = effect;
 	ct->ctch_value = value;
+
+	return ct;
 }
 
 #if 0
@@ -783,6 +785,11 @@
 			  $$ = gen_str2(CTL_XFONT2, $2, $3);
 			}
 	| KW_BIMAGE STRorID	{ $$ = gen_image(CTL_BIMAGE, $2, 0, 0, 0, 0); }
+	| KW_BIMAGE STRorID WINSIZ
+			{ int x, y;
+			  x = atoi($3); y = atoi(strchr($3, 'x') + 1);
+			  $$ = gen_image(CTL_BIMAGE, $2, 0, x, y, 2);
+			}
 	| KW_VFONT STRorID	{
 #ifdef VFLIB
 				  $$ = gen_str(CTL_VFONT, $2);
Index: kit/mgp.man
diff -u kit/mgp.man:1.50 kit/mgp.man:1.53
--- kit/mgp.man:1.50	Fri Nov 20 10:51:33 1998
+++ kit/mgp.man	Thu Jun 10 16:00:20 1999
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\" 
-.\"	$Id: mgp.man,v 1.50 1998/11/20 01:51:33 itojun Exp $
+.\"	$Id: mgp.man,v 1.53 1999/06/10 07:00:20 kazu Exp $
 .\"
 .Dd November 1997
 .Dt MGP 1
@@ -48,6 +48,7 @@
 .Op Fl T Ar timestampfile
 .Op Fl X Ar gsdevice
 .Op Fl w Ar wdir
+.Op Fl F Ar mode,effect,value
 .Ar file
 .\"
 .Sh DESCRIPTION
@@ -233,6 +234,32 @@
 specifies the working directory used for store embedded images if any.
 To generate an embedded MGP file, use 
 .Xr mgpembed 1 .
+.It Fl F Ar mode,effect,value
+specifies forward page cache options.
+.Ar mode ,
+.Ar effect
+and
+.Ar value
+are numbers. 
+.Ar mode
+specifies caching mode. 
+.Ar mode
+0 means caching is executed after 2 seconds idle.
+.Ar mode
+1 means caching is executed immediately.
+.Ar effect 
+specifies 'special effect' for the forward page cache. Currently, 
+two special effects are supported by specifying 1 or 2 for  
+.Ar effect .
+.Ar effect 
+0 means no special effect.
+.Ar value
+specifies speed of special effect. 
+.Ar value
+1 means the highest speed. A higher value for 
+.Ar value
+decreases effect speed.
+
 .El
 .\"
 .Sh KEY OPERATION
@@ -271,6 +298,8 @@
 Change the pen color for rakugaki (jotting) mode.
 .It t
 Enable/disable the timebar if -t timeslot option is specified.
+.It c
+Enable/disable forward page cache.
 .It control-L
 Repaint the current page.
 Use this if you messed up the page by jotting too much.
@@ -343,7 +372,7 @@
 Yoshifumi Nishida <nishida@sfc.wide.ad.jp>
 .\"
 .Sh CONTRIBUTION
-Jun-ichiro Itoh <itojun@itojun.org>, Akira Kato <kato@wide.ad.jp>,
+Jun-ichiro Hagino <itojun@itojun.org>, Akira Kato <kato@wide.ad.jp>,
 Atsushi Onoe <onoe@sm.sony.co.jp>, Kazu Yamamoto <Kazu@Mew.org>,
 Youjiro Uo <yuo@nui.org>, and Masaki Minami <Masaki@Minami.org> 
 extensively contributed improvements, bug fixes, and documents.
Index: kit/contrib/mgp2html.pl.in
diff -u kit/contrib/mgp2html.pl.in:1.10 kit/contrib/mgp2html.pl.in:1.11
--- kit/contrib/mgp2html.pl.in:1.10	Sat Apr  3 01:29:19 1999
+++ kit/contrib/mgp2html.pl.in	Wed Jun  9 18:24:27 1999
@@ -2,7 +2,7 @@
 
 # mgp2html.pl
 # converts MagicPoint input file to simple dumb html file.
-# $Id: mgp2html.pl.in,v 1.10 1999/04/02 16:29:19 nishida Exp $
+# $Id: mgp2html.pl.in,v 1.11 1999/06/09 09:24:27 nishida Exp $
 #
 # Copyright (C) 1997 and 1998 WIDE Project.  All rights reserved.
 # 
@@ -40,9 +40,42 @@
 $line = 0;
 $doimage = 1;
 $nodefault = 0;
-$ignoremode = 0;
 $indent = 0;
 $cont = 0;
+$colortext = "";
+$colorbg = "";
+$colorlink = "";
+$colorvflink = "";
+$mgpdefaultfontsize = 5;
+$mgpfontsize = -1;
+$htmldefaultfontsize = -1;
+$htmlfontsize = -1;
+$htmlfontsizemin = 1;
+$htmlfontsizemax = 9;
+$htmlfontcol = "";
+$colormode = 0;
+$colorlast = "";
+$infont = 0;
+$filtermode = 0;
+$filtercmd = "";
+$filterinput = "";
+
+while ($_ = $ARGV[0], /^-/) {
+	shift;
+	last if /^--$/;
+	if (/^-c/)        { $colormode = 1; next; }
+	if (/^-text$/)    { $colortext = shift; next; }
+	if (/^-link$/)    { $colorlink = shift; next; }
+	if (/^-vlink$/)   { $colorvlink = shift; next; }
+	if (/^-bgcolor$/) { $colorbg = shift; next; }
+	if (/^-f$/)       { $mgpdefaultfontsize = shift; next; }
+	if (/^-fh$/)      { $htmldefaultfontsize = shift; next; }
+	if (/^-fhmin$/)   { $htmlfontsizemin = shift; next; }
+	if (/^-fhmax$/)   { $htmlfontsizemax = shift; next; }
+}
+$fontsize = $defaultfontsize;
+$mgpfontsize = $mgpdefaultfontsize;
+$| = 1;
 
 &prologue;
 while (<>) {
@@ -52,10 +85,19 @@
 
 	if ($_ eq '' || $_ =~ /^[^%]/) {
 		$line++;
+		$cont = 0 if ($cont == 2);
+		$cont = 2 if ($cont == 1);
 		if ($default[$line] && !$nodefault) {
 			&cmds($default[$line]);
 		}
-		next if ($ignoremode);
+		if ($filtermode) {
+			if ($filterinput eq "") {
+				$filterinput = $_;
+			} else {
+				$filterinput = $filterinput . "\n" . $_;
+			}
+			next; 
+		}
 		next if ($page == -1);
 		&output($_);
 		next;
@@ -73,6 +115,7 @@
 
 	# special directives
 	if (/^%page/i) {
+		&fontreset;
 		if ($page != -1) {
 			&alignreset;
 			&pageepilogue;
@@ -82,6 +125,9 @@
 		&pageprologue;
 		$line = 0;
 		$nodefault = 0;
+		$htmlfontsize = $htmldefaultfontsize;
+		$mgpfontsize = $mgpdefaultfontsize;
+		$fontchange;
 		next;
 	} elsif (/^%default/i) {
 		$x = (split(/\s+/, $_))[1];
@@ -116,16 +162,26 @@
 			}
 		} elsif ($dir[0] eq 'nodefault') {
 			$nodefault++;
-		} elsif ($dir[0] =~ /^(left|right|center)$/) {
+		} elsif ($dir[0] =~ /^(left|leftfill|right|center)$/) {
 			$dir[0] =~ tr/A-Z/a-z/;
+			&fontreset;
 			&alignreset;
 			&alignmode($dir[0]);
+			&fontchange;
 		} elsif ($dir[0] =~ /^filter$/) {
-			$ignoremode = 1;
+			&filter;
 		} elsif ($dir[0] =~ /^endfilter$/) {
-			$ignoremode = 0;
+			&endfilter;
 		} elsif ($dir[0] =~ /^cont$/) {
 			$cont = 1;
+		} elsif ($dir[0] =~ /^fore/) {
+			$dir[1] =~ s/\"//g;
+			$htmlfontcol = $dir[1];
+			&fontchange if ($colormode == 1);
+		} elsif ($dir[0] =~ /^size/) {
+			$dir[1] =~ s/\"//g;
+			$mgpfontsize = $dir[1];
+			&fontchange;
 		} elsif (grep($dir[0] eq $_, @keywords)) {
 			# unsupported directive with 1 parameter
 		} else {
@@ -135,13 +191,24 @@
 }
 
 sub prologue {
-	print <<EOF;
-<HTML>
-<BODY>
-EOF
+	print "<HTML>\n";
+	print "<BODY";
+	print " TEXT=" . $colortext    if ($colortext ne '');
+	print " BGCOLOR=" . $colorbg   if ($colorbg ne '');
+	print " LINK=" . $colorlink    if ($colorlink ne '');
+	print " VLINK=" . $colorvlink  if ($colorvlink ne '');
+	print ">\n";
+	if ($htmldefaultfontsize > 0) {
+		print "<FONT SIZE=";
+		print $htmldefaultfontsize;
+		print ">\n";
+	}
 }
 
 sub epilogue {
+	if ($htmldefaultfontsize > 0){
+		print "</FONT>\n";
+	}
 	print <<EOF;
 </BODY>
 </HTML>
@@ -155,6 +222,7 @@
 }
 
 sub pageepilogue {
+	&output_eol;
 	$page++;
 	&doindent(0);
 	print <<EOF
@@ -171,27 +239,34 @@
 		$str = substr($str, 1);
 	}
 	if ($cont == 0) {
+		&output_eol;
 		&doindent($i); 
-	}
-	if (length($str)) {
-		if ($indent) {
-			if ($cont == 0) { 
-				print "\t" x $indent . "<LI>" . $str . "\n";
+		if (length($str)) {
+			if ($indent) {
+				print "\t" x $indent . "<LI>" . $str;
+				$endline = "\n";
 			} else {
 				print $str;
+				$endline = "<BR>\n";
 			}
+			$outputsomething++;
 		} else {
-			print $str . "<BR>\n";
+			$endline = "<BR>\n";
 		}
-		$outputsomething++;
 	} else {
-		if ($cont == 0) { 
-			print "<BR>\n";
+		$endline = "";
+		if (length($str)) {
+			print $str;
+			$outputsomething++;
 		}
 	}
-	$cont = 0;
 }
 
+sub output_eol {
+	print $endline;
+	$endline = "";
+}
+
 sub doindent {
 	local($level) = @_;
 
@@ -213,6 +288,8 @@
 
 	if ($alignmode eq 'left') {
 		print "</DIV>\n";
+	} elsif ($alignmode eq 'leftfill') {
+		print "</DIV>\n";
 	} elsif ($alignmode eq 'right') {
 		print "</DIV>\n";
 	} elsif ($alignmode eq 'center') {
@@ -220,7 +297,6 @@
 	} else {
 		die "unknown alignment $alignmode\n";
 	}
-
 	$alignmode = '';
 }
 
@@ -230,6 +306,8 @@
 	$alignmode = $mode;
 	if ($alignmode eq 'left') {
 		print "<DIV ALIGN=LEFT>\n";
+	} elsif ($alignmode eq 'leftfill') {
+		print "<DIV ALIGN=LEFT>\n";
 	} elsif ($alignmode eq 'right') {
 		print "<DIV ALIGN=RIGHT>\n";
 	} elsif ($alignmode eq 'center') {
@@ -238,4 +316,73 @@
 		die "unknown alignment $mode\n";
 	}
 	$outputsomething = 0;
+}
+
+sub filter {
+	$filtercmd = "";
+	for ($i = 1; $i < scalar(@dir); $i++) {
+		$dir[$i] =~ s/\\/\\\\/g;
+		if ($i == 1) {
+			$dir[$i] =~ s/^\"//;
+		} elsif ($i == scalar(@dir) - 1) {
+			$dir[$i] =~ s/\"$//;
+		} else {
+			$dir[$i] =~ s/\"/\\"/g;
+		}
+		$filtercmd = $filtercmd . " " . $dir[$i];
+	}
+	$filtermode = 1;
+}
+
+sub endfilter {
+	if ($filterinput eq '') {
+	} else {
+		$filterinput =~ s/\\/\\\\/g;
+		$filterinput =~ s/"/\\"/g;
+		$filtercmd = "echo \"" . $filterinput . "\""
+				. " | " . $filtercmd;
+	}
+	&output_eol;
+	print "<PRE>\n";
+	system($filtercmd);
+	print "</PRE>\n";
+	$filterinput = "";
+	$filtermode = 0;
+}
+
+sub fontchange {
+	local($fs, $fsh);
+	&fontreset;
+	if ($mgpdefaultfontsize > 0) {
+		$fs = $mgpfontsize - $mgpdefaultfontsize;
+	} else {
+		$fs = 0;
+	}
+	if ($htmldefaultfontsize > 0) {
+		$fsh = $fs + $htmldefaultfontsize;
+		$fs = $htmlfontsizemin if ($fsh < $htmlfontsizemin);
+		$fs = $htmlfontsizemax if ($fsh > $htmlfontsizemax);
+	}
+	if (($fs != 0) || (($colormode == 1) && ($colorlast ne $htmlfontcol))){
+		print "<FONT";
+		if ($fs != 0) {
+			print " SIZE=";
+			print "+" if ($fs >= 0);
+			print $fs;
+		}
+		if (($colormode == 1) && ($colorlast ne $htmlfontcol)) {
+			print " COLOR=\"" . $htmlfontcol . "\"";
+			$colorlast = $htmlfontcol;
+		}
+		print ">";
+		$infont = 1;
+	}
+}
+
+sub fontreset {
+	$colorlast = "";
+	if ($infont == 1) {
+		print "</FONT>";
+	}
+	$infont = 0;
 }
Index: kit/sample/sample-jp.mgp
diff -u kit/sample/sample-jp.mgp:1.25 kit/sample/sample-jp.mgp:1.26
--- kit/sample/sample-jp.mgp:1.25	Sun Jul 19 22:50:30 1998
+++ kit/sample/sample-jp.mgp	Tue Jun  8 02:17:20 1999
@@ -313,7 +313,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %PAGE
 
-$B:G6a$N5!G=(B
+$B$=$NB>$N5!G=(B
 
 	$B2hA|$r(Btab command$B$K;XDj$G$-$^$9!#(B
 	itemize$BMQ%"%$%3%s(B(
@@ -333,9 +333,38 @@
 $B@>ED(B
 %cont, fore "red", font "typewriter", size 6
 $B$G$9!#(B
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%PAGE
+%pcache 1 1 0 0
+
+Forward Page Cache
+
+	$B#1%Z!<%8@h$NFbMF$r%-%c%C%7%e$7$^$9(B
+	$B#2$D$N;XDjJ}K!$,$"$j$^$9(B
+%fore "red"
+		-F
+%cont, fore "yellow"
+ option $B$r;H$&(B
+		"
+%cont, fore "red"
+pcache
+%cont, fore "yellow"
+" directive$B$r;H$&(B
+
+	$B%-%c%C%7%e5!G=$K$h$jIA2h=hM}$,9bB.$K$J$j$^$9(B
+		SPC$B%-!<$r2!$7$F2<$5$$(B
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%PAGE
+%pcache 1 1 1 30
+
+Forward Page Cache$B$NFC<l8z2L(B
+
+	Forward Page Cache$B5!G=$K$OFC<l5!G=$,;XDj$G$-$^$9(B
 
+	SPC$B$r2!$9$HFC<l8z2L$NNc$r$_$k$3$H$,$G$-$^$9(B
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %PAGE
+%pcache 0
 
 $B$*$7$^$$(B
 
Index: kit/sample/sample.mgp
diff -u kit/sample/sample.mgp:1.18 kit/sample/sample.mgp:1.19
--- kit/sample/sample.mgp:1.18	Mon Jun  7 02:55:25 1999
+++ kit/sample/sample.mgp	Tue Jun  8 15:35:55 1999
@@ -216,7 +216,7 @@
 
 Forward page cache (2)
 
-	You can specify 'special effect' in forward page cache.
+	You can specify 'special effect' for the forward page cache.
 		tap space bar to see the 'special effect'. 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %PAGE
