home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / x / volume3 / xdvi / patch2 < prev    next >
Encoding:
Internet Message Format  |  1989-03-20  |  31.3 KB

  1. Path: uunet!wyse!mikew
  2. From: mikew@wyse.wyse.com (Mike Wexler)
  3. Newsgroups: comp.sources.x
  4. Subject: v03i057:  dvi previewer, Patch2
  5. Message-ID: <2155@wyse.wyse.com>
  6. Date: 20 Mar 89 22:28:56 GMT
  7. Organization: Wyse Technology, San Jose
  8. Lines: 1027
  9. Approved: mikew@wyse.com
  10.  
  11. Submitted-by: vojta@bosco.Berkeley.EDU
  12. Posting-number: Volume 3, Issue 57
  13. Archive-name: xdvi/patch2
  14.  
  15. Enclosed is patch2 for xdvi, the dvi previewer.  Mostly it fixes bugs
  16. and addresses comments which were sent to me.  You may notice that
  17. among these patches, I change the Makefile back to its original form.
  18. I see no point in replacing the Makefile with a machine generated one:
  19. (a) if a site uses imake, then they would probably throw away the
  20. Makefile; (b) if a site does not use imake, then they probably don't
  21. use makedepend either, (the Makefile distributed did not include
  22. dependencies of the .h files); and (c) sites not using imake do not
  23. like to wade through long machine-generated makefiles.  So please keep
  24. the short Makefile.
  25.  
  26. Also, I eliminated the nonsense with using the program mktable.c to generate
  27. the header file table.h.  It created problems for a number of people, and
  28. it's just not worth the 790 bytes it saves.
  29.  
  30. diff -cr xdvi.old/AUTHOR xdvi/AUTHOR
  31. *** xdvi.old/AUTHOR    Fri Mar 17 17:55:55 1989
  32. --- xdvi/AUTHOR    Fri Mar 17 17:49:19 1989
  33. ***************
  34. *** 1,31 ****
  35. ! (Message inbox:1046)
  36. ! Return-Path: usenet%agate.Berkeley.EDU@ucbvax.Berkeley.EDU
  37. ! Received:  by wyse.wyse.com (5.58/Wyse master/5-13-88)
  38. !     id AA24270; Mon, 6 Mar 89 10:21:26 PST
  39. ! Received: from UCBVAX.Berkeley.EDU by uunet.UU.NET (5.61/1.14) with SMTP 
  40. !     id AA16785; Sun, 5 Mar 89 19:11:28 -0500
  41. ! Received: from agate.Berkeley.EDU by ucbvax.Berkeley.EDU (5.61/1.33)
  42. !     id AA05984; Sun, 5 Mar 89 16:12:08 -0800
  43. ! Received: by agate.berkeley.edu (5.61/1.30)
  44. !     id AA08053; Sun, 5 Mar 89 16:10:54 PST
  45. ! To: comp-sources-x@ucbvax.Berkeley.EDU
  46. ! Path: agate!math.berkeley.edu!vojta
  47. ! From: vojta%bosco.Berkeley.EDU@ucbvax.Berkeley.EDU (Paul Vojta)
  48. ! Newsgroups: comp.sources.x
  49. ! Subject: xdvi, a TeX dvi file previewer (part 1 of 3)
  50. ! Message-Id: <21190@agate.BERKELEY.EDU>
  51. ! Date: 6 Mar 89 00:10:47 GMT
  52. ! Sender: usenet%agate.Berkeley.EDU@ucbvax.Berkeley.EDU
  53. ! Reply-To: vojta%bosco.Berkeley.EDU@ucbvax.Berkeley.EDU (Paul Vojta)
  54. ! Organization: Math Dept., UC Berkeley
  55. ! Lines: 1830
  56.   
  57.   
  58. ! Enclosed is an updated version of the program xdvi.  This version has been
  59. ! modified to use the toolkit (specifically, a viewport widget), and it also
  60. ! has a `magnifying glass.'  tpic specials, too (X11 only).  I should note,
  61. ! however, that it might not work with color VAXstations.  I understand that
  62. ! this is a server bug.
  63. ! --Paul Vojta, vojta@math.berkeley.edu
  64. --- 1,22 ----
  65. !     This program is the combined work of many people, including but not
  66. ! restricted to:
  67. !     Eric Cooper, CMU
  68. !     Bob Scheifler, MIT LCS
  69. !     Paal Kvamme, Norwegian Institute of Technology
  70. !     H\aa vard Eidnes, Norwegian Institute of Technology
  71. !     Mark Eichin, MIT SIPB
  72. !     Paul Vojta, UC Berkeley
  73. !     Jeffrey Lee, U of Toronto
  74. ! At the present time, the person to send bug reports to is Paul Vojta,
  75. !     vojta@math.berkeley.edu.
  76. ! This address will be valid at least through August, 1989.
  77.   
  78. + In addition to the various comp.sources.x archives, current versions of this
  79. + program can also be obtained via anonymous ftp from the following locations:
  80. +     expo.lcs.mit.edu    [18.30.0.212]    file contrib/xdvi.shar.Z
  81. +     ucbvax.berkeley.edu    [128.32.149.36]    file pub/tmp/xdvi.shar.Z
  82. +     charon.mit.edu        [18.80.0.13]    file pub/vxdvi.shar.Z
  83. + In general, ucbvax will hold the newest version, and charon may be a bit out
  84. + of date.
  85.   
  86. ! Paul Vojta, 13 March 1989.
  87. diff -cr xdvi.old/Imakefile xdvi/Imakefile
  88. *** xdvi.old/Imakefile    Fri Mar 17 17:55:57 1989
  89. --- xdvi/Imakefile    Fri Mar 17 17:49:21 1989
  90. ***************
  91. *** 3,11 ****
  92.   FONTFORMATS_C=gf.c pk.c pxl.c
  93.   FONTFORMATS_O=gf.o pk.o pxl.o
  94.   
  95. ! DEFINES=-DBMSHORT \
  96. !             -DFONT_PATH=\"$(FONT_PATH)\" \
  97. !             -DDEFAULT_FONT_PATH=\"$(DEFAULT_FONT_PATH)\"
  98.   SYSLAST_LIBRARIES=-lXaw -lXmu -lXt -lX11 -lm
  99.   SRCS=xdvi.c dvi_init.c dvi_draw.c $(FONTFORMATS_C) pxl_open.c tpic.c
  100.   OBJS=xdvi.o dvi_init.o dvi_draw.o $(FONTFORMATS_O) pxl_open.o tpic.o
  101. --- 3,12 ----
  102.   FONTFORMATS_C=gf.c pk.c pxl.c
  103.   FONTFORMATS_O=gf.o pk.o pxl.o
  104.   
  105. ! DEFINES=-DMSBITFIRST \
  106. !   -DBMSHORT \
  107. !   -DFONT_PATH=\"$(FONT_PATH)\" \
  108. !   -DDEFAULT_FONT_PATH=\"$(DEFAULT_FONT_PATH)\"
  109.   SYSLAST_LIBRARIES=-lXaw -lXmu -lXt -lX11 -lm
  110.   SRCS=xdvi.c dvi_init.c dvi_draw.c $(FONTFORMATS_C) pxl_open.c tpic.c
  111.   OBJS=xdvi.o dvi_init.o dvi_draw.o $(FONTFORMATS_O) pxl_open.o tpic.o
  112. ***************
  113. *** 12,23 ****
  114.   
  115.   ComplexProgramTarget(xdvi)
  116.   
  117. - table.h: mktable
  118. -     mktable > table.h
  119. - mktable: mktable.c
  120. -     $(CC) $(CFLAGS) -o mktable mktable.c
  121.   xdvi.man:
  122.       sed -e "s;%%FONT_PATH%%;$(FONT_PATH);g" \
  123.           -e "s;%%DEFAULT_FONT_PATH%%;$(DEFAULT_FONT_PATH);g" \
  124. --- 13,18 ----
  125. ***************
  126. *** 25,31 ****
  127.           > xdvi.man
  128.   
  129.   clean::
  130. !     $(RM) mktable table.h xdvi.man
  131.   
  132.   lint::
  133.       lint $(INCLUDES) $(DEFINES) $(SRCS)
  134. --- 20,26 ----
  135.           > xdvi.man
  136.   
  137.   clean::
  138. !     $(RM) xdvi.man
  139.   
  140.   lint::
  141.       lint $(INCLUDES) $(DEFINES) $(SRCS)
  142. diff -cr xdvi.old/Makefile xdvi/Makefile
  143. *** xdvi.old/Makefile    Fri Mar 17 17:55:16 1989
  144. --- xdvi/Makefile    Fri Mar 17 17:49:25 1989
  145. ***************
  146. *** 1,186 ****
  147. - # Makefile generated by imake - do not edit!
  148. - # $XConsortium: imake.c,v 1.37 88/10/08 20:08:30 jim Exp $
  149.   #
  150. ! # The cpp used on this machine replaces all newlines and multiple tabs and
  151. ! # spaces in a macro expansion with a single space.  Imake tries to compensate
  152. ! # for this, but is not always successful.
  153.   #
  154. ! ###########################################################################
  155. ! # X Window System Makefile generated from template file Imake.tmpl
  156. ! # $XConsortium: Imake.tmpl,v 1.91 88/10/23 22:37:10 jim Exp $
  157.   #
  158. - # Do not change the body of the imake template file.  Server-specific
  159. - # parameters may be set in the appropriate .macros file; site-specific
  160. - # parameters (but shared by all servers) may be set in site.def.  If you
  161. - # make any changes, you'll need to rebuild the makefiles using
  162. - # "make World" (at best) or "make Makefile; make Makefiles" (at least) in
  163. - # the top level directory.
  164. - #
  165. - # If your C preprocessor doesn't define any unique symbols, you'll need
  166. - # to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
  167. - # "make Makefile", "make Makefiles", or "make World").
  168. - #
  169. - # If you absolutely can't get imake to work, you'll need to set the
  170. - # variables at the top of each Makefile as well as the dependencies at the
  171. - # bottom (makedepend will do this automatically).
  172. - #
  173. - ###########################################################################
  174. - # platform-specific configuration parameters - edit Sun.macros to change
  175. - # platform:  $XConsortium: Sun.macros,v 1.52 88/10/23 11:00:55 jim Exp $
  176. - # operating system:   SunOS 3.4
  177. - BOOTSTRAPCFLAGS =
  178. -              AS = as
  179. -              CC = cc
  180. -             CPP = /lib/cpp
  181. -              LD = ld
  182. -            LINT = lint
  183. -         INSTALL = install
  184. -            TAGS = ctags
  185. -              RM = rm -f
  186. -              MV = mv
  187. -              LN = ln -s
  188. -          RANLIB = ranlib
  189. - RANLIBINSTFLAGS = -t
  190. -              AR = ar clq
  191. -              LS = ls
  192. -        LINTOPTS = -xz
  193. -     LINTLIBFLAG = -C
  194. -            MAKE = make
  195. - STD_CPP_DEFINES =
  196. -     STD_DEFINES =
  197. - ###########################################################################
  198. - # site-specific configuration parameters - edit site.def to change
  199. - # site:  $XConsortium: site.def,v 1.16 88/10/12 10:30:24 jim Exp $
  200. - ###########################################################################
  201. - # definitions common to all Makefiles - do not edit
  202. -           SHELL =  /bin/sh
  203. -         DESTDIR = /global
  204. -       USRLIBDIR = $(DESTDIR)/lib
  205. -          BINDIR = $(DESTDIR)/bin/X11
  206. -          INCDIR = $(DESTDIR)/include
  207. -          ADMDIR = $(DESTDIR)/usr/adm
  208. -          LIBDIR = $(USRLIBDIR)/X11
  209. -      LINTLIBDIR = $(USRLIBDIR)/lint
  210. -         FONTDIR = $(LIBDIR)/fonts
  211. -        XINITDIR = $(LIBDIR)/xinit
  212. -          XDMDIR = $(LIBDIR)/xdm
  213. -          UWMDIR = $(LIBDIR)/uwm
  214. -          AWMDIR = $(LIBDIR)/awm
  215. -          TWMDIR = $(LIBDIR)/twm
  216. -           DTDIR = $(LIBDIR)/dt
  217. -         MANPATH = /usr/man
  218. -   MANSOURCEPATH = $(MANPATH)/man
  219. -          MANDIR = $(MANSOURCEPATH)n
  220. -       LIBMANDIR = $(MANSOURCEPATH)n3
  221. -     XAPPLOADDIR = $(LIBDIR)/app-defaults
  222. -    INSTBINFLAGS = -m 0755
  223. -    INSTUIDFLAGS = -m 4755
  224. -    INSTLIBFLAGS = -m 0664
  225. -    INSTINCFLAGS = -m 0444
  226. -    INSTMANFLAGS = -m 0444
  227. -    INSTAPPFLAGS = -m 0444
  228. -   INSTKMEMFLAGS = -m 4755
  229. -         FCFLAGS = -t
  230. -     CDEBUGFLAGS = -O
  231. -         PATHSEP = /
  232. -          DEPEND = $(BINDIR)/makedepend
  233. -           IMAKE = $(BINDIR)/imake
  234. -             RGB = $(LIBDIR)/rgb
  235. -              FC = $(BINDIR)/bdftosnf
  236. -       MKFONTDIR = $(BINDIR)/mkfontdir
  237. -       MKDIRHIER = $(BINDIR)/mkdirhier.sh
  238. -          CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(STD_DEFINES) $(DEFINES)
  239. -       LINTFLAGS = $(LINTOPTS) $(INCLUDES) $(STD_DEFINES) $(DEFINES) -DLINT
  240. -         LDFLAGS = $(CDEBUGFLAGS) -L$(USRLIBDIR) $(SYS_LIBRARIES) $(SYSAUX_LIBRARIES)
  241. -        IRULESRC = $(LIBDIR)/imake.includes
  242. -    EXTENSIONLIB = $(USRLIBDIR)/libext.a
  243. -            XLIB = $(USRLIBDIR)/libX11.a
  244. -          XMULIB = $(USRLIBDIR)/libXmu.a
  245. -         OLDXLIB = $(USRLIBDIR)/liboldX.a
  246. -        XTOOLLIB = $(USRLIBDIR)/libXt.a
  247. -          XAWLIB = $(USRLIBDIR)/libXaw.a
  248. -        LINTXLIB = $(USRLIBDIR)/lint/llib-lX11.ln
  249. -         LINTXMU = $(USRLIBDIR)/lint/llib-lXmu.ln
  250. -       LINTXTOOL = $(USRLIBDIR)/lint/llib-lXt.ln
  251. -         LINTXAW = $(USRLIBDIR)/lint/llib-lXaw.ln
  252. -        INCLUDES = -I$(INCDIR)
  253. -       MACROFILE = Sun.macros
  254. -    ICONFIGFILES = $(IRULESRC)/Imake.tmpl \
  255. -             $(IRULESRC)/$(MACROFILE) $(IRULESRC)/site.def
  256. -   IMAKE_DEFINES =
  257. -       IMAKE_CMD = $(NEWTOP)$(IMAKE) -TImake.tmpl -I$(NEWTOP)$(IRULESRC) \
  258. -             -s Makefile $(IMAKE_DEFINES)
  259. -          RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a \
  260. -             .emacs_* tags TAGS make.log MakeOut
  261. - ###########################################################################
  262. - # rules:  $XConsortium: Imake.rules,v 1.71 88/10/23 22:46:34 jim Exp $
  263. - ###########################################################################
  264. - # start of Imakefile
  265.   FONT_PATH=TEXFONTS
  266.   DEFAULT_FONT_PATH=/usr/local/tex/fonts
  267.   FONTFORMATS_C=gf.c pk.c pxl.c
  268.   FONTFORMATS_O=gf.o pk.o pxl.o
  269. ! DEFINES=-DBMSHORT \
  270. !             -DFONT_PATH=\"$(FONT_PATH)\" \
  271. !             -DDEFAULT_FONT_PATH=\"$(DEFAULT_FONT_PATH)\"
  272. ! SYSLAST_LIBRARIES=-lXaw -lXmu -lXt -lX11 -lm
  273. ! SRCS=xdvi.c dvi_init.c dvi_draw.c $(FONTFORMATS_C) pxl_open.c tpic.c
  274.   OBJS=xdvi.o dvi_init.o dvi_draw.o $(FONTFORMATS_O) pxl_open.o tpic.o
  275.   
  276. !  PROGRAM = xdvi
  277.   
  278. ! all:: xdvi
  279.   
  280. ! xdvi: $(OBJS) $(LOCAL_LIBRARIES)
  281. !     $(RM) $@
  282. !     $(CC) -o $@ $(OBJS) $(LOCAL_LIBRARIES) $(LDFLAGS) $(SYSLAST_LIBRARIES)
  283.   
  284. ! relink::
  285. !     $(RM) $(PROGRAM)
  286. !     $(MAKE) $(MFLAGS) $(PROGRAM)
  287.   
  288. - install:: xdvi
  289. -     $(INSTALL) -c $(INSTALLFLAGS) xdvi $(BINDIR)
  290. - install.man:: xdvi.man
  291. -     $(INSTALL) -c $(INSTMANFLAGS) xdvi.man $(MANDIR)/xdvi.n
  292. - depend:: $(DEPEND)
  293. - depend::
  294. -     $(DEPEND) -s "# DO NOT DELETE" -- $(CFLAGS) -- $(SRCS)
  295. - $(DEPEND):
  296. -     @echo "making $@"; \
  297. -     cd $(DEPENDSRC); $(MAKE)
  298. - clean::
  299. -     $(RM) $(PROGRAM)
  300. - table.h: mktable
  301. -     mktable > table.h
  302. - mktable: mktable.c
  303. -     $(CC) $(CFLAGS) -o mktable mktable.c
  304.   xdvi.man:
  305.       sed -e "s;%%FONT_PATH%%;$(FONT_PATH);g" \
  306.           -e "s;%%DEFAULT_FONT_PATH%%;$(DEFAULT_FONT_PATH);g" \
  307. --- 1,50 ----
  308.   #
  309. ! # Makefile for dvi previewer.
  310.   #
  311. ! # $Header: Makefile,v 1.2 87/05/14 14:05:34 eichin Locked $
  312. ! # $Source: /u1/uus/vs2/xdvi/RCS/Makefile,v $
  313.   #
  314.   FONT_PATH=TEXFONTS
  315.   DEFAULT_FONT_PATH=/usr/local/tex/fonts
  316. + DEFINES=-DMSBITFIRST \
  317. +   -DBMSHORT \
  318. +   -DFONT_PATH=\"$(FONT_PATH)\" \
  319. +   -DDEFAULT_FONT_PATH=\"$(DEFAULT_FONT_PATH)\"
  320.   FONTFORMATS_C=gf.c pk.c pxl.c
  321.   FONTFORMATS_O=gf.o pk.o pxl.o
  322. ! LIBDIR=/usr/custom/x11/lib
  323. ! #LIBDIR=/tuna_a/x11r3/lib
  324. ! INCDIR=/usr/include
  325. ! #INCDIR=/tuna_a/x11r3/include
  326. ! XMULIB=
  327. ! #XMULIB=-lXmu
  328. ! DESTDIR=
  329. ! BINDIR=/usr/sipb/$$(MACHTYPE)bin
  330. ! INCLUDES=-I$(INCDIR)
  331. ! CFLAGS=-O $(INCLUDES) $(DEFINES)
  332. ! LIBS=-L$(LIBDIR) -lXaw -lXt $(XMULIB) -lX11 -lm
  333. ! SRCS=xdvi.c dvi_init.c dvi_draw.c $(FONTFORMATS_C) pxl_open.c tpic.c \
  334. !   xdvi.h dvi.h xdvi.icon
  335.   OBJS=xdvi.o dvi_init.o dvi_draw.o $(FONTFORMATS_O) pxl_open.o tpic.o
  336. + CC=/tuna_a/gnu/bin/gcc
  337. + RM=rm -f
  338.   
  339. ! .c.o:
  340. !     $(CC) -c $(CFLAGS) $*.c
  341.   
  342. ! xdvi:    $(OBJS)
  343. !     $(CC) -o xdvi $(OBJS) $(LIBS)
  344. !     chmod go+rx xdvi
  345.   
  346. ! xdvi.o: xdvi.h patchlevel.h xdvi.icon
  347. ! dvi_init.o:xdvi.h dvi.h
  348. ! dvi_draw.o:xdvi.h dvi.h
  349. ! tpic.c:    xdvi.h
  350.   
  351. ! gf.o:    xdvi.h
  352. ! pk.o:    xdvi.h
  353. ! pxl.o:    xdvi.h
  354.   
  355.   xdvi.man:
  356.       sed -e "s;%%FONT_PATH%%;$(FONT_PATH);g" \
  357.           -e "s;%%DEFAULT_FONT_PATH%%;$(DEFAULT_FONT_PATH);g" \
  358. ***************
  359. *** 187,238 ****
  360.           < xdvi.man.sed \
  361.           > xdvi.man
  362.   
  363. ! clean::
  364. !     $(RM) mktable table.h xdvi.man
  365.   
  366. ! lint::
  367. !     lint $(INCLUDES) $(DEFINES) $(SRCS)
  368.   
  369. ! ###########################################################################
  370. ! # Imake.tmpl common rules for all Makefiles - do not edit
  371. ! emptyrule::
  372. ! clean::
  373. !     $(RM_CMD) \#*
  374. ! Makefile:: $(IMAKE)
  375. ! Makefile:: Imakefile \
  376. !     $(IRULESRC)/Imake.tmpl \
  377. !     $(IRULESRC)/Imake.rules \
  378. !     $(IRULESRC)/site.def \
  379. !     $(IRULESRC)/$(MACROFILE)
  380. !     -@if [ -f Makefile ]; then \
  381. !     echo "$(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
  382. !     $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
  383. !     else exit 0; fi
  384. !     $(IMAKE_CMD) -DTOPDIR=$(TOP)
  385. ! $(IMAKE):
  386. !     @echo "making $@"; \
  387. !     cd $(IMAKESRC); $(MAKE) BOOTSTRAPCFLAGS=$(BOOTSTRAPCFLAGS)
  388. ! tags::
  389. !     $(TAGS) -w *.[ch]
  390. !     $(TAGS) -xw *.[ch] > TAGS
  391. ! ###########################################################################
  392. ! # empty rules for directories that do not have SUBDIRS - do not edit
  393. ! install::
  394. !     @echo "install done"
  395. ! install.man::
  396. !     @echo "install.man done"
  397. ! Makefiles::
  398. ! ###########################################################################
  399. ! # dependencies generated by makedepend
  400. --- 51,62 ----
  401.           < xdvi.man.sed \
  402.           > xdvi.man
  403.   
  404. ! install: all
  405. !     install -c -s xdvi $(DESTDIR)$(BINDIR)
  406.   
  407. ! clean:
  408. !     $(RM) *.o *.BAK *.CKP xdvi.man xdvi a.out core errs *~
  409.   
  410. ! lint:
  411. !     lint $(INCLUDES) $(DEFINES) xdvi.c dvi_init.c dvi_draw.c \
  412. !         $(FONTFORMATS_C) pxl_open.c tpic.c
  413. diff -cr xdvi.old/Makefile_10 xdvi/Makefile_10
  414. *** xdvi.old/Makefile_10    Fri Mar 17 17:55:59 1989
  415. --- xdvi/Makefile_10    Fri Mar 17 17:49:28 1989
  416. ***************
  417. *** 17,23 ****
  418.   CFLAGS=-O $(DEFINES)
  419.   LIBS=-lX
  420.   SRCS=xdvi.c dvi_init.c dvi_draw.c $(FONTFORMATS_C) pxl_open.c \
  421. !             xdvi.h dvi.h table.h xdvi_curs.h xdvi_mask.h
  422.   OBJS=xdvi.o dvi_init.o dvi_draw.o $(FONTFORMATS_O) pxl_open.o
  423.   CC=/tuna_a/gnu/bin/gcc
  424.   RM=rm -f
  425. --- 17,23 ----
  426.   CFLAGS=-O $(DEFINES)
  427.   LIBS=-lX
  428.   SRCS=xdvi.c dvi_init.c dvi_draw.c $(FONTFORMATS_C) pxl_open.c \
  429. !   xdvi.h dvi.h xdvi_curs.h xdvi_mask.h
  430.   OBJS=xdvi.o dvi_init.o dvi_draw.o $(FONTFORMATS_O) pxl_open.o
  431.   CC=/tuna_a/gnu/bin/gcc
  432.   RM=rm -f
  433. ***************
  434. *** 29,48 ****
  435.       $(CC) -o xdvi $(OBJS) $(LIBS)
  436.       chmod go+rx xdvi
  437.   
  438. ! xdvi.o: xdvi.h xdvi_curs.h xdvi_mask.h
  439.   dvi_init.o:xdvi.h dvi.h
  440.   dvi_draw.o:xdvi.h dvi.h
  441.   
  442.   gf.o:    xdvi.h
  443.   pk.o:    xdvi.h
  444. ! pxl.o:    xdvi.h table.h
  445.   
  446. - # table.h: mktable
  447. - #     mktable > table.h
  448. - mktable: mktable.c
  449. -     $(CC) $(CFLAGS) -o mktable mktable.c
  450.   xdvi.man: xdvi10.man.s
  451.       sed -e "s;%%FONT_PATH%%;$(FONT_PATH);g" \
  452.           -e "s;%%DEFAULT_FONT_PATH%%;$(DEFAULT_FONT_PATH);g" \
  453. --- 29,42 ----
  454.       $(CC) -o xdvi $(OBJS) $(LIBS)
  455.       chmod go+rx xdvi
  456.   
  457. ! xdvi.o: xdvi.h patchlevel.h xdvi_curs.h xdvi_mask.h
  458.   dvi_init.o:xdvi.h dvi.h
  459.   dvi_draw.o:xdvi.h dvi.h
  460.   
  461.   gf.o:    xdvi.h
  462.   pk.o:    xdvi.h
  463. ! pxl.o:    xdvi.h
  464.   
  465.   xdvi.man: xdvi10.man.s
  466.       sed -e "s;%%FONT_PATH%%;$(FONT_PATH);g" \
  467.           -e "s;%%DEFAULT_FONT_PATH%%;$(DEFAULT_FONT_PATH);g" \
  468. ***************
  469. *** 53,59 ****
  470.       install -c -s xdvi $(DESTDIR)$(BINDIR)
  471.   
  472.   clean:
  473. !     $(RM) mktable table.h *.o *.BAK *.CKP xdvi.man xdvi a.out core errs *~
  474.   
  475.   lint:
  476.       lint $(DEFINES) xdvi.c dvi_init.c dvi_draw.c $(FONTFORMATS_C) pxl_open.c
  477. --- 47,53 ----
  478.       install -c -s xdvi $(DESTDIR)$(BINDIR)
  479.   
  480.   clean:
  481. !     $(RM) *.o *.BAK *.CKP xdvi.man xdvi a.out core errs *~
  482.   
  483.   lint:
  484.       lint $(DEFINES) xdvi.c dvi_init.c dvi_draw.c $(FONTFORMATS_C) pxl_open.c
  485. diff -cr xdvi.old/README xdvi/README
  486. *** xdvi.old/README    Fri Mar 17 17:54:26 1989
  487. --- xdvi/README    Fri Mar 17 17:49:34 1989
  488. ***************
  489. *** 11,22 ****
  490.   If you discover (and fix) any bugs in this code, please notify me, so
  491.   I can make the corresponding changes myself.
  492.   
  493. - Makefile was modified slightly to suit local conventions (CONFDIR and
  494. - INCLUDES).
  495. - [I threw in an Imakefile, but it's only a guess, as they don't have imake
  496. - at our site]--PV
  497.   ---------
  498.   H}vard Eidnes    (TeXish: H\aa vard Eidnes)
  499.   Division of Computer Science
  500. --- 11,16 ----
  501. ***************
  502. *** 24,30 ****
  503.   
  504.   E-Mail: h_eidnes%vax.runit.unit.uninett@nta-vax.arpa
  505.   ================================================================
  506. ! Also has path search added by Mark Eichin, looks in XTEXFONTS then TEXFONTS
  507.   ================================================================
  508.   
  509.   Compilation notes:
  510. --- 18,24 ----
  511.   
  512.   E-Mail: h_eidnes%vax.runit.unit.uninett@nta-vax.arpa
  513.   ================================================================
  514. ! Also has path search added by Mark Eichin, looks in TEXFONTS
  515.   ================================================================
  516.   
  517.   Compilation notes:
  518. ***************
  519. *** 34,50 ****
  520.           make
  521.               _Mark Eichin
  522.               <eichin@athena.mit.edu>
  523. -     The X10 flag only affects xdvi.c (and the flags MSBITFIRST, BMSHORT,
  524. -     and BMLONG, see below)
  525.   
  526.       You can also change the `make' variables FONTFORMATS_C and FONTFORMATS_O
  527.       to reflect which font formats are actually used at your site.
  528.   
  529.   Other compilation flags are:
  530.       FONT_PATH    (xdvi.c)  Name of the environment variable to use when
  531.               searching for the font path
  532.       DEFAULT_FONT_PATH  (xdvi.c)  Name of the default font path to use when
  533. !             the above environment variable is not set.
  534.       MSBITFIRST    (X11 only; xdvi.c dvi_draw.c gf.c pk.c pxl.c)  Store
  535.               bitmaps internally with the most significant bit at
  536.               the left.  For performance reasons, it would be best
  537. --- 28,51 ----
  538.           make
  539.               _Mark Eichin
  540.               <eichin@athena.mit.edu>
  541.   
  542. +     The X10 flag only affects xdvi.c and pxl.c (and the flags MSBITFIRST,
  543. +     BMSHORT, and BMLONG, see below).
  544.       You can also change the `make' variables FONTFORMATS_C and FONTFORMATS_O
  545.       to reflect which font formats are actually used at your site.
  546.   
  547. + Apparently this program does not work on color VAXstations; it is my
  548. + understanding that this is caused by a server bug.
  549.   Other compilation flags are:
  550.       FONT_PATH    (xdvi.c)  Name of the environment variable to use when
  551.               searching for the font path
  552.       DEFAULT_FONT_PATH  (xdvi.c)  Name of the default font path to use when
  553. !             the above environment variable is not set.  See the
  554. !             ENVIRONMENT section of the man page for details on
  555. !             how to get xdvi to recognize the directory structure
  556. !             you use for storing fonts.
  557.       MSBITFIRST    (X11 only; xdvi.c dvi_draw.c gf.c pk.c pxl.c)  Store
  558.               bitmaps internally with the most significant bit at
  559.               the left.  For performance reasons, it would be best
  560. ***************
  561. *** 58,63 ****
  562. --- 59,67 ----
  563.                   time xdvi -d 8 file.dvi
  564.       BMLONG        (X11 only; xdvi.c dvi_draw.c gf.c pk.c pxl.c)  Store
  565.               bitmaps in long integers instead of bytes.
  566. +     MAXCHARS    (dvi_init.c dvi_draw.c gf.c pk.c pxl.c)  Set to 256 for
  567. +             256-character fonts.  Default is 128.
  568.   All flags should be set in the appropriate Makefile.
  569.   ================================================================
  570.   Additional notes:
  571. ***************
  572. *** 103,117 ****
  573.       changing, made table.h necessary only for pxl.h, split up the source
  574.       file into xdvi.c, dvi.c, gf.c, pxl.c, and pk.c, made shrinking occur
  575.       relative to the character's hot point, etc.)
  576. - --  Patchlevel 1:  --
  577.      10.  The program reads SIGIO signals and processes incoming events
  578.       immediately, so that it can stop displaying things that would be
  579.       erased anyway.  If these interrupts are not coming through, then
  580.       it also checks for incoming events every several dozen characters
  581.       displayed.
  582. - --  Patchlevel 2:  --
  583.      11.  Further split up dvi.c into dvi_init.c and dvi_draw.c; added
  584.       compilation options for various internal bitmap representations.
  585.       Fixed it so gcc won't give warnings, and so it works with R3 toolkit.
  586.   
  587.   Paul Vojta, vojta@math.berkeley.edu
  588. --- 107,122 ----
  589.       changing, made table.h necessary only for pxl.h, split up the source
  590.       file into xdvi.c, dvi.c, gf.c, pxl.c, and pk.c, made shrinking occur
  591.       relative to the character's hot point, etc.)
  592.      10.  The program reads SIGIO signals and processes incoming events
  593.       immediately, so that it can stop displaying things that would be
  594.       erased anyway.  If these interrupts are not coming through, then
  595.       it also checks for incoming events every several dozen characters
  596.       displayed.
  597.      11.  Further split up dvi.c into dvi_init.c and dvi_draw.c; added
  598.       compilation options for various internal bitmap representations.
  599.       Fixed it so gcc won't give warnings, and so it works with R3 toolkit.
  600. + --  Patchlevel 2:  --
  601. +    12.  Added MAXCHARS compilation option.  Eliminated the nonsense with
  602. +     generating table.h.
  603.   
  604.   Paul Vojta, vojta@math.berkeley.edu
  605. diff -cr xdvi.old/dvi_draw.c xdvi/dvi_draw.c
  606. *** xdvi.old/dvi_draw.c    Fri Mar 17 17:55:25 1989
  607. --- xdvi/dvi_draw.c    Fri Mar 17 17:49:43 1989
  608. ***************
  609. *** 17,22 ****
  610. --- 17,23 ----
  611.    *    MSBITFIRST    store bitmaps internally in with significant bit first
  612.    *    BMSHORT    store bitmaps in shorts instead of bytes
  613.    *    BMLONG    store bitmaps in longs instead of bytes
  614. +  *    MAXCHARS set to 256 for 256 character fonts (default = 128)
  615.    */
  616.   
  617.   #include <stdio.h>
  618. diff -cr xdvi.old/dvi_init.c xdvi/dvi_init.c
  619. *** xdvi.old/dvi_init.c    Fri Mar 17 17:55:33 1989
  620. --- xdvi/dvi_init.c    Fri Mar 17 17:49:49 1989
  621. ***************
  622. *** 17,22 ****
  623. --- 17,23 ----
  624.    *    MSBITFIRST    store bitmaps internally in with significant bit first
  625.    *    BMSHORT    store bitmaps in shorts instead of bytes
  626.    *    BMLONG    store bitmaps in longs instead of bytes
  627. +  *    MAXCHARS set to 256 for 256 character fonts (default = 128)
  628.    */
  629.   
  630.   #include <stdio.h>
  631. diff -cr xdvi.old/gf.c xdvi/gf.c
  632. *** xdvi.old/gf.c    Fri Mar 17 17:56:05 1989
  633. --- xdvi/gf.c    Fri Mar 17 17:49:53 1989
  634. ***************
  635. *** 123,131 ****
  636. --- 123,133 ----
  637.           int addr;
  638.   
  639.           ch = one(GF_file);            /* character code */
  640. + #if    MAXCHARS < 256
  641.           if (ch >= MAXCHARS)
  642.           oops("Character code %d outside range, file %s", ch,
  643.               fontp->fontname);
  644. + #endif    MAXCHARS
  645.           g = &fontp->glyph[ch];
  646.           switch (cmnd) {
  647.           case CHAR_LOC:
  648. diff -cr xdvi.old/mktable.c xdvi/mktable.c
  649. *** xdvi.old/mktable.c    Fri Mar 17 17:56:07 1989
  650. --- xdvi/mktable.c    Fri Mar 17 18:04:08 1989
  651. ***************
  652. *** 1,60 ****
  653. - #ifndef lint
  654. - static char *mktable_c = 
  655. -   "$Header: mktable.c,v 10.5 86/02/01 15:44:59 tony Rel $";
  656. - #endif     lint
  657. - #include <stdio.h>
  658. - unsigned char reverse_byte[0x100] = { 0 };
  659. - main()
  660. - {
  661. -     seed_table();
  662. -     fill_in_table();
  663. -     print_table();
  664. - }
  665. - seed_table()
  666. - {
  667. -     int i = 0;
  668. -     int j = 0x100/2;
  669. -     int b = 0;
  670. -     for (;;) {
  671. -         reverse_byte[i] = b;
  672. -         if (j == 0)
  673. -             break;
  674. -         i = 2*i + 1;
  675. -         b = b + j;
  676. -         j = j/2;
  677. -     }
  678. - }
  679. - fill_in_table()
  680. - {
  681. -     int b;
  682. -     for (b = 1; b < 0x100-2; b += 1)
  683. -         reverse_byte[b+1] =
  684. -             reverse_byte[b] ^ reverse_byte[b^(b+1)];
  685. - }
  686. - print_table()
  687. - {
  688. -     int b;
  689. -     printf("unsigned char reverse_byte[0x100] = {\n\t");
  690. -     b = 0;
  691. -     for (;;) {
  692. -         printf("0x%02x", reverse_byte[b] & 0xff);
  693. -         b += 1;
  694. -         if (b == 0x100) {
  695. -             printf("\n};\n");
  696. -             return;
  697. -         } else if (b % 8 == 0) {
  698. -             printf(",\n\t");
  699. -         } else {
  700. -             printf(", ");
  701. -         }
  702. -     }
  703. - }
  704. --- 0 ----
  705. diff -cr xdvi.old/patchlevel.h xdvi/patchlevel.h
  706. *** xdvi.old/patchlevel.h    Fri Mar 17 17:56:53 1989
  707. --- xdvi/patchlevel.h    Fri Mar 17 17:49:55 1989
  708. ***************
  709. *** 1 ****
  710. ! #define PATCHLEVEL 1
  711. --- 1 ----
  712. ! #define PATCHLEVEL 2
  713. diff -cr xdvi.old/pk.c xdvi/pk.c
  714. *** xdvi.old/pk.c    Fri Mar 17 17:56:13 1989
  715. --- xdvi/pk.c    Fri Mar 17 17:50:00 1989
  716. ***************
  717. *** 173,181 ****
  718. --- 173,183 ----
  719.           bytes_left = (flag_low_bits << 8) + one(fontp->file);
  720.           cc = one(fontp->file);
  721.           }
  722. + #if    MAXCHARS < 256
  723.           if (cc >= MAXCHARS)
  724.           oops("Character code %d outside range, file %s\n", cc,
  725.               fontp->fontname);
  726. + #endif    MAXCHARS
  727.           fontp->glyph[cc].addr = ftell(fontp->file);
  728.           fontp->glyph[cc].x2 = PK_flag_byte;
  729.           Fseek(fontp->file, (long) bytes_left, 1);
  730. diff -cr xdvi.old/pxl.c xdvi/pxl.c
  731. *** xdvi.old/pxl.c    Fri Mar 17 17:56:16 1989
  732. --- xdvi/pxl.c    Fri Mar 17 17:50:07 1989
  733. ***************
  734. *** 7,14 ****
  735.    ***/
  736.   
  737.   #ifndef    MSBITFIRST
  738. ! #include "table.h"
  739. ! extern    unsigned char    reverse_byte[];
  740.   #endif    MSBITFIRST
  741.   
  742.   static    void    read_index(), read_char();
  743. --- 7,50 ----
  744.    ***/
  745.   
  746.   #ifndef    MSBITFIRST
  747. ! #ifndef X10
  748. ! extern    unsigned char    _reverse_byte[];    /* defined in Xlib */
  749. ! #else X10
  750. ! static    unsigned char    _reverse_byte[0x100] = {
  751. !     0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
  752. !     0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
  753. !     0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
  754. !     0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
  755. !     0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
  756. !     0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
  757. !     0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
  758. !     0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
  759. !     0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
  760. !     0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
  761. !     0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
  762. !     0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
  763. !     0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
  764. !     0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
  765. !     0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
  766. !     0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe,
  767. !     0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1,
  768. !     0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1,
  769. !     0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9,
  770. !     0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9,
  771. !     0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5,
  772. !     0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5,
  773. !     0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed,
  774. !     0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd,
  775. !     0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3,
  776. !     0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3,
  777. !     0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb,
  778. !     0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
  779. !     0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7,
  780. !     0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
  781. !     0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
  782. !     0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
  783. ! };
  784. ! #endif X10
  785.   #endif    MSBITFIRST
  786.   
  787.   static    void    read_index(), read_char();
  788. ***************
  789. *** 36,42 ****
  790.       (void) four(fontp->file);    /* pxl id word */
  791.       /* seek to font directory */
  792.       Fseek(fontp->file, font_dir_ptr, 0);
  793. !     for (g = &fontp->glyph[0]; g < &fontp->glyph[MAXCHARS]; ++g) {
  794.           g->bitmap.w = two(fontp->file);
  795.           g->bitmap.h = two(fontp->file);
  796.           g->x = stwo(fontp->file);
  797. --- 72,80 ----
  798.       (void) four(fontp->file);    /* pxl id word */
  799.       /* seek to font directory */
  800.       Fseek(fontp->file, font_dir_ptr, 0);
  801. !     for (g = fontp->glyph; g < &fontp->glyph[128]; ++g) {
  802. !         g->bitmap.bits = NULL;
  803. !         g->bitmap2.bits = NULL;
  804.           g->bitmap.w = two(fontp->file);
  805.           g->bitmap.h = two(fontp->file);
  806.           g->x = stwo(fontp->file);
  807. ***************
  808. *** 77,82 ****
  809. --- 115,127 ----
  810.               Printf("size=%dx%d, dvi_adv=%d\n", g->bitmap.w, g->bitmap.h,
  811.               g->dvi_adv);
  812.       }
  813. + #if    MAXCHARS > 128
  814. +     for ( ; g < &fontp->glyph[MAXCHARS]; ++g) {
  815. +         g->bitmap.bits = NULL;
  816. +         g->bitmap2.bits = NULL;
  817. +         g->addr = 0;
  818. +     }
  819. + #endif    MAXCHARS
  820.   }
  821.   
  822.   static void
  823. ***************
  824. *** 101,113 ****
  825.       for (i = bitmap->h; i > 0; --i) {
  826.           for (j = bitmap->bytes_wide; j > 0; j -= BYTES_PER_BMUNIT) {
  827.   #ifndef    MSBITFIRST
  828. !         *ptr = reverse_byte[one(fontp->file)];
  829.   #if    BYTES_PER_BMUNIT > 1
  830. !         *ptr |= reverse_byte[one(fontp->file)] << 8;
  831.   #endif
  832.   #ifdef    BMLONG
  833. !         *ptr |= reverse_byte[one(fontp->file)] << 16;
  834. !         *ptr |= reverse_byte[one(fontp->file)] << 24;
  835.   #endif    BMLONG
  836.   #else    MSBITFIRST
  837.           *ptr = 0;
  838. --- 146,158 ----
  839.       for (i = bitmap->h; i > 0; --i) {
  840.           for (j = bitmap->bytes_wide; j > 0; j -= BYTES_PER_BMUNIT) {
  841.   #ifndef    MSBITFIRST
  842. !         *ptr = _reverse_byte[one(fontp->file)];
  843.   #if    BYTES_PER_BMUNIT > 1
  844. !         *ptr |= _reverse_byte[one(fontp->file)] << 8;
  845.   #endif
  846.   #ifdef    BMLONG
  847. !         *ptr |= _reverse_byte[one(fontp->file)] << 16;
  848. !         *ptr |= _reverse_byte[one(fontp->file)] << 24;
  849.   #endif    BMLONG
  850.   #else    MSBITFIRST
  851.           *ptr = 0;
  852. diff -cr xdvi.old/pxl_open.c xdvi/pxl_open.c
  853. *** xdvi.old/pxl_open.c    Fri Mar 17 17:56:54 1989
  854. --- xdvi/pxl_open.c    Fri Mar 17 17:50:11 1989
  855. ***************
  856. *** 24,29 ****
  857. --- 24,31 ----
  858.   #include <string.h>
  859.   #include <errno.h>
  860.   
  861. + extern    int    errno;
  862.   #define    PATH_SEP    ':'
  863.   #define    DEFAULT_TAIL    "/%f.%d%p"
  864.   
  865. ***************
  866. *** 94,100 ****
  867.           f = fopen(nm, OPEN_MODE);
  868.       }
  869.       if (f != NULL) {
  870. !           *name = malloc((unsigned) (n - nm + 1));
  871.           Strcpy(*name, nm);
  872.       }
  873.       return(f);
  874. --- 96,102 ----
  875.           f = fopen(nm, OPEN_MODE);
  876.       }
  877.       if (f != NULL) {
  878. !         *name = malloc((unsigned) (n - nm + 1));
  879.           Strcpy(*name, nm);
  880.       }
  881.       return(f);
  882. diff -cr xdvi.old/tpic.c xdvi/tpic.c
  883. *** xdvi.old/tpic.c    Fri Mar 17 17:55:39 1989
  884. --- xdvi/tpic.c    Fri Mar 17 17:50:17 1989
  885. ***************
  886. *** 27,34 ****
  887.    */
  888.   
  889.   #ifndef lint
  890. ! static char *rcsid=
  891. !   "$Header: dvi_draw.c,v 1.1 88/10/20 00:10:09 xwindows Exp $" ;
  892.   #endif lint
  893.   
  894.   #include <math.h>
  895. --- 27,34 ----
  896.    */
  897.   
  898.   #ifndef lint
  899. ! static char *rcsid =
  900. !   "$Header: dvi_draw.c,v 1.1 88/10/20 00:10:09 xwindows Exp $";
  901.   #endif lint
  902.   
  903.   #include <math.h>
  904. diff -cr xdvi.old/xdvi.c xdvi/xdvi.c
  905. *** xdvi.old/xdvi.c    Fri Mar 17 17:54:57 1989
  906. --- xdvi/xdvi.c    Fri Mar 17 17:50:38 1989
  907. ***************
  908. *** 17,22 ****
  909. --- 17,23 ----
  910.    *    MSBITFIRST    store bitmaps internally in with significant bit first
  911.    *    BMSHORT    store bitmaps in shorts instead of bytes
  912.    *    BMLONG    store bitmaps in longs instead of bytes
  913. +  *    MAXCHARS set to 256 for 256 character fonts (default = 128)
  914.    */
  915.   #ifndef lint
  916.   #include "patchlevel.h"
  917. ***************
  918. *** 991,997 ****
  919. --- 992,1004 ----
  920.   do_pages()
  921.   {
  922.       if (debug & DBG_BATCH) {
  923. + #ifndef X10
  924.           while (mane.min_x == MAXINT) read_events(True);
  925. + #else X10
  926. +         while (mane.min_x == MAXINT)
  927. +         if (setjmp(canit_env)) break;
  928. +         else read_events(True);
  929. + #endif X10
  930.           for (current_page = 0; current_page < total_pages; ++current_page)
  931.           redraw_page();
  932.           exit(0);
  933. diff -cr xdvi.old/xdvi.h xdvi/xdvi.h
  934. *** xdvi.old/xdvi.h    Fri Mar 17 17:56:22 1989
  935. --- xdvi/xdvi.h    Fri Mar 17 17:50:43 1989
  936. ***************
  937. *** 3,9 ****
  938.    */
  939.   /* $Header: xdvi.h,v 10.5 86/02/01 15:45:03 tony Rel $ */
  940.   
  941. ! #include <X11/Xos.h>
  942.   #include <setjmp.h>
  943.   
  944.   #define    OPEN_MODE    "r"
  945. --- 3,13 ----
  946.    */
  947.   /* $Header: xdvi.h,v 10.5 86/02/01 15:45:03 tony Rel $ */
  948.   
  949. ! #ifndef X10
  950. ! #include <X11/Xos.h>    /* same as below */
  951. ! #else X10
  952. ! #include <sys/types.h>    /* for sites without X11 */
  953. ! #endif X10
  954.   #include <setjmp.h>
  955.   
  956.   #define    OPEN_MODE    "r"
  957. ***************
  958. *** 119,125 ****
  959.       char *bits;        /* pointer to the bits */
  960.   };
  961.   
  962. ! #define MAXCHARS 128        /* make 256 for 8 bit characters */
  963.   
  964.   /*
  965.    * Per-character information.
  966. --- 123,131 ----
  967.       char *bits;        /* pointer to the bits */
  968.   };
  969.   
  970. ! #ifndef    MAXCHARS
  971. ! #define    MAXCHARS    128    /* make 256 for 8 bit characters */
  972. ! #endif    MAXCHARS
  973.   
  974.   /*
  975.    * Per-character information.
  976. -- 
  977. Mike Wexler(wyse!mikew)    Phone: (408)433-1000 x1330
  978. Moderator of comp.sources.x
  979.