aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSatoshi Asami <asami@FreeBSD.org>1996-11-09 12:59:11 +0000
committerSatoshi Asami <asami@FreeBSD.org>1996-11-09 12:59:11 +0000
commit0b0882524b539c40df1f87f49f562121e548761f (patch)
treed8409d8e8c2bb3e133ec065a54e41c2e89c0f553
parent3a0efa087fc4e1815c46fee5964d6b0303aefc78 (diff)
downloadports-0b0882524b539c40df1f87f49f562121e548761f.tar.gz
ports-0b0882524b539c40df1f87f49f562121e548761f.zip
Notes
-rw-r--r--japanese/vfxdvi300/Makefile81
-rw-r--r--japanese/vfxdvi300/distinfo6
-rw-r--r--japanese/vfxdvi300/files/customize.sh68
-rw-r--r--japanese/vfxdvi300/files/patch-aa437
-rw-r--r--japanese/vfxdvi300/files/patch-ab38
-rw-r--r--japanese/vfxdvi300/files/patch-ac19
-rw-r--r--japanese/vfxdvi300/files/patch-ad120
-rw-r--r--japanese/vfxdvi300/files/xdvi-17+ptex.fixed.patch.of.patch80
-rw-r--r--japanese/vfxdvi300/files/xdvi18.vflib.patch.of.patch1252
-rw-r--r--japanese/vfxdvi300/pkg-comment1
-rw-r--r--japanese/vfxdvi300/pkg-descr6
-rw-r--r--japanese/vfxdvi300/pkg-plist7
12 files changed, 2115 insertions, 0 deletions
diff --git a/japanese/vfxdvi300/Makefile b/japanese/vfxdvi300/Makefile
new file mode 100644
index 000000000000..8eb28a273273
--- /dev/null
+++ b/japanese/vfxdvi300/Makefile
@@ -0,0 +1,81 @@
+# New ports collection makefile for: xdvi-17miyu + patches + vector font library
+# Version required: 1.7
+# Date created: 8 Nov 1996
+# Whom: Mita Yoshio <mita@jp.FreeBSD.org>
+#
+# $Id$
+#
+
+DISTNAME= xdvi-17
+PKGNAME= jp-vfxdvi${RESOLUTION}-1.7
+CATEGORIES+= japanese print
+MASTER_SITES= ftp://bacchus.in.kobe-u.ac.jp/pub/tex/dviware/xdvi17/ \
+ ftp://bacchus.in.kobe-u.ac.jp/pub/tex/dviware/xdvi18/ \
+ ftp://ftp.hipecs.hokudai.ac.jp/pub/news-archive/fj.comp.texhax/volume95/Sep/ \
+ ftp://ftp.hipecs.hokudai.ac.jp/pub/news-archive/fj.comp.texhax/volume95/Oct/ \
+ ftp://ftp.hipecs.hokudai.ac.jp/pub/news-archive/fj.comp.texhax/volume95/Nov/
+DISTFILES= xdvi-17.tar.gz xdvi-17miyu.patch-beta6.gz \
+ xdvi18-okagawa-patch \
+ 950923.02.Z 951007.02.Z 951109.04.Z
+
+MAINTAINER= mita@jp.FreeBSD.org
+
+BUILD_DEPENDS= ${LOCALBASE}/lib/VFlib.a:${PORTSDIR}/japanese/vflib
+RUN_DEPENDS= ${LOCALBASE}/lib/VFlib/vfontcap:${PORTSDIR}/japanese/vflib
+
+WRKSRC= ${WRKDIR}
+DIST_SUBDIR= xdvi
+USE_IMAKE= yes
+XMKMF= xmkmf
+EXTRACT_ONLY= xdvi-17.tar.gz
+
+.if !defined(RESOLUTION)
+RESOLUTION= 300
+RESOLUTION_UNSPECIFIED= yes
+.else
+.if ${RESOLUTION} != 118 && ${RESOLUTION} != 240 && \
+ ${RESOLUTION} != 300 && ${RESOLUTION} != 360 && \
+ ${RESOLUTION} != 400 && ${RESOLUTION} != 600
+RESOLUTION_INVALID= yes
+.endif
+.endif
+
+pre-fetch:
+.if defined(RESOLUTION_UNSPECIFIED)
+ @echo "Building xdvi with ${RESOLUTION}dpi fonts."
+ @echo "Set the environment variable RESOLUTION if you want"
+ @echo "it to use other resolutions."
+ @echo "Possible values are: 118, 240, 300 (default), 360, 400 and 600."
+.elif defined(RESOLUTION_INVALID)
+ @echo "Error: invalid value for RESOLUTION: \"${RESOLUTION}\""
+ @echo "Possible values are: 118, 240, 300 (default), 360, 400 and 600."
+ @/usr/bin/false
+.endif
+
+pre-patch:
+ @(cd ${WRKDIR} ; \
+ ${GZCAT} ${DISTDIR}/950923.02.Z | uudecode ; \
+ ${GZCAT} ${DISTDIR}/951109.04.Z | uudecode ; \
+ uudecode ${DISTDIR}/xdvi18-okagawa-patch ; \
+ gzip -d xdvi18.vflib.patch.gz ; \
+ ${PATCH} < ${FILESDIR}/xdvi18.vflib.patch.of.patch >/dev/null 2>&1; \
+ gzip -d xdvi-17+ptex.fixed.patch.gz ; \
+ ${PATCH} < ${FILESDIR}/xdvi-17+ptex.fixed.patch.of.patch >/dev/null 2>&1; \
+ mkdir tmp; \
+ cd tmp; \
+ ${PATCH} -f < ../xdvi18.vflib.patch >/dev/null 2>&1; \
+ cd .. ; \
+ ${GZCAT} ${DISTDIR}/xdvi-17miyu.patch-beta6.gz | patch -d . >/dev/null 2>&1; \
+ ${GZCAT} xdvi-pl17+markpage+toc+printdvi+paper.patch.gz | patch -d . >/dev/null 2>&1 ; \
+ ${PATCH} -d . < xdvi-17+ptex.fixed.patch >/dev/null 2>&1; \
+ ${CP} tmp/dnpzeit.c tmp/zeit.c . ; \
+ )
+
+post-patch:
+.if defined(BATCH)
+ @(cd ${WRKDIR}; sh ${FILESDIR}/customize.sh ${RESOLUTION} BATCH)
+.else
+ @(cd ${WRKDIR}; sh ${FILESDIR}/customize.sh ${RESOLUTION})
+.endif
+
+.include <bsd.port.mk>
diff --git a/japanese/vfxdvi300/distinfo b/japanese/vfxdvi300/distinfo
new file mode 100644
index 000000000000..b7d2bf6913e7
--- /dev/null
+++ b/japanese/vfxdvi300/distinfo
@@ -0,0 +1,6 @@
+MD5 (xdvi-17.tar.gz) = 71c512f827c7e2ce534b52005720ce6d
+MD5 (xdvi-17miyu.patch-beta6.gz) = e7e8a5aae3d0377efd61e027ab38f5b8
+MD5 (xdvi18-okagawa-patch) = 2a4ab2bbbf785b8e848fe172ba66df4b
+MD5 (950923.02.Z) = 47bae107c47b620d7e38b77595b0adae
+MD5 (951007.02.Z) = 1f6222f6638af86476031b9421afdaac
+MD5 (951109.04.Z) = a34d3ee40cfe3288f518bb1948a0e6d4
diff --git a/japanese/vfxdvi300/files/customize.sh b/japanese/vfxdvi300/files/customize.sh
new file mode 100644
index 000000000000..7e7c418e9406
--- /dev/null
+++ b/japanese/vfxdvi300/files/customize.sh
@@ -0,0 +1,68 @@
+#!/bin/sh
+# usage sh customize.sh ${RESOLUTION} [BATCH]
+
+DEFAULT_FONT_PATH=.:/usr/local/lib/fonts/pk$1:/usr/local/share/tex/jfonts/jfms:/usr/local/lib/texmf/fonts/public/ptex/tfm
+
+DONE=no
+if [ $# = 2 ] ; then
+ DONE=yes
+fi
+
+echo "Check directory for pkfonts (resolution:$1) and ASCII jTeX's tfm files."
+echo
+echo "Default is .:/usr/local/share/fonts/pk$1:/usr/local/share/tex/jfonts/jfms:\\"
+echo " :/usr/local/lib/texmf/fonts/public/ptex/tfm"
+echo "If you use jlatex of ports collection, it should be OK."
+echo
+
+while [ "$DONE" != "yes" ]
+do
+ lib "Is it OK (y/n)[y]?"
+ read ans
+ case x"${ans}" in
+ xN*|xn*)
+ echo "Type DEFAULT_FONT_PATH:"
+ read DEFAULT_FONT_PATH
+ echo
+ echo "DEFAULT_FONT_PATH=${DEFAULT_FONT_PATH}"
+ ;;
+ *)
+ DONE=yes
+ ;;
+ esac
+done
+echo "DEFAULT_FONT_PATH=${DEFAULT_FONT_PATH}"
+
+CHANGE=`echo ${DEFAULT_FONT_PATH} | sed -e 's/\//\\\\\//g'`
+
+cp Imakefile Imakefile.tmp
+cat Imakefile.tmp \
+| sed -e "s/DEFAULT_FONT_SIZES=FontSizes300/DEFAULT_FONT_SIZES=FontSizes$1/g"\
+| sed -e "s/-DBDPI=300/-DBDPI=$1/g"\
+| sed -e "s/DEFAULT_FONT_PATH=CHANGE/DEFAULT_FONT_PATH=${CHANGE}/g" \
+> Imakefile
+rm Imakefile.tmp
+
+if [ $1 = "360" ] || [ $1 = "400" ] || [ $1 = "600" ] ; then
+ echo "Default shrink level is set to 5."
+cp Imakefile Imakefile.tmp
+cat Imakefile.tmp \
+| sed -e 's/DEFAULT_SHRINK=\\\"4\\\"/DEFAULT_SHRINK=\\\"5\\\"/g' \
+> Imakefile
+rm Imakefile.tmp
+fi
+
+if [ $# = 1 ] ; then
+echo
+echo "Do you like to customize Imakefile again by yourself (y/n)[no]?"
+read ans
+case x"${ans}" in
+ xY*|xy*)
+ if [ ${EDITOR} ] ; then
+ ${EDITOR} Imakefile
+ else
+ vi Imakefile
+ fi
+ ;;
+esac
+fi
diff --git a/japanese/vfxdvi300/files/patch-aa b/japanese/vfxdvi300/files/patch-aa
new file mode 100644
index 000000000000..94d2282e0c50
--- /dev/null
+++ b/japanese/vfxdvi300/files/patch-aa
@@ -0,0 +1,437 @@
+*** xdvi.c.orig Sat Jan 13 22:04:23 1996
+--- xdvi.c Sat Jan 13 22:04:37 1996
+***************
+*** 3476,3482 ****
+ use_ps_special = resource.use_ps_special;
+ #endif /* PS */
+ #ifdef USE_ZEIT
+! VF_init(resource.fontconf);
+ #endif /* USE_ZEIT */
+
+ #else /* !TOOLKIT */
+--- 3476,3482 ----
+ use_ps_special = resource.use_ps_special;
+ #endif /* PS */
+ #ifdef USE_ZEIT
+! VF_Init(resource.fontconf);
+ #endif /* USE_ZEIT */
+
+ #else /* !TOOLKIT */
+*** dnpzeit.c.orig Sat Nov 9 10:43:17 1996
+--- dnpzeit.c Sat Nov 9 10:42:43 1996
+***************
+*** 3,13 ****
+ * Written by Y. Hayashi (hayashi@me.aoyama.ac.jp)
+ **************************************************/
+
+! #include "xdvi.h"
+
+ #ifndef X_NOT_STDC_ENV
+ #include <stdlib.h>
+! #endif
+
+ static struct _dnplist {
+ char *name;
+--- 3,13 ----
+ * Written by Y. Hayashi (hayashi@me.aoyama.ac.jp)
+ **************************************************/
+
+! /*#include "xdvi.h"
+
+ #ifndef X_NOT_STDC_ENV
+ #include <stdlib.h>
+! #endif*/
+
+ static struct _dnplist {
+ char *name;
+***************
+*** 53,59 ****
+ static void
+ get_NTT_font(fontp, code)
+ struct font *fontp;
+! int code;
+ {
+ struct bitmap *bm;
+ int bwidth, jiscode;
+--- 53,63 ----
+ static void
+ get_NTT_font(fontp, code)
+ struct font *fontp;
+! #ifdef NeedWidePrototypes
+! long code;
+! #else
+! int code;
+! #endif
+ {
+ struct bitmap *bm;
+ int bwidth, jiscode;
+***************
+*** 70,77 ****
+ static void
+ read_NTT_char(fontp, ch)
+ struct font *fontp;
+! int ch;
+ {
+ struct glyph *g;
+
+ g = &fontp->glyph[ch];
+--- 74,88 ----
+ static void
+ read_NTT_char(fontp, ch)
+ struct font *fontp;
+! #ifdef NeedWidePrototypes
+! long ch;
+! #else
+! int ch;
+! #endif
+!
+!
+ {
++
+ struct glyph *g;
+
+ g = &fontp->glyph[ch];
+***************
+*** 100,106 ****
+ double dimconv, pow();
+ char *p;
+
+! fontp->read_char = read_NTT_char;
+ fontp->glyph = (struct glyph *)
+ xmalloc(256 * sizeof(struct glyph), "glyph array");
+ bzero((char *) fontp->glyph, 256 * sizeof(struct glyph));
+--- 111,117 ----
+ double dimconv, pow();
+ char *p;
+
+! fontp->read_char = (read_char_proc) read_NTT_char;
+ fontp->glyph = (struct glyph *)
+ xmalloc(256 * sizeof(struct glyph), "glyph array");
+ bzero((char *) fontp->glyph, 256 * sizeof(struct glyph));
+*** Imakefile.orig Sat Nov 9 10:43:30 1996
+--- Imakefile Sat Nov 9 10:42:48 1996
+***************
+*** 22,28 ****
+ TEXFONTS=$(TEXLIB)/fonts
+
+ #ifdef Use_ZEIT
+! DEFAULT_FONT_PATH=.:$(TEXFONTS)/pk:$(TEXFONTS)/jfms
+ #else
+ DEFAULT_FONT_PATH=.:$(TEXFONTS)/pk
+ #endif /* Use_ZEIT */
+--- 22,28 ----
+ TEXFONTS=$(TEXLIB)/fonts
+
+ #ifdef Use_ZEIT
+! DEFAULT_FONT_PATH=CHANGE
+ #else
+ DEFAULT_FONT_PATH=.:$(TEXFONTS)/pk
+ #endif /* Use_ZEIT */
+***************
+*** 72,79 ****
+ #endif
+
+ #ifdef Use_ZEIT
+! DEFAULT_FONTCONFDIR=$(TEXFONTS)/zeit
+! DEFAULT_FONTCONF=$(DEFAULT_FONTCONFDIR)/FontConf
+ #ifdef Use_NTTZEIT
+ ZEIT_DEFS=-DUSE_ZEIT -DNTTZEIT -DDEFAULT_FONTCONF=\"$(DEFAULT_FONTCONF)\"
+ #else
+--- 72,79 ----
+ #endif
+
+ #ifdef Use_ZEIT
+! DEFAULT_FONTCONFDIR=/usr/local/lib/VFlib
+! DEFAULT_FONTCONF=$(DEFAULT_FONTCONFDIR)/vfontcap
+ #ifdef Use_NTTZEIT
+ ZEIT_DEFS=-DUSE_ZEIT -DNTTZEIT -DDEFAULT_FONTCONF=\"$(DEFAULT_FONTCONF)\"
+ #else
+***************
+*** 175,181 ****
+
+ CDEBUGFLAGS=-g
+
+! VFLIB=VFlib-1.32/VFlib.a
+ #ifdef Use_ZEIT
+ DEPLIBS=$(VFLIB) XawClientDepLibs
+ LOCAL_LIBRARIES=$(VFLIB) XawClientLibs
+--- 175,181 ----
+
+ CDEBUGFLAGS=-g
+
+! VFLIB=/usr/local/lib/VFlib.a
+ #ifdef Use_ZEIT
+ DEPLIBS=$(VFLIB) XawClientDepLibs
+ LOCAL_LIBRARIES=$(VFLIB) XawClientLibs
+***************
+*** 267,273 ****
+ #endif /* Use_MAKEPK */
+
+ #ifdef Use_ZEIT
+! InstallNonExecFile(VFlib-1.32/FontConf, $(DEFAULT_FONTCONFDIR))
+ #endif /* Use_ZEIT */
+
+ #ifdef Use_PRINTDVI
+--- 267,273 ----
+ #endif /* Use_MAKEPK */
+
+ #ifdef Use_ZEIT
+!
+ #endif /* Use_ZEIT */
+
+ #ifdef Use_PRINTDVI
+*** dvi_draw.c.orig Sat Nov 9 10:43:58 1996
+--- dvi_draw.c Sat Nov 9 10:42:43 1996
+***************
+*** 124,130 ****
+ * Byte reading routines for dvi file.
+ */
+
+! #define xtell(pos) (lseek(fileno(dvi_file), 0L, SEEK_CUR) - \
+ (currinf.end - (pos)))
+
+ static ubyte
+--- 124,130 ----
+ * Byte reading routines for dvi file.
+ */
+
+! #define xtell(pos) (lseek(fileno(dvi_file), (off_t)0, SEEK_CUR) - \
+ (currinf.end - (pos)))
+
+ static ubyte
+***************
+*** 176,182 ****
+ {
+ currinf.pos += offset;
+ if (!currinf.virtual && currinf.pos > currinf.end)
+! (void) lseek(fileno(dvi_file), (long) (currinf.pos - currinf.end),
+ SEEK_CUR);
+ }
+
+--- 176,182 ----
+ {
+ currinf.pos += offset;
+ if (!currinf.virtual && currinf.pos > currinf.end)
+! (void) lseek(fileno(dvi_file), (off_t) (currinf.pos - currinf.end),
+ SEEK_CUR);
+ }
+
+***************
+*** 824,830 ****
+ set_char(WIDEARG(ubyte, int) ch)
+ #else /* NeXT */
+ set_char(ch)
+! WIDEARG(ubyte, int) ch;
+ #endif /* NeXT */
+ #else
+ void
+--- 824,830 ----
+ set_char(WIDEARG(ubyte, int) ch)
+ #else /* NeXT */
+ set_char(ch)
+! WIDEARG(long, int) ch;
+ #endif /* NeXT */
+ #else
+ void
+***************
+*** 959,967 ****
+ }
+
+ #if defined(KANJI) && !defined(ASCIIDNP)
+ long
+ set_char2(ch)
+! int ch;
+ {
+ register struct glyph *g;
+ #ifdef PTEX
+--- 959,973 ----
+ }
+
+ #if defined(KANJI) && !defined(ASCIIDNP)
++ #if NeedFunctionPrototypes
+ long
+ set_char2(ch)
+! long ch;
+! #else
+! long
+! set_char2(ch)
+! int ch;
+! #endif
+ {
+ register struct glyph *g;
+ #ifdef PTEX
+***************
+*** 1062,1070 ****
+ #else
+ void
+ load_n_set_char(cmd, ch)
+! WIDEARG(ubyte, int) cmd;
+ #endif
+! WIDEARG(ubyte, int) ch;
+ {
+ if (load_font(currinf.fontp)) { /* if not found */
+ Fputs("Character(s) will be left blank.\n", stderr);
+--- 1068,1076 ----
+ #else
+ void
+ load_n_set_char(cmd, ch)
+! WIDEARG(ubyte, long) cmd;
+ #endif
+! long ch;
+ {
+ if (load_font(currinf.fontp)) { /* if not found */
+ Fputs("Character(s) will be left blank.\n", stderr);
+***************
+*** 1092,1098 ****
+ set_vf_char(WIDEARG(ubyte, int) ch)
+ #else /* NeXT */
+ set_vf_char(ch)
+! WIDEARG(ubyte, int) ch;
+ #endif /* NeXT */
+ #else
+ void
+--- 1098,1104 ----
+ set_vf_char(WIDEARG(ubyte, int) ch)
+ #else /* NeXT */
+ set_vf_char(ch)
+! long ch;
+ #endif /* NeXT */
+ #else
+ void
+***************
+*** 1158,1164 ****
+ set_no_char(cmd, ch)
+ ubyte cmd;
+ #endif
+! ubyte ch;
+ {
+ if (currinf.virtual) {
+ currinf.fontp = currinf.virtual->first_font;
+--- 1164,1170 ----
+ set_no_char(cmd, ch)
+ ubyte cmd;
+ #endif
+! long ch;
+ {
+ if (currinf.virtual) {
+ currinf.fontp = currinf.virtual->first_font;
+***************
+*** 1495,1501 ****
+ oldinfo.end = currinf.end;
+ }
+ else {
+! (void) lseek(fileno(dvi_file), file_pos,
+ SEEK_SET);
+ oldinfo.pos = oldinfo.end;
+ }
+--- 1501,1507 ----
+ oldinfo.end = currinf.end;
+ }
+ else {
+! (void) lseek(fileno(dvi_file), (off_t)file_pos,
+ SEEK_SET);
+ oldinfo.pos = oldinfo.end;
+ }
+***************
+*** 1675,1684 ****
+ ROUNDUP(unshrunk_paper_h, shrink_factor) + 1);
+
+ #ifdef PAGENUM
+! (void) lseek(fileno(dvi_file), page_index[current_page].offset,
+ SEEK_SET);
+ #else
+! (void) lseek(fileno(dvi_file), page_offset[current_page], SEEK_SET);
+ #endif /* PAGENUM */
+
+ bzero((char *) &currinf.data, sizeof(currinf.data));
+--- 1681,1690 ----
+ ROUNDUP(unshrunk_paper_h, shrink_factor) + 1);
+
+ #ifdef PAGENUM
+! (void) lseek(fileno(dvi_file), (off_t) page_index[current_page].offset,
+ SEEK_SET);
+ #else
+! (void) lseek(fileno(dvi_file), (off_t) page_offset[current_page], SEEK_SET);
+ #endif /* PAGENUM */
+
+ bzero((char *) &currinf.data, sizeof(currinf.data));
+*** zeit.c.orig Sat Nov 9 10:43:09 1996
+--- zeit.c Sat Nov 9 10:42:44 1996
+***************
+*** 3,14 ****
+ * Written by Y. Hayashi (hayashi@me.aoyama.ac.jp)
+ ******************************************************/
+
+! #include "xdvi.h"
+
+ #ifndef X_NOT_STDC_ENV
+ #include <stdlib.h>
+ #endif
+!
+ #include "jtfm.h"
+
+ #ifndef SEEK_SET
+--- 3,14 ----
+ * Written by Y. Hayashi (hayashi@me.aoyama.ac.jp)
+ ******************************************************/
+
+! /*#include "xdvi.h"
+
+ #ifndef X_NOT_STDC_ENV
+ #include <stdlib.h>
+ #endif
+! */
+ #include "jtfm.h"
+
+ #ifndef SEEK_SET
+***************
+*** 258,264 ****
+ static void
+ get_ZEIT_font(fontp, code)
+ struct font *fontp;
+! int code;
+ {
+ struct bitmap *bm;
+ int bwidth;
+--- 258,264 ----
+ static void
+ get_ZEIT_font(fontp, code)
+ struct font *fontp;
+! long code;
+ {
+ struct bitmap *bm;
+ int bwidth;
+***************
+*** 297,303 ****
+ static void
+ read_ZEIT_char(fontp, ch)
+ struct font *fontp;
+! int ch;
+ {
+ struct bitmap *bm;
+ struct glyph *g;
+--- 297,303 ----
+ static void
+ read_ZEIT_char(fontp, ch)
+ struct font *fontp;
+! long ch;
+ {
+ struct bitmap *bm;
+ struct glyph *g;
+***************
+*** 354,360 ****
+ double dimconv;
+ int n, index, code, width, height, depth;
+
+! fontp->read_char = read_ZEIT_char;
+ fontp->kglyph = (struct glyph **)
+ xmalloc(sizeof(struct glyph *) * KTABLESIZE, "read_ZEIT_index");
+ dimconv = fontp->dimconv;
+--- 354,360 ----
+ double dimconv;
+ int n, index, code, width, height, depth;
+
+! fontp->read_char = (read_char_proc) read_ZEIT_char;
+ fontp->kglyph = (struct glyph **)
+ xmalloc(sizeof(struct glyph *) * KTABLESIZE, "read_ZEIT_index");
+ dimconv = fontp->dimconv;
diff --git a/japanese/vfxdvi300/files/patch-ab b/japanese/vfxdvi300/files/patch-ab
new file mode 100644
index 000000000000..e233b8001369
--- /dev/null
+++ b/japanese/vfxdvi300/files/patch-ab
@@ -0,0 +1,38 @@
+*** gs-view.c.orig Sat Jan 13 18:33:59 1996
+--- gs-view.c Sat Jan 13 18:34:19 1996
+***************
+*** 126,132 ****
+
+ #ifdef PS_LITERAL
+ fflush(temp_ps_file);
+! lseek(fileno(temp_ps_file), 0L, SEEK_SET);
+ #endif /* PS_LITERAL */
+
+ {
+--- 126,132 ----
+
+ #ifdef PS_LITERAL
+ fflush(temp_ps_file);
+! lseek(fileno(temp_ps_file), (off_t)0, SEEK_SET);
+ #endif /* PS_LITERAL */
+
+ {
+*** font_open.c.orig Sat Jan 13 18:29:22 1996
+--- font_open.c Sat Jan 13 18:39:14 1996
+***************
+*** 137,143 ****
+ #else
+ #if NeedFunctionPrototypes
+ #if !defined(__386BSD__) && !defined(SVR4)
+! extern char *getcwd (char *, int);
+ #endif
+ #else
+ extern char *getcwd ();
+--- 137,143 ----
+ #else
+ #if NeedFunctionPrototypes
+ #if !defined(__386BSD__) && !defined(SVR4)
+! extern char *getcwd (char *, size_t);
+ #endif
+ #else
+ extern char *getcwd ();
diff --git a/japanese/vfxdvi300/files/patch-ac b/japanese/vfxdvi300/files/patch-ac
new file mode 100644
index 000000000000..844c6e9c9d04
--- /dev/null
+++ b/japanese/vfxdvi300/files/patch-ac
@@ -0,0 +1,19 @@
+*** SelFile.c.orig Sat Jan 13 18:40:29 1996
+--- SelFile.c Sat Jan 13 18:42:35 1996
+***************
+*** 46,52 ****
+ /* BSD 4.3 errno.h does not declare errno */
+ extern int errno;
+ extern int sys_nerr;
+! extern char *sys_errlist[];
+
+ #include <sys/param.h>
+ #include <X11/cursorfont.h>
+--- 46,52 ----
+ /* BSD 4.3 errno.h does not declare errno */
+ extern int errno;
+ extern int sys_nerr;
+! /*extern char *sys_errlist[];*/
+
+ #include <sys/param.h>
+ #include <X11/cursorfont.h>
diff --git a/japanese/vfxdvi300/files/patch-ad b/japanese/vfxdvi300/files/patch-ad
new file mode 100644
index 000000000000..2419847131b1
--- /dev/null
+++ b/japanese/vfxdvi300/files/patch-ad
@@ -0,0 +1,120 @@
+*** dvi_init.c.orig Sat Jan 13 19:16:24 1996
+--- dvi_init.c Sat Jan 13 19:17:18 1996
+***************
+*** 262,268 ****
+ if (iskanjifont(fontp->fontname)) {
+ fontp->flags |= FONT_KANJI;
+ fontp->fsize = (float) size_found;
+! fontp->set_char_p = set_char2;
+ }
+ else {
+ fontp->fsize = (float) size_found / 5;
+--- 262,268 ----
+ if (iskanjifont(fontp->fontname)) {
+ fontp->flags |= FONT_KANJI;
+ fontp->fsize = (float) size_found;
+! fontp->set_char_p = (set_char_proc) set_char2;
+ }
+ else {
+ fontp->fsize = (float) size_found / 5;
+*** gf.c.orig Sat Jan 13 19:17:24 1996
+--- gf.c Sat Jan 13 19:17:46 1996
+***************
+*** 58,64 ****
+ static void
+ read_GF_char(fontp, ch)
+ register struct font *fontp;
+! ubyte ch;
+ {
+ register struct glyph *g;
+ ubyte cmnd;
+--- 58,64 ----
+ static void
+ read_GF_char(fontp, ch)
+ register struct font *fontp;
+! long ch;
+ {
+ register struct glyph *g;
+ ubyte cmnd;
+*** pk.c.orig Sat Jan 13 19:17:57 1996
+--- pk.c Sat Jan 13 19:18:20 1996
+***************
+*** 107,113 ****
+ static void
+ read_PK_char(fontp, ch)
+ register struct font *fontp;
+! ubyte ch;
+ {
+ int i, j;
+ int n;
+--- 107,113 ----
+ static void
+ read_PK_char(fontp, ch)
+ register struct font *fontp;
+! long ch;
+ {
+ int i, j;
+ int n;
+*** xdvi.h.orig Sat Jan 13 19:18:35 1996
+--- xdvi.h Sat Jan 13 19:38:03 1996
+***************
+*** 215,221 ****
+
+ #if NeedFunctionPrototypes
+ #ifndef TEXXET
+! typedef long (*set_char_proc)(WIDEARG(ubyte, int));
+ #else /* TEXXET */
+ typedef void (*set_char_proc)(WIDEARG(ubyte, int), WIDEARG(ubyte, int));
+ #endif /* TEXXET */
+--- 215,221 ----
+
+ #if NeedFunctionPrototypes
+ #ifndef TEXXET
+! typedef long (*set_char_proc)(WIDEARG(long, int));
+ #else /* TEXXET */
+ typedef void (*set_char_proc)(WIDEARG(ubyte, int), WIDEARG(ubyte, int));
+ #endif /* TEXXET */
+***************
+*** 351,357 ****
+ #define NOMAGSTP (-29999)
+
+ #if NeedFunctionPrototypes
+! typedef void (*read_char_proc)(struct font *, WIDEARG(ubyte, int));
+ #else
+ typedef void (*read_char_proc)();
+ #endif
+--- 351,357 ----
+ #define NOMAGSTP (-29999)
+
+ #if NeedFunctionPrototypes
+! typedef void (*read_char_proc)(struct font *, WIDEARG(long, int));
+ #else
+ typedef void (*read_char_proc)();
+ #endif
+***************
+*** 536,547 ****
+ extern void open_dvi_file(void);
+ extern Boolean check_dvi_file(void);
+ #ifndef TEXXET
+! extern long set_char(WIDEARG(ubyte, int));
+ #if defined(KANJI) && !defined(ASCIIDNP)
+! extern long set_char2(int);
+ #endif /* KANJI && !ASCIIDNP */
+! extern long load_n_set_char(WIDEARG(ubyte, int));
+! extern long set_vf_char(WIDEARG(ubyte, int));
+ #else
+ extern void set_char(WIDEARG(ubyte, int), WIDEARG(ubyte, int));
+ extern void load_n_set_char(WIDEARG(ubyte, int), WIDEARG(ubyte, int));
+--- 536,547 ----
+ extern void open_dvi_file(void);
+ extern Boolean check_dvi_file(void);
+ #ifndef TEXXET
+! extern long set_char(WIDEARG(long, int));
+ #if defined(KANJI) && !defined(ASCIIDNP)
+! extern long set_char2(long);
+ #endif /* KANJI && !ASCIIDNP */
+! extern long load_n_set_char(WIDEARG(long,long));
+! extern long set_vf_char(long);
+ #else
+ extern void set_char(WIDEARG(ubyte, int), WIDEARG(ubyte, int));
+ extern void load_n_set_char(WIDEARG(ubyte, int), WIDEARG(ubyte, int));
diff --git a/japanese/vfxdvi300/files/xdvi-17+ptex.fixed.patch.of.patch b/japanese/vfxdvi300/files/xdvi-17+ptex.fixed.patch.of.patch
new file mode 100644
index 000000000000..16058f6d744c
--- /dev/null
+++ b/japanese/vfxdvi300/files/xdvi-17+ptex.fixed.patch.of.patch
@@ -0,0 +1,80 @@
+*** xdvi-17+ptex.fixed.patch.orig Thu May 30 00:45:59 1996
+--- xdvi-17+ptex.fixed.patch Thu May 30 00:49:10 1996
+***************
+*** 2,13 ****
+ *** xdvi.old/Imakefile Thu Nov 9 02:46:11 1995
+ --- xdvi.ptex/Imakefile Thu Nov 9 02:48:42 1995
+ ***************
+! *** 7,12 ****
+! --- 7,13 ----
+! #define Use_ZEIT
+! #define Use_NTTZEIT
+! #define Use_PS
+! + #define Use_PTEX
+
+ #include "XDvi.defs"
+ #include "XDvi.rules"
+--- 2,13 ----
+ *** xdvi.old/Imakefile Thu Nov 9 02:46:11 1995
+ --- xdvi.ptex/Imakefile Thu Nov 9 02:48:42 1995
+ ***************
+! *** 12,17 ****
+! --- 12,18 ----
+! #define Use_PRINTDVI
+! #define Use_PAGENUM
+! #define Use_PAPER
+! + #define Use_PTEX
+
+ #include "XDvi.defs"
+ #include "XDvi.rules"
+***************
+*** 39,62 ****
+ DEFAULT_FONTCONFDIR=$(TEXFONTS)/zeit
+ DEFAULT_FONTCONF=$(DEFAULT_FONTCONFDIR)/FontConf
+ ***************
+! *** 121,129 ****
+! #endif /* Use_PS */
+!
+ SRCS=xdvi.c dvi_init.c dvi_draw.c fontfmts.c vf.c util.c font_open.c tpic.c \
+! ! SELFILE_SRCS PS_SRCS
+ OBJS=xdvi.o dvi_init.o dvi_draw.o fontfmts.o vf.o util.o font_open.o tpic.o \
+! ! SELFILE_OBJS PS_OBJS
+!
+ DEFINES=$(DEFS) -DDEFAULT_FONT_PATH=\"$(DEFAULT_FONT_PATH)\" \
+ -DDEFAULT_VF_PATH=\"$(DEFAULT_VF_PATH)\" \
+! --- 134,142 ----
+! #endif /* Use_PS */
+!
+ SRCS=xdvi.c dvi_init.c dvi_draw.c fontfmts.c vf.c util.c font_open.c tpic.c \
+! ! SELFILE_SRCS PS_SRCS PTEX_SRCS
+ OBJS=xdvi.o dvi_init.o dvi_draw.o fontfmts.o vf.o util.o font_open.o tpic.o \
+! ! SELFILE_OBJS PS_OBJS PTEX_OBJS
+!
+ DEFINES=$(DEFS) -DDEFAULT_FONT_PATH=\"$(DEFAULT_FONT_PATH)\" \
+ -DDEFAULT_VF_PATH=\"$(DEFAULT_VF_PATH)\" \
+ diff -c -N xdvi.old/README.ptex xdvi.ptex/README.ptex
+--- 39,62 ----
+ DEFAULT_FONTCONFDIR=$(TEXFONTS)/zeit
+ DEFAULT_FONTCONF=$(DEFAULT_FONTCONFDIR)/FontConf
+ ***************
+! *** 232,240 ****
+! #define PAPER_OBJS paper.o
+!
+ SRCS=xdvi.c dvi_init.c dvi_draw.c fontfmts.c vf.c util.c font_open.c tpic.c \
+! ! SELFILE_SRCS PS_SRCS MARKPAGE_SRCS TOC_SRCS PRINT_SRCS PAPER_SRCS
+ OBJS=xdvi.o dvi_init.o dvi_draw.o fontfmts.o vf.o util.o font_open.o tpic.o \
+! ! SELFILE_OBJS PS_OBJS MARKPAGE_OBJS TOC_OBJS PRINT_OBJS PAPER_OBJS
+!
+ DEFINES=$(DEFS) -DDEFAULT_FONT_PATH=\"$(DEFAULT_FONT_PATH)\" \
+ -DDEFAULT_VF_PATH=\"$(DEFAULT_VF_PATH)\" \
+! --- 233,241 ----
+! #define PAPER_OBJS paper.o
+!
+ SRCS=xdvi.c dvi_init.c dvi_draw.c fontfmts.c vf.c util.c font_open.c tpic.c \
+! ! SELFILE_SRCS PS_SRCS MARKPAGE_SRCS TOC_SRCS PRINT_SRCS PAPER_SRCS PTEX_SRCS
+ OBJS=xdvi.o dvi_init.o dvi_draw.o fontfmts.o vf.o util.o font_open.o tpic.o \
+! ! SELFILE_OBJS PS_OBJS MARKPAGE_OBJS TOC_OBJS PRINT_OBJS PAPER_OBJS PTEX_OBJS
+!
+ DEFINES=$(DEFS) -DDEFAULT_FONT_PATH=\"$(DEFAULT_FONT_PATH)\" \
+ -DDEFAULT_VF_PATH=\"$(DEFAULT_VF_PATH)\" \
+ diff -c -N xdvi.old/README.ptex xdvi.ptex/README.ptex
diff --git a/japanese/vfxdvi300/files/xdvi18.vflib.patch.of.patch b/japanese/vfxdvi300/files/xdvi18.vflib.patch.of.patch
new file mode 100644
index 000000000000..28849fdbb771
--- /dev/null
+++ b/japanese/vfxdvi300/files/xdvi18.vflib.patch.of.patch
@@ -0,0 +1,1252 @@
+*** xdvi18.vflib.patch.orig Thu May 30 00:15:44 1996
+--- xdvi18.vflib.patch Thu May 30 00:19:04 1996
+***************
+*** 1,142 ****
+- diff -Ncr xdvi18.original/Imakefile xdvi18/Imakefile
+- *** xdvi18.original/Imakefile Fri May 6 08:01:18 1994
+- --- xdvi18/Imakefile Wed Mar 1 12:39:30 1995
+- ***************
+- *** 2,16 ****
+- * Imakefile for dvi previewer.
+- */
+-
+- XCOMM The following five lines are the crucial ones.
+- ! OSDEFS=-DMSBITFIRST
+- ! OPTIONDEFS=-DUSE_PK -DBUTTONS -DGREY
+- ! DEFAULT_FONT_PATH=/usr/local/tex/fonts
+- DEFAULT_VF_PATH=/usr/local/tex/fonts/vf
+- DEFAULT_FONT_SIZES=$(SIZES300)
+-
+- LOCAL_LIBRARIES_TOOL=$(VARLIBS) XawClientLibs
+- DEPLIBS_TOOL=$(VARDEPLIBS) XawClientDepLibs
+- LINTLIBS_TOOL=$(VARLINT) $(LINTXAW) $(LINTXMU) $(LINTXTOOL) \
+- $(LINTEXTENSIONLIB) $(LINTXLIB) -lm
+-
+- --- 2,57 ----
+- * Imakefile for dvi previewer.
+- */
+-
+- + #define Use_KANJI
+- + #undef Use_ASCIIDNP
+- + #define Use_ZEIT
+- + #define Use_NTTZEIT
+- +
+- + #include "XDvi.defs"
+- + #include "XDvi.rules"
+- +
+- XCOMM The following five lines are the crucial ones.
+- ! TEXLIB=/usr/local/lib/tex
+- ! TEXFONTS=$(TEXLIB)/fonts /* where jfm files are located */
+- ! PKFONTS=$(TEXLIB)/300pk
+- !
+- ! #ifdef Use_ZEIT
+- ! VFLIB=/usr/local/lib/VFlib-2.16.2/VFlib.a
+- ! #endif
+- !
+- ! DEFAULT_FONT_PATH=.:/usr/local/lib/nttjtex/pk:$(PKFONTS)/cmfonts:$(TEXLIB)/amspk:$(TEXFONTS)
+- DEFAULT_VF_PATH=/usr/local/tex/fonts/vf
+- DEFAULT_FONT_SIZES=$(SIZES300)
+-
+- + #ifdef Use_KANJI
+- + #ifdef Use_ASCIIDNP
+- + KANJI_DEFS=-DKANJI -DASCIIDNP
+- + #else
+- + KANJI_DEFS=-DKANJI
+- + #endif /* Use_ASCIIDNP */
+- + #else
+- + KANJI_DEFS=
+- + #endif /* Use_KANJI */
+- +
+- + #ifdef Use_ZEIT
+- + DEFAULT_FONTCONFDIR=$(DEFAULT_VF_PATH)
+- + DEFAULT_FONTCONF=$(TEXLIB)/vfonts/FontConf
+- + #ifdef Use_NTTZEIT
+- + ZEIT_DEFS=-DUSE_ZEIT -DNTTZEIT -DDEFAULT_FONTCONF=\"$(DEFAULT_FONTCONF)\"
+- + #else
+- + ZEIT_DEFS=-DUSE_ZEIT -DDEFAULT_FONTCONF=\"$(DEFAULT_FONTCONF)\"
+- + #endif /* Use_NTTZEIT */
+- + #else
+- + ZEIT_DEFS=
+- + #endif /* Use_ZEIT */
+- +
+- + #ifdef Use_ZEIT
+- + LOCAL_LIBRARIES_TOOL=$(VFLIB) $(VARLIBS) XawClientLibs
+- + DEPLIBS_TOOL=$(VFLIB) $(VARDEPLIBS)XawClientDepLibs
+- + #else
+- LOCAL_LIBRARIES_TOOL=$(VARLIBS) XawClientLibs
+- DEPLIBS_TOOL=$(VARDEPLIBS) XawClientDepLibs
+- + #endif
+- LINTLIBS_TOOL=$(VARLINT) $(LINTXAW) $(LINTXMU) $(LINTXTOOL) \
+- $(LINTEXTENSIONLIB) $(LINTXLIB) -lm
+-
+- ***************
+- *** 21,26 ****
+- --- 62,70 ----
+- MATHLIB=-lm
+- SYS_LIBRARIES=$(MATHLIB)
+-
+- + OSDEFS=
+- + OPTIONDEFS=-DUSE_PK -DUSE_GF -DA4 -DBUTTONS -DGREY -DPS_GS \
+- + $(KANJI_DEFS) $(ZEIT_DEFS)
+- DEFS=$(OSDEFS) $(OPTIONDEFS)
+- DEFINES=$(DEFS) -DDEFAULT_FONT_PATH=\"$(DEFAULT_FONT_PATH)\" \
+- -DDEFAULT_VF_PATH=\"$(DEFAULT_VF_PATH)\" \
+- diff -Ncr xdvi18.original/XDvi.defs xdvi18/XDvi.defs
+- *** xdvi18.original/XDvi.defs Thu Jan 1 09:00:00 1970
+- --- xdvi18/XDvi.defs Wed Mar 1 09:26:49 1995
+- ***************
+- *** 0 ****
+- --- 1,23 ----
+- + /* XDvi.defs */
+- +
+- + #ifdef Use_ASCIIDNP
+- + #ifndef Use_KANJI
+- + #define Use_KANJI
+- + #endif
+- + #ifdef Use_NTTZEIT
+- + #undef Use_NTTZEIT
+- + #endif
+- + #ifdef Use_ZEIT
+- + #undef Use_ZEIT
+- + #endif
+- + #endif /* Use_ASCIIDNP */
+- +
+- + #ifdef Use_NTTZEIT
+- + #ifndef Use_KANJI
+- + #define Use_KANJI
+- + #endif
+- + #ifndef Use_ZEIT
+- + #define Use_ZEIT
+- + #endif
+- + #endif /* Use_NTTZEIT */
+- +
+- diff -Ncr xdvi18.original/XDvi.rules xdvi18/XDvi.rules
+- *** xdvi18.original/XDvi.rules Thu Jan 1 09:00:00 1970
+- --- xdvi18/XDvi.rules Wed Mar 1 09:27:30 1995
+- ***************
+- *** 0 ****
+- --- 1,14 ----
+- + /* XDvi.rules */
+- +
+- + #ifndef MakeDir
+- + #define MakeDir(dir) -@if [ -d dir ]; then set +x; \ @@\
+- + else (set -x; $(MKDIRHIER) dir); fi
+- + #endif
+- +
+- + #ifndef InstallNonExecFile
+- + #define InstallNonExecFile(file,dest) @@\
+- + install:: file @@\
+- + MakeDir($(DESTDIR)dest) @@\
+- + $(INSTALL) -c $(INSTDATFLAGS) file $(DESTDIR)dest
+- + #endif /* InstallNonExecFile */
+- +
+- diff -Ncr xdvi18.original/dnpzeit.c xdvi18/dnpzeit.c
+ *** xdvi18.original/dnpzeit.c Thu Jan 1 09:00:00 1970
+ --- xdvi18/dnpzeit.c Wed Mar 1 10:33:25 1995
+ ***************
+--- 1,3 ----
+***************
+*** 313,1403 ****
+ + return(ku * 256 + ten);
+ + }
+ +
+- diff -Ncr xdvi18.original/dvi.h xdvi18/dvi.h
+- *** xdvi18.original/dvi.h Sat Mar 28 05:27:15 1992
+- --- xdvi18/dvi.h Wed Mar 1 09:29:10 1995
+- ***************
+- *** 4,11 ****
+- --- 4,17 ----
+-
+- #define SETCHAR0 0
+- #define SET1 128
+- + #ifdef KANJI
+- + #define SET2 129
+- + #endif /* KANJI */
+- #define SETRULE 132
+- #define PUT1 133
+- + #ifdef KANJI
+- + #define PUT2 134
+- + #endif /* KANJI */
+- #define PUTRULE 137
+- #define NOP 138
+- #define BOP 139
+- diff -Ncr xdvi18.original/dvi_draw.c xdvi18/dvi_draw.c
+- *** xdvi18.original/dvi_draw.c Fri May 27 17:22:24 1994
+- --- xdvi18/dvi_draw.c Wed Mar 1 10:37:01 1995
+- ***************
+- *** 363,369 ****
+- --- 363,373 ----
+- }
+-
+- static _Xconst char *dvi_table1[] = {
+- + #ifdef KANJI
+- + "SET1", "SET2", NULL, NULL, "SETRULE", "PUT1", "PUT2", NULL,
+- + #else /* KANJI */
+- "SET1", NULL, NULL, NULL, "SETRULE", "PUT1", NULL, NULL,
+- + #endif /* KANJI */
+- NULL, "PUTRULE", "NOP", "BOP", "EOP", "PUSH", "POP", "RIGHT1",
+- "RIGHT2", "RIGHT3", "RIGHT4", "W0", "W1", "W2", "W3", "W4",
+- "X0", "X1", "X2", "X3", "X4", "DOWN1", "DOWN2", "DOWN3",
+- ***************
+- *** 606,617 ****
+- --- 610,739 ----
+-
+- g->y2 = g->y / shrink_factor;
+- }
+- +
+- + static void
+- + shrink_glyph_NeXT(g)
+- + register struct glyph *g;
+- + {
+- + int rows_left, rows, init_cols, cols_left;
+- + register int cols;
+- + int x, y;
+- + long thesample;
+- + BMUNIT *old_ptr;
+- +
+- + /* These machinations ensure that the character is shrunk according to
+- + its hot point, rather than its upper left-hand corner. */
+- + g->x2 = g->x / shrink_factor;
+- + init_cols = g->x - g->x2 * shrink_factor;
+- + if (init_cols <= 0) init_cols += shrink_factor;
+- + else ++g->x2;
+- + g->bitmap2.w = g->x2 + ROUNDUP(g->bitmap.w - g->x, shrink_factor);
+- + /* include row zero with the positively numbered rows */
+- + cols = g->y + 1; /* spare register variable */
+- + g->y2 = cols / shrink_factor;
+- + rows = cols - g->y2 * shrink_factor;
+- + if (rows <= 0) {
+- + rows += shrink_factor;
+- + --g->y2;
+- + }
+- + g->bitmap2.h = g->y2 + ROUNDUP(g->bitmap.h - cols, shrink_factor) + 1;
+- +
+- + g->image2 = XCreateImage(DISP, DefaultVisualOfScreen(SCRN),
+- + DefaultDepthOfScreen(SCRN),
+- + ZPixmap, 0, (char *) NULL,
+- + g->bitmap2.w, g->bitmap2.h,
+- + BITS_PER_BMUNIT, 0);
+- + g->pixmap2 = g->image2->data = xmalloc((unsigned)
+- + g->image2->bytes_per_line * g->bitmap2.h,
+- + "character pixmap");
+- +
+- + #ifndef MSBITFIRST
+- + g->image2->bitmap_bit_order = LSBFirst;
+- + #else
+- + g->image2->bitmap_bit_order = MSBFirst;
+- + #endif
+- + {
+- + short endian = MSBFirst << 8 | LSBFirst;
+- +
+- + g->image2->byte_order = *((char *) &endian);
+- + }
+- + g->image2->bitmap_pad = 32;
+- +
+- + old_ptr = (BMUNIT *) g->bitmap.bits;
+- + rows_left = g->bitmap.h;
+- + y = 0;
+- + while (rows_left) {
+- + x = 0;
+- + if (rows > rows_left) rows = rows_left;
+- + cols_left = g->bitmap.w;
+- + cols = init_cols;
+- + while (cols_left) {
+- + if (cols > cols_left) cols = cols_left;
+- +
+- + thesample = sample(old_ptr, g->bitmap.bytes_wide,
+- + g->bitmap.w - cols_left, cols, rows);
+- + NeXTPutPixel(g->image2, x, y,
+- + (thesample * 100) / (shrink_factor * shrink_factor));
+- +
+- + cols_left -= cols;
+- + cols = shrink_factor;
+- + x++;
+- + }
+- + *((char **) &old_ptr) += rows * g->bitmap.bytes_wide;
+- + rows_left -= rows;
+- + rows = shrink_factor;
+- + y++;
+- + }
+- +
+- + while (y < g->bitmap2.h) {
+- + for (x = 0; x < g->bitmap2.w; x++)
+- + NeXTPutPixel(g->image2, x, y, 0);
+- + y++;
+- + }
+- +
+- + g->y2 = g->y / shrink_factor;
+- + }
+- +
+- + static int NeXTd[3] = {15, 30, 50};
+- +
+- + void
+- + set_NeXTd(s)
+- + char *s;
+- + {
+- + int i;
+- +
+- + if (*s == ':') ++s;
+- + for (i = 0; i < 3; i++) {
+- + NeXTd[i] = atof(s);
+- + if ((s = index(s, ':')) == NULL) return;
+- + ++s;
+- + }
+- + }
+- +
+- + NeXTPutPixel(image, x, y, percent)
+- + XImage *image;
+- + int x, y, percent;
+- + {
+- + int pix;
+- +
+- + pix = percent < NeXTd[0] ? 0
+- + : percent < NeXTd[1] ? 1 : percent < NeXTd[2] ? 2 : 3;
+- + image->data[y * image->bytes_per_line + x / 4]
+- + |= pix << (2 * (3 - x % 4));
+- + }
+- #endif /* GREY */
+-
+- /*
+- * Find font #n.
+- */
+-
+- + #ifdef ASCIIDNP
+- + static unsigned int cur_TeXnumber;
+- +
+- + extern void define_kanjifont();
+- + extern void adj_kanjiwidth();
+- + #endif /* ASCIIDNP */
+- +
+- static void
+- change_font(n)
+- unsigned long n;
+- ***************
+- *** 627,634 ****
+- --- 749,770 ----
+- break;
+- }
+- }
+- + #ifdef ASCIIDNP
+- + if (currinf.fontp == NULL) {
+- + if (n >> 24) {
+- + define_kanjifont(n);
+- + change_font(n);
+- + return;
+- + }
+- + tell_oops("non-existent font #%d", n);
+- + }
+- + #else /* ASCIIDNP */
+- if (currinf.fontp == NULL) tell_oops("non-existent font #%d", n);
+- + #endif /* ASCIIDNP */
+- maxchar = currinf.fontp->maxchar;
+- + #ifdef ASCIIDNP
+- + cur_TeXnumber = n;
+- + #endif /* ASCIIDNP */
+- currinf.set_char_p = currinf.fontp->set_char_p;
+- }
+-
+- ***************
+- *** 676,681 ****
+- --- 812,820 ----
+-
+- if (ch > maxchar) realloc_font(currinf.fontp, WIDENINT ch);
+- if ((g = &currinf.fontp->glyph[ch])->bitmap.bits == NULL) {
+- + #ifdef NTTZEIT
+- + if (!(currinf.fontp->flags & FONT_DNP)) {
+- + #endif /* NTTZEIT */
+- if (g->addr == 0) {
+- if (!hush_chars)
+- Fprintf(stderr, "Character %d not defined in font %s\n", ch,
+- ***************
+- *** 687,693 ****
+- --- 826,839 ----
+- return ERRVAL; /* previously flagged missing char */
+- open_font_file(currinf.fontp);
+- Fseek(currinf.fontp->file, g->addr, 0);
+- + #ifdef NTTZEIT
+- + }
+- + #endif /* NTTZEIT */
+- (*currinf.fontp->read_char)(currinf.fontp, ch);
+- + #ifdef ASCIIDNP
+- + if (cur_TeXnumber >> 24)
+- + adj_kanjiwidth(currinf.fontp, cur_TeXnumber >> 24, ch);
+- + #endif /* ASCIIDNP */
+- if (debug & DBG_BITMAP) print_char((ubyte) ch, g);
+- currinf.fontp->timestamp = ++current_timestamp;
+- }
+- ***************
+- *** 760,765 ****
+- --- 906,949 ----
+- }
+-
+-
+- + #if defined(KANJI) && !defined(ASCIIDNP)
+- + long
+- + set_char2(ch)
+- + int ch;
+- + {
+- + register struct glyph *g;
+- +
+- + g = currinf.fontp->kglyph[jisindex(ch)];
+- + if (g == NULL || g->bitmap.bits == NULL) {
+- + (*currinf.fontp->read_char)(currinf.fontp, ch);
+- + g = currinf.fontp->kglyph[jisindex(ch)];
+- + }
+- + if (shrink_factor == 1)
+- + put_bitmap(&g->bitmap, PXL_H - g->x, PXL_V - g->y);
+- + else {
+- + #ifdef GREY
+- + if (use_grey) {
+- + if (g->pixmap2 == NULL)
+- + if (DefaultDepthOfScreen(SCRN) == 2)
+- + shrink_glyph_NeXT(g);
+- + else
+- + shrink_glyph_grey(g);
+- + put_image(g->image2, PXL_H - g->x2, PXL_V - g->y2);
+- + } else {
+- + if (g->bitmap2.bits == NULL)
+- + shrink_glyph(g);
+- + put_bitmap(&g->bitmap2, PXL_H - g->x2, PXL_V - g->y2);
+- + }
+- + #else
+- + if (g->bitmap2.bits == NULL)
+- + shrink_glyph(g);
+- + put_bitmap(&g->bitmap2, PXL_H - g->x2, PXL_V - g->y2);
+- + #endif
+- + }
+- + return g->dvi_adv;
+- + }
+- + #endif /* KANJI && !ASCIIDNP */
+- +
+- #ifndef TEXXET
+- long
+- load_n_set_char(ch)
+- ***************
+- *** 931,936 ****
+- --- 1115,1168 ----
+- applicationDoSpecial(cmd);
+- }
+-
+- + #ifdef ASCIIDNP
+- + /*** compute_fc : borrowed from jvi2ps1.3j ***/
+- +
+- + static void
+- + compute_fc(kuten, f, c)
+- + register unsigned int kuten;
+- + unsigned int *f, *c;
+- + {
+- + register int n;
+- + register unsigned int ku, ten;
+- +
+- + *f = *c = 1;
+- + ku = kuten / 256;
+- + ten = kuten % 256;
+- + if (ku < 0x21 || (0x29 <= ku && ku <= 0x2f) || 0x74 < ku) {
+- + Fprintf(stderr, "invalid ku in jis (%x, %x)", ku, ten);
+- + return;
+- + }
+- + if (ten < 0x21 || 0x7e < ten) {
+- + Fprintf(stderr, "invalid ten in jis (%x, %x)", ku, ten);
+- + return;
+- + }
+- + ku -= 0x20;
+- + ten -= 0x20;
+- + if (ku == 1) {
+- + *f = 1;
+- + *c = ten;
+- + } else if (ku == 2) {
+- + *f = 1;
+- + *c = ten + 100;
+- + } else if (ku == 3) {
+- + *f = 2;
+- + *c = ten + 32;
+- + } else if (ku <= 8) {
+- + *f = ku - 1;
+- + *c = ten;
+- + } else if (ku <= 47) { /* Daiichi Suijun */
+- + n = (ku - 0x10) * 0x5e + ten - 1;
+- + *f = (n / 256) + 8;
+- + *c = n % 256;
+- + } else { /* Daini Suijun */
+- + n = (ku - 0x30) * 0x5e + ten - 1;
+- + *f = (n / 256) + 20;
+- + *c = n % 256;
+- + }
+- + }
+- + #endif /* ASCIIDNP */
+- +
+- #define xspell_conv(n) spell_conv0(n, current_dimconv)
+-
+- static void
+- ***************
+- *** 966,973 ****
+- change_font((unsigned long) (ch - FNTNUM0));
+- else {
+- long a, b;
+-
+- ! switch (ch) {
+- case SET1:
+- case PUT1:
+- #ifndef TEXXET
+- --- 1198,1208 ----
+- change_font((unsigned long) (ch - FNTNUM0));
+- else {
+- long a, b;
+- + #ifdef ASCIIDNP
+- + unsigned int f, c;
+- + #endif /* ASCIIDNP */
+-
+- ! switch (ch) {
+- case SET1:
+- case PUT1:
+- #ifndef TEXXET
+- ***************
+- *** 978,983 ****
+- --- 1213,1232 ----
+- #endif
+- break;
+-
+- + #ifdef KANJI
+- + case SET2:
+- + case PUT2:
+- + #ifdef ASCIIDNP
+- + compute_fc(xnum(2), &f, &c);
+- + if (cur_TeXnumber >> 24 != f)
+- + change_font((cur_TeXnumber & 0xffffff) | (f << 24));
+- + a = (*currinf.set_char_p)(c);
+- + #else /* ASCIIDNP */
+- + a = (*currinf.set_char_p)(xnum(2));
+- + #endif /* ASCIIDNP */
+- + if (ch != PUT2) DVI_H += a;
+- + break;
+- + #endif /* KANJI */
+- case SETRULE:
+- /* Be careful, dvicopy outputs rules with
+- height = 0x80000000. We don't want any
+- diff -Ncr xdvi18.original/dvi_init.c xdvi18/dvi_init.c
+- *** xdvi18.original/dvi_init.c Mon May 16 11:16:57 1994
+- --- xdvi18/dvi_init.c Wed Mar 1 11:20:20 1995
+- ***************
+- *** 75,80 ****
+- --- 75,83 ----
+- #define VF_PRE 247
+- #define VF_ID_BYTE 202
+- #define VF_MAGIC (VF_PRE << 8) + VF_ID_BYTE
+- + #if defined(KANJI) && !defined(ASCIIDNP)
+- + #define JFMS_MAGIC 11
+- + #endif /* KANJI && !ASCIIDNP */
+-
+- #define dvi_oops(str) (dvi_oops_msg = (str), longjmp(dvi_env, 1))
+-
+- ***************
+- *** 119,126 ****
+- --- 122,151 ----
+- {
+- register struct font *f;
+- register struct glyph *g;
+- + #if defined(KANJI) && !defined(ASCIIDNP)
+- + int n, maxchar;
+-
+- for (f = font_head; f != NULL; f = f->next)
+- + if ((f->flags & FONT_LOADED) && !(f->flags & FONT_VIRTUAL)) {
+- + maxchar = (f->flags & FONT_KANJI) ? KTABLESIZE : f->maxchar;
+- + for (n = 0; n < maxchar; ++n) {
+- + g = (f->flags & FONT_KANJI) ? f->kglyph[n] : &f->glyph[n];
+- + if (g != NULL) {
+- + if (g->bitmap2.bits) {
+- + free(g->bitmap2.bits);
+- + g->bitmap2.bits = NULL;
+- + }
+- + #ifdef GREY
+- + if (g->pixmap2) {
+- + XDestroyImage(g->image2);
+- + g->pixmap2 = NULL;
+- + }
+- + #endif
+- + }
+- + }
+- + }
+- + #else /* KANJI && !ASCIIDNP */
+- + for (f = font_head; f != NULL; f = f->next)
+- if ((f->flags & FONT_LOADED) && !(f->flags & FONT_VIRTUAL))
+- for (g = f->glyph; g <= f->glyph + f->maxchar; ++g) {
+- if (g->bitmap2.bits) {
+- ***************
+- *** 134,139 ****
+- --- 159,165 ----
+- }
+- #endif
+- }
+- + #endif /* KANJI && !ASCIIDNP */
+- }
+-
+- /*
+- ***************
+- *** 195,201 ****
+- --- 221,241 ----
+- int magic;
+- Boolean hushcs = hush_chk;
+-
+- + #ifdef ASCIIDNP
+- + if (iskanjifont(fontp->fontname)) return False;
+- + #endif /* ASCIIDNP */
+- fontp->flags |= FONT_LOADED;
+- + #ifdef NTTZEIT
+- + if (isdnpfont(fontp->fontname)) {
+- + fontp->timestamp = ++current_timestamp;
+- + fontp->maxchar = maxchar = 255;
+- + fontp->set_char_p = set_char;
+- + fontp->file = NULL;
+- + fontp->flags |= FONT_DNP;
+- + read_NTT_index(fontp);
+- + return False;
+- + }
+- + #endif /* NTTZEIT */
+- fontp->file = font_open(fontp->fontname, &font_found,
+- fsize, &size_found, fontp->magstepval, &fontp->filename);
+- if (fontp->file == NULL) {
+- ***************
+- *** 216,225 ****
+- Fprintf(stderr,
+- "Can't find font %s at %d dpi; using %d dpi instead.\n",
+- fontp->fontname, dpi, size_found);
+- - fontp->fsize = size_found;
+- fontp->timestamp = ++current_timestamp;
+- fontp->maxchar = maxchar = 255;
+- fontp->set_char_p = set_char;
+- magic = two(fontp->file);
+- #ifdef USE_PK
+- if (magic == PK_MAGIC) read_PK_index(fontp, WIDENINT hushcs);
+- --- 256,277 ----
+- Fprintf(stderr,
+- "Can't find font %s at %d dpi; using %d dpi instead.\n",
+- fontp->fontname, dpi, size_found);
+- fontp->timestamp = ++current_timestamp;
+- fontp->maxchar = maxchar = 255;
+- + #if defined(KANJI) && !defined(ASCIIDNP)
+- + if (iskanjifont(fontp->fontname)) {
+- + fontp->flags |= FONT_KANJI;
+- + fontp->fsize = (float) size_found;
+- + fontp->set_char_p = set_char2;
+- + }
+- + else {
+- + fontp->fsize = (float) size_found / 5;
+- + fontp->set_char_p = set_char;
+- + }
+- + #else /* KANJI && !ASCIIDNP */
+- + fontp->fsize = (float) size_found / 5;
+- fontp->set_char_p = set_char;
+- + #endif /* KANJI && !ASCIIDNP */
+- magic = two(fontp->file);
+- #ifdef USE_PK
+- if (magic == PK_MAGIC) read_PK_index(fontp, WIDENINT hushcs);
+- ***************
+- *** 231,236 ****
+- --- 283,297 ----
+- #endif
+- if (magic == VF_MAGIC) read_VF_index(fontp, WIDENINT hushcs);
+- else
+- + #if defined(KANJI) && !defined(ASCIIDNP)
+- + if (magic == JFMS_MAGIC) {
+- + #ifdef USE_ZEIT
+- + read_ZEIT_index(fontp);
+- + #endif /* USE_ZEIT */
+- + return False;
+- + }
+- + else
+- + #endif /* KANJI && !ASCIIDNP */
+- oops("Cannot recognize format for font file %s", fontp->filename);
+-
+- if (fontp->flags & FONT_VIRTUAL) {
+- ***************
+- *** 413,418 ****
+- --- 474,504 ----
+- return fontp;
+- }
+-
+- + #ifdef KANJI
+- + int
+- + iskanjifont(font)
+- + char *font;
+- + {
+- + if (strncmp(font, "min", 3) == 0 || strncmp(font, "nmin", 4) == 0)
+- + return 1;
+- + if (strncmp(font, "goth", 4) == 0 || strncmp(font, "ngoth", 5) == 0)
+- + return 2;
+- + return 0;
+- + }
+- + #endif /* KANJI */
+- +
+- + #if defined(ASCIIDNP) || defined(NTTZEIT)
+- + int
+- + isdnpfont(font)
+- + char *font;
+- + {
+- + if (strncmp(font, "dmj", 3) == 0)
+- + return 1;
+- + if (strncmp(font, "dgj", 3) == 0)
+- + return 2;
+- + return 0;
+- + }
+- + #endif /* ASCIIDNP || NTTZEIT */
+-
+- /*
+- * process_preamble reads the information in the preamble and stores
+- ***************
+- *** 547,553 ****
+- --- 633,664 ----
+- }
+- else {
+- register struct glyph *g;
+- + #if defined(KANJI) && !defined(ASCIIDNP)
+- + int n, maxchar;
+-
+- + maxchar = (fontp->flags & FONT_KANJI)
+- + ? KTABLESIZE : fontp->maxchar;
+- + for (n = 0; n < maxchar; ++n) {
+- + g = (fontp->flags & FONT_KANJI)
+- + ? fontp->kglyph[n] : &fontp->glyph[n];
+- + if (g != NULL) {
+- + if (g->bitmap.bits != NULL)
+- + free(g->bitmap.bits);
+- + if (g->bitmap2.bits != NULL)
+- + free(g->bitmap2.bits);
+- + #ifdef GREY
+- + if (g->pixmap2 != NULL)
+- + XDestroyImage(g->image2);
+- + #endif
+- + if (fontp->flags & FONT_KANJI)
+- + free((char *) g);
+- + }
+- + }
+- + if (fontp->flags & FONT_KANJI)
+- + free((char **) fontp->kglyph);
+- + else
+- + free((char *) fontp->glyph);
+- + #else /* KANJI && !ASCIIDNP */
+- for (g = fontp->glyph;
+- g <= fontp->glyph + fontp->maxchar; ++g) {
+- if (g->bitmap.bits != NULL) free(g->bitmap.bits);
+- ***************
+- *** 557,562 ****
+- --- 668,674 ----
+- #endif
+- }
+- free((char *) fontp->glyph);
+- + #endif /* KANJI && !ASCIIDNP */
+- }
+- free((char *) fontp);
+- }
+- ***************
+- *** 678,680 ****
+- --- 790,956 ----
+- }
+- return True;
+- }
+- +
+- + #ifdef ASCIIDNP
+- + static double kanji_width[] = {
+- + 0.962216, 0.747434, 0.504013, 0.353665,
+- + 0.962216, 0.747434, 0.504013, 0.353665,
+- + };
+- +
+- + static char kanji_sym[] = {
+- + 0,0,2,2,3,3,7,7,7,6,7,3,3,7,7,6,6,0,0,6,0,6,1,1,0,1,0,0,0,0,7,0,
+- + 0,0,7,7,0,0,7,3,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,0,0,0,0,
+- + 0,0,0,0,0,0,0,0,1,1,1,2,2,2,0,0,1,1,1,0,0,0,0,0,6,0,0,0,0,0,0,0,
+- + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+- + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+- + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+- + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+- + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+- + };
+- +
+- + static char kanji_hira[] = {
+- + 0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+- + 0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+- + 0,0,0,1,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+- + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+- + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+- + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+- + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+- + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+- + };
+- +
+- + static char kanji_kata[] = {
+- + 0,1,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+- + 0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+- + 0,0,0,1,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,
+- + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+- + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+- + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+- + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+- + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+- + };
+- +
+- + void
+- + adj_kanjiwidth(fontp, subindex, c)
+- + struct font *fontp;
+- + unsigned int subindex;
+- + ubyte c;
+- + {
+- + char *table;
+- +
+- + switch (subindex) {
+- + case 1:
+- + table = kanji_sym;
+- + break;
+- + case 3:
+- + table = kanji_hira;
+- + break;
+- + case 4:
+- + table = kanji_kata;
+- + break;
+- + default:
+- + fontp->glyph[c].dvi_adv =
+- + fontp->dimconv * (1 << 20) * kanji_width[0];
+- + return;
+- + }
+- + fontp->glyph[c].dvi_adv =
+- + fontp->dimconv * (1 << 20) * kanji_width[table[c]];
+- + if (table[c] == 1)
+- + fontp->glyph[c].x = -fontp->glyph[c].y / 5;
+- + else if (table[c] >= 4)
+- + fontp->glyph[c].x = -fontp->glyph[c].y / 10;
+- + }
+- +
+- + /**** jsf_names[] : borrowed from jvi2ps1.3j ****/
+- +
+- + static char *jsf_names[] = {
+- + "", "jsy", "jroma", "jhira", "jkata",
+- + "jgreek", "jrussian", "jkeisen",
+- + "jka", "jkb", "jkc", "jkd", "jke", "jkf",
+- + "jkg", "jkh", "jki", "jkj", "jkk", "jkl",
+- + "jkm", "jkn", "jko", "jkp", "jkq", "jkr",
+- + "jks", "jkt", "jku", "jkv", "jkw", "jkx",
+- + "jky", "jkz", NULL,
+- + };
+- +
+- + void
+- + define_kanjifont(n)
+- + unsigned int n;
+- + {
+- + unsigned int base, index;
+- + register struct tn *tnp;
+- + struct font *fontp, *real_fontp;
+- + float fsize;
+- + int len;
+- + char *fontname, *name, *head;
+- + int size;
+- +
+- + base = n & 0xffffff;
+- + index = n >> 24;
+- +
+- + for (tnp = currinf.tn_head; tnp != NULL; tnp = tnp->next)
+- + if (tnp->TeXnumber == base) {
+- + real_fontp = tnp->fontp;
+- + break;
+- + }
+- + tnp = (struct tn *)
+- + xmalloc((unsigned) sizeof(struct tn), "TeXnumber structure");
+- + tnp->next = tn_head;
+- + tn_head = tnp;
+- + currinf.tn_head = tn_head;
+- + tnp->TeXnumber = n;
+- + fsize = real_fontp->fsize;
+- + name = real_fontp->fontname;
+- + if (iskanjifont(name) == 1)
+- + head = "dm";
+- + else
+- + head = "dg";
+- + while (!isdigit(*name))
+- + name++;
+- + len = strlen(head) + strlen(jsf_names[index]) + strlen(name);
+- + fontname = xmalloc((unsigned) len + 1, "font name");
+- + Sprintf(fontname, "%s%s%s", head, jsf_names[index], name);
+- + if (debug & DBG_PK)
+- + Printf("Define kanjifont \"%s\"\n", fontname);
+- + /*
+- + * reuse font if possible
+- + */
+- + for (fontp = font_head;; fontp = fontp->next) {
+- + if (fontp == NULL) { /* if font doesn't exist yet */
+- + if (list_fonts)
+- + Printf("%s at %d dpi\n", fontname, (int) (fsize + 0.5));
+- + fontp = (struct font *) xmalloc((unsigned) sizeof(struct font),
+- + "font structure");
+- + fontp->dimconv = real_fontp->dimconv;
+- + fontp->fontname = fontname;
+- + fontp->fsize = fsize;
+- + fontp->flags = FONT_IN_USE;
+- + load_font(fontp);
+- + fontp->next = font_head;
+- + font_head = fontp;
+- + break;
+- + }
+- + if (strcmp(fontname, fontp->fontname) == 0
+- + && size == (int) (5 * fontp->fsize + 0.5)) {
+- + /* if font already in use */
+- + reuse_font(fontp);
+- + free(fontname);
+- + break;
+- + }
+- + }
+- + tnp->fontp = fontp;
+- + if (index == 1) {
+- + struct glyph *g;
+- +
+- + /* dainippon symbol font; Zenkaku blank is not defined in it. */
+- + g = &fontp->glyph[1];
+- + g->x = 0;
+- + g->y = 0;
+- + g->bitmap.w = 1;
+- + g->bitmap.h = 1;
+- + alloc_bitmap(&g->bitmap);
+- + bzero(g->bitmap.bits, g->bitmap.h * g->bitmap.bytes_wide);
+- + adj_kanjiwidth(fontp, index, 1);
+- + }
+- + }
+- + #endif /* ASCIIDNP */
+- diff -Ncr xdvi18.original/font_open.c xdvi18/font_open.c
+- *** xdvi18.original/font_open.c Mon May 16 11:17:14 1994
+- --- xdvi18/font_open.c Wed Mar 1 09:48:16 1995
+- ***************
+- *** 80,85 ****
+- --- 80,93 ----
+- #define DEFAULT_VF_TAIL ":%f.vf"
+- #endif /* VMS */
+-
+- + #ifdef USE_ZEIT
+- + #ifndef VMS
+- + #define DEFAULT_TFM_TAIL "/%f.%p"
+- + #else /* VMS */
+- + #define DEFAULT_TFM_TAIL ":%f.%p"
+- + #endif /* VMS */
+- + #endif /* USE_ZEIT */
+- +
+- #ifdef MAKEPKCMD
+- #undef MAKEPK
+- #define MAKEPK
+- ***************
+- *** 570,575 ****
+- --- 578,591 ----
+- DEFAULT_TAIL)) != NULL)
+- return f;
+- #endif
+- + #undef FIRST_TRY
+- + #define FIRST_TRY False
+- + #ifdef USE_ZEIT
+- + if (iskanjifont(font))
+ + if ((f = formatted_open(p, font, "tfm", 0, name, FIRST_TRY,
+ + DEFAULT_TFM_TAIL)) != NULL)
+ + return f;
+ + #endif /* USE_ZEIT */
+! #ifdef SEARCH_SUBDIRECTORIES
+! if (next_subdir != NULL && next_subdir->index == p) {
+! next_subdir = next_subdir->next;
+! ***************
+! *** 702,708 ****
+! --- 718,728 ----
+!
+! #ifdef MAKEPK
+! /* Try to create the font. */
+! + #ifdef ASCIIDNP
+! + if ((magstepval != NOBUILD) && !isdnpfont(font)) {
+! + #else /* ASCIIDNP */
+! if (magstepval != NOBUILD) {
+! + #endif /* ASCIIDNP */
+! char mkpk[MKPKSIZE];
+! Boolean used_fontname = False;
+! _Xconst char *p;
+! diff -Ncr xdvi18.original/jtfm.h xdvi18/jtfm.h
+! *** xdvi18.original/jtfm.h Thu Jan 1 09:00:00 1970
+! --- xdvi18/jtfm.h Wed Mar 1 09:50:25 1995
+! ***************
+! *** 0 ****
+! --- 1,47 ----
+! + /**********************************************
+! + * Copyright (C) Atsuo Kawaguchi, 1987.
+! + * (atsuo@sanken.osaka-u.junet)
+! + * Modified by Y. Hayashi from jxdvi-NEWS
+! + * (hayashi@me.aoyama.ac.jp)
+! + **********************************************/
+! + #define J_ID 0 /* id */
+! + #define J_NT 1 /* number of words in the char_type table */
+! + #define J_LF 2 /* length of entire file */
+! + #define J_LH 3 /* length of header */
+! + #define J_BC 4 /* smallest char_type */
+! + #define J_EC 5 /* largest char_type */
+! + #define J_NW 6 /* number of width table */
+! + #define J_NH 7 /* number of height table */
+! + #define J_ND 8 /* number of depth table */
+! + #define J_NI 9 /* number of italic correctiuon table */
+! + #define J_NL 10 /* number of glue/kern talbe */
+! + #define J_NK 11
+! + #define J_NG 12
+! + #define J_NP 13
+! +
+! + struct jfm_char_type {
+! + unsigned short code; /* JIS code */
+! + unsigned short index; /* index to char_info */
+! + };
+! +
+! + struct jfm_char_info {
+! + unsigned char width_ix; /* index to width */
+! + unsigned char height_depth_ix; /* index to height & depth */
+! + unsigned char italic_ix_tag; /* index to italic & tag */
+! + unsigned char remainder_ix; /* index to remainder */
+! + };
+! +
+! + struct jfm {
+! + char fn[128]; /* font name (min10, etc.) */
+! + short table[(J_NP+1)]; /* table */
+! + unsigned long check_sum; /* header */
+! + unsigned long design_size;
+! + struct jfm_char_type *type;
+! + struct jfm_char_info *info;
+! + unsigned long *width;
+! + unsigned long *height;
+! + unsigned long *depth;
+! + unsigned long *italic;
+! + };
+! +
+! + struct jfm *read_jfm();
+! diff -Ncr xdvi18.original/mkconfig xdvi18/mkconfig
+! *** xdvi18.original/mkconfig Fri May 6 09:38:57 1994
+! --- xdvi18/mkconfig Wed Mar 1 10:19:59 1995
+! ***************
+! *** 21,26 ****
+! --- 21,30 ----
+! PSHEADERC=''
+! PSHEADERO=''
+! PS=''
+! + ZEITC=''
+! + ZEITO=''
+! + NTTZEITC=''
+! + NTTZEITO=''
+!
+! while test $# -gt 0
+! do
+! ***************
+! *** 33,38 ****
+! --- 37,44 ----
+! -DPS_NEWS) NEWSC=psnews.c; NEWSO=psnews.o;
+! NEWSLIBS='-u _xv_psview_pkg -lxvps -lxview -lcps -lolgx'; PS=y;;
+! -DPS_GS) GSC=psgs.c; GSO=psgs.o; PS=y;;
+! + -DUSE_ZEIT) ZEITC=zeit.c; ZEITO=zeit.o;;
+! + -DNTTZEIT) NTTZEITC=dnpzeit.c; NTTZEITO=dnpzeit.o;;
+! esac
+! shift
+! done
+! ***************
+! *** 45,52 ****
+!
+! if test -n "$PS"; then PSHEADERC=psheader.c; PSHEADERO=psheader.o; fi
+!
+! ! echo VARSRCS= $PKC $GFC $PSHEADERC $DPSC $NEWSC $GSC > Makefile.cfg
+! ! echo VAROBJS= $PKO $GFO $PSHEADERO $DPSO $NEWSO $GSO >> Makefile.cfg
+!
+! if test $TYPE = "make"
+! then
+! --- 51,58 ----
+!
+! if test -n "$PS"; then PSHEADERC=psheader.c; PSHEADERO=psheader.o; fi
+!
+! ! echo VARSRCS= $PKC $GFC $PSHEADERC $DPSC $NEWSC $GSC $ZEITC $NTTZEITC > Makefile.cfg
+! ! echo VAROBJS= $PKO $GFO $PSHEADERO $DPSO $NEWSO $GSO $ZEITO $NTTZEITO >> Makefile.cfg
+!
+! if test $TYPE = "make"
+! then
+! diff -Ncr xdvi18.original/xdvi.c xdvi18/xdvi.c
+! *** xdvi18.original/xdvi.c Wed May 25 00:12:25 1994
+! --- xdvi18/xdvi.c Wed Mar 1 11:44:27 1995
+! ***************
+! *** 73,78 ****
+! --- 73,83 ----
+! #ifndef ALTFONT
+! #define ALTFONT "cmr10"
+! #endif
+! + #ifdef USE_ZEIT
+! + #ifndef DEFAULT_FONTCONF
+! + #define DEFAULT_FONTCONF "/usr/local/lib/tex/fonts/zeit/FontConf"
+! + #endif
+! + #endif /* USE_ZEIT */
+!
+! #ifndef A4
+! #define DEFAULT_PAPER "us"
+! ***************
+! *** 211,216 ****
+! --- 216,224 ----
+! {"+nogrey", ".grey", XrmoptionNoArg, (caddr_t) "on"},
+! {"-gamma", ".gamma", XrmoptionSepArg, (caddr_t) NULL},
+! #endif
+! + #ifdef USE_ZEIT
+! + {"-fontconf", ".fontconf", XrmoptionSepArg, (caddr_t) NULL},
+! + #endif /* USE_ZEIT */
+! {"-p", ".pixelsPerInch", XrmoptionSepArg, (caddr_t) NULL},
+! {"-margins", ".Margin", XrmoptionSepArg, (caddr_t) NULL},
+! {"-sidemargin", ".sideMargin", XrmoptionSepArg, (caddr_t) NULL},
+! ***************
+! *** 378,383 ****
+! --- 386,395 ----
+! {"grey", "Grey", XtRBoolean, sizeof (Boolean),
+! offset(_use_grey), XtRString, "true"},
+! #endif
+! + #ifdef USE_ZEIT
+! + {"fontconf", "FontConf", XtRString, sizeof(char *),
+! + offset(fontconf), XtRString, (caddr_t) DEFAULT_FONTCONF},
+! + #endif /* USE_ZEIT */
+! };
+! #undef offset
+!
+! ***************
+! *** 564,569 ****
+! --- 576,584 ----
+! {"-gamma", "gamma", SepArg, FloatArg, 1,
+! "g", ADDR(_gamma)},
+! #endif
+! + #ifdef USE_ZEIT
+! + {"-fontconf", ".fontconf", XrmoptionSepArg, (caddr_t) NULL},
+! + #endif /* USE_ZEIT */
+! {"-p", "pixelsPerInch", SepArg, NumberArg, 1,
+! "pixels", ADDR(_pixels_per_inch)},
+! {"-margins", "Margin", SepArg, StringArg, 3,
+! ***************
+! *** 1162,1167 ****
+! --- 1177,1186 ----
+! DISP = XtDisplay(top_level);
+! SCRN = XtScreen(top_level);
+! shrink_factor = resource.shrinkfactor;
+! +
+! + #ifdef USE_ZEIT
+! + VF_Init(NULL);
+! + #endif /* USE_ZEIT */
+!
+! #else /* !TOOLKIT */
+!
+! diff -Ncr xdvi18.original/xdvi.h xdvi18/xdvi.h
+! *** xdvi18.original/xdvi.h Sat May 7 05:22:22 1994
+! --- xdvi18/xdvi.h Wed Mar 1 09:59:31 1995
+! ***************
+! *** 6,11 ****
+! --- 6,32 ----
+! * The C environment *
+! *******************************/
+!
+! + #ifdef ASCIIDNP
+! + #ifndef KANJI
+! + #define KANJI
+! + #endif
+! + #ifdef NTTZEIT
+! + #undef NTTZEIT
+! + #endif
+! + #ifdef USE_ZEIT
+! + #undef USE_ZEIT
+! + #endif
+! + #endif /* ASCIIDNP */
+! +
+! + #ifdef NTTZEIT
+! + #ifndef KANJI
+! + #define KANJI
+! + #endif
+! + #ifndef USE_ZEIT
+! + #define USE_ZEIT
+! + #endif
+! + #endif /* NTTZEIT */
+! +
+! #include <X11/Xlib.h> /* include Xfuncs.h, if available */
+! #include <X11/Xutil.h> /* needed for XDestroyImage */
+! #include <X11/Xos.h>
+! ***************
+! *** 143,148 ****
+! --- 164,173 ----
+! #define Fclose (void) fclose
+! #define Fflush (void) fflush
+! #define Strcpy (void) strcpy
+! + #if defined(KANJI) && !defined(ASCIIDNP)
+! + #define jisindex(c) (((c) < 0x2000 || 0x7d00 < (c)) ? 0 : ((c) - 0x2000))
+! + #define KTABLESIZE 0x5d00
+! + #endif /* KANJI && !ASCIIDNP */
+!
+! /********************************
+! * Types and data *
+! ***************
+! *** 362,367 ****
+! --- 387,401 ----
+! struct glyph *glyph;
+! /* these fields are used by (loaded) virtual fonts */
+! struct font **vf_table; /* list of fonts used by this vf */
+! + #if defined(KANJI) && !defined(ASCIIDNP)
+! + struct glyph **kglyph;
+! + #ifdef USE_ZEIT
+! + int vf;
+! + #ifdef NTTZEIT
+! + int index;
+! + #endif /* NTTZEIT */
+! + #endif /* USE_ZEIT */
+! + #endif /* KANJI && !ASCIIDNP */
+! struct tn *vf_chain; /* ditto, if TeXnumber >= VFTABLELEN */
+! struct font *first_font; /* first font defined */
+! struct macro *macro;
+! ***************
+! *** 372,377 ****
+! --- 406,417 ----
+! #define FONT_IN_USE 1 /* used for housekeeping */
+! #define FONT_LOADED 2 /* if font file has been read */
+! #define FONT_VIRTUAL 4 /* if font is virtual */
+! + #if defined(KANJI) && !defined(ASCIIDNP)
+! + #define FONT_KANJI 8 /* if font is kanji */
+! + #ifdef NTTZEIT
+! + #define FONT_DNP 16 /* if font is DNP kanji */
+! + #endif /* NTTZEIT */
+! + #endif /* KANJI && !ASCIIDNP */
+!
+! #define TNTABLELEN 30 /* length of TeXnumber array (dvi file) */
+! #define VFTABLELEN 5 /* length of TeXnumber array (virtual fonts) */
+! ***************
+! *** 454,459 ****
+! --- 494,502 ----
+! #ifdef GREY
+! Boolean _use_grey;
+! #endif
+! + #ifdef USE_ZEIT
+! + _Xconst char *fontconf;
+! + #endif /* USE_ZEIT */
+! } resource;
+!
+! /* As a convenience, we define the field names without leading underscores
+! ***************
+! *** 612,621 ****
+! --- 655,670 ----
+! extern void put_border ARGS((int, int, unsigned int, unsigned int, GC));
+! #ifndef TEXXET
+! extern long set_char ARGS((wide_ubyte));
+! + #if defined(KANJI) && !defined(ASCIIDNP)
+! + extern long set_char2(int);
+! + #endif /* KANJI && !ASCIIDNP */
+! extern long load_n_set_char ARGS((wide_ubyte));
+! extern long set_vf_char ARGS((wide_ubyte));
+! #else
+! extern void set_char ARGS((wide_ubyte, wide_ubyte));
+! + #if defined(KANJI) && !defined(ASCIIDNP)
+! + extern long set_char2();
+! + #endif /* KANJI && !ASCIIDNP */
+! extern void load_n_set_char ARGS((wide_ubyte, wide_ubyte));
+! extern void set_vf_char ARGS((wide_ubyte, wide_ubyte));
+! #endif
+! diff -Ncr xdvi18.original/zeit.c xdvi18/zeit.c
+ *** xdvi18.original/zeit.c Thu Jan 1 09:00:00 1970
+ --- xdvi18/zeit.c Wed Mar 1 10:38:19 1995
+ ***************
+--- 174,184 ----
+ + return(ku * 256 + ten);
+ + }
+ +
+ + if ((f = formatted_open(p, font, "tfm", 0, name, FIRST_TRY,
+ + DEFAULT_TFM_TAIL)) != NULL)
+ + return f;
+ + #endif /* USE_ZEIT */
+! +
+ *** xdvi18.original/zeit.c Thu Jan 1 09:00:00 1970
+ --- xdvi18/zeit.c Wed Mar 1 10:38:19 1995
+ ***************
diff --git a/japanese/vfxdvi300/pkg-comment b/japanese/vfxdvi300/pkg-comment
new file mode 100644
index 000000000000..d664c81329c8
--- /dev/null
+++ b/japanese/vfxdvi300/pkg-comment
@@ -0,0 +1 @@
+DVI Previewer for X. + Japanese patch + vector font support
diff --git a/japanese/vfxdvi300/pkg-descr b/japanese/vfxdvi300/pkg-descr
new file mode 100644
index 000000000000..a05f0c855c4b
--- /dev/null
+++ b/japanese/vfxdvi300/pkg-descr
@@ -0,0 +1,6 @@
+This is xdvi-17 + miyupath + markpage + toc + printdvi + VFlib patch.
+
+jp-vflib package is need to be installed in advance.
+This package can compile in 118dpi, 240dpi, 300dpi , 360dpi, 400dpi
+or 600dpi fonts.
+ MITA Yoshio <mita@jp.FreeBSD.org>
diff --git a/japanese/vfxdvi300/pkg-plist b/japanese/vfxdvi300/pkg-plist
new file mode 100644
index 000000000000..f42adebd2171
--- /dev/null
+++ b/japanese/vfxdvi300/pkg-plist
@@ -0,0 +1,7 @@
+@cwd /usr/X11R6
+bin/xdvi
+man/man1/xdvi.1.gz
+@cwd /usr/local
+lib/tex/xdvipaper.dvi2ps-j
+lib/tex/xdvipaper.dvips
+lib/tex/xdvipaper.jdvi2kps