home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!wyse!mikew
- From: mikew@wyse.wyse.com (Mike Wexler)
- Newsgroups: comp.sources.x
- Subject: v03i057: dvi previewer, Patch2
- Message-ID: <2155@wyse.wyse.com>
- Date: 20 Mar 89 22:28:56 GMT
- Organization: Wyse Technology, San Jose
- Lines: 1027
- Approved: mikew@wyse.com
-
- Submitted-by: vojta@bosco.Berkeley.EDU
- Posting-number: Volume 3, Issue 57
- Archive-name: xdvi/patch2
-
- Enclosed is patch2 for xdvi, the dvi previewer. Mostly it fixes bugs
- and addresses comments which were sent to me. You may notice that
- among these patches, I change the Makefile back to its original form.
- I see no point in replacing the Makefile with a machine generated one:
- (a) if a site uses imake, then they would probably throw away the
- Makefile; (b) if a site does not use imake, then they probably don't
- use makedepend either, (the Makefile distributed did not include
- dependencies of the .h files); and (c) sites not using imake do not
- like to wade through long machine-generated makefiles. So please keep
- the short Makefile.
-
- Also, I eliminated the nonsense with using the program mktable.c to generate
- the header file table.h. It created problems for a number of people, and
- it's just not worth the 790 bytes it saves.
-
- diff -cr xdvi.old/AUTHOR xdvi/AUTHOR
- *** xdvi.old/AUTHOR Fri Mar 17 17:55:55 1989
- --- xdvi/AUTHOR Fri Mar 17 17:49:19 1989
- ***************
- *** 1,31 ****
- ! (Message inbox:1046)
- ! Return-Path: usenet%agate.Berkeley.EDU@ucbvax.Berkeley.EDU
- ! Received: by wyse.wyse.com (5.58/Wyse master/5-13-88)
- ! id AA24270; Mon, 6 Mar 89 10:21:26 PST
- ! Received: from UCBVAX.Berkeley.EDU by uunet.UU.NET (5.61/1.14) with SMTP
- ! id AA16785; Sun, 5 Mar 89 19:11:28 -0500
- ! Received: from agate.Berkeley.EDU by ucbvax.Berkeley.EDU (5.61/1.33)
- ! id AA05984; Sun, 5 Mar 89 16:12:08 -0800
- ! Received: by agate.berkeley.edu (5.61/1.30)
- ! id AA08053; Sun, 5 Mar 89 16:10:54 PST
- ! To: comp-sources-x@ucbvax.Berkeley.EDU
- ! Path: agate!math.berkeley.edu!vojta
- ! From: vojta%bosco.Berkeley.EDU@ucbvax.Berkeley.EDU (Paul Vojta)
- ! Newsgroups: comp.sources.x
- ! Subject: xdvi, a TeX dvi file previewer (part 1 of 3)
- ! Message-Id: <21190@agate.BERKELEY.EDU>
- ! Date: 6 Mar 89 00:10:47 GMT
- ! Sender: usenet%agate.Berkeley.EDU@ucbvax.Berkeley.EDU
- ! Reply-To: vojta%bosco.Berkeley.EDU@ucbvax.Berkeley.EDU (Paul Vojta)
- ! Organization: Math Dept., UC Berkeley
- ! Lines: 1830
-
-
- ! Enclosed is an updated version of the program xdvi. This version has been
- ! modified to use the toolkit (specifically, a viewport widget), and it also
- ! has a `magnifying glass.' tpic specials, too (X11 only). I should note,
- ! however, that it might not work with color VAXstations. I understand that
- ! this is a server bug.
- !
- ! --Paul Vojta, vojta@math.berkeley.edu
- !
- --- 1,22 ----
- ! This program is the combined work of many people, including but not
- ! restricted to:
- ! Eric Cooper, CMU
- ! Bob Scheifler, MIT LCS
- ! Paal Kvamme, Norwegian Institute of Technology
- ! H\aa vard Eidnes, Norwegian Institute of Technology
- ! Mark Eichin, MIT SIPB
- ! Paul Vojta, UC Berkeley
- ! Jeffrey Lee, U of Toronto
- ! At the present time, the person to send bug reports to is Paul Vojta,
- ! vojta@math.berkeley.edu.
- ! This address will be valid at least through August, 1989.
-
- + In addition to the various comp.sources.x archives, current versions of this
- + program can also be obtained via anonymous ftp from the following locations:
- + expo.lcs.mit.edu [18.30.0.212] file contrib/xdvi.shar.Z
- + ucbvax.berkeley.edu [128.32.149.36] file pub/tmp/xdvi.shar.Z
- + charon.mit.edu [18.80.0.13] file pub/vxdvi.shar.Z
- + In general, ucbvax will hold the newest version, and charon may be a bit out
- + of date.
-
- ! Paul Vojta, 13 March 1989.
- diff -cr xdvi.old/Imakefile xdvi/Imakefile
- *** xdvi.old/Imakefile Fri Mar 17 17:55:57 1989
- --- xdvi/Imakefile Fri Mar 17 17:49:21 1989
- ***************
- *** 3,11 ****
- FONTFORMATS_C=gf.c pk.c pxl.c
- FONTFORMATS_O=gf.o pk.o pxl.o
-
- ! DEFINES=-DBMSHORT \
- ! -DFONT_PATH=\"$(FONT_PATH)\" \
- ! -DDEFAULT_FONT_PATH=\"$(DEFAULT_FONT_PATH)\"
- SYSLAST_LIBRARIES=-lXaw -lXmu -lXt -lX11 -lm
- SRCS=xdvi.c dvi_init.c dvi_draw.c $(FONTFORMATS_C) pxl_open.c tpic.c
- OBJS=xdvi.o dvi_init.o dvi_draw.o $(FONTFORMATS_O) pxl_open.o tpic.o
- --- 3,12 ----
- FONTFORMATS_C=gf.c pk.c pxl.c
- FONTFORMATS_O=gf.o pk.o pxl.o
-
- ! DEFINES=-DMSBITFIRST \
- ! -DBMSHORT \
- ! -DFONT_PATH=\"$(FONT_PATH)\" \
- ! -DDEFAULT_FONT_PATH=\"$(DEFAULT_FONT_PATH)\"
- SYSLAST_LIBRARIES=-lXaw -lXmu -lXt -lX11 -lm
- SRCS=xdvi.c dvi_init.c dvi_draw.c $(FONTFORMATS_C) pxl_open.c tpic.c
- OBJS=xdvi.o dvi_init.o dvi_draw.o $(FONTFORMATS_O) pxl_open.o tpic.o
- ***************
- *** 12,23 ****
-
- ComplexProgramTarget(xdvi)
-
- - table.h: mktable
- - mktable > table.h
- -
- - mktable: mktable.c
- - $(CC) $(CFLAGS) -o mktable mktable.c
- -
- xdvi.man:
- sed -e "s;%%FONT_PATH%%;$(FONT_PATH);g" \
- -e "s;%%DEFAULT_FONT_PATH%%;$(DEFAULT_FONT_PATH);g" \
- --- 13,18 ----
- ***************
- *** 25,31 ****
- > xdvi.man
-
- clean::
- ! $(RM) mktable table.h xdvi.man
-
- lint::
- lint $(INCLUDES) $(DEFINES) $(SRCS)
- --- 20,26 ----
- > xdvi.man
-
- clean::
- ! $(RM) xdvi.man
-
- lint::
- lint $(INCLUDES) $(DEFINES) $(SRCS)
- diff -cr xdvi.old/Makefile xdvi/Makefile
- *** xdvi.old/Makefile Fri Mar 17 17:55:16 1989
- --- xdvi/Makefile Fri Mar 17 17:49:25 1989
- ***************
- *** 1,186 ****
- - # Makefile generated by imake - do not edit!
- - # $XConsortium: imake.c,v 1.37 88/10/08 20:08:30 jim Exp $
- #
- ! # The cpp used on this machine replaces all newlines and multiple tabs and
- ! # spaces in a macro expansion with a single space. Imake tries to compensate
- ! # for this, but is not always successful.
- #
- !
- ! ###########################################################################
- ! # X Window System Makefile generated from template file Imake.tmpl
- ! # $XConsortium: Imake.tmpl,v 1.91 88/10/23 22:37:10 jim Exp $
- #
- - # Do not change the body of the imake template file. Server-specific
- - # parameters may be set in the appropriate .macros file; site-specific
- - # parameters (but shared by all servers) may be set in site.def. If you
- - # make any changes, you'll need to rebuild the makefiles using
- - # "make World" (at best) or "make Makefile; make Makefiles" (at least) in
- - # the top level directory.
- - #
- - # If your C preprocessor doesn't define any unique symbols, you'll need
- - # to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
- - # "make Makefile", "make Makefiles", or "make World").
- - #
- - # If you absolutely can't get imake to work, you'll need to set the
- - # variables at the top of each Makefile as well as the dependencies at the
- - # bottom (makedepend will do this automatically).
- - #
- -
- - ###########################################################################
- - # platform-specific configuration parameters - edit Sun.macros to change
- -
- - # platform: $XConsortium: Sun.macros,v 1.52 88/10/23 11:00:55 jim Exp $
- - # operating system: SunOS 3.4
- -
- - BOOTSTRAPCFLAGS =
- - AS = as
- - CC = cc
- - CPP = /lib/cpp
- - LD = ld
- - LINT = lint
- - INSTALL = install
- - TAGS = ctags
- - RM = rm -f
- - MV = mv
- - LN = ln -s
- - RANLIB = ranlib
- - RANLIBINSTFLAGS = -t
- - AR = ar clq
- - LS = ls
- - LINTOPTS = -xz
- - LINTLIBFLAG = -C
- - MAKE = make
- - STD_CPP_DEFINES =
- - STD_DEFINES =
- -
- - ###########################################################################
- - # site-specific configuration parameters - edit site.def to change
- -
- - # site: $XConsortium: site.def,v 1.16 88/10/12 10:30:24 jim Exp $
- -
- - ###########################################################################
- - # definitions common to all Makefiles - do not edit
- -
- - SHELL = /bin/sh
- -
- - DESTDIR = /global
- - USRLIBDIR = $(DESTDIR)/lib
- - BINDIR = $(DESTDIR)/bin/X11
- - INCDIR = $(DESTDIR)/include
- - ADMDIR = $(DESTDIR)/usr/adm
- - LIBDIR = $(USRLIBDIR)/X11
- - LINTLIBDIR = $(USRLIBDIR)/lint
- - FONTDIR = $(LIBDIR)/fonts
- - XINITDIR = $(LIBDIR)/xinit
- - XDMDIR = $(LIBDIR)/xdm
- - UWMDIR = $(LIBDIR)/uwm
- - AWMDIR = $(LIBDIR)/awm
- - TWMDIR = $(LIBDIR)/twm
- - DTDIR = $(LIBDIR)/dt
- - MANPATH = /usr/man
- - MANSOURCEPATH = $(MANPATH)/man
- - MANDIR = $(MANSOURCEPATH)n
- - LIBMANDIR = $(MANSOURCEPATH)n3
- - XAPPLOADDIR = $(LIBDIR)/app-defaults
- -
- - INSTBINFLAGS = -m 0755
- - INSTUIDFLAGS = -m 4755
- - INSTLIBFLAGS = -m 0664
- - INSTINCFLAGS = -m 0444
- - INSTMANFLAGS = -m 0444
- - INSTAPPFLAGS = -m 0444
- - INSTKMEMFLAGS = -m 4755
- - FCFLAGS = -t
- - CDEBUGFLAGS = -O
- -
- - PATHSEP = /
- - DEPEND = $(BINDIR)/makedepend
- - IMAKE = $(BINDIR)/imake
- - RGB = $(LIBDIR)/rgb
- - FC = $(BINDIR)/bdftosnf
- - MKFONTDIR = $(BINDIR)/mkfontdir
- - MKDIRHIER = $(BINDIR)/mkdirhier.sh
- -
- - CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(STD_DEFINES) $(DEFINES)
- - LINTFLAGS = $(LINTOPTS) $(INCLUDES) $(STD_DEFINES) $(DEFINES) -DLINT
- - LDFLAGS = $(CDEBUGFLAGS) -L$(USRLIBDIR) $(SYS_LIBRARIES) $(SYSAUX_LIBRARIES)
- -
- - IRULESRC = $(LIBDIR)/imake.includes
- -
- - EXTENSIONLIB = $(USRLIBDIR)/libext.a
- - XLIB = $(USRLIBDIR)/libX11.a
- - XMULIB = $(USRLIBDIR)/libXmu.a
- - OLDXLIB = $(USRLIBDIR)/liboldX.a
- - XTOOLLIB = $(USRLIBDIR)/libXt.a
- - XAWLIB = $(USRLIBDIR)/libXaw.a
- - LINTXLIB = $(USRLIBDIR)/lint/llib-lX11.ln
- - LINTXMU = $(USRLIBDIR)/lint/llib-lXmu.ln
- - LINTXTOOL = $(USRLIBDIR)/lint/llib-lXt.ln
- - LINTXAW = $(USRLIBDIR)/lint/llib-lXaw.ln
- - INCLUDES = -I$(INCDIR)
- - MACROFILE = Sun.macros
- - ICONFIGFILES = $(IRULESRC)/Imake.tmpl \
- - $(IRULESRC)/$(MACROFILE) $(IRULESRC)/site.def
- - IMAKE_DEFINES =
- - IMAKE_CMD = $(NEWTOP)$(IMAKE) -TImake.tmpl -I$(NEWTOP)$(IRULESRC) \
- - -s Makefile $(IMAKE_DEFINES)
- - RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a \
- - .emacs_* tags TAGS make.log MakeOut
- -
- - ###########################################################################
- - # rules: $XConsortium: Imake.rules,v 1.71 88/10/23 22:46:34 jim Exp $
- -
- - ###########################################################################
- - # start of Imakefile
- -
- FONT_PATH=TEXFONTS
- DEFAULT_FONT_PATH=/usr/local/tex/fonts
- FONTFORMATS_C=gf.c pk.c pxl.c
- FONTFORMATS_O=gf.o pk.o pxl.o
- !
- ! DEFINES=-DBMSHORT \
- ! -DFONT_PATH=\"$(FONT_PATH)\" \
- ! -DDEFAULT_FONT_PATH=\"$(DEFAULT_FONT_PATH)\"
- ! SYSLAST_LIBRARIES=-lXaw -lXmu -lXt -lX11 -lm
- ! SRCS=xdvi.c dvi_init.c dvi_draw.c $(FONTFORMATS_C) pxl_open.c tpic.c
- OBJS=xdvi.o dvi_init.o dvi_draw.o $(FONTFORMATS_O) pxl_open.o tpic.o
-
- ! PROGRAM = xdvi
-
- ! all:: xdvi
-
- ! xdvi: $(OBJS) $(LOCAL_LIBRARIES)
- ! $(RM) $@
- ! $(CC) -o $@ $(OBJS) $(LOCAL_LIBRARIES) $(LDFLAGS) $(SYSLAST_LIBRARIES)
-
- ! relink::
- ! $(RM) $(PROGRAM)
- ! $(MAKE) $(MFLAGS) $(PROGRAM)
-
- - install:: xdvi
- - $(INSTALL) -c $(INSTALLFLAGS) xdvi $(BINDIR)
- -
- - install.man:: xdvi.man
- - $(INSTALL) -c $(INSTMANFLAGS) xdvi.man $(MANDIR)/xdvi.n
- -
- - depend:: $(DEPEND)
- -
- - depend::
- - $(DEPEND) -s "# DO NOT DELETE" -- $(CFLAGS) -- $(SRCS)
- -
- - $(DEPEND):
- - @echo "making $@"; \
- - cd $(DEPENDSRC); $(MAKE)
- -
- - clean::
- - $(RM) $(PROGRAM)
- -
- - table.h: mktable
- - mktable > table.h
- -
- - mktable: mktable.c
- - $(CC) $(CFLAGS) -o mktable mktable.c
- -
- xdvi.man:
- sed -e "s;%%FONT_PATH%%;$(FONT_PATH);g" \
- -e "s;%%DEFAULT_FONT_PATH%%;$(DEFAULT_FONT_PATH);g" \
- --- 1,50 ----
- #
- ! # Makefile for dvi previewer.
- #
- ! # $Header: Makefile,v 1.2 87/05/14 14:05:34 eichin Locked $
- ! # $Source: /u1/uus/vs2/xdvi/RCS/Makefile,v $
- #
- FONT_PATH=TEXFONTS
- DEFAULT_FONT_PATH=/usr/local/tex/fonts
- + DEFINES=-DMSBITFIRST \
- + -DBMSHORT \
- + -DFONT_PATH=\"$(FONT_PATH)\" \
- + -DDEFAULT_FONT_PATH=\"$(DEFAULT_FONT_PATH)\"
- FONTFORMATS_C=gf.c pk.c pxl.c
- FONTFORMATS_O=gf.o pk.o pxl.o
- ! LIBDIR=/usr/custom/x11/lib
- ! #LIBDIR=/tuna_a/x11r3/lib
- ! INCDIR=/usr/include
- ! #INCDIR=/tuna_a/x11r3/include
- ! XMULIB=
- ! #XMULIB=-lXmu
- ! DESTDIR=
- ! BINDIR=/usr/sipb/$$(MACHTYPE)bin
- ! INCLUDES=-I$(INCDIR)
- ! CFLAGS=-O $(INCLUDES) $(DEFINES)
- ! LIBS=-L$(LIBDIR) -lXaw -lXt $(XMULIB) -lX11 -lm
- ! SRCS=xdvi.c dvi_init.c dvi_draw.c $(FONTFORMATS_C) pxl_open.c tpic.c \
- ! xdvi.h dvi.h xdvi.icon
- OBJS=xdvi.o dvi_init.o dvi_draw.o $(FONTFORMATS_O) pxl_open.o tpic.o
- + CC=/tuna_a/gnu/bin/gcc
- + RM=rm -f
-
- ! .c.o:
- ! $(CC) -c $(CFLAGS) $*.c
-
- ! xdvi: $(OBJS)
- ! $(CC) -o xdvi $(OBJS) $(LIBS)
- ! chmod go+rx xdvi
-
- ! xdvi.o: xdvi.h patchlevel.h xdvi.icon
- ! dvi_init.o:xdvi.h dvi.h
- ! dvi_draw.o:xdvi.h dvi.h
- ! tpic.c: xdvi.h
-
- ! gf.o: xdvi.h
- ! pk.o: xdvi.h
- ! pxl.o: xdvi.h
-
- xdvi.man:
- sed -e "s;%%FONT_PATH%%;$(FONT_PATH);g" \
- -e "s;%%DEFAULT_FONT_PATH%%;$(DEFAULT_FONT_PATH);g" \
- ***************
- *** 187,238 ****
- < xdvi.man.sed \
- > xdvi.man
-
- ! clean::
- ! $(RM) mktable table.h xdvi.man
-
- ! lint::
- ! lint $(INCLUDES) $(DEFINES) $(SRCS)
-
- ! ###########################################################################
- ! # Imake.tmpl common rules for all Makefiles - do not edit
- !
- ! emptyrule::
- !
- ! clean::
- ! $(RM_CMD) \#*
- !
- ! Makefile:: $(IMAKE)
- !
- ! Makefile:: Imakefile \
- ! $(IRULESRC)/Imake.tmpl \
- ! $(IRULESRC)/Imake.rules \
- ! $(IRULESRC)/site.def \
- ! $(IRULESRC)/$(MACROFILE)
- ! -@if [ -f Makefile ]; then \
- ! echo "$(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
- ! $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
- ! else exit 0; fi
- ! $(IMAKE_CMD) -DTOPDIR=$(TOP)
- !
- ! $(IMAKE):
- ! @echo "making $@"; \
- ! cd $(IMAKESRC); $(MAKE) BOOTSTRAPCFLAGS=$(BOOTSTRAPCFLAGS)
- !
- ! tags::
- ! $(TAGS) -w *.[ch]
- ! $(TAGS) -xw *.[ch] > TAGS
- !
- ! ###########################################################################
- ! # empty rules for directories that do not have SUBDIRS - do not edit
- !
- ! install::
- ! @echo "install done"
- !
- ! install.man::
- ! @echo "install.man done"
- !
- ! Makefiles::
- !
- ! ###########################################################################
- ! # dependencies generated by makedepend
- !
- --- 51,62 ----
- < xdvi.man.sed \
- > xdvi.man
-
- ! install: all
- ! install -c -s xdvi $(DESTDIR)$(BINDIR)
-
- ! clean:
- ! $(RM) *.o *.BAK *.CKP xdvi.man xdvi a.out core errs *~
-
- ! lint:
- ! lint $(INCLUDES) $(DEFINES) xdvi.c dvi_init.c dvi_draw.c \
- ! $(FONTFORMATS_C) pxl_open.c tpic.c
- diff -cr xdvi.old/Makefile_10 xdvi/Makefile_10
- *** xdvi.old/Makefile_10 Fri Mar 17 17:55:59 1989
- --- xdvi/Makefile_10 Fri Mar 17 17:49:28 1989
- ***************
- *** 17,23 ****
- CFLAGS=-O $(DEFINES)
- LIBS=-lX
- SRCS=xdvi.c dvi_init.c dvi_draw.c $(FONTFORMATS_C) pxl_open.c \
- ! xdvi.h dvi.h table.h xdvi_curs.h xdvi_mask.h
- OBJS=xdvi.o dvi_init.o dvi_draw.o $(FONTFORMATS_O) pxl_open.o
- CC=/tuna_a/gnu/bin/gcc
- RM=rm -f
- --- 17,23 ----
- CFLAGS=-O $(DEFINES)
- LIBS=-lX
- SRCS=xdvi.c dvi_init.c dvi_draw.c $(FONTFORMATS_C) pxl_open.c \
- ! xdvi.h dvi.h xdvi_curs.h xdvi_mask.h
- OBJS=xdvi.o dvi_init.o dvi_draw.o $(FONTFORMATS_O) pxl_open.o
- CC=/tuna_a/gnu/bin/gcc
- RM=rm -f
- ***************
- *** 29,48 ****
- $(CC) -o xdvi $(OBJS) $(LIBS)
- chmod go+rx xdvi
-
- ! xdvi.o: xdvi.h xdvi_curs.h xdvi_mask.h
- dvi_init.o:xdvi.h dvi.h
- dvi_draw.o:xdvi.h dvi.h
-
- gf.o: xdvi.h
- pk.o: xdvi.h
- ! pxl.o: xdvi.h table.h
-
- - # table.h: mktable
- - # mktable > table.h
- -
- - mktable: mktable.c
- - $(CC) $(CFLAGS) -o mktable mktable.c
- -
- xdvi.man: xdvi10.man.s
- sed -e "s;%%FONT_PATH%%;$(FONT_PATH);g" \
- -e "s;%%DEFAULT_FONT_PATH%%;$(DEFAULT_FONT_PATH);g" \
- --- 29,42 ----
- $(CC) -o xdvi $(OBJS) $(LIBS)
- chmod go+rx xdvi
-
- ! xdvi.o: xdvi.h patchlevel.h xdvi_curs.h xdvi_mask.h
- dvi_init.o:xdvi.h dvi.h
- dvi_draw.o:xdvi.h dvi.h
-
- gf.o: xdvi.h
- pk.o: xdvi.h
- ! pxl.o: xdvi.h
-
- xdvi.man: xdvi10.man.s
- sed -e "s;%%FONT_PATH%%;$(FONT_PATH);g" \
- -e "s;%%DEFAULT_FONT_PATH%%;$(DEFAULT_FONT_PATH);g" \
- ***************
- *** 53,59 ****
- install -c -s xdvi $(DESTDIR)$(BINDIR)
-
- clean:
- ! $(RM) mktable table.h *.o *.BAK *.CKP xdvi.man xdvi a.out core errs *~
-
- lint:
- lint $(DEFINES) xdvi.c dvi_init.c dvi_draw.c $(FONTFORMATS_C) pxl_open.c
- --- 47,53 ----
- install -c -s xdvi $(DESTDIR)$(BINDIR)
-
- clean:
- ! $(RM) *.o *.BAK *.CKP xdvi.man xdvi a.out core errs *~
-
- lint:
- lint $(DEFINES) xdvi.c dvi_init.c dvi_draw.c $(FONTFORMATS_C) pxl_open.c
- diff -cr xdvi.old/README xdvi/README
- *** xdvi.old/README Fri Mar 17 17:54:26 1989
- --- xdvi/README Fri Mar 17 17:49:34 1989
- ***************
- *** 11,22 ****
- If you discover (and fix) any bugs in this code, please notify me, so
- I can make the corresponding changes myself.
-
- - Makefile was modified slightly to suit local conventions (CONFDIR and
- - INCLUDES).
- -
- - [I threw in an Imakefile, but it's only a guess, as they don't have imake
- - at our site]--PV
- -
- ---------
- H}vard Eidnes (TeXish: H\aa vard Eidnes)
- Division of Computer Science
- --- 11,16 ----
- ***************
- *** 24,30 ****
-
- E-Mail: h_eidnes%vax.runit.unit.uninett@nta-vax.arpa
- ================================================================
- ! Also has path search added by Mark Eichin, looks in XTEXFONTS then TEXFONTS
- ================================================================
-
- Compilation notes:
- --- 18,24 ----
-
- E-Mail: h_eidnes%vax.runit.unit.uninett@nta-vax.arpa
- ================================================================
- ! Also has path search added by Mark Eichin, looks in TEXFONTS
- ================================================================
-
- Compilation notes:
- ***************
- *** 34,50 ****
- make
- _Mark Eichin
- <eichin@athena.mit.edu>
- - The X10 flag only affects xdvi.c (and the flags MSBITFIRST, BMSHORT,
- - and BMLONG, see below)
-
- You can also change the `make' variables FONTFORMATS_C and FONTFORMATS_O
- to reflect which font formats are actually used at your site.
-
- Other compilation flags are:
- FONT_PATH (xdvi.c) Name of the environment variable to use when
- searching for the font path
- DEFAULT_FONT_PATH (xdvi.c) Name of the default font path to use when
- ! the above environment variable is not set.
- MSBITFIRST (X11 only; xdvi.c dvi_draw.c gf.c pk.c pxl.c) Store
- bitmaps internally with the most significant bit at
- the left. For performance reasons, it would be best
- --- 28,51 ----
- make
- _Mark Eichin
- <eichin@athena.mit.edu>
-
- + The X10 flag only affects xdvi.c and pxl.c (and the flags MSBITFIRST,
- + BMSHORT, and BMLONG, see below).
- +
- You can also change the `make' variables FONTFORMATS_C and FONTFORMATS_O
- to reflect which font formats are actually used at your site.
-
- + Apparently this program does not work on color VAXstations; it is my
- + understanding that this is caused by a server bug.
- +
- Other compilation flags are:
- FONT_PATH (xdvi.c) Name of the environment variable to use when
- searching for the font path
- DEFAULT_FONT_PATH (xdvi.c) Name of the default font path to use when
- ! the above environment variable is not set. See the
- ! ENVIRONMENT section of the man page for details on
- ! how to get xdvi to recognize the directory structure
- ! you use for storing fonts.
- MSBITFIRST (X11 only; xdvi.c dvi_draw.c gf.c pk.c pxl.c) Store
- bitmaps internally with the most significant bit at
- the left. For performance reasons, it would be best
- ***************
- *** 58,63 ****
- --- 59,67 ----
- time xdvi -d 8 file.dvi
- BMLONG (X11 only; xdvi.c dvi_draw.c gf.c pk.c pxl.c) Store
- bitmaps in long integers instead of bytes.
- + MAXCHARS (dvi_init.c dvi_draw.c gf.c pk.c pxl.c) Set to 256 for
- + 256-character fonts. Default is 128.
- +
- All flags should be set in the appropriate Makefile.
- ================================================================
- Additional notes:
- ***************
- *** 103,117 ****
- changing, made table.h necessary only for pxl.h, split up the source
- file into xdvi.c, dvi.c, gf.c, pxl.c, and pk.c, made shrinking occur
- relative to the character's hot point, etc.)
- - -- Patchlevel 1: --
- 10. The program reads SIGIO signals and processes incoming events
- immediately, so that it can stop displaying things that would be
- erased anyway. If these interrupts are not coming through, then
- it also checks for incoming events every several dozen characters
- displayed.
- - -- Patchlevel 2: --
- 11. Further split up dvi.c into dvi_init.c and dvi_draw.c; added
- compilation options for various internal bitmap representations.
- Fixed it so gcc won't give warnings, and so it works with R3 toolkit.
-
- Paul Vojta, vojta@math.berkeley.edu
- --- 107,122 ----
- changing, made table.h necessary only for pxl.h, split up the source
- file into xdvi.c, dvi.c, gf.c, pxl.c, and pk.c, made shrinking occur
- relative to the character's hot point, etc.)
- 10. The program reads SIGIO signals and processes incoming events
- immediately, so that it can stop displaying things that would be
- erased anyway. If these interrupts are not coming through, then
- it also checks for incoming events every several dozen characters
- displayed.
- 11. Further split up dvi.c into dvi_init.c and dvi_draw.c; added
- compilation options for various internal bitmap representations.
- Fixed it so gcc won't give warnings, and so it works with R3 toolkit.
- + -- Patchlevel 2: --
- + 12. Added MAXCHARS compilation option. Eliminated the nonsense with
- + generating table.h.
-
- Paul Vojta, vojta@math.berkeley.edu
- diff -cr xdvi.old/dvi_draw.c xdvi/dvi_draw.c
- *** xdvi.old/dvi_draw.c Fri Mar 17 17:55:25 1989
- --- xdvi/dvi_draw.c Fri Mar 17 17:49:43 1989
- ***************
- *** 17,22 ****
- --- 17,23 ----
- * MSBITFIRST store bitmaps internally in with significant bit first
- * BMSHORT store bitmaps in shorts instead of bytes
- * BMLONG store bitmaps in longs instead of bytes
- + * MAXCHARS set to 256 for 256 character fonts (default = 128)
- */
-
- #include <stdio.h>
- diff -cr xdvi.old/dvi_init.c xdvi/dvi_init.c
- *** xdvi.old/dvi_init.c Fri Mar 17 17:55:33 1989
- --- xdvi/dvi_init.c Fri Mar 17 17:49:49 1989
- ***************
- *** 17,22 ****
- --- 17,23 ----
- * MSBITFIRST store bitmaps internally in with significant bit first
- * BMSHORT store bitmaps in shorts instead of bytes
- * BMLONG store bitmaps in longs instead of bytes
- + * MAXCHARS set to 256 for 256 character fonts (default = 128)
- */
-
- #include <stdio.h>
- diff -cr xdvi.old/gf.c xdvi/gf.c
- *** xdvi.old/gf.c Fri Mar 17 17:56:05 1989
- --- xdvi/gf.c Fri Mar 17 17:49:53 1989
- ***************
- *** 123,131 ****
- --- 123,133 ----
- int addr;
-
- ch = one(GF_file); /* character code */
- + #if MAXCHARS < 256
- if (ch >= MAXCHARS)
- oops("Character code %d outside range, file %s", ch,
- fontp->fontname);
- + #endif MAXCHARS
- g = &fontp->glyph[ch];
- switch (cmnd) {
- case CHAR_LOC:
- diff -cr xdvi.old/mktable.c xdvi/mktable.c
- *** xdvi.old/mktable.c Fri Mar 17 17:56:07 1989
- --- xdvi/mktable.c Fri Mar 17 18:04:08 1989
- ***************
- *** 1,60 ****
- - #ifndef lint
- - static char *mktable_c =
- - "$Header: mktable.c,v 10.5 86/02/01 15:44:59 tony Rel $";
- - #endif lint
- -
- - #include <stdio.h>
- -
- - unsigned char reverse_byte[0x100] = { 0 };
- -
- - main()
- - {
- - seed_table();
- - fill_in_table();
- - print_table();
- - }
- -
- - seed_table()
- - {
- - int i = 0;
- - int j = 0x100/2;
- - int b = 0;
- -
- - for (;;) {
- - reverse_byte[i] = b;
- - if (j == 0)
- - break;
- - i = 2*i + 1;
- - b = b + j;
- - j = j/2;
- - }
- - }
- -
- - fill_in_table()
- - {
- - int b;
- -
- - for (b = 1; b < 0x100-2; b += 1)
- - reverse_byte[b+1] =
- - reverse_byte[b] ^ reverse_byte[b^(b+1)];
- - }
- -
- - print_table()
- - {
- - int b;
- -
- - printf("unsigned char reverse_byte[0x100] = {\n\t");
- - b = 0;
- - for (;;) {
- - printf("0x%02x", reverse_byte[b] & 0xff);
- - b += 1;
- - if (b == 0x100) {
- - printf("\n};\n");
- - return;
- - } else if (b % 8 == 0) {
- - printf(",\n\t");
- - } else {
- - printf(", ");
- - }
- - }
- - }
- --- 0 ----
- diff -cr xdvi.old/patchlevel.h xdvi/patchlevel.h
- *** xdvi.old/patchlevel.h Fri Mar 17 17:56:53 1989
- --- xdvi/patchlevel.h Fri Mar 17 17:49:55 1989
- ***************
- *** 1 ****
- ! #define PATCHLEVEL 1
- --- 1 ----
- ! #define PATCHLEVEL 2
- diff -cr xdvi.old/pk.c xdvi/pk.c
- *** xdvi.old/pk.c Fri Mar 17 17:56:13 1989
- --- xdvi/pk.c Fri Mar 17 17:50:00 1989
- ***************
- *** 173,181 ****
- --- 173,183 ----
- bytes_left = (flag_low_bits << 8) + one(fontp->file);
- cc = one(fontp->file);
- }
- + #if MAXCHARS < 256
- if (cc >= MAXCHARS)
- oops("Character code %d outside range, file %s\n", cc,
- fontp->fontname);
- + #endif MAXCHARS
- fontp->glyph[cc].addr = ftell(fontp->file);
- fontp->glyph[cc].x2 = PK_flag_byte;
- Fseek(fontp->file, (long) bytes_left, 1);
- diff -cr xdvi.old/pxl.c xdvi/pxl.c
- *** xdvi.old/pxl.c Fri Mar 17 17:56:16 1989
- --- xdvi/pxl.c Fri Mar 17 17:50:07 1989
- ***************
- *** 7,14 ****
- ***/
-
- #ifndef MSBITFIRST
- ! #include "table.h"
- ! extern unsigned char reverse_byte[];
- #endif MSBITFIRST
-
- static void read_index(), read_char();
- --- 7,50 ----
- ***/
-
- #ifndef MSBITFIRST
- ! #ifndef X10
- ! extern unsigned char _reverse_byte[]; /* defined in Xlib */
- ! #else X10
- ! static unsigned char _reverse_byte[0x100] = {
- ! 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
- ! 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
- ! 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
- ! 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
- ! 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
- ! 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
- ! 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
- ! 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
- ! 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
- ! 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
- ! 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
- ! 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
- ! 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
- ! 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
- ! 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
- ! 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe,
- ! 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1,
- ! 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1,
- ! 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9,
- ! 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9,
- ! 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5,
- ! 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5,
- ! 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed,
- ! 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd,
- ! 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3,
- ! 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3,
- ! 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb,
- ! 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
- ! 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7,
- ! 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
- ! 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
- ! 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
- ! };
- ! #endif X10
- #endif MSBITFIRST
-
- static void read_index(), read_char();
- ***************
- *** 36,42 ****
- (void) four(fontp->file); /* pxl id word */
- /* seek to font directory */
- Fseek(fontp->file, font_dir_ptr, 0);
- ! for (g = &fontp->glyph[0]; g < &fontp->glyph[MAXCHARS]; ++g) {
- g->bitmap.w = two(fontp->file);
- g->bitmap.h = two(fontp->file);
- g->x = stwo(fontp->file);
- --- 72,80 ----
- (void) four(fontp->file); /* pxl id word */
- /* seek to font directory */
- Fseek(fontp->file, font_dir_ptr, 0);
- ! for (g = fontp->glyph; g < &fontp->glyph[128]; ++g) {
- ! g->bitmap.bits = NULL;
- ! g->bitmap2.bits = NULL;
- g->bitmap.w = two(fontp->file);
- g->bitmap.h = two(fontp->file);
- g->x = stwo(fontp->file);
- ***************
- *** 77,82 ****
- --- 115,127 ----
- Printf("size=%dx%d, dvi_adv=%d\n", g->bitmap.w, g->bitmap.h,
- g->dvi_adv);
- }
- + #if MAXCHARS > 128
- + for ( ; g < &fontp->glyph[MAXCHARS]; ++g) {
- + g->bitmap.bits = NULL;
- + g->bitmap2.bits = NULL;
- + g->addr = 0;
- + }
- + #endif MAXCHARS
- }
-
- static void
- ***************
- *** 101,113 ****
- for (i = bitmap->h; i > 0; --i) {
- for (j = bitmap->bytes_wide; j > 0; j -= BYTES_PER_BMUNIT) {
- #ifndef MSBITFIRST
- ! *ptr = reverse_byte[one(fontp->file)];
- #if BYTES_PER_BMUNIT > 1
- ! *ptr |= reverse_byte[one(fontp->file)] << 8;
- #endif
- #ifdef BMLONG
- ! *ptr |= reverse_byte[one(fontp->file)] << 16;
- ! *ptr |= reverse_byte[one(fontp->file)] << 24;
- #endif BMLONG
- #else MSBITFIRST
- *ptr = 0;
- --- 146,158 ----
- for (i = bitmap->h; i > 0; --i) {
- for (j = bitmap->bytes_wide; j > 0; j -= BYTES_PER_BMUNIT) {
- #ifndef MSBITFIRST
- ! *ptr = _reverse_byte[one(fontp->file)];
- #if BYTES_PER_BMUNIT > 1
- ! *ptr |= _reverse_byte[one(fontp->file)] << 8;
- #endif
- #ifdef BMLONG
- ! *ptr |= _reverse_byte[one(fontp->file)] << 16;
- ! *ptr |= _reverse_byte[one(fontp->file)] << 24;
- #endif BMLONG
- #else MSBITFIRST
- *ptr = 0;
- diff -cr xdvi.old/pxl_open.c xdvi/pxl_open.c
- *** xdvi.old/pxl_open.c Fri Mar 17 17:56:54 1989
- --- xdvi/pxl_open.c Fri Mar 17 17:50:11 1989
- ***************
- *** 24,29 ****
- --- 24,31 ----
- #include <string.h>
- #include <errno.h>
-
- + extern int errno;
- +
- #define PATH_SEP ':'
- #define DEFAULT_TAIL "/%f.%d%p"
-
- ***************
- *** 94,100 ****
- f = fopen(nm, OPEN_MODE);
- }
- if (f != NULL) {
- ! *name = malloc((unsigned) (n - nm + 1));
- Strcpy(*name, nm);
- }
- return(f);
- --- 96,102 ----
- f = fopen(nm, OPEN_MODE);
- }
- if (f != NULL) {
- ! *name = malloc((unsigned) (n - nm + 1));
- Strcpy(*name, nm);
- }
- return(f);
- diff -cr xdvi.old/tpic.c xdvi/tpic.c
- *** xdvi.old/tpic.c Fri Mar 17 17:55:39 1989
- --- xdvi/tpic.c Fri Mar 17 17:50:17 1989
- ***************
- *** 27,34 ****
- */
-
- #ifndef lint
- ! static char *rcsid=
- ! "$Header: dvi_draw.c,v 1.1 88/10/20 00:10:09 xwindows Exp $" ;
- #endif lint
-
- #include <math.h>
- --- 27,34 ----
- */
-
- #ifndef lint
- ! static char *rcsid =
- ! "$Header: dvi_draw.c,v 1.1 88/10/20 00:10:09 xwindows Exp $";
- #endif lint
-
- #include <math.h>
- diff -cr xdvi.old/xdvi.c xdvi/xdvi.c
- *** xdvi.old/xdvi.c Fri Mar 17 17:54:57 1989
- --- xdvi/xdvi.c Fri Mar 17 17:50:38 1989
- ***************
- *** 17,22 ****
- --- 17,23 ----
- * MSBITFIRST store bitmaps internally in with significant bit first
- * BMSHORT store bitmaps in shorts instead of bytes
- * BMLONG store bitmaps in longs instead of bytes
- + * MAXCHARS set to 256 for 256 character fonts (default = 128)
- */
- #ifndef lint
- #include "patchlevel.h"
- ***************
- *** 991,997 ****
- --- 992,1004 ----
- do_pages()
- {
- if (debug & DBG_BATCH) {
- + #ifndef X10
- while (mane.min_x == MAXINT) read_events(True);
- + #else X10
- + while (mane.min_x == MAXINT)
- + if (setjmp(canit_env)) break;
- + else read_events(True);
- + #endif X10
- for (current_page = 0; current_page < total_pages; ++current_page)
- redraw_page();
- exit(0);
- diff -cr xdvi.old/xdvi.h xdvi/xdvi.h
- *** xdvi.old/xdvi.h Fri Mar 17 17:56:22 1989
- --- xdvi/xdvi.h Fri Mar 17 17:50:43 1989
- ***************
- *** 3,9 ****
- */
- /* $Header: xdvi.h,v 10.5 86/02/01 15:45:03 tony Rel $ */
-
- ! #include <X11/Xos.h>
- #include <setjmp.h>
-
- #define OPEN_MODE "r"
- --- 3,13 ----
- */
- /* $Header: xdvi.h,v 10.5 86/02/01 15:45:03 tony Rel $ */
-
- ! #ifndef X10
- ! #include <X11/Xos.h> /* same as below */
- ! #else X10
- ! #include <sys/types.h> /* for sites without X11 */
- ! #endif X10
- #include <setjmp.h>
-
- #define OPEN_MODE "r"
- ***************
- *** 119,125 ****
- char *bits; /* pointer to the bits */
- };
-
- ! #define MAXCHARS 128 /* make 256 for 8 bit characters */
-
- /*
- * Per-character information.
- --- 123,131 ----
- char *bits; /* pointer to the bits */
- };
-
- ! #ifndef MAXCHARS
- ! #define MAXCHARS 128 /* make 256 for 8 bit characters */
- ! #endif MAXCHARS
-
- /*
- * Per-character information.
- --
- Mike Wexler(wyse!mikew) Phone: (408)433-1000 x1330
- Moderator of comp.sources.x
-