v04i056: xtroff -- troff previewer for X11, Part11/18

Dan Heller argv at island.uu.net
Tue Jul 18 17:26:51 AEST 1989


Submitted-by: Mark Moraes <moraes at ai.toronto.edu>
Posting-number: Volume 4, Issue 56
Archive-name: xtroff/part11



#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 11 (of 18)."
# Contents:  xtroff/Makefile xtroff/NeWS/news.awk xtroff/README
# Wrapped by moraes at neat.ai on Thu Jul 13 20:55:16 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'xtroff/Makefile' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xtroff/Makefile'\"
else
echo shar: Extracting \"'xtroff/Makefile'\" \(16795 characters\)
sed "s/^X//" >'xtroff/Makefile' <<'END_OF_FILE'
X# Makefile generated by imake - do not edit!
X# $XConsortium: imake.c,v 1.37 88/10/08 20:08:30 jim Exp $
X#
X# The cpp used on this machine replaces all newlines and multiple tabs and
X# spaces in a macro expansion with a single space.  Imake tries to compensate
X# for this, but is not always successful.
X#
X
X###########################################################################
X# X Window System Makefile generated from template file Imake.tmpl
X# $XConsortium: Imake.tmpl,v 1.91 88/10/23 22:37:10 jim Exp $
X#
X# Do not change the body of the imake template file.  Server-specific
X# parameters may be set in the appropriate .macros file; site-specific
X# parameters (but shared by all servers) may be set in site.def.  If you
X# make any changes, you'll need to rebuild the makefiles using
X# "make World" (at best) or "make Makefile; make Makefiles" (at least) in
X# the top level directory.
X#
X# If your C preprocessor doesn't define any unique symbols, you'll need
X# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
X# "make Makefile", "make Makefiles", or "make World").
X#
X# If you absolutely can't get imake to work, you'll need to set the
X# variables at the top of each Makefile as well as the dependencies at the
X# bottom (makedepend will do this automatically).
X#
X
X###########################################################################
X# platform-specific configuration parameters - edit Sun.macros to change
X
X# platform:  $XConsortium: Sun.macros,v 1.52 88/10/23 11:00:55 jim Exp $
X# operating system:  SunOS 4.0
X
XBOOTSTRAPCFLAGS =
X             AS = as
X             CC = cc
X            CPP = /lib/cpp
X             LD = ld
X           LINT = lint
X        INSTALL = install
X           TAGS = ctags
X             RM = rm -f
X             MV = mv
X             LN = ln -s
X         RANLIB = ranlib
XRANLIBINSTFLAGS = -t
X             AR = ar clq
X             LS = ls
X       LINTOPTS = -axz
X    LINTLIBFLAG = -C
X           MAKE = make
XSTD_CPP_DEFINES =
X    STD_DEFINES =
X
X###########################################################################
X# site-specific configuration parameters - edit site.def to change
X
X# site:  $XConsortium: site.def,v 1.16 88/10/12 10:30:24 jim Exp $
X
X XWSRC = $(CONTRIBSRC)/widgets/Xhp/Xw
X
X XWLIB = $(USRLIBDIR)/libXw.a
X
X###########################################################################
X# definitions common to all Makefiles - do not edit
X
X          SHELL = /bin/sh
X
X        DESTDIR =
X      USRLIBDIR = /local/lib/X11
X         BINDIR = /local/bin/X11
X         INCDIR = $(LIBDIR)/include
X        INCROOT = $(DESTDIR)/usr/include
X         ADMDIR = /var/scr/Xerrors
X         LIBDIR = /local/share/X11
X     LINTLIBDIR = $(LIBDIR)/lint
X        FONTDIR = $(LIBDIR)/fonts
X       XINITDIR = $(LIBDIR)/xinit
X         XDMDIR = $(LIBDIR)/xdm
X         UWMDIR = $(LIBDIR)/uwm
X         AWMDIR = $(LIBDIR)/awm
X         TWMDIR = $(LIBDIR)/twm
X        MANPATH = /local/man
X  MANSOURCEPATH = $(MANPATH)/man
X         MANDIR = $(MANSOURCEPATH)x
X      LIBMANDIR = $(MANSOURCEPATH)3
X    XAPPLOADDIR = $(LIBDIR)/app-defaults
X
X   INSTBINFLAGS = -m 0755
X   INSTUIDFLAGS = -m 4755
X   INSTLIBFLAGS = -m 0664
X   INSTINCFLAGS = -m 0444
X   INSTMANFLAGS = -m 0444
X   INSTAPPFLAGS = -m 0444
X  INSTKMEMFLAGS = -g kmem -m 2755
X        FCFLAGS = -t
X    CDEBUGFLAGS = -O
X
X        PATHSEP = /
X         DEPEND = $(DEPENDSRC)/makedepend
X          IMAKE = $(IMAKESRC)/imake.`mach`
X            RGB = $(RGBSRC)/rgb
X             FC = $(BDFTOSNFSRC)/bdftosnf
X      MKFONTDIR = $(MKFONTDIRSRC)/mkfontdir
X      MKDIRHIER = $(SCRIPTSSRC)/mkdirhier.sh
X
X         CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(STD_DEFINES) $(DEFINES)
X      LINTFLAGS = $(LINTOPTS) $(INCLUDES) $(STD_DEFINES) $(DEFINES) -DLINT
X        LDFLAGS = $(CDEBUGFLAGS) $(SYS_LIBRARIES) $(SYSAUX_LIBRARIES)
X            TOP = /ai/src/X.V11R3
X      CLIENTSRC = $(TOP)/clients
X        DEMOSRC = $(TOP)/demos
X         LIBSRC = $(TOP)/lib
X        FONTSRC = $(TOP)/fonts
X     INCLUDESRC = $(TOP)/X11
X      SERVERSRC = $(TOP)/server
X        UTILSRC = $(TOP)/util
X     SCRIPTSSRC = $(UTILSRC)/scripts
X     EXAMPLESRC = $(TOP)/examples
X     CONTRIBSRC = $(TOP)/contrib
X         DOCSRC = $(TOP)/doc
X         RGBSRC = $(TOP)/rgb
X      DEPENDSRC = $(UTILSRC)/makedepend
X       IMAKESRC = $(UTILSRC)/imake
X       IRULESRC = $(UTILSRC)/imake.includes
X        XLIBSRC = $(LIBSRC)/X
X         XMUSRC = $(LIBSRC)/Xmu
X     TOOLKITSRC = $(LIBSRC)/Xt
X     AWIDGETSRC = $(LIBSRC)/Xaw
X     OLDXLIBSRC = $(LIBSRC)/oldX
X    BDFTOSNFSRC = $(FONTSRC)/bdftosnf
X   MKFONTDIRSRC = $(FONTSRC)/mkfontdir
X   EXTENSIONSRC = $(TOP)/extensions
X
X   EXTENSIONLIB = $(USRLIBDIR)/lib/libXext.a
X
X           XLIB = -L$(USRLIBDIR) -lX11
X
X         XMULIB = $(USRLIBDIR)/libXmu.a
X        OLDXLIB = $(USRLIBDIR)/liboldX.a
X       XTOOLLIB = $(USRLIBDIR)/libXt.a
X         XAWLIB = $(USRLIBDIR)/libXaw.a
X       INCLUDES = -I$(INCDIR) -I$(INCROOT)
X
X       LINTXLIB = $(XLIBSRC)/llib-lX11.ln
X        LINTXMU = $(XMUSRC)/llib-lXmu.ln
X      LINTXTOOL = $(TOOLKITSRC)/llib-lXt.ln
X        LINTXAW = $(AWIDGETSRC)/llib-lXaw.ln
X      MACROFILE = Sun.macros
X   ICONFIGFILES = $(IRULESRC)/Imake.tmpl \
X			$(IRULESRC)/$(MACROFILE) $(IRULESRC)/site.def
X  IMAKE_DEFINES =
X      IMAKE_CMD = $(NEWTOP)$(IMAKE) -TImake.tmpl -I$(NEWTOP)$(IRULESRC) \
X			-s Makefile $(IMAKE_DEFINES)
X         RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a \
X			.emacs_* tags TAGS make.log MakeOut
X
X###########################################################################
X# rules:  $XConsortium: Imake.rules,v 1.71 88/10/23 22:46:34 jim Exp $
X
X###########################################################################
X# start of Imakefile
X
X#
X#	Xtroff ImakeFile
X#
X#	make [all]	compiles the programs in this directory, and the
X#			relevant subdirectories - fontstuff are font
X#			manipulation programs, xfonts has the stuff for
X#			by piping the 75dpi bdf through awk scripts
X#			to remap it to PostScript collation sequences,
X#			and generating compressed snf.
X#	make install	makes and installs the programs
X#	make vfonts	makes and installs scaled and converted vfonts
X#			for the devsun device. Not strictly necessary, but
X#			useful for large fonts. xpic can use them too.
X#	make imfonts	Scales and converts Imagen RST fonts if you have them
X#			for the Imagen device. Good if you have them.
X#	make devsun	Installs the devsun width info and runs makedev
X#			Do this if you install the vfonts
X#	make devpsc	Installs the devpsc width info and runs makedev
X#			If you already have a devpsc device, from
X#			Transcript(tm), or some other ditroff to
X#			PostScript(tm) translation package,
X#			then you probably don't need this.
X#
X#	Xtroff doesn't need (more important, doesn't use properly) the
X#	devsun fonts, which are still here for the Suntools version.
X#	You may want to do a 'make vfonts devsun' if you use xpic, which
X#	can use those fonts too. (They are nice and large, for making slides)
X#
X#	The following two defines might need to be changed.  The VFONTS
X#	definition points towards the directory containing the Sun modified
X#	Berkeley versatec font catalog.  These bits of these fonts are used
X#	as the default screen font.  See the file fontstuff/MakeSunFonts for
X#	more details.
X#
X#	The RSTFONTS definition points to the RST (Imagen) font
X#	files.  If you don't have an Imagen printer then you won't need to
X#	worry about these bits.  If you do have an Imagen printer then you
X#	may want to see the file fontstuff/MakeImagenFonts for a way of getting
X#	more accurate bits on the screen.  If you don't want to worry about
X#	the fonts (and I don't blame you) then xtroff will use the
X#	X fonts described above for.
X#
X#	The SUNTROFF_FONTS points to the directory where the fonts
X#	sit. It has subdirectories of the form 'dev'$DEVICE for each
X#	typesetter's fonts - devsun is the default for the scaled
X#	versatec fonts, devimp is for imagen, etc.
X
X         VFONTS = /usr/lib/vfont
X       RSTFONTS = /usr/uturing/ron/rst
X SUNTROFF_FONTS = $(FONTDIR)/xtroff
X      RSTDEVICE = imp	#imagen
X      SUNDEVICE = sun	#versatec - other printers like lw.
X       WIDTHDIR = /local/share/troff
X        MAKEDEV = /local/src/v8troff/troff/makedev
X
X#	Percent MUST be two digits
X#	For the imagen, percent is 120 / 300, i.e 40.
X     RSTPERCENT = 40
X
X#	For versatec fonts, which we use for laserwriters etc.,
X#	percent should be 120/200. i.e. 66. We use 50 for a better
X#	error margin.
X     SUNPERCENT = 50
X
X#	For lots of debugging info, especially FONTDEBUG.
X#          DEBUG = -DFONTDEBUG -DWINDOWDEBUG -DTYPEDEBUG -DDEBUG
X          DEBUG =
X#    CDEBUGFLAGS = -g
X
X# 	defining -DNOADJUST excludes some experimental code which tries to
X#	adjust character positions to make the X font match the troff
X#	font more closely. It may look better if you don't define it -
X#	ligatures, especially 'fi' come out wrong at present if it is
X#	undefined.
X# 	-DFASTARCS does not use an ellipse drawing algorithm that approximates
X# 	ellipses as polygons. Define it if your server draws arcs fast.
X#	(Leave it undefined on Suns, uVaxen, anything using the R3 sample
X#	server miarc.c code)
X#	-DBEZERKELYISM allows the parser to understand the ditroff
X#	sequences emitted by Berkeley ditroff. (May work, I don't have
X#	Berkeley ditroff to test it)
X# 	We have Menu/Menu.o, checkitem/CheckItem.o and menuitem/MenuItem.o
X# 	installed as XtStuff - In fact, we keep all three (Menu. checkitem,
X#	menuitem) in one directory to make matters simpler.
X#	Window is adapted from the R2 version Chris Peterson's xman program.
X        DEFINES = -DFONTDIR=\"${WIDTHDIR}\" -DBITDIR=\"${SUNTROFF_FONTS}\" \
X		  $(DEBUG) -DNOADJUST
X
X       INCLUDES = -I./bitmaps -I./XtStuff -I$(TOP)
X        MATHLIB = -lm
X
X             FC = bdftosnf
X        XTSTUFF = XtStuff/libXtStuff.a
XLOCAL_LIBRARIES = $(XTSTUFF) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
X  SYSAUX_LIBRARIES = $(MATHLIB)
X           OBJS = xwindows.o suntroff.o parse.o font.o draw.o \
X		  fixpoint.o curves.o arc.o
X           SRCS = xwindows.c suntroff.c parse.c font.c draw.c \
X		  fixpoint.c curves.c arc.c
X       PROGRAMS = xtroff
X      PREVIEWER = xtroff
X
X.SUFFIXES: .manX .man
X
X.manX.man:
X	rm -f $*.man
X	sed -e 's?WIDTHDIR?$(WIDTHDIR)?g'\
X	    -e 's?FONTDIR?$(SUNTROFF_FONTS)?g' $*.manX > $*.man
X
X# Comment out fontstuff and xfonts if you are compiling this on a crunch
X# machine which has no displays or X terminals attached.
X
XSUBDIRS = XtStuff fontstuff xfonts
X
Xall::
X	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
X	for i in $(SUBDIRS) ;\
X	do \
X	(cd $$i ; echo "making all in $$i"; \
X	$(MAKE) 'CDEBUGFLAGS=$(CDEBUGFLAGS)' $(MFLAGS)); \
X	done
X
Xdepend::
X	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
X	for i in $(SUBDIRS) ;\
X	do \
X	(cd $$i ; echo "depending in $$i"; \
X	$(MAKE) $(MFLAGS) depend ); \
X	done
X
X PROGRAM = xtroff
X
Xall:: xtroff
X
Xxtroff: $(OBJS) $(LOCAL_LIBRARIES)
X	$(RM) $@
X	$(CC) -o $@ $(OBJS) $(LOCAL_LIBRARIES) $(LDFLAGS) $(SYSLAST_LIBRARIES)
X
Xrelink::
X	$(RM) $(PROGRAM)
X	$(MAKE) $(MFLAGS) $(PROGRAM)
X
Xinstall:: xtroff
X	$(INSTALL) -c $(INSTALLFLAGS) xtroff $(BINDIR)
X
Xinstall.man:: xtroff.man
X	$(INSTALL) -c $(INSTMANFLAGS) xtroff.man $(MANDIR)/xtroff.x
X
Xdepend:: $(DEPEND)
X
Xdepend::
X	$(DEPEND) -s "# DO NOT DELETE" -- $(CFLAGS) -- $(SRCS)
X
X$(DEPEND):
X	@echo "making $@"; \
X	cd $(DEPENDSRC); $(MAKE)
X
Xclean::
X	$(RM) $(PROGRAM)
X
XXtStuff/libXtStuff.a::
X	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
X	for i in XtStuff ;\
X	do \
X	(cd $$i ; echo "making XtStuff/libXtStuff.a in $$i"; \
X	$(MAKE) 'CDEBUGFLAGS=$(CDEBUGFLAGS)' $(MFLAGS)); \
X	done
X
Xvfonts::
X		-mkdir $(SUNTROFF_FONTS)
X		cd fontstuff; make $(MFLAGS) CDEBUGFLAGS="$(CDEBUGFLAGS)" \
X			VFONTS=$(VFONTS) \
X			RSTFONTS=$(RSTFONTS) PREVIEWER=$(PREVIEWER) \
X			FC=$(FC) SUNPERCENT=$(SUNPERCENT) \
X			RSTPERCENT=$(RSTPERCENT) \
X			SUNTROFF_FONTS=$(SUNTROFF_FONTS) \
X			RSTDEVICE=dev$(RSTDEVICE) SUNDEVICE=dev$(SUNDEVICE) \
X			sunfonts
X
Ximfonts::
X		-mkdir $(SUNTROFF_FONTS)
X		cd fontstuff; make $(MFLAGS) CDEBUGFLAGS="$(CDEBUGFLAGS)" \
X			VFONTS=$(VFONTS) \
X			RSTFONTS=$(RSTFONTS) PREVIEWER=$(PREVIEWER) \
X			FC=$(FC) SUNPERCENT=$(SUNPERCENT) \
X			RSTPERCENT=$(RSTPERCENT) \
X			SUNTROFF_FONTS=$(SUNTROFF_FONTS) \
X			RSTDEVICE=dev$(RSTDEVICE) SUNDEVICE=dev$(SUNDEVICE) \
X			rstfonts
X
Xdevsun::
X		cp -r devsun ${WIDTHDIR}; \
X		cd ${WIDTHDIR}/devsun;  \
X		${MAKEDEV} DESC;	\
X		rm -f [a-zA-Z] [a-zA-Z][a-zA-Z]
X
XMakefiles::
X	$(RM) devpsc/Makefile.bak
X	- at if [ -f devpsc/Makefile ]; then \
X	echo "$(MV) devpsc/Makefile devpsc/Makefile.bak"; \
X	$(MV) devpsc/Makefile devpsc/Makefile.bak; \
X	else exit 0; fi
X	cd devpsc; ../$(IMAKE) -TImake.tmpl -I../$(IRULESRC) \
X		-s Makefile $(IMAKE_DEFINES) -DTOPDIR=../$(TOP); \
X		$(MAKE) $(MFLAGS) Makefiles
X
Xdevpsc::
X		cd devpsc; make $(MFLAGS) MAKEDEV=$(MAKEDEV) \
X			WIDTHDIR=$(WIDTHDIR) install
X
Xclean::
X		rm -f xtroff.man
X		cd devpsc; make clean
X
Xtar:
X		make clean
X		-rm /tmp/xtroff.tar.Z
X		cd ..; tar cvfX - xtroff/ExcludeFiles ./xtroff \
X			| compress > /tmp/xtroff.tar.Z
X
Xlint:
X	cd XtStuff; make llib-lXtStuff.ln
X	lint -abz $(SRCS) $(SYS_LIBRARIES) $(SYSAUX_LIBRARIES) \
X		XtStuff/llib-lXtStuff.ln -lXaw -lXt -lX11 -lm $(LINTFLAGS)
X
X###########################################################################
X# Imake.tmpl common rules for all Makefiles - do not edit
X
Xemptyrule::
X
Xclean::
X	$(RM_CMD) \#*
X
XMakefile:: $(IMAKE)
X
XMakefile:: Imakefile \
X	$(IRULESRC)/Imake.tmpl \
X	$(IRULESRC)/Imake.rules \
X	$(IRULESRC)/site.def \
X	$(IRULESRC)/$(MACROFILE)
X	- at if [ -f Makefile ]; then \
X	echo "$(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
X	$(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
X	else exit 0; fi
X	$(IMAKE_CMD) -DTOPDIR=$(TOP)
X
X$(IMAKE):
X	@echo "making $@"; \
X	cd $(IMAKESRC); $(MAKE) BOOTSTRAPCFLAGS=$(BOOTSTRAPCFLAGS)
X
Xtags::
X	$(TAGS) -w *.[ch]
X	$(TAGS) -xw *.[ch] > TAGS
X
X$(XLIB)::;
X-L$(USRLIBDIR)::;
X-L$(LIBSRC)/Xpic::;
X
X###########################################################################
X# rules for building in SUBDIRS - do not edit
X
Xinstall::
X	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
X	for i in $(SUBDIRS) ;\
X	do \
X	(cd $$i ; echo "installing in $$i"; \
X	$(MAKE) $(MFLAGS) \
X	DESTDIR='$(DESTDIR)' install ); \
X	done
X
Xinstall.man::
X	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
X	for i in $(SUBDIRS) ;\
X	do \
X	(cd $$i ; echo "installing man pages in $$i"; \
X	$(MAKE) $(MFLAGS) \
X	DESTDIR='$(DESTDIR)' install.man ); \
X	done
X
Xclean::
X	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
X	for i in $(SUBDIRS) ;\
X	do \
X	(cd $$i ; echo "cleaning in $$i"; \
X	$(MAKE) $(MFLAGS) RM_CMD='$(RM_CMD)' clean ); \
X	done
X
Xtags::
X	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
X	for i in $(SUBDIRS) ;\
X	do \
X	(cd $$i ; echo "tagging in $$i"; \
X	$(MAKE) $(MFLAGS) TAGS='$(TAGS)' tags ); \
X	done
X
XMakefiles:: $(IMAKE)
X
XMakefiles::
X	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
X	for i in $(SUBDIRS) ;\
X	do \
X	echo "Making Makefiles in $$i..."; \
X	case "$$i" in \
X	./?*/?*/?*/?*) newtop=../../../../ sub=subsubsubsub;; \
X	./?*/?*/?*) newtop=../../../ sub=subsubsub;; \
X	./?*/?*) newtop=../../ sub=subsub;; \
X	./?*) newtop=../ sub=sub;; \
X	*/?*/?*/?*) newtop=../../../../ sub=subsubsubsub;; \
X	*/?*/?*) newtop=../../../ sub=subsubsub;; \
X	*/?*) newtop=../../ sub=subsub;; \
X	*) newtop=../ sub=sub;; \
X	esac; \
X	$(MAKE) $${sub}dirMakefiles NEWTOP=$$newtop \
X	MAKEFILE_SUBDIR=$$i;\
X	done
X
XsubdirMakefiles:
X	$(RM) $(MAKEFILE_SUBDIR)/Makefile.bak
X	- at if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then \
X	echo "$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak"; \
X	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \
X	else exit 0; fi
X	cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=../$(TOP); \
X	$(MAKE) $(MFLAGS) Makefiles
X
XsubsubdirMakefiles:
X	$(RM) $(MAKEFILE_SUBDIR)/Makefile.bak
X	- at if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then \
X	echo "$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak"; \
X	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \
X	else exit 0; fi
X	cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=../../$(TOP); \
X	$(MAKE) $(MFLAGS) Makefiles
X
XsubsubsubdirMakefiles:
X	$(RM) $(MAKEFILE_SUBDIR)/Makefile.bak
X	- at if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then \
X	echo "$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak"; \
X	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \
X	else exit 0; fi
X	cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=../../../$(TOP); \
X	$(MAKE) $(MFLAGS) Makefiles
X
XsubsubsubsubdirMakefiles:
X	$(RM) $(MAKEFILE_SUBDIR)/Makefile.bak
X	- at if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then \
X	echo "$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak"; \
X	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \
X	else exit 0; fi
X	cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=../../../../$(TOP); \
X	$(MAKE) $(MFLAGS) Makefiles
X
X###########################################################################
X# dependencies generated by makedepend
X
END_OF_FILE
if test 16795 -ne `wc -c <'xtroff/Makefile'`; then
    echo shar: \"'xtroff/Makefile'\" unpacked with wrong size!
