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 Dec 11 05:10:00 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/configure diff -u kit/configure:1.79 kit/configure:1.80 --- kit/configure:1.79 Sun Oct 8 22:49:46 2000 +++ kit/configure Tue Dec 5 00:04:22 2000 @@ -691,7 +691,7 @@ fi echo "$ac_t""$CPP" 1>&6 -for ac_prog in mawk gawk nawk awk +for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -1191,7 +1191,7 @@ echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lttf -lintl $LIBS" +LIBS="-lttf $LIBS" cat > conftest.$ac_ext <], [], [], [dnl echo "Fatal: freetype.h not found" exit 1]) 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 Dec 11 05:10:01 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.174 kit/draw.c:1.177 --- kit/draw.c:1.174 Mon Jul 17 23:21:25 2000 +++ kit/draw.c Tue Dec 5 00:55:59 2000 @@ -26,7 +26,7 @@ * SUCH DAMAGE. */ /* - * $Id: draw.c,v 1.174 2000/07/17 14:21:25 nishida Exp $ + * $Id: draw.c,v 1.177 2000/12/04 15:55:59 nishida Exp $ */ #include "mgp.h" @@ -129,6 +129,7 @@ static void regist_background_pixmap __P((XImageInfo *, Image *)); #define CHECK_CACHE {if (caching){caching = -1; return;}} +#define MINIMUM_ASCENT 1 static int ispsfilename(p0) @@ -505,6 +506,11 @@ break; case CTL_BACK: + if (state->line){ + fprintf(stderr, + "warning: %%back directive should be put in the first line of the page. ignored.\n"); + break; + } back_color[caching] = cp->ctl_value; bg_ctl = cp; /*update later*/ break; @@ -675,7 +681,7 @@ case CTL_LINEEND: /* blank lines */ - if (state->maxascent + state->maxdescent < 3) { /*XXX*/ + if (state->maxascent + state->maxdescent < MINIMUM_ASCENT) { /*XXX*/ state->maxascent = char_size[caching]; state->maxdescent = VERT_GAP(char_size[caching]); } @@ -1770,7 +1776,7 @@ }\ drawarea[areaindex].x = x;\ drawarea[areaindex].y = y - obj->data.X->ascent;\ - drawarea[areaindex].width = obj->data.X->charlen+1;\ + drawarea[areaindex].width = obj->data.X->xmax+1;\ drawarea[areaindex].height = obj->data.X->height+1;\ areaindex ++;\ } @@ -3075,7 +3081,13 @@ XFillRectangle(display, state->target, gcsbar, st, state->ypos + width, len, swidth); state->ypos += width + swidth + VERT_GAP(char_size[caching]) / 2; - state->maxascent = width + swidth; + if (state->maxascent < width + swidth) + state->maxascent = width + swidth; + + /* state->maxascent shouldn't be less than MINIMUM_ASCENT, + otherwise mgp regards this line as blank line. */ + if (state->maxascent < MINIMUM_ASCENT) + state->maxascent = MINIMUM_ASCENT; } static void @@ -3401,7 +3413,9 @@ target = parent; } XReparentWindow(display, child_window, window, x, y); +#if 0 XDestroyWindow(display, target); +#endif } void Index: kit/font.c diff -u kit/font.c:1.25 kit/font.c:1.26 --- kit/font.c:1.25 Fri Mar 3 03:05:35 2000 +++ kit/font.c Mon Dec 4 18:21:27 2000 @@ -26,7 +26,7 @@ * SUCH DAMAGE. */ /* - * $Id: font.c,v 1.25 2000/03/02 18:05:35 nishida Exp $ + * $Id: font.c,v 1.26 2000/12/04 09:21:27 nishida Exp $ */ #include "mgp.h" @@ -326,7 +326,7 @@ /* horizontal gap of 1 dot is included by default */ char_len = max_x - min_x + 2; vfc->xoff = min_x; - vfc->charlen = char_len; + vfc->charlen = vfc->xmax = char_len; vfc->descent = height / VF_DESCENT; vfc->ascent = vfc->height - vfc->descent; Index: kit/mgp.h diff -u kit/mgp.h:1.122 kit/mgp.h:1.123 --- kit/mgp.h:1.122 Tue Jul 11 00:51:16 2000 +++ kit/mgp.h Mon Dec 4 18:21:27 2000 @@ -26,7 +26,7 @@ * SUCH DAMAGE. */ /* - * $Id: mgp.h,v 1.122 2000/07/10 15:51:16 nishida Exp $ + * $Id: mgp.h,v 1.123 2000/12/04 09:21:27 nishida Exp $ */ #include @@ -451,6 +451,7 @@ u_int height; u_int code; u_int charlen; + u_int xmax; int ascent; int descent; u_int xoff; @@ -472,6 +473,7 @@ u_int height; /* bitmap height */ u_int code; u_int charlen; /* origin x axis advance width */ + u_int xmax; /* right edge of bbox */ int ascent; /* (top of bitmap) - (origin y axis) */ int descent; /* (origin y axis) - (bottom of bitmap) */ int xoff; /* (left of bitmap) - (origin x axis) */ Index: kit/tfont.c diff -u kit/tfont.c:1.39 kit/tfont.c:1.40 --- kit/tfont.c:1.39 Tue Jul 11 00:51:18 2000 +++ kit/tfont.c Mon Dec 4 18:21:27 2000 @@ -26,7 +26,7 @@ * SUCH DAMAGE. */ /* - * $Id: tfont.c,v 1.39 2000/07/10 15:51:18 nishida Exp $ + * $Id: tfont.c,v 1.40 2000/12/04 09:21:27 nishida Exp $ */ #include "mgp.h" @@ -530,6 +530,7 @@ tfc->xoff = metrics.bearingX >> 6; tfc->fontname = strdup(fontname); tfc->charlen = metrics.advance >> 6; + tfc->xmax = metrics.bbox.xMax >> 6; tfc->ref = 0; tfc->dbitmap = bitmap.bitmap; tfc->regid = get_regid(registry); 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 Dec 11 05:10:02 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 .