fi
# end of 'xtroff/Makefile'
fi
if test -f 'xtroff/NeWS/news.awk' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xtroff/NeWS/news.awk'\"
else
echo shar: Extracting \"'xtroff/NeWS/news.awk'\" \(14490 characters\)
sed "s/^X//" >'xtroff/NeWS/news.awk' <<'END_OF_FILE'
X# Translate from NeWS format BDF file to X11 format BDF file.
X# D. A. Cahlander 88/12/31.  dac at cray.com
X
XBEGIN {
X
X#  Define FONT family name
X
X	family["Times-Bold"] = "B"
X	family["Times-BoldItalic"] = "BI"
X	family["Courier"] = "C"
X	family["Courier-Bold"] = "CB"
X	family["Courier-BoldOblique"] = "CN"
X	family["Courier-Oblique"] = "CO"
X	family["Helvetica"] = "H"
X	family["Helvetica-Bold"] = "HB"
X	family["Helvetica-BoldOblique"] = "HN"
X	family["Helvetica-Oblique"] = "HO"
X	family["Times-Italic"] = "I"
X	family["Times-Roman"] = "R"
X	family["Symbol"] = "S"
X
X#	family["Boston"] = "Boston"
X#	family["Cyrillic"] = "Cyrillic"
X#	family["Cursor"] = "Cursor"
X#	family["GFont"] = "GFont"
X#	family["Helvetica-Medium"] = "Hevetica-Medium"
X#	family["Icon"] = "Icon"
X#	family["Kanji"] = "Kanji"
X#	family["Screen"] = "Screen"
X#	family["Symbol-Medium"] = "Symbol-Medium"
X
X# Define SWIDTH the same as X11 timR10.bdf
X
X	swidth["space"] = 250
X	swidth["exclam"] = 333
X	swidth["quotedbl"] = 408
X	swidth["numbersign"] = 500
X	swidth["dollar"] = 500
X	swidth["percent"] = 833
X	swidth["ampersand"] = 778
X	swidth["quoteright"] = 333
X	swidth["parenleft"] = 333
X	swidth["parenright"] = 333
X	swidth["asterisk"] = 500
X	swidth["plus"] = 564
X	swidth["comma"] = 250
X	swidth["minus"] = 564
X	swidth["period"] = 250
X	swidth["slash"] = 278
X	swidth["zero"] = 500
X	swidth["one"] = 500
X	swidth["two"] = 500
X	swidth["three"] = 500
X	swidth["four"] = 500
X	swidth["five"] = 500
X	swidth["six"] = 500
X	swidth["seven"] = 500
X	swidth["eight"] = 500
X	swidth["nine"] = 500
X	swidth["colon"] = 278
X	swidth["semicolon"] = 278
X	swidth["less"] = 564
X	swidth["equal"] = 564
X	swidth["greater"] = 564
X	swidth["question"] = 444
X	swidth["at"] = 921
X	swidth["A"] = 722
X	swidth["B"] = 667
X	swidth["C"] = 667
X	swidth["D"] = 722
X	swidth["E"] = 611
X	swidth["F"] = 556
X	swidth["G"] = 722
X	swidth["H"] = 722
X	swidth["I"] = 333
X	swidth["J"] = 389
X	swidth["K"] = 722
X	swidth["L"] = 611
X	swidth["M"] = 889
X	swidth["N"] = 722
X	swidth["O"] = 722
X	swidth["P"] = 556
X	swidth["Q"] = 722
X	swidth["R"] = 667
X	swidth["S"] = 556
X	swidth["T"] = 611
X	swidth["U"] = 722
X	swidth["V"] = 722
X	swidth["W"] = 944
X	swidth["X"] = 722
X	swidth["Y"] = 722
X	swidth["Z"] = 611
X	swidth["bracketleft"] = 333
X	swidth["backslash"] = 278
X	swidth["bracketright"] = 333
X	swidth["asciicircum"] = 469
X	swidth["underscore"] = 500
X	swidth["quoteleft"] = 333
X	swidth["a"] = 444
X	swidth["b"] = 500
X	swidth["c"] = 444
X	swidth["d"] = 500
X	swidth["e"] = 444
X	swidth["f"] = 333
X	swidth["g"] = 500
X	swidth["h"] = 500
X	swidth["i"] = 278
X	swidth["j"] = 278
X	swidth["k"] = 500
X	swidth["l"] = 278
X	swidth["m"] = 778
X	swidth["n"] = 500
X	swidth["o"] = 500
X	swidth["p"] = 500
X	swidth["q"] = 500
X	swidth["r"] = 333
X	swidth["s"] = 389
X	swidth["t"] = 278
X	swidth["u"] = 500
X	swidth["v"] = 500
X	swidth["w"] = 722
X	swidth["x"] = 500
X	swidth["y"] = 500
X	swidth["z"] = 444
X	swidth["braceleft"] = 480
X	swidth["bar"] = 200
X	swidth["braceright"] = 480
X	swidth["asciitilde"] = 541
X	swidth["exclamdown"] = 333
X	swidth["cent"] = 500
X	swidth["sterling"] = 500
X	swidth["currency"] = 500
X	swidth["yen"] = 500
X	swidth["brokenbar"] = 200
X	swidth["section"] = 500
X	swidth["dieresis"] = 333
X	swidth["copyright"] = 760
X	swidth["ordfeminine"] = 276
X	swidth["guillemotleft"] = 500
X	swidth["logicalnot"] = 564
X	swidth["hyphen"] = 333
X	swidth["registered"] = 760
X	swidth["macron"] = 333
X	swidth["degree"] = 400
X	swidth["plusminus"] = 564
X	swidth["twosuperior"] = 300
X	swidth["threesuperior"] = 300
X	swidth["acute"] = 333
X	swidth["mu"] = 500
X	swidth["paragraph"] = 453
X	swidth["periodcentered"] = 250
X	swidth["cedilla"] = 333
X	swidth["onesuperior"] = 300
X	swidth["ordmasculine"] = 310
X	swidth["guillemotright"] = 500
X	swidth["onequarter"] = 750
X	swidth["onehalf"] = 750
X	swidth["threequarters"] = 750
X	swidth["questiondown"] = 444
X	swidth["Agrave"] = 722
X	swidth["Aacute"] = 722
X	swidth["Acircumflex"] = 722
X	swidth["Atilde"] = 722
X	swidth["Adieresis"] = 722
X	swidth["Aring"] = 722
X	swidth["AE"] = 889
X	swidth["Ccedilla"] = 667
X	swidth["Egrave"] = 611
X	swidth["Eacute"] = 611
X	swidth["Ecircumflex"] = 611
X	swidth["Edieresis"] = 611
X	swidth["Igrave"] = 333
X	swidth["Iacute"] = 333
X	swidth["Icircumflex"] = 333
X	swidth["Idieresis"] = 333
X	swidth["Eth"] = 722
X	swidth["Ntilde"] = 722
X	swidth["Ograve"] = 722
X	swidth["Oacute"] = 722
X	swidth["Ocircumflex"] = 722
X	swidth["Otilde"] = 722
X	swidth["Odieresis"] = 722
X	swidth["multiply"] = 564
X	swidth["Oslash"] = 722
X	swidth["Ugrave"] = 722
X	swidth["Uacute"] = 722
X	swidth["Ucircumflex"] = 722
X	swidth["Udieresis"] = 722
X	swidth["Yacute"] = 722
X	swidth["Thorn"] = 556
X	swidth["germandbls"] = 500
X	swidth["agrave"] = 444
X	swidth["aacute"] = 444
X	swidth["acircumflex"] = 444
X	swidth["atilde"] = 444
X	swidth["adieresis"] = 444
X	swidth["aring"] = 444
X	swidth["ae"] = 667
X	swidth["ccedilla"] = 444
X	swidth["egrave"] = 444
X	swidth["eacute"] = 444
X	swidth["ecircumflex"] = 444
X	swidth["edieresis"] = 444
X	swidth["igrave"] = 278
X	swidth["iacute"] = 278
X	swidth["icircumflex"] = 278
X	swidth["idieresis"] = 278
X	swidth["eth"] = 500
X	swidth["ntilde"] = 500
X	swidth["ograve"] = 500
X	swidth["oacute"] = 500
X	swidth["ocircumflex"] = 500
X	swidth["otilde"] = 500
X	swidth["odieresis"] = 500
X	swidth["divide"] = 564
X	swidth["oslash"] = 500
X	swidth["ugrave"] = 500
X	swidth["uacute"] = 500
X	swidth["ucircumflex"] = 500
X	swidth["udieresis"] = 500
X	swidth["yacute"] = 500
X	swidth["thorn"] = 500
X	swidth["ydieresis"] = 500
X	swidth["Zcaron"] = 611
X	swidth["zcaron"] = 444
X	swidth["Scaron"] = 556
X	swidth["scaron"] = 389
X	swidth["oe"] = 722
X	swidth["lslash"] = 278
X	swidth["dotlessi"] = 278
X	swidth["Ydieresis"] = 722
X	swidth["OE"] = 889
X	swidth["Lslash"] = 611
X	swidth["emdash"] = 1000
X	swidth["caron"] = 333
X	swidth["ogonek"] = 333
X	swidth["hungarumlaut"] = 333
X	swidth["ring"] = 333
X	swidth["dotaccent"] = 333
X	swidth["breve"] = 333
X	swidth["tilde"] = 333
X	swidth["circumflex"] = 333
X	swidth["grave"] = 333
X	swidth["perthousand"] = 1000
X	swidth["ellipsis"] = 1000
X	swidth["quotedblright"] = 444
X	swidth["quotedblbase"] = 444
X	swidth["quotesinglbase"] = 333
X	swidth["bullet"] = 350
X	swidth["daggerdbl"] = 500
X	swidth["dagger"] = 500
X	swidth["endash"] = 500
X	swidth["fl"] = 556
X	swidth["fi"] = 556
X	swidth["guilsinglright"] = 333
X	swidth["guilsinglleft"] = 333
X	swidth["quotedblleft"] = 444
X	swidth["quotesingle"] = 180
X	swidth["florin"] = 500
X	swidth["fraction"] = 167
X	swidth["trademark"] = 980
X
X# define location of "special" character set
X
X	special[32] = "space"
X	special[33] = "exclam"
X	special[34] = "universal"
X	special[35] = "numbersign"
X	special[36] = "existential"
X	special[37] = "percent"
X	special[38] = "ampersand"
X	special[39] = "suchthat"
X	special[40] = "parenleft"
X	special[41] = "parenright"
X	special[42] = "asteriskmath"
X	special[43] = "plus"
X	special[44] = "comma"
X	special[45] = "minus"
X	special[46] = "period"
X	special[47] = "slash"
X	special[48] = "zero"
X	special[49] = "one"
X	special[50] = "two"
X	special[51] = "three"
X	special[52] = "four"
X	special[53] = "five"
X	special[54] = "six"
X	special[55] = "seven"
X	special[56] = "eight"
X	special[57] = "nine"
X	special[58] = "colon"
X	special[59] = "semicolon"
X	special[60] = "less"
X	special[61] = "equal"
X	special[62] = "greater"
X	special[63] = "question"
X	special[64] = "congruent"
X	special[65] = "Alpha"
X	special[66] = "Beta"
X	special[67] = "Chi"
X	special[68] = "Delta"
X	special[69] = "Epsilon"
X	special[70] = "Phi"
X	special[71] = "Gamma"
X	special[72] = "Eta"
X	special[73] = "Iota"
X	special[74] = "theta1"
X	special[75] = "Kappa"
X	special[76] = "Lambda"
X	special[77] = "Mu"
X	special[78] = "Nu"
X	special[79] = "Omicron"
X	special[80] = "Pi"
X	special[81] = "Theta"
X	special[82] = "Rho"
X	special[83] = "Sigma"
X	special[84] = "Tau"
X	special[85] = "Upsilon"
X	special[86] = "sigma1"
X	special[87] = "Omega"
X	special[88] = "Xi"
X	special[89] = "Psi"
X	special[90] = "Zeta"
X	special[91] = "bracketleft"
X	special[92] = "therefore"
X	special[93] = "bracketright"
X	special[94] = "perpendicular"
X	special[95] = "underscore"
X	special[96] = "radicalex"
X	special[97] = "alpha"
X	special[98] = "beta"
X	special[99] = "chi"
X	special[100] = "delta"
X	special[101] = "epsilon"
X	special[102] = "phi"
X	special[103] = "gamma"
X	special[104] = "eta"
X	special[105] = "iota"
X	special[106] = "phi1"
X	special[107] = "kappa"
X	special[108] = "lambda"
X	special[109] = "mu"
X	special[110] = "nu"
X	special[111] = "omicron"
X	special[112] = "pi"
X	special[113] = "theta"
X	special[114] = "rho"
X	special[115] = "sigma"
X	special[116] = "tau"
X	special[117] = "upsilon"
X	special[118] = "omega1"
X	special[119] = "omega"
X	special[120] = "xi"
X	special[121] = "psi"
X	special[122] = "zeta"
X	special[123] = "braceleft"
X	special[124] = "bar"
X	special[125] = "braceright"
X	special[126] = "similar"
X	special[161] = "Upsilon1"
X	special[162] = "minute"
X	special[163] = "lessequal"
X	special[164] = "fraction"
X	special[165] = "infinity"
X	special[166] = "florin"
X	special[167] = "club"
X	special[168] = "diamond"
X	special[169] = "heart"
X	special[170] = "spade"
X	special[171] = "arrowboth"
X	special[172] = "arrowleft"
X	special[173] = "arrowup"
X	special[174] = "arrowright"
X	special[175] = "arrowdown"
X	special[176] = "degree"
X	special[177] = "plusminus"
X	special[178] = "second"
X	special[179] = "greaterequal"
X	special[180] = "multiply"
X	special[181] = "proportional"
X	special[182] = "partialdiff"
X	special[183] = "bullet"
X	special[184] = "divide"
X	special[185] = "notequal"
X	special[186] = "equivalence"
X	special[187] = "approxequal"
X	special[188] = "ellipsis"
X	special[189] = "arrowvertex"
X	special[190] = "arrowhorizex"
X	special[191] = "carriagereturn"
X	special[192] = "aleph"
X	special[193] = "Ifraktur"
X	special[194] = "Rfraktur"
X	special[195] = "weierstrass"
X	special[196] = "circlemultiply"
X	special[197] = "circleplus"
X	special[198] = "emptyset"
X	special[199] = "intersection"
X	special[200] = "union"
X	special[201] = "propersuperset"
X	special[202] = "reflexsuperset"
X	special[203] = "notsubset"
X	special[204] = "propersubset"
X	special[205] = "reflexsubset"
X	special[206] = "element"
X	special[207] = "notelement"
X	special[208] = "angle"
X	special[209] = "gradient"
X	special[210] = "registerserif"
X	special[211] = "copyrightserif"
X	special[212] = "trademarkserif"
X	special[213] = "product"
X	special[214] = "radical"
X	special[215] = "dotmath"
X	special[216] = "logicalnot"
X	special[217] = "logicaland"
X	special[218] = "logicalor"
X	special[219] = "arrowdblboth"
X	special[220] = "arrowdblleft"
X	special[221] = "arrowdblup"
X	special[222] = "arrowdblright"
X	special[223] = "arrowdbldown"
X	special[224] = "lozenge"
X	special[225] = "angleleft"
X	special[226] = "registersans"
X	special[227] = "copyrightsans"
X	special[228] = "trademarksans"
X	special[229] = "summation"
X	special[230] = "parenlefttp"
X	special[231] = "parenleftex"
X	special[232] = "parenleftbt"
X	special[233] = "bracketlefttp"
X	special[234] = "bracketleftex"
X	special[235] = "bracketleftbt"
X	special[236] = "bracelefttp"
X	special[237] = "braceleftmid"
X	special[238] = "braceleftbt"
X	special[239] = "braceex"
X	special[240] = "apple"
X	special[241] = "angleright"
X	special[242] = "integral"
X	special[243] = "integraltp"
X	special[244] = "integralex"
X	special[245] = "integralbt"
X	special[246] = "parenrighttp"
X	special[247] = "parenrightex"
X	special[248] = "parenrightbt"
X	special[249] = "bracketrighttp"
X	special[250] = "bracketrightex"
X	special[251] = "bracketrightbt"
X	special[252] = "bracerighttp"
X	special[253] = "bracerightmid"
X	special[254] = "bracerightbt"
X	special[133] = "box"
X	special[132] = "square"
X	special[134] = "circle"
X	special[135] = "boxrule"
X	special[137] = "rule"
X	special[148] = "rightceiling"
X	special[136] = "boldvertical"
X	special[146] = "rightfloor"
X	special[141] = "righttopcurly"
X	special[144] = "rightmidcurly"
X	special[142] = "rightbotcurly"
X	special[147] = "leftceiling"
X	special[145] = "leftfloor"
X	special[139] = "lefttopcurly"
X	special[143] = "leftmidcurly"
X	special[140] = "leftbotcurly"
X}
X
X#  Header from fonts/bdf/75dpi/timR24.bdf
X#
X#	STARTFONT 2.1
X#	FONT -Adobe-Times-Medium-R-Normal--10-100-75-75-P-54-ISO8859-1
X#	SIZE 10 75 75
X#	FONTBOUNDINGBOX 11 11 -1 -3
X#	STARTPROPERTIES 23
X#	COMMENT Begin LogicalFontDescription
X#	FONTNAME_REGISTRY ""
X#	FAMILY_NAME "Times"
X#	FOUNDRY "Adobe"
X#	WEIGHT_NAME "Medium"
X#	SETWIDTH_NAME "Normal"
X#	SLANT "R"
X#	ADD_STYLE_NAME ""
X#	PIXEL_SIZE 10
X#	POINT_SIZE 100
X#	RESOLUTION_X 75
X#	RESOLUTION_Y 75
X#	SPACING "P"
X#	AVERAGE_WIDTH 54
X#	CHARSET_REGISTRY "ISO8859"
X#	CHARSET_ENCODING "1"
X#	DEVICE_FONT_NAME "Times-Roman"
X#	COMMENT END LogicalFontDescription
X#	CHARSET_COLLECTIONS "ASCII ISOLATIN1 ADOBESTANDARD"
X#	FULL_NAME "Times Roman"
X#	COPYRIGHT "Copyright (c) 1984, 1987 Adobe Systems, Inc., Portions Copyright 1988 Digital Equipment Corp."
X#	COMMENT ***** end of inserted font properties
X#	FONT_ASCENT 8
X#	FONT_DESCENT 3
X#	CAP_HEIGHT 7
X#	X_HEIGHT 5
X#	ENDPROPERTIES 
X#	CHARS 228
X#	STARTCHAR space
X#	ENCODING 32
X#	SWIDTH 250 0
X#	DWIDTH 2 0
X#	BBX 1 1 0 0
X#	BITMAP
X#	00
X#	ENDCHAR
X
X#  Change the version number and fill in what is needed for bdftosnf
X
X/^StartFont / {
X	print "STARTFONT 2.1"
X	next
X}
X
X/^Comment / { $1 = "COMMENT" }
X
X/^Font / {
X	fontname = $2
X	next
X}
X
X/^Size / {
X	if (length(family[fontname]))
X		print "FONT devpsc." family[fontname] "." $2 "." 75
X	else
X		print "FONT " fontname "." $2 "." 75
X	$1 = "SIZE"
X}
X
X/^FontBoundingBox / {
X	$1 = "FONTBOUNDINGBOX"
X	print
X	print "STARTPROPERTIES 5"
X	print "DEVICE_FONT_NAME \"" fontname "\""
X	print "RESOLUTION_X 75"
X	print "RESOLUTION_Y 75"
X	if ($3 > $5) {
X		print "FONT_ASCENT", $3
X		print "FONT_DESCENT", -$5
X	} else {
X		print "FONT_ASCENT", $5
X		print "FONT_DESCENT", -$3
X	}
X	print "ENDPROPERTIES"
X	next
X}
X
X/^Chars / { $1 = "CHARS" }
X
X/^StartChar / {
X	$1 = "STARTCHAR"
X	ch = $2
X	if (fontname == "Symbol")
X		next
X}
X
X/^Encoding / {
X	$1 = "ENCODING"
X
X#  Change encoded name for the Symbol set since dumpfont
X#  gives the wrong name.
X
X	if (fontname == "Symbol") {
X		if (length(special[$2]))
X			ch = special[$2]
X		else
X			ch = "<unknown>"
X		print "STARTCHAR", ch
X		print
X		next
X	}
X
X#  Change to unencoded for "<unknown>" characters.
X#  These characters could even be removed from the character set.
X
X	if ((ch == "<unknown>") && length(family[fontname]))
X		$2 = -1
X}
X
X#  SWIDTH is not provided.  It is not needed for xtroff, but
X#  should be supplied for completeness.  Here it is supplied
X#  from a canned table.
X
X/^DWidth / {
X	if (length(swidth[ch]) != 0)
X		print "SWIDTH", swidth[ch], "0"
X	else
X		print "SWIDTH 250 0"
X	$1 = "DWIDTH"
X}
X
X/^Bitmap/ { $1 = "BITMAP" }
X
X/^EndChar/ { $1 = "ENDCHAR" }
X
X/^EndFont/ { $1 = "ENDFONT" }
X
X# other
X
X{ print }
END_OF_FILE
if test 14490 -ne `wc -c <'xtroff/NeWS/news.awk'`; then
    echo shar: \"'xtroff/NeWS/news.awk'\" unpacked with wrong size!
fi
# end of 'xtroff/NeWS/news.awk'
fi
if test -f 'xtroff/README' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xtroff/README'\"
else
echo shar: Extracting \"'xtroff/README'\" \(15047 characters\)
sed "s/^X//" >'xtroff/README' <<'END_OF_FILE'
XThis directory contains a Device Independent Troff previewer for a
XSun workstation.  It is based on a previewer originally written by
XDavid Slattengren (Berkeley) and Rich Hyde (Purdue) and was nearly
Xall rewritten by Malcolm Slaney (Schlumberger Palo Alto Research).
X(An X Windows interface for X Version 11 also exists - see README.X11)
X
XFirst the appropiate legal mumblings......
X
XThis command was developed as an independent project to satisfy a need
Xof the author.  This program may contain bugs and the user is cautioned
Xto independently verify that the program is suitable for the user's 
Xintended purpose. The program is made available on an ``as is'' basis 
Xwith all faults and without any implied or expressed warranties or support
Xfrom either the author, Malcolm Slaney, or the Schlumberger Palo Alto
XResearch Laboratory.
X
XI am putting this program in the Unix domain.  You are free to use
Xit as you wish.  In return I ask two things.  First, that you do not
Xremove the names of the authors from this work.  Secondly, if you 
Xmake changes or improvements to this program that you pass these
Xchanges back to the author so that everybody can benefit from the
Ximprovements.
X
X
X					Malcolm Slaney  (December 1986)
X					Schlumberger Palo Alto Research
X					3340 Hillview Avenue
X					Palo Alto, CA 94304
X					(415) 496-4669
X					spar!malcolm at decwrl.dec.com
X					malcolm at ecn.purdue.edu
X					malcolm at spar.slb.com (Someday)
X
X
X
XHOW IT WORKS
X
XDitroff (Device Independent Troff) outputs a file containing commands
Xfor a pseudo typesetter.  SunTroff reads this file and displays an
Xapproximation to the typeset output as a window on a Sun workstation.
XThe current code makes extensive use of Sun View and will runs under
Xeither Sun Unix 3.0 or 3.2.  It has not been tested with other versions
Xof Sun software.  (Note that ditroff is NOT the same as /usr/bin/troff
Xin SunOS. Ditroff is supplied with the Documenters WorkBench by AT&T,
Xor with the research editions of Unix from Bell labs (eg) Eighth
XEdition. To tell if your typesetter if ditroff, try running the
Xsuntroff.man through it - if you get something resembling
Xsuntroff.tr (i.e ASCII commands) then it's ditroff - if you get a
Xbinary file, or the dreaded 'Typesetter busy', then you've got the
Xvenerable old troff that produces stuff for a CAT typesetter).
X
XDitroff reads files containing typesetter information from a directory
X(at SPAR it is in /usr/spar/font/ditroff).  This information is also
Xused by SunTroff (and most of the filters that convert ditroff output
Xinto bits for a typesetter.)  Within the ditroff directory there
Xare sub directories for each of the typesetters supported by ditroff.
XThese directories are named /usr/spar/font/ditroff/devXXX where XXX is
Xreplaced with the typesetter name.
X(At CSRI, University of Toronto, the troff directory is called
X /local/share/troff, and ditroff is called /local/bin/troff)
X
XIn addition their is another directory (called /usr/spar/font/suntroff
Xat SPAR) with the actual fonts used by Suntroff.  This directory 
Xparallel's the ditroff directory with seperate directories for
Xeach typesetter.  These directories contain the reduced fonts used
Xto approximate each typesetter.  Suntroff (as it is used at SPAR)
Xuses fonts that have 120 dots per inch.
X(At CSRI, this directory is /local/lib/suntroff)
X
XThere is software provided (originally written at Berkeley) that will
Xconvert Berkeley versatec format or Imagen RST format fonts to a
Xreadable format, reduce them by any desired fraction and then convert
Xthem back to Versatec format for use by Suntroff.  SunTroff can only
Xread font information in Berkeley Versatec format (this is also the
Xdefault for the rest of the Sun software.)
X
XThe hardest problem with SunTroff (possibly unsolved) is the fonts.
XThe only fonts that are available to Sun users are the versatec fonts
Xfound in /usr/lib/vfont.  Other typesetters (like Imagen) sometimes
Xprovide fonts but not in a common format.  Finally there are typesetters
X(like Adobe and Apple) where there it is not possible to get the font
Xbits.
X
XSunTroff will try to use the fonts available for each typesetter.  Here
Xat SPAR this means that our 300 dpi Imagen printer has some of the
Xfonts it needs.  All other devices default to the Versatec fonts. SunTroff
Xis pretty smart about picking the right size if exactly the right size
Xisn't available.  If the correct font name isn't present (like a
XRoman Helvetica, HR) then it defaults to the Roman font.
X
XIn addition to the normal typesetters it is also necessary to define
Xa new typesetter called sun that represents the default typesetter.
XIn the ditroff font directory this can be a link to the Versatec information
X(link devvp to devsun) but in the SunTroff directory it contains the 
Xactual bits for the default fonts.  Here is what these two directories
Xcontain at SPAR.
X
X/usr/spar/font/ditroff:
Xtotal 25
X   1 drwxrwxr-x  9 malcolm       512 Oct 29 12:17 .
X   1 drwxrwxr-x  6 root          512 Sep 14 13:21 ..
X   1 lrwxrwxrwx  1 malcolm        12 Oct 22 15:58 devi24 -> devimagen300
X   1 lrwxrwxrwx  1 malcolm        12 Oct 22 15:58 devimagen -> devimagen300
X   1 lrwxrwxrwx  1 malcolm        12 Oct 22 15:58 devimagen24 -> devimagen300
X   1 drwxrwxr-x  3 malcolm      1024 Sep 29 11:51 devimagen300
X   1 lrwxrwxrwx  1 malcolm        12 Oct 22 15:58 devip -> devimagen300
X   1 lrwxrwxrwx  1 malcolm         6 Oct 22 15:58 devlw1 -> devpsc
X   1 lrwxrwxrwx  1 malcolm         6 Oct 22 15:58 devlw2 -> devpsc
X   1 lrwxrwxrwx  1 malcolm         6 Oct 22 15:58 devlw3 -> devpsc
X   1 lrwxrwxrwx  1 malcolm         6 Oct 22 15:58 devlw4 -> devpsc
X   2 drwxrwxr-x  2 malcolm      1536 Jul  7 20:12 devpsc
X   1 lrwxrwxrwx  1 malcolm         5 Oct 29 12:17 devsun -> devva
X   1 drwxrwxr-x  2 malcolm       512 Jun 30 10:44 devter
X   1 lrwxrwxrwx  1 malcolm         6 Oct 22 15:58 devterm -> devter
X   1 lrwxrwxrwx  1 malcolm         6 Oct 22 15:58 devterminal -> devter
X   2 drwxrwxr-x  2 malcolm      2048 Jun 30 10:45 devva
X   1 lrwxrwxrwx  1 malcolm         5 Oct 22 15:58 devvarian -> devva
X   1 lrwxrwxrwx  1 malcolm         5 Oct 22 15:58 devversatec -> devva
X   1 lrwxrwxrwx  1 malcolm         5 Oct 22 15:58 devvp -> devva
X
X/usr/spar/font/suntroff:
Xtotal 6
X   1 drwxr-xr-x  4 malcolm       512 Sep 14 13:53 .
X   1 drwxrwxr-x  6 root          512 Sep 14 13:21 ..
X   3 drwxr-xr-x  2 malcolm      3072 Sep 26 17:06 devimagen
X   1 drwxr-xr-x  2 malcolm      1024 Sep 15 09:38 devsun
X
XNote that in the /usr/spar/font/ditroff directory there are really
Xonly five different devices supported (300 dpi Imagen, 300 dpi
XPostscript, dumb terminals and the 200 dpi Versatec type 
Xdevices).  Each directory contains the DESC and font files needed
Xfor ditroff.
X
XThe /usr/spar/font/suntroff directory only contains two directories,
Xone for the imagen fonts and the other for the default sun fonts.  The
Xprograms in the fontstuff subdirectory are used to make these fonts.
XIf anybody figures out a way to get the Apple fonts I would dearly
Xlove to hear from them.
X
XINSTALLATION
XInstallation of SunTroff is relatively easy.  The following represents
Xa short do list (I hope I haven't forgotten anything).  Except for
Xcreating the BITDIR (see 2 below) directory and installing the binary
Ximage of suntroff there is no need for special permissions.
X
X1)	Edit the Makefile.  Change the definitions of VFONTS and RSTFONTS
X	to point to the location of your Versatec Font Files (as provided
X	by Sun) and the RST (Imagen) fonts.  If you don't have an Imagen
X	printer (or you don't want to mess with the Imagen fonts) then
X	don't worry about the RSTFONTS.  These two definitions are needed
X	by the programs that attempt to automatically make the font files
X	needed for the screen. Change SUNTROFF_FONTS to the directory 
X	where you want the scaled sunfonts to go (they'll be put in devXXX
X	subdirectories, and set DEVICE to whatever XXX is to be. (eg) sun
X	for devsun, or imp for devimp.) Change MAKEDEV to point to 
X	either makedev (for AT&T ditroff people) or devconfig (for Berkeley
X	ditroff people). Change WIDTHDIR to point to wherever ditroff
X	looks for its font width tables. To find that out, type
X	something like
X		ditroff -t -Tfoo suntroff.man > /dev/null
X	You should get an error message like
X
X	ditroff: can't open tables for /usr/local/lib/troff//devfoo/DESC.out
X
X	Whatever is before the devfoo is WIDTHDIR.
X	(At CSRI, we call ditroff troff, and just bury the Sun
X	supplied /usr/bin/troff)
X
X	People using Berkeley ditroff should add -DBEZERKELYISM to the
X	DEFINES line in the Makefile.
X
X2)	Make sure that the dev.h file is correct.  There are two versions.
X	The one supplied is identical to AT&T's version and should work
X	for most people.  If your version of DESC.out files are compiled
X	with another version of dev.h then you should replace this copy
X	of the dev.h file with your own.  It doesn't really matter which
X	version you use as long as you are consistent.
X	
X3)	Type make.  This will make the suntroff binary.
X
X4)	Type 'make fonts' which will make the font conversion programs, and
X	then scale and make the fonts, and install them in 
X	$(SUNTROFF_FONTS)/dev$(DEVICE)
X
X5)	Type 'make width'. This will install the devsun directory in
X	WIDTHDIR.  It runs either makedev (for you AT&T ditroff people) or
X	devconfig (for you Berkeley ditroff people).  
X
X	The devsun directory (and more specifically the DESC.out file that
X	devconfig/makedev create) is necessary so that SunTroff knows how
X	to find the special characters (like ligatures) in the font files.
X
X	In the directory devsun I have supplied the DESC and font
X	description files we use for the Versatec (default) fonts.  If
X	your site doesn't already support the Versatec fonts then these
X	description files might be a good place to start.  Be sure to
X	put them in with the rest of your fonts and run either makedev
X	(AT&T) or devconfig (Berkeley).  You need to have a devsun
X	directory......it can either be a link to the devversatec
X	(or whatever you call it) or a copy of the devsun directory
X	supplied here.
X
X6)	To test.  Type the command "suntroff suntroff.tr" while
X	running in suntools.  Things should be pretty obvious from the
X	right mouse button menu, the middle mouse button and the
X	status panel.  (The files suntroff.tr and xtroff.tr are both
X	ditroff output files for test purposes. They are the suntroff
X	and xtroff manuals respectively). Then you can create a ditroff
X	output file with the -t flag to ditroff. 
X
XOne final note (or things not to get bitten by)
XNote there are two different versions of the dev.h file that describes
Xthe DESC.out files.  The AT&T version is probably the most widespread
Xand is what is distributed in this directory.  Berkeley made a couple
Xof small changes in the size of some of the string arrays and changed
Xa couple of the spare slots into graphics specifications.  It doesn't
Xmatter which one you use as long as it is the same as the one used
Xto make your DESC.out files.  (If you're not sure then the one supplied
Xis probably correct for you.)
X
XIf you don't have the proper $(WIDTHDIR)/devsun/DESC.out file installed then
XSunTroff will not be able to find the special characters like ligatures
X(fi, ffi, etc).
X
XThe files found in this directory are listed below.  Note the source files
Xare organized the way they are because there is somebody at SPAR who is 
Xinterested in using the SunTroff user interface (in sunwindows.c) as part
Xof a TeX previewer.  The file sunwindows.c contains all the SunView code,
Xand suntroff.c and *.c contain all the ditroff dependent stuff.
X
X	README			This file.
X
X	dev.h			Contains structure describing the
X				binary file with typesetter information.
X
X	devsun/ 		A directory containing the DESC and
X				font description files needed for DiTroff.
X				Be sure to install this information in
X				your ditroff font directory.  SunTroff needs
X				this information so it can figure out the
X				mapping of the special characters. 
X				If you already have Ditroff working on
X				the versatec then just use that directory.
X
X	suntroff		The binary executable.  Install in
X				your favorite source directory.
X
X	suntroff.h		Various system defines.  You will
X				definitely have to change the location
X				of your font directories (FONTDIR and
X				BITDIR).  The rest of the stuff is
X				probably OK.  Also note the LPR command
X				that is used.  It could be different
X				at different sites.
X
X	suntroff.man		The manual page
X	suntroff.tr		The ditroff output of the manual page
X
X	suntroff.c		Miscellaneous functions that don't
X				really fit anywhere else.  The functions
X				in sunwindows.c mostly call the functions
X				in this file.
X
X	curves.c		The fancy drawing commands.  There were
X				not written at SPAR.
X
X	draw.c		The simple drawing commands.  Most of
X				the word is done by SunView.
X
X	fixpoint.c	Fixed point arithmetic used by the 
X				routines in curves.c
X
X	font.c		All the routines needed to deal with
X				the fonts.  This includes font loading
X				and caching.
X
X	parse.c		Parse the troff input file.  No real
X				work is done by this file.  It depends
X				on the other files to draw the
X				characters.
X
X	sunwindows.c		This file contains all the SunView interface.
X				This includes the page movement, the
X				panel and the menu.  It provides a large
X				bit map for the troff drawing functions
X				to scribble on then displays the desired
X				part of the page for the user.
X
X
XIn the fontstuff directory:
X
X	MakeSunFonts		Program to make the reduced fonts
X				needed by SunTroff.  By default it
X				reads the fonts in /usr/lib/vfont
X				reduces them and puts them in
X				the proper directory.
X
X	MakeImagenFonts		Program to make the reduced fonts
X				needed by SunTroff to emulate the
X				300 DPI Imagen printers.
X
X	ch2rst
X	ch2rst.c		Convert a font in character format
X				back into RST (Imagen) format
X	ch2cft
X	ch2vft.c		Convert a font in character format
X				back into Versatec format
X
X	rst.h			Describes the RST (Imagen) format.
X
X	rst2ch
X	rst2ch.c		Convert an RST format font into 
X				a readable (character) format.
X
X	scalech
X	scalech.c		Scale a readable font (as created
X				by rst2ch and vft2ch) by a fraction
X				less than 1.
X
X	vf2bdf
X	vf2bdf.c		Convert a Vfont (Versatec format)
X				font into the BDF format used by
X				X11. (Originally from Ken Yap, at Rochester,
X				a couple of fixes by Dana Chee at bellcore
X				- moraes)
X
X	vft2ch
X	vft2ch.c		Convert a Vfont (Versatec format)
X				font into character format.
X
XIn the bitmaps directory:
X
X	ditroff.icon		An icon for the SunTroff program.
X
X	ditroff.bitmap		An icon for the X11 program.
X
X	hand.x11.mask
X	hand.x11.bitmap		The hand cursor for the X11 program. 
X				(All conversions from Sun format to X11
X				format were made using Jef Poskanzer's
X				pbm programs - moraes)
X
XPlease contact me if you have any questions, comments, bugs and (most
Ximportantly) any improvements.
X
X					Malcolm Slaney
X					Schlumberger Palo Alto Research
X					3340 Hillview Avenue
X					Palo Alto, CA 94304
X					(415) 496-4669
X					{decwrl,pur-ee}!malcolm
X					spar!malcolm at decwrl.dec.com
X					malcolm at malcolm.purdue.edu
X
END_OF_FILE
if test 15047 -ne `wc -c <'xtroff/README'`; then
    echo shar: \"'xtroff/README'\" unpacked with wrong size!
fi
# end of 'xtroff/README'
fi
echo shar: End of archive 11 \(of 18\).
cp /dev/null ark11isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 18 archives.
    rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0



More information about the Comp.sources.x mailing list