home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-10-05 | 76.2 KB | 2,390 lines |
- Newsgroups: comp.sources.unix
- From: envbvs@epb12.lbl.gov (Brian V. Smith)
- Subject: v27i055: transfig-2.1.8 - a set of tools for creating TeX documents with graphics, Part01/07
- Message-id: <1.749903574.10622@gw.home.vix.com>
- Sender: unix-sources-moderator@gw.home.vix.com
- Approved: vixie@gw.home.vix.com
-
- Submitted-By: envbvs@epb12.lbl.gov (Brian V. Smith)
- Posting-Number: Volume 27, Issue 55
- Archive-Name: transfig-2.1.8/part01
-
- This is TransFig version 2.1 patchlevel 8.
-
- TransFig is a set of tools for creating TeX documents with graphics which
- are portable, in the sense that they can be printed in a wide variety of
- environments.
-
- The transfig directory contains the source for the transfig command which
- generates a Makefile which translates Fig code to various graphics
- description languages using the fig2dev program. In previous releases,
- this command was implemented as a shell script.
-
- The fig2dev directory contains a general program for translating from Fig
- code to other graphics desciption languages. The dev subdirectory contains
- a library of output drivers used by fig2dev.
-
- Drivers currently exist for the following graphics langauges: (E)EPIC
- macros, LaTeX picture environment, PIC, PiCTeX, PostScript, and TeXtyl.
- Fig2dev can be configured with a subset of these drivers
-
- I have taken over the maintenance of TransFig from Micah Beck so please
- send any bug notices, fixes, contributions etc to me at bvsmith@lbl.gov.
-
- - Brian V. Smith
- - Lawrence Berkeley Laboratory
-
- ----------------------------------------------------------------------------
- Transfig version 2.1.8 (Oct 1, 1993)
- Changes from 2.1.7:
-
- New Features:
-
- Bugs fixed:
-
- o thick line threshold increased from 1 to 2 for latex lines
- o save/restore wraps EPS objects now
- o specifing nonexistant font with -f caused coredump
- from Gordon W. Ross (gwr@jericho.mc.com)
- o newpath command given before EPS object for PostScript output
- o moved definition of SetFigFont to better place
- from Bernd Raichle (raichle@isr.uni-stuttgart.de)
- o #included sys/types for BSD4_3 systems in genps.c
- o bug in eepic output - SetFigFont was being defined inside a \put
- from Vivek Khera (khera@cs.duke.edu)
- o BoundingBox for EPS objects can be floating values
- o shortened file name (fig2dev/dev/)def_setfigfont.c to setfigfont.c
- o distribution version of fig2dev/dev/Makefile had (def_)setfigfont.c
- instead of (def_)setfigfont.o in LIBOBJS definition
- o SUBDIR fig2dev/dev was missing from top-level Imakefile caused problems
- where make would say something like "No rule to make target
- dev/libtransfig.a"
-
- #! /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 1 (of 7)."
- # Contents: CHANGES Imakefile NOTES README copyright doc
- # doc/fig2ps2tex.1 doc/manual doc/pic2tpic.1 doc/transfig.1 fig2dev
- # fig2dev/Imakefile fig2dev/alloc.h fig2dev/arrow.c fig2dev/dev
- # fig2dev/dev/Imakefile fig2dev/dev/def_setfigfont.c
- # fig2dev/dev/genbox.c fig2dev/dev/picfonts.h
- # fig2dev/dev/picpsfonts.h fig2dev/dev/psfonts.h
- # fig2dev/dev/setfigfont.c fig2dev/dev/texfonts.c
- # fig2dev/dev/texfonts.h fig2dev/drivers.h fig2dev/fig2dev.h
- # fig2dev/fig2ps2tex.script fig2dev/free.c fig2dev/iso2tex.c
- # fig2dev/pi.h fig2dev/pic2tpic.script fig2dev/strstr.c transfig
- # transfig/Imakefile transfig/sys.c transfig/transfig.h
- # transfig/txfile.c
- # Wrapped by envbvs@epb12.lbl.gov.lbl.gov on Fri Oct 1 14:55:44 1993
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'CHANGES' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'CHANGES'\"
- else
- echo shar: Extracting \"'CHANGES'\" \(3719 characters\)
- sed "s/^X//" >'CHANGES' <<'END_OF_FILE'
- XTransfig version 2.1.8 (Oct 1, 1993)
- XChanges from 2.1.7:
- X
- XNew Features:
- X
- XBugs fixed:
- X
- Xo thick line threshold increased from 1 to 2 for latex lines
- Xo save/restore wraps EPS objects now
- Xo specifing nonexistant font with -f caused coredump
- X from Gordon W. Ross (gwr@jericho.mc.com)
- Xo newpath command given before EPS object for PostScript output
- Xo moved definition of SetFigFont to better place
- X from Bernd Raichle (raichle@isr.uni-stuttgart.de)
- Xo #included sys/types for BSD4_3 systems in genps.c
- Xo bug in eepic output - SetFigFont was being defined inside a \put
- X from Vivek Khera (khera@cs.duke.edu)
- Xo BoundingBox for EPS objects can be floating values
- Xo shortened file name (fig2dev/dev/)def_setfigfont.c to setfigfont.c
- Xo distribution version of fig2dev/dev/Makefile had (def_)setfigfont.c
- X instead of (def_)setfigfont.o in LIBOBJS definition
- Xo SUBDIR fig2dev/dev was missing from top-level Imakefile caused problems
- X where make would say something like "No rule to make target
- X dev/libtransfig.a"
- X
- X---------------------------------------------------------------------------
- XTransfig version 2.1.7
- XChanges from 2.1.6:
- X
- Xo no longer writes over input file if there is an error in the command line
- Xo added "%%Orientation: Landscape" comment for PostScript output in landscape
- X orientation
- Xo moved definition of SetFigFont from transfig into genpstex.c so that there
- X is no need to run transfig for pstex output
- Xo script pic2tpic was generating \ss instead of \sf for \fH
- X from Mark Roth (mroth@afit.af.mil)
- Xo changed header for Encapsulated postscript files from "%!PS-Adobe-2.0 EPSF"
- X to "%!PS-Adobe-2.0 EPSF-2.0" which allows FrameMaker and ghostview to
- X read them properly.
- X from Vivek Khera (khera@cs.duke.edu)
- Xo check for #ifdef SYSV to include string.h instead of strings.h in
- X fig2dev/dev/genibmgl.c
- Xo changed EXTRA_LIBRARIES to SYS_LIBRARIES in fig2dev/Imakefile so wouldn't
- X clobber system-dependent flags in EXTRA_LIBRARIES
- Xo fprintf and 'else' missing from genepic which caused incorrect information
- X to be generated when drawing arcs using epic output
- Xo removed dependencies on the X libraries (Imakefiles and Makefiles)
- Xo SGI machines had trouble with hypot() which caused arrow heads to mess up
- X from Malcolm Davis (davis@nod.bms.com)
- Xo Flipped EPS objects were incorrectly flipped on output
- X from Brian Boyter (boyter@pyrdc.va.pyramid.com)
- Xo POLYLINES were being drawn in sections (10 points per section) which
- X resulted in incorrect dashed line lengths and only one section
- X filled if area fill was on
- X from Peter Egelberg (egel@neural.se)
- Xo added Sequent machines and Suns with SunOs < 4.1 to list of machines that
- X don't have strstr()
- X from Scott Erikson (sources@ics.uci.edu)
- Xo removed PATCHLEVEL from patchlevel.h file - version number is complete with
- X three parts (e.g. 2.1.6)
- Xo removed "extern coord_system" from fig2dev.h (wasn't used by fig2dev)
- Xo SPECIAL_CHAR split into three strings for systems which can't handle one
- Xo -P flag dissappeared from eepic output language - reinstated
- X
- X---------------------------------------------------------------------------
- XVersion 2.1.6
- XChanges from 2.1.5:
- X
- Xo Courier-BoldItalic changed to Courier-BoldOblique for PostScript fonts
- Xo "if" statement replaces copysign() call since some machines don't have it
- Xo some backslashes ('\') corrected in printf statements in transfig/mkfile.c and
- X fig2dev/iso2tex.c
- Xo changed header for postscript files from "%!" to "%!PS-Adobe-2.0" when using
- X -P (showpage) option and "%!PS-Adobe-2.0 EPSF" otherwise (Encapsulated)
- Xo corrupt transfig/Imakefile and typo (SCRS instead of SRCS)
- Xo some variables (cur_thickness and coord_system) were multiply defined in
- X various drivers in fig2dev/dev - made those static
- END_OF_FILE
- if test 3719 -ne `wc -c <'CHANGES'`; then
- echo shar: \"'CHANGES'\" unpacked with wrong size!
- fi
- # end of 'CHANGES'
- fi
- if test -f 'Imakefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Imakefile'\"
- else
- echo shar: Extracting \"'Imakefile'\" \(419 characters\)
- sed "s/^X//" >'Imakefile' <<'END_OF_FILE'
- X#
- X# Top level Makefile for TransFig
- X#
- X# to make fig2dev: type "make"
- X#
- X#define IHaveSubdirs
- X#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
- X
- XDEPLIBS =
- XSUBDIRS = transfig fig2dev/dev fig2dev
- XMakeSubdirs($(SUBDIRS))
- XDependSubdirs($(SUBDIRS))
- X
- Xmanual:
- X
- Xtransfig.man: ../doc/transfig.1
- X ln -s ../doc/transfig.1 transfig.man
- X cd doc/manual; make; latex manual; latex manual
- X
- Xclean::
- X cd doc/manual; make clean
- END_OF_FILE
- if test 419 -ne `wc -c <'Imakefile'`; then
- echo shar: \"'Imakefile'\" unpacked with wrong size!
- fi
- # end of 'Imakefile'
- fi
- if test -f 'NOTES' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'NOTES'\"
- else
- echo shar: Extracting \"'NOTES'\" \(2145 characters\)
- sed "s/^X//" >'NOTES' <<'END_OF_FILE'
- XA brief history of Fig translation programs.
- X
- XFig2dev is derived from f2p, the original program written by the author of Fig,
- XSupoj Sutanthavibul of the University of Texas at Austin, to translate Fig
- Xcode to PIC. The devlopment is somewhat complex.
- X
- XSupoj adapted f2p for PostScript ouput: f2ps.
- X
- XMicah Beck adapted f2p for PiCTeX output: fig2tex.
- X
- XFrank Schmuck, then a graduate student at Cornell, adapted fig2tex for
- XLaTeX picture environment output: fig2latex.
- X
- XFrank also enhanced Fig, giving us Fig-FS. Micah in turn extended the
- Xdefinition of Fig code and added corresponding features to Fig-FS.
- XMicah implemented this extension (TFX) in fig2tex, and in fig2ps, which
- Xis an adaption of f2ps.
- X
- XConrad Kwok, then of the University of California at Davis, adapted
- Xfig2tex for (E)EPIC output: fig2epic.
- X
- XHe also enhanced f2p to support the TFX extension: fig2pic.
- X
- XMicah then reorganized the five programs named fig2* into drivers for
- Xa single tranlation program: fig2dev.
- X
- XAs of October 1992, I have taken over the maintenence and distribution of
- Xthe TransFig package from Micah.
- X
- X***************************************************************************
- XPlease refer any questions/bug fixes/contributions etc. about TransFig or
- Xxfig to me.
- X
- XBrian Smith
- XLawrence Berkeley Laboratory
- Xbvsmith@lbl.gov
- XOctober 1992
- X***************************************************************************
- X
- XNote that although I work at Lawrence Berkeley Laboratory (LBL) I don't speak
- Xfor LBL nor do I represent LBL with respect to my work on TransFig and xfig,
- Xnor does LBL make any representations about the suitability of this software
- Xfor any purpose.
- XHere is the legal part:
- X
- XTHE LAWRENCE BERKELEY LABORATORY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- XSOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- XEVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
- XDAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- XWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
- XOUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- X
- END_OF_FILE
- if test 2145 -ne `wc -c <'NOTES'`; then
- echo shar: \"'NOTES'\" unpacked with wrong size!
- fi
- # end of 'NOTES'
- fi
- if test -f 'README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'README'\"
- else
- echo shar: Extracting \"'README'\" \(2490 characters\)
- sed "s/^X//" >'README' <<'END_OF_FILE'
- XTo make TransFig:
- X
- X1. Do a "make Makefiles"
- X2. Do a "make install" to create the executables and install them in the system
- X or
- X do a "make" to create the executables only
- X3. Do a "make install.man" to put the manual pages in the proper directories
- X
- X------------------------------------------------------------------------------------
- XGeneral information:
- X
- XTransFig is a set of tools for creating TeX documents with graphics
- Xwhich are portable, in the sense that they can be printed in a wide
- Xvariety of environments.
- X
- XThe transfig directory contains the source for the transfig command
- Xwhich generates a Makefile which translates Fig code to various graphics
- Xdescription languages using the fig2dev program. In previous releases,
- Xthis command was implemented as a shell script.
- X
- XThe fig2dev directory contains a general program for translating from
- XFig code to other graphics desciption languages. The dev subdirectory
- Xcontains a library of output drivers used by fig2dev.
- X
- XDrivers currently exist for the following graphics langauges:
- X(E)EPIC macros, LaTeX picture environment, PIC, PiCTeX, PostScript, and TeXtyl.
- XFig2dev can be configured with a subset of these drivers
- X
- XThe doc directory contains man pages for fig2dev and for the transfig command.
- XThe subdirectory doc/manual contains a manual for using TransFig to create
- Xdocuments with portable graphics. The manual also contains a reference
- Xguide describing Fig code in detail, and a description of TFX, an extension to
- XFig code which is supported by the translators in this package.
- X
- XMicah Beck
- XDept of Computer Science
- XCornell University
- X
- X1 May 1990
- X----------
- XVersion 2.0 note: The PostScript translation implemented by fig2dev
- Xnow supports both the TFX version of Fig code and the V2.0, the dialect
- Xused by XFig Version 2.0. The other translations support only TFX.
- X
- X1 September 1990
- X----------------
- XVersion 2.1 note: fig2dev now supports Fig code V2.1, which implements
- Xthe features of both TFX and V2.0. V2.1 has some options which are
- Ximplemented only in the PS output mode, most notably the use of PS font
- Xnames in specifying text objects. However, unlike V2.0, this feature
- Xis optional in V2.1; TFX-style font specifiers are also supported and
- Xcan be translated in all output modes. TFX and V2.0 are still supported.
- X
- X********************************
- XPROBLEMS and POSSIBLE SOLUTIONS:
- X********************************
- X
- XSolaris 2.x users:
- X
- XYou must use the /usr/ucb/cc compiler because gethosename() is used.
- END_OF_FILE
- if test 2490 -ne `wc -c <'README'`; then
- echo shar: \"'README'\" unpacked with wrong size!
- fi
- # end of 'README'
- fi
- if test -f 'copyright' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'copyright'\"
- else
- echo shar: Extracting \"'copyright'\" \(1075 characters\)
- sed "s/^X//" >'copyright' <<'END_OF_FILE'
- X/*
- X * TransFig: Facility for Translating Fig code
- X * Copyright (c) 1985 Supoj Sutantavibul
- X * Copyright (c) 1991 Micah Beck
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both that
- X * copyright notice and this permission notice appear in supporting
- X * documentation. The authors make no representations about the suitability
- X * of this software for any purpose. It is provided "as is" without express
- X * or implied warranty.
- X *
- X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- X * PERFORMANCE OF THIS SOFTWARE.
- X *
- X */
- X
- END_OF_FILE
- if test 1075 -ne `wc -c <'copyright'`; then
- echo shar: \"'copyright'\" unpacked with wrong size!
- fi
- # end of 'copyright'
- fi
- if test ! -d 'doc' ; then
- echo shar: Creating directory \"'doc'\"
- mkdir 'doc'
- fi
- if test -f 'doc/fig2ps2tex.1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'doc/fig2ps2tex.1'\"
- else
- echo shar: Extracting \"'doc/fig2ps2tex.1'\" \(963 characters\)
- sed "s/^X//" >'doc/fig2ps2tex.1' <<'END_OF_FILE'
- X.TH FIG2PS2TEX 1 "14 Mar 1991"
- X.SH NAME
- Xfig2ps2tex - generate a TeX file for including a PostScript file
- X
- X.SH SYNOPSIS
- X.B fig2ps2tex
- X.I file
- X
- X.SH DESCRIPTION
- X.PP
- X.I Fig2ps2tex
- Xgenerates a TeX file for including a PostScript file in a TeX document.
- XThis involves calculating the bounding box from the Postscript document.
- XThe TeX inclusion file is written to stdout.
- X.PP
- XNote that the
- X.I psfig
- Xmacro package provides a more sophisticated approach to including
- XPostscript files in LaTeX docuements.
- X.I Fig2ps2tex
- Xworks with plain TeX however.
- X
- X.SH USAGE
- X.PP
- XAssume the Postscript file is called
- X.I foo.ps .
- XThe command
- X
- X.ce
- X% fig2ps2tex foo.ps >foo.tex
- X
- Xwill create the inclusion file with bounding information.
- XThen include this file in your TeX document with the command
- X
- X.ce
- X\einput{foo}
- X
- X.SH "SEE ALSO"
- Xpsfig(1),
- Xlatex(1),
- Xf2ps(1),
- Xfig2dev(1),
- Xtransfig(1).
- X
- X.SH AUTHOR
- XMicah Beck
- X.br
- XCornell University
- X
- XMan page by George Ferguson, ferguson@cs.rochester.edu.
- X
- END_OF_FILE
- if test 963 -ne `wc -c <'doc/fig2ps2tex.1'`; then
- echo shar: \"'doc/fig2ps2tex.1'\" unpacked with wrong size!
- fi
- # end of 'doc/fig2ps2tex.1'
- fi
- if test ! -d 'doc/manual' ; then
- echo shar: Creating directory \"'doc/manual'\"
- mkdir 'doc/manual'
- fi
- if test -f 'doc/pic2tpic.1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'doc/pic2tpic.1'\"
- else
- echo shar: Extracting \"'doc/pic2tpic.1'\" \(1418 characters\)
- sed "s/^X//" >'doc/pic2tpic.1' <<'END_OF_FILE'
- X.TH PIC2TPIC 1 "14 Mar 1991"
- X.SH NAME
- Xpic2tpic - Convert pic files to tpic format
- X
- X.SH SYNOPSIS
- X.B pic2tpic
- X[ files ]
- X
- X.SH DESCRIPTION
- X.PP
- X.B Pic2tpic
- Xreads the
- X.B pic
- Xfiles given on the command line (or stdin if none are given) and
- Xwrites their
- X.B tpic
- Xequivalent to stdout.
- X
- X.SH "SEE ALSO"
- Xtpic(1),
- Xfig2dev(1),
- Xtransfig(1).
- X.SH COPYRIGHT
- XCopyright (c) 1985 Supoj Sutantavibul
- X.br
- XCopyright (c) 1991 Micah Beck
- X.LP
- XPermission to use, copy, modify, distribute, and sell this software and its
- Xdocumentation for any purpose is hereby granted without fee, provided that
- Xthe above copyright notice appear in all copies and that both that
- Xcopyright notice and this permission notice appear in supporting
- Xdocumentation. The authors make no representations about the suitability
- Xof this software for any purpose. It is provided "as is" without express
- Xor implied warranty.
- X.LP
- XTHE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- XINCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- XEVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- XCONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- XDATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- XTORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- XPERFORMANCE OF THIS SOFTWARE.
- X.SH AUTHOR
- XMicah Beck
- X.br
- XCornell University
- X
- XMan page by George Ferguson, ferguson@cs.rochester.edu.
- END_OF_FILE
- if test 1418 -ne `wc -c <'doc/pic2tpic.1'`; then
- echo shar: \"'doc/pic2tpic.1'\" unpacked with wrong size!
- fi
- # end of 'doc/pic2tpic.1'
- fi
- if test -f 'doc/transfig.1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'doc/transfig.1'\"
- else
- echo shar: Extracting \"'doc/transfig.1'\" \(3279 characters\)
- sed "s/^X//" >'doc/transfig.1' <<'END_OF_FILE'
- X.TH TRANSFIG 1 "1 Sept 1990"
- X.SH NAME
- Xtransfig \- creates a makefile for portable LaTeX figures
- X.SH SYNOPSIS
- X.B transfig
- X[ -L \fIlanguage\fR ]
- X[ -M \fImakefile\fR ]
- X[ -T \fItexfile\fR ]
- X[ -I \fImacrofile\fR ]
- X[ -V ]
- X[ \fIcontrol_specs\fR figfile ... ] ...]
- X.SH DESCRIPTION
- X.I Transfig
- Xcreates a makefile to translate figures described in Fig code, PostScript,
- Xor PIC into a specified LaTeX graphics \fIlanguage\fR.
- XPostScript and PIC files are identified by the suffixes ".ps" and ".pic"
- Xrespectively;
- XFig files can be specified either with or without the suffix ".fig" .
- XTransfig also creates a TeX macro file appropriate to the target language.
- X.SH OPTIONS
- XThe \fIlanguage\fR specifier must be either
- X.T
- X.BR epic ,
- X.BR eepic ,
- X.BR eepicemu ,
- X.BR latex ,
- X.BR pictex ,
- X.BR ps ,
- X.BR psfig ,
- X.BR pstex ,
- X.BR textyl ,
- X.BR tpic ,
- Xor
- X.BR null .
- XThe specifier
- X.B psfig
- Xis like the
- X.B ps
- Xspecifier, except that it
- Xmake use of the psfig macro package.
- XThe specifier
- X.B pstex
- Xis like
- X.B psfig,
- Xexcept that it uses LaTeX to process formatted (special) text.
- XThe specifier
- X.B null
- Xresults in the figures being replaced by empty boxes of the
- Xappropriate size.
- XIf no language is specified,
- X.B epic
- Xis the default.
- X.PP
- XThe names of the makefile and TeX macro file can be set with the
- X-M and -T options.
- XThe default names are "Makefile" and "transfig.tex", respectively.
- XIf the -I option is specified, then a command to read in \fImacrofile\fR is
- X inserted into the TeX macro file.
- XIf the -V option is specified, the program version number is printed only.
- X.PP
- XControl specifiers are
- X.TP
- X\fB\-m\fI mag\fR
- Xset the magnification at which the figure is rendered (default 1.0).
- X.TP
- X\fB\-f\fI font\fR
- Xset the default font family used for text objects (default "\fBrm\fR").
- X.TP
- X\fB\-s \fIfontsize\fR
- Xset the default font size (in points) for text objects (default 11*\fImag\fR).
- X.TP
- X\fB\-o \fIoption\fR
- Xpass the specified option string through to fig2dev.
- X.PP
- XIf there is no scaling, the default font is an eleven point roman font.
- XLanguage and control specifiers may occur more than once;
- Xthey affect the translation of files which appear to their
- Xright in the argument list.
- XIf no files are specified, then "*.fig" is assumed.
- X.SH "SEE ALSO"
- Xfig(1),
- Xfig2dev(1),
- Xpic(1),
- Xpic2fig(1),
- X.SH COPYRIGHT
- XCopyright (c) 1985 Supoj Sutantavibul
- X.br
- XCopyright (c) 1991 Micah Beck
- X.LP
- XPermission to use, copy, modify, distribute, and sell this software and its
- Xdocumentation for any purpose is hereby granted without fee, provided that
- Xthe above copyright notice appear in all copies and that both that
- Xcopyright notice and this permission notice appear in supporting
- Xdocumentation. The authors make no representations about the suitability
- Xof this software for any purpose. It is provided "as is" without express
- Xor implied warranty.
- X.LP
- XTHE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- XINCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- XEVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- XCONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- XDATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- XTORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- XPERFORMANCE OF THIS SOFTWARE.
- X.SH AUTHOR
- XMicah Beck
- END_OF_FILE
- if test 3279 -ne `wc -c <'doc/transfig.1'`; then
- echo shar: \"'doc/transfig.1'\" unpacked with wrong size!
- fi
- # end of 'doc/transfig.1'
- fi
- if test ! -d 'fig2dev' ; then
- echo shar: Creating directory \"'fig2dev'\"
- mkdir 'fig2dev'
- fi
- if test -f 'fig2dev/Imakefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fig2dev/Imakefile'\"
- else
- echo shar: Extracting \"'fig2dev/Imakefile'\" \(2527 characters\)
- sed "s/^X//" >'fig2dev/Imakefile' <<'END_OF_FILE'
- X# Fig2dev : General Fig code translation program
- X#
- X# TransFig: Facility for Translating Fig code
- X# Copyright (c) 1985 Supoj Sutantavibul
- X# Copyright (c) 1991 Micah Beck
- X#
- X# Permission to use, copy, modify, distribute, and sell this software and its
- X# documentation for any purpose is hereby granted without fee, provided that
- X# the above copyright notice appear in all copies and that both that
- X# copyright notice and this permission notice appear in supporting
- X# documentation. The authors make no representations about the suitability
- X# of this software for any purpose. It is provided "as is" without express
- X# or implied warranty.
- X#
- X# THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- X# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- X# EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- X# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- X# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- X# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- X# PERFORMANCE OF THIS SOFTWARE.
- X#
- X#
- X# to include drivers for the following languages,
- X# add the corresponding symbol to the DEFINES list:
- X#
- X# -DEPIC -DIBMGL -DLATEX -DPIC -DPICTEX -DPS -DPSTEX -DTEXTYL -DTPIC
- X#
- XDEFINES = -DEPIC -DIBMGL -DLATEX -DPIC -DPICTEX -DPS -DPSTEX -DTEXTYL -DTPIC
- XDEPLIBS =
- X
- X#if (defined(VaxArchitecture) && !defined(UltrixArchitecture)) || \
- X (defined(RtArchitecture) && !defined(AIXArchitecture)) || \
- X (defined(MipsArchitecture)) || defined(SequentArchitecture) || \
- X (defined(SunOSPlatform) && (OSMinorVersion==0))
- X
- XSTRSTRC= strstr.c
- XSTRSTRO= strstr.o
- X#endif
- X
- X#define IHaveSubdirs
- X#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
- X
- XSUBDIRS = dev
- X
- XINCLUDES = -I..
- X
- XSRCS = fig2dev.c getopt.c psfonts.c iso2tex.c \
- X arrow.c bound.c free.c read.c read1_3.c latex_line.c $(STRSTRC)
- XOBJS = fig2dev.o getopt.o psfonts.o iso2tex.o \
- X arrow.o bound.o free.o read.o read1_3.o latex_line.o $(STRSTRO) \
- X dev/libtransfig.a
- X
- XSYS_LIBRARIES = -lm
- X
- XMakeSubdirs($(SUBDIRS))
- XDependSubdirs($(SUBDIRS))
- X
- XComplexProgramTarget(fig2dev)
- X
- Xall:: fig2dev.man fig2ps2tex.man pic2tpic.man
- X
- XInstallScript(fig2ps2tex,$(BINDIR))
- XInstallScript(pic2tpic,$(BINDIR))
- X
- XInstallManPage(fig2ps2tex,$(MANDIR))
- XInstallManPage(pic2tpic,$(MANDIR))
- X
- Xfig2dev.man: ../doc/fig2dev.1
- X ln -s ../doc/fig2dev.1 fig2dev.man
- X
- Xfig2ps2tex.man: ../doc/fig2ps2tex.1
- X ln -s ../doc/fig2ps2tex.1 fig2ps2tex.man
- X
- Xpic2tpic.man: ../doc/pic2tpic.1
- X ln -s ../doc/pic2tpic.1 pic2tpic.man
- END_OF_FILE
- if test 2527 -ne `wc -c <'fig2dev/Imakefile'`; then
- echo shar: \"'fig2dev/Imakefile'\" unpacked with wrong size!
- fi
- # end of 'fig2dev/Imakefile'
- fi
- if test -f 'fig2dev/alloc.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fig2dev/alloc.h'\"
- else
- echo shar: Extracting \"'fig2dev/alloc.h'\" \(1768 characters\)
- sed "s/^X//" >'fig2dev/alloc.h' <<'END_OF_FILE'
- X/*
- X * TransFig: Facility for Translating Fig code
- X * Copyright (c) 1985 Supoj Sutantavibul
- X * Copyright (c) 1991 Micah Beck
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both that
- X * copyright notice and this permission notice appear in supporting
- X * documentation. The authors make no representations about the suitability
- X * of this software for any purpose. It is provided "as is" without express
- X * or implied warranty.
- X *
- X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- X * PERFORMANCE OF THIS SOFTWARE.
- X *
- X */
- X
- Xextern char *malloc();
- Xextern char *calloc();
- X
- X#define Line_malloc(z) z = (F_line*)malloc(LINOBJ_SIZE)
- X#define Eps_malloc(z) z = (F_eps*)malloc(EPS_SIZE)
- X#define Spline_malloc(z) z = (F_spline*)malloc(SPLOBJ_SIZE)
- X#define Ellipse_malloc(z) z = (F_ellipse*)malloc(ELLOBJ_SIZE)
- X#define Arc_malloc(z) z = (F_arc*)malloc(ARCOBJ_SIZE)
- X#define Compound_malloc(z) z = (F_compound*)malloc(COMOBJ_SIZE)
- X#define Text_malloc(z) z = (F_text*)malloc(TEXOBJ_SIZE)
- X#define Point_malloc(z) z = (F_point*)malloc(POINT_SIZE)
- X#define Control_malloc(z) z = (F_control*)malloc(CONTROL_SIZE)
- X#define Arrow_malloc(z) z = (F_arrow*)malloc(ARROW_SIZE)
- X
- Xextern char Err_mem[];
- Xextern char Err_incomp[];
- END_OF_FILE
- if test 1768 -ne `wc -c <'fig2dev/alloc.h'`; then
- echo shar: \"'fig2dev/alloc.h'\" unpacked with wrong size!
- fi
- # end of 'fig2dev/alloc.h'
- fi
- if test -f 'fig2dev/arrow.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fig2dev/arrow.c'\"
- else
- echo shar: Extracting \"'fig2dev/arrow.c'\" \(2441 characters\)
- sed "s/^X//" >'fig2dev/arrow.c' <<'END_OF_FILE'
- X/*
- X * TransFig: Facility for Translating Fig code
- X * Copyright (c) 1985 Supoj Sutantavibul
- X * Copyright (c) 1991 Micah Beck
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both that
- X * copyright notice and this permission notice appear in supporting
- X * documentation. The authors make no representations about the suitability
- X * of this software for any purpose. It is provided "as is" without express
- X * or implied warranty.
- X *
- X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- X * PERFORMANCE OF THIS SOFTWARE.
- X *
- X */
- X
- X#include <stdio.h>
- X#include "alloc.h"
- X#include "object.h"
- X
- Xstatic double forward_arrow_wid = 4;
- Xstatic double forward_arrow_ht = 8;
- Xstatic int forward_arrow_type = 0;
- Xstatic int forward_arrow_style = 0;
- Xstatic double forward_arrow_thickness = 1;
- X
- Xstatic double backward_arrow_wid = 4;
- Xstatic double backward_arrow_ht = 8;
- Xstatic int backward_arrow_type = 0;
- Xstatic int backward_arrow_style = 0;
- Xstatic double backward_arrow_thickness = 1;
- X
- XF_arrow *
- Xforward_arrow()
- X{
- X F_arrow *a;
- X
- X if (NULL == (Arrow_malloc(a))) {
- X put_msg(Err_mem);
- X return(NULL);
- X }
- X a->type = forward_arrow_type;
- X a->style = forward_arrow_style;
- X a->thickness = forward_arrow_thickness;
- X a->wid = forward_arrow_wid;
- X a->ht = forward_arrow_ht;
- X return(a);
- X }
- X
- XF_arrow *
- Xbackward_arrow()
- X{
- X F_arrow *a;
- X
- X if (NULL == (Arrow_malloc(a))) {
- X put_msg(Err_mem);
- X return(NULL);
- X }
- X a->type = backward_arrow_type;
- X a->style = backward_arrow_style;
- X a->thickness = backward_arrow_thickness;
- X a->wid = backward_arrow_wid;
- X a->ht = backward_arrow_ht;
- X return(a);
- X }
- X
- XF_arrow *
- Xmake_arrow(type, style, thickness, wid, ht)
- Xint type, style;
- Xdouble thickness, wid, ht;
- X{
- X F_arrow *a;
- X
- X if (NULL == (Arrow_malloc(a))) {
- X put_msg(Err_mem);
- X return(NULL);
- X }
- X a->type = type;
- X a->style = style;
- X a->thickness = thickness;
- X a->wid = wid;
- X a->ht = ht;
- X return(a);
- X }
- END_OF_FILE
- if test 2441 -ne `wc -c <'fig2dev/arrow.c'`; then
- echo shar: \"'fig2dev/arrow.c'\" unpacked with wrong size!
- fi
- # end of 'fig2dev/arrow.c'
- fi
- if test ! -d 'fig2dev/dev' ; then
- echo shar: Creating directory \"'fig2dev/dev'\"
- mkdir 'fig2dev/dev'
- fi
- if test -f 'fig2dev/dev/Imakefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fig2dev/dev/Imakefile'\"
- else
- echo shar: Extracting \"'fig2dev/dev/Imakefile'\" \(611 characters\)
- sed "s/^X//" >'fig2dev/dev/Imakefile' <<'END_OF_FILE'
- X#
- X# Fig2dev Driver Library Makefile
- X#
- X# to set paper size to A4 add -DA4d to DEFINES list
- X# to set IBM Graphics Enhancement Cartridge add -DIBMGEC to DEFINES list
- X# to set DVI-to-PostScript driver to dvips add -DDVIPS to DEFINES list
- X#
- XDEFINES = -DDVIPS
- XDEPLIBS =
- XINCLUDES = -I..
- X
- XSRCS = genbox.c genepic.c genibmgl.c genlatex.c genpic.c genpictex.c \
- X genps.c genpstex.c gentextyl.c gentpic.c setfigfont.c
- XLIBOBJS = genbox.o genepic.o genibmgl.o genlatex.o genpic.o genpictex.o \
- X genps.o genpstex.o gentextyl.o gentpic.o setfigfont.o
- X
- XLIB = transfig
- X
- XNormalLibraryTarget($(LIB),$(LIBOBJS))
- XDependTarget()
- END_OF_FILE
- if test 611 -ne `wc -c <'fig2dev/dev/Imakefile'`; then
- echo shar: \"'fig2dev/dev/Imakefile'\" unpacked with wrong size!
- fi
- # end of 'fig2dev/dev/Imakefile'
- fi
- if test -f 'fig2dev/dev/def_setfigfont.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fig2dev/dev/def_setfigfont.c'\"
- else
- echo shar: Extracting \"'fig2dev/dev/def_setfigfont.c'\" \(0 characters\)
- sed "s/^X//" >'fig2dev/dev/def_setfigfont.c' <<'END_OF_FILE'
- END_OF_FILE
- if test 0 -ne `wc -c <'fig2dev/dev/def_setfigfont.c'`; then
- echo shar: \"'fig2dev/dev/def_setfigfont.c'\" unpacked with wrong size!
- fi
- # end of 'fig2dev/dev/def_setfigfont.c'
- fi
- if test -f 'fig2dev/dev/genbox.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fig2dev/dev/genbox.c'\"
- else
- echo shar: Extracting \"'fig2dev/dev/genbox.c'\" \(1875 characters\)
- sed "s/^X//" >'fig2dev/dev/genbox.c' <<'END_OF_FILE'
- X/*
- X * TransFig: Facility for Translating Fig code
- X * Copyright (c) 1985 Supoj Sutantavibul
- X * Copyright (c) 1991 Micah Beck
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both that
- X * copyright notice and this permission notice appear in supporting
- X * documentation. The authors make no representations about the suitability
- X * of this software for any purpose. It is provided "as is" without express
- X * or implied warranty.
- X *
- X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- X * PERFORMANCE OF THIS SOFTWARE.
- X *
- X */
- X
- X/*
- X * genbox : Empty box driver for fig2dev translator
- X *
- X*/
- X#include <stdio.h>
- X#include "object.h"
- X#include "fig2dev.h"
- X
- Xvoid genbox_option(opt, optarg)
- Xchar opt, *optarg;
- X{
- X switch (opt) {
- X
- X case 's':
- X case 'f':
- X case 'm':
- X case 'L':
- X break;
- X
- X default:
- X put_msg(Err_badarg, opt, "box");
- X exit(1);
- X }
- X}
- X
- Xvoid genbox_start(objects)
- XF_compound *objects;
- X{
- X double ppi;
- X
- X if (0 == (ppi = (double)objects->nwcorner.x)) {
- X fprintf(stderr, "Resolution is zero!! default to 80 ppi\n");
- X ppi = 80.0;
- X }
- X
- X /* draw box */
- X fprintf(tfp, "\\makebox[%.3fin]{\\rule{0in}{%.3fin}}\n",
- X (urx-llx)*mag/ppi, (ury-lly)*mag/ppi);
- X }
- X
- Xstruct driver dev_box = {
- X genbox_option,
- X genbox_start,
- X gendev_null,
- X gendev_null,
- X gendev_null,
- X gendev_null,
- X gendev_null,
- X gendev_null,
- X INCLUDE_TEXT
- X};
- END_OF_FILE
- if test 1875 -ne `wc -c <'fig2dev/dev/genbox.c'`; then
- echo shar: \"'fig2dev/dev/genbox.c'\" unpacked with wrong size!
- fi
- # end of 'fig2dev/dev/genbox.c'
- fi
- if test -f 'fig2dev/dev/picfonts.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fig2dev/dev/picfonts.h'\"
- else
- echo shar: Extracting \"'fig2dev/dev/picfonts.h'\" \(1606 characters\)
- sed "s/^X//" >'fig2dev/dev/picfonts.h' <<'END_OF_FILE'
- X/*
- X * TransFig: Facility for Translating Fig code
- X * Copyright (c) 1985 Supoj Sutantavibul
- X * Copyright (c) 1991 Micah Beck
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both that
- X * copyright notice and this permission notice appear in supporting
- X * documentation. The authors make no representations about the suitability
- X * of this software for any purpose. It is provided "as is" without express
- X * or implied warranty.
- X *
- X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- X * PERFORMANCE OF THIS SOFTWARE.
- X *
- X */
- X
- X/* The selection of font names may be site dependent */
- X
- Xchar *picfontnames[] = {
- X "R", "R", /* default */
- X "R", /* roman */
- X "B", /* bold */
- X "I", /* italic */
- X "H", /* sans serif */
- X "C" /* typewriter */
- X };
- X#define MAXFONTSIZE 108
- X
- X#define PICFONT(F) (picfontnames[((F) <= MAX_FONT) ? (F)+1 : MAX_FONT])
- X#define PICFONTSIZE(S) ((S) > 0 ? \
- X ((S) <= MAXFONTSIZE ? \
- X round(S) : \
- X MAXFONTSIZE) : \
- X font_size)
- X#define PICFONTMAG(T) PICFONTSIZE((int)(T->size*(rigid_text(T) ? 1.0 : mag)))
- END_OF_FILE
- if test 1606 -ne `wc -c <'fig2dev/dev/picfonts.h'`; then
- echo shar: \"'fig2dev/dev/picfonts.h'\" unpacked with wrong size!
- fi
- # end of 'fig2dev/dev/picfonts.h'
- fi
- if test -f 'fig2dev/dev/picpsfonts.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fig2dev/dev/picpsfonts.h'\"
- else
- echo shar: Extracting \"'fig2dev/dev/picpsfonts.h'\" \(2222 characters\)
- sed "s/^X//" >'fig2dev/dev/picpsfonts.h' <<'END_OF_FILE'
- X/*
- X * TransFig: Facility for Translating Fig code
- X * Copyright (c) 1985 Supoj Sutantavibul
- X * Copyright (c) 1991 Micah Beck
- X * Copyright (c) 1992 Uri Blumenthal, IBM
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both that
- X * copyright notice and this permission notice appear in supporting
- X * documentation. The authors make no representations about the suitability
- X * of this software for any purpose. It is provided "as is" without express
- X * or implied warranty.
- X *
- X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- X * PERFORMANCE OF THIS SOFTWARE.
- X *
- X */
- X
- X#define ULIMIT_FONT_SIZE 300
- X#define DEFAULT_PICFONT 13
- X#define PICPSFONT(F) (PICfontnames[ \
- X PICPSfontmap[(((F)->font) <= MAXFONT(F)) ? \
- X ((F)->font)+1 : \
- X DEFAULT_PICFONT]])
- Xextern int v2_flag, v21_flag;
- X#define ROMAN_DEFAULT 0
- X#define ROMAN 1
- X#define ITALIC 2
- X#define BOLD 3
- X#define ITABOL 4
- X#define HELVET 5
- X#define HELBOL 6
- X#define HELOBL 7
- X#define HELBOB 8
- X#define COUR 9
- X#define COURBL 10
- X#define COUROB 11
- X#define COURBO 12
- X#define SYMBOL 13
- X#define BRAKET 14
- Xint PICPSfontmap[] = {
- X ROMAN_DEFAULT, ROMAN,
- X ITALIC,
- X BOLD,
- X ITABOL,
- X HELVET,
- X HELOBL,
- X HELBOL,
- X HELBOB,
- X ROMAN,
- X ITALIC,
- X BOLD,
- X ITABOL,
- X COUR,
- X COUROB,
- X COURBL,
- X COURBO,
- X HELVET,
- X HELOBL,
- X HELBOL,
- X HELBOB,
- X HELVET,
- X HELOBL,
- X HELBOL,
- X HELBOB,
- X ROMAN,
- X ITALIC,
- X BOLD,
- X ITABOL,
- X ROMAN,
- X ITALIC,
- X BOLD,
- X ITABOL,
- X SYMBOL,
- X ITALIC,
- X BRAKET
- X };
- Xchar *PICfontnames[] = {
- X "R", "R", /* default */
- X "I",
- X "B",
- X "BI",
- X "H",
- X "HB",
- X "HO",
- X "HX",
- X "C",
- X "CB",
- X "CO",
- X "CX",
- X "S",
- X "S2"
- X };
- END_OF_FILE
- if test 2222 -ne `wc -c <'fig2dev/dev/picpsfonts.h'`; then
- echo shar: \"'fig2dev/dev/picpsfonts.h'\" unpacked with wrong size!
- fi
- # end of 'fig2dev/dev/picpsfonts.h'
- fi
- if test -f 'fig2dev/dev/psfonts.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fig2dev/dev/psfonts.h'\"
- else
- echo shar: Extracting \"'fig2dev/dev/psfonts.h'\" \(1693 characters\)
- sed "s/^X//" >'fig2dev/dev/psfonts.h' <<'END_OF_FILE'
- X/*
- X * TransFig: Facility for Translating Fig code
- X * Copyright (c) 1985 Supoj Sutantavibul
- X * Copyright (c) 1991 Micah Beck
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both that
- X * copyright notice and this permission notice appear in supporting
- X * documentation. The authors make no representations about the suitability
- X * of this software for any purpose. It is provided "as is" without express
- X * or implied warranty.
- X *
- X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- X * PERFORMANCE OF THIS SOFTWARE.
- X *
- X */
- X
- Xstatic char *psfontnames[] = {
- X "Times-Roman", "Times-Roman", /* default */
- X "Times-Roman", /* roman */
- X "Times-Bold", /* bold */
- X "Times-Italic", /* italic */
- X "Helvetica", /* sans serif */
- X "Courier" /* typewriter */
- X };
- X
- X#define PS_FONTNAMES(T) \
- X (((v2_flag&&!v21_flag) || psfont_text(T)) ? PSfontnames : psfontnames)
- X
- X#define PSFONT(T) \
- X ((T->font) <= MAXFONT(T) ? PS_FONTNAMES(T)[T->font+1] : PS_FONTNAMES(T)[0])
- X
- X#define PSFONTMAG(T) (((T->size) > 0 ? \
- X ((T->size) <= ULIMIT_FONT_SIZE ? \
- X (T->size) : \
- X ULIMIT_FONT_SIZE) : \
- X font_size)/(rigid_text(T) ? mag : 1.0))
- END_OF_FILE
- if test 1693 -ne `wc -c <'fig2dev/dev/psfonts.h'`; then
- echo shar: \"'fig2dev/dev/psfonts.h'\" unpacked with wrong size!
- fi
- # end of 'fig2dev/dev/psfonts.h'
- fi
- if test -f 'fig2dev/dev/setfigfont.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fig2dev/dev/setfigfont.c'\"
- else
- echo shar: Extracting \"'fig2dev/dev/setfigfont.c'\" \(1224 characters\)
- sed "s/^X//" >'fig2dev/dev/setfigfont.c' <<'END_OF_FILE'
- X/* Add a (La)TeX macro, if TeX fonts are used. */
- X/* This macro is called with three arguments:
- X * #1 fontsize (without `pt')
- X * #2 baselineskip (without `pt')
- X * #3 font (without escape character)
- X */
- X
- X#include <stdio.h>
- X
- Xdefine_setfigfont(tfp)
- X FILE *tfp;
- X{
- X fprintf(tfp, "%%\n\
- X\\begingroup\\makeatletter\\ifx\\SetFigFont\\undefined\n\
- X%% extract first six characters in \\fmtname\n\
- X\\def\\x#1#2#3#4#5#6#7\\relax{\\def\\x{#1#2#3#4#5#6}}%%\n\
- X\\expandafter\\x\\fmtname xxxxxx\\relax \\def\\y{splain}%%\n\
- X\\ifx\\x\\y %% LaTeX or SliTeX?\n\
- X\\gdef\\SetFigFont#1#2#3{%%\n\
- X \\ifnum #1<17\\tiny\\else \\ifnum #1<20\\small\\else\n\
- X \\ifnum #1<24\\normalsize\\else \\ifnum #1<29\\large\\else\n\
- X \\ifnum #1<34\\Large\\else \\ifnum #1<41\\LARGE\\else\n\
- X \\huge\\fi\\fi\\fi\\fi\\fi\\fi\n\
- X \\csname #3\\endcsname}%%\n\
- X\\else\n\
- X\\gdef\\SetFigFont#1#2#3{\\begingroup\n\
- X \\count@#1\\relax \\ifnum 25<\\count@\\count@25\\fi\n\
- X \\def\\x{\\endgroup\\@setsize\\SetFigFont{#2pt}}%%\n\
- X \\expandafter\\x\n\
- X \\csname \\romannumeral\\the\\count@ pt\\expandafter\\endcsname\n\
- X \\csname @\\romannumeral\\the\\count@ pt\\endcsname\n\
- X \\csname #3\\endcsname}%%\n\
- X\\fi\n\
- X\\fi\\endgroup\n");
- X}
- END_OF_FILE
- if test 1224 -ne `wc -c <'fig2dev/dev/setfigfont.c'`; then
- echo shar: \"'fig2dev/dev/setfigfont.c'\" unpacked with wrong size!
- fi
- # end of 'fig2dev/dev/setfigfont.c'
- fi
- if test -f 'fig2dev/dev/texfonts.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fig2dev/dev/texfonts.c'\"
- else
- echo shar: Extracting \"'fig2dev/dev/texfonts.c'\" \(2338 characters\)
- sed "s/^X//" >'fig2dev/dev/texfonts.c' <<'END_OF_FILE'
- X/*
- X * TransFig: Facility for Translating Fig code
- X * Copyright (c) 1985 Supoj Sutantavibul
- X * Copyright (c) 1991 Micah Beck
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both that
- X * copyright notice and this permission notice appear in supporting
- X * documentation. The authors make no representations about the suitability
- X * of this software for any purpose. It is provided "as is" without express
- X * or implied warranty.
- X *
- X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- X * PERFORMANCE OF THIS SOFTWARE.
- X *
- X */
- X
- Xstatic char *texfontnames[] = {
- X "rm", "rm", /* default */
- X "rm", /* roman */
- X "bf", /* bold */
- X "it", /* italic */
- X "sf", /* sans serif */
- X "tt" /* typewriter */
- X };
- X
- X/* The selection of font names may be site dependent.
- X * Not all fonts are preloaded at all sizes.
- X */
- X
- Xstatic char *texfontsizes[] = {
- X "Elv", "elv", /* default */
- X "Fiv", "Fiv", "Fiv", "Fiv", /* small fonts */
- X "Fiv", /* five point font */
- X "Six", "Sev", "Egt", /* etc */
- X "Nin", "Ten", "Elv",
- X "Twl", "Twl", "Frtn",
- X "Frtn", "Frtn", "Svtn",
- X "Svtn", "Svtn", "Twty",
- X "Twty", "Twty", "Twty", "Twty", "Twfv",
- X "Twfv", "Twfv", "twfv", "Twentynine",
- X "Twentynine", "Twentynine", "Twentynine", "Twentynine",
- X "Thirtyfour", "Thirtyfour", "Thirtyfour", "Thirtyfour",
- X "Thirtyfour", "Thirtyfour", "Thirtyfour", "Fortyone",
- X "Fortyone", "Fortyone"
- X };
- X
- X#define MAXFONTSIZE 42
- X
- X#define TEXFONT(F) (texfontnames[((F) <= MAX_FONT) ? (F)+1 : MAX_FONT])
- X#define TEXFONTSIZE(S) (texfontsizes[((S) <= MAXFONTSIZE) ? round(S)+1\
- X : MAXFONTSIZE])
- X#define TEXFONTMAG(T) TEXFONTSIZE(T->size*(rigid_text(T) ? 1.0 : mag))
- X
- END_OF_FILE
- if test 2338 -ne `wc -c <'fig2dev/dev/texfonts.c'`; then
- echo shar: \"'fig2dev/dev/texfonts.c'\" unpacked with wrong size!
- fi
- # end of 'fig2dev/dev/texfonts.c'
- fi
- if test -f 'fig2dev/dev/texfonts.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fig2dev/dev/texfonts.h'\"
- else
- echo shar: Extracting \"'fig2dev/dev/texfonts.h'\" \(2256 characters\)
- sed "s/^X//" >'fig2dev/dev/texfonts.h' <<'END_OF_FILE'
- X/*
- X * TransFig: Facility for Translating Fig code
- X * Copyright (c) 1985 Supoj Sutantavibul
- X * Copyright (c) 1991 Micah Beck
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both that
- X * copyright notice and this permission notice appear in supporting
- X * documentation. The authors make no representations about the suitability
- X * of this software for any purpose. It is provided "as is" without express
- X * or implied warranty.
- X *
- X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- X * PERFORMANCE OF THIS SOFTWARE.
- X *
- X */
- X
- Xstatic char *texfontnames[] = {
- X "rm", /* default */
- X "rm", /* roman */
- X "bf", /* bold */
- X "it", /* italic */
- X "sf", /* sans serif */
- X "tt" /* typewriter */
- X };
- X
- X/* The selection of font names may be site dependent.
- X * Not all fonts are preloaded at all sizes.
- X */
- X
- Xstatic char texfontsizes[] = {
- X 11, /* default */
- X 5, 5, 5, 5, /* 1-4: small fonts */
- X 5, /* five point font */
- X 6, 7, 8, /* etc */
- X 9, 10, 11,
- X 12, 12, 14,
- X 14, 14, 17,
- X 17, 17, 20,
- X 20, 20, 20, 20, 25,
- X 25, 25, 25, 29,
- X 29, 29, 29, 29,
- X 34, 34, 34, 34,
- X 34, 34, 34, 41,
- X 41, 41
- X };
- X
- X#define MAXFONTSIZE 42
- X
- X#define TEXFONT(F) (texfontnames[((F) <= MAX_FONT) ? (F) : (MAX_FONT-1)])
- X#define TEXFONTSIZE(S) (texfontsizes[((S) <= MAXFONTSIZE) ? round(S)\
- X : (MAXFONTSIZE-1)])
- X#define TEXFONTMAG(T) TEXFONTSIZE(T->size*(rigid_text(T) ? 1.0 : mag))
- X
- END_OF_FILE
- if test 2256 -ne `wc -c <'fig2dev/dev/texfonts.h'`; then
- echo shar: \"'fig2dev/dev/texfonts.h'\" unpacked with wrong size!
- fi
- # end of 'fig2dev/dev/texfonts.h'
- fi
- if test -f 'fig2dev/drivers.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fig2dev/drivers.h'\"
- else
- echo shar: Extracting \"'fig2dev/drivers.h'\" \(1995 characters\)
- sed "s/^X//" >'fig2dev/drivers.h' <<'END_OF_FILE'
- X/*
- X * TransFig: Facility for Translating Fig code
- X * Copyright (c) 1985 Supoj Sutantavibul
- X * Copyright (c) 1991 Micah Beck
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both that
- X * copyright notice and this permission notice appear in supporting
- X * documentation. The authors make no representations about the suitability
- X * of this software for any purpose. It is provided "as is" without express
- X * or implied warranty.
- X *
- X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- X * PERFORMANCE OF THIS SOFTWARE.
- X *
- X */
- X
- Xextern struct driver dev_box;
- Xextern struct driver dev_epic;
- Xextern struct driver dev_ibmgl;
- Xextern struct driver dev_latex;
- Xextern struct driver dev_pic;
- Xextern struct driver dev_pictex;
- Xextern struct driver dev_ps;
- Xextern struct driver dev_pstex;
- Xextern struct driver dev_pstex_t;
- Xextern struct driver dev_textyl;
- Xextern struct driver dev_tpic;
- X
- Xstruct
- X {char *name; struct driver *dev;}
- X drivers[]
- X = {
- X {"box", &dev_box},
- X#ifdef EPIC
- X {"epic", &dev_epic},
- X {"eepic", &dev_epic},
- X {"eepicemu", &dev_epic},
- X#endif
- X#ifdef IBMGL
- X {"ibmgl", &dev_ibmgl},
- X#endif
- X#ifdef LATEX
- X {"latex", &dev_latex},
- X#endif
- X#ifdef PIC
- X {"pic", &dev_pic},
- X#endif
- X#ifdef PICTEX
- X {"pictex", &dev_pictex},
- X#endif
- X#ifdef PS
- X {"ps", &dev_ps},
- X#endif
- X#ifdef PSTEX
- X {"pstex", &dev_pstex},
- X {"pstex_t", &dev_pstex_t},
- X#endif
- X#ifdef TEXTYL
- X {"textyl", &dev_textyl},
- X#endif
- X#ifdef TPIC
- X {"tpic", &dev_tpic},
- X#endif
- X {"", NULL}
- X };
- END_OF_FILE
- if test 1995 -ne `wc -c <'fig2dev/drivers.h'`; then
- echo shar: \"'fig2dev/drivers.h'\" unpacked with wrong size!
- fi
- # end of 'fig2dev/drivers.h'
- fi
- if test -f 'fig2dev/fig2dev.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fig2dev/fig2dev.h'\"
- else
- echo shar: Extracting \"'fig2dev/fig2dev.h'\" \(2032 characters\)
- sed "s/^X//" >'fig2dev/fig2dev.h' <<'END_OF_FILE'
- X/*
- X * TransFig: Facility for Translating Fig code
- X * Copyright (c) 1985 Supoj Sutantavibul
- X * Copyright (c) 1991 Micah Beck
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both that
- X * copyright notice and this permission notice appear in supporting
- X * documentation. The authors make no representations about the suitability
- X * of this software for any purpose. It is provided "as is" without express
- X * or implied warranty.
- X *
- X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- X * PERFORMANCE OF THIS SOFTWARE.
- X *
- X */
- X
- X#ifdef SYSV
- X#include <string.h>
- X#else
- X#include <strings.h>
- X#ifndef strchr
- Xextern char *strchr();
- X#endif
- X#ifndef NeXT
- X#define strchr index
- X#define strrchr rindex
- X#endif
- X#endif
- X
- X#define round(x) ((int) ((x) + ((x >= 0)? 0.5: -0.5)))
- X
- X/*
- X * Device driver interface structure
- X */
- Xstruct driver {
- X void (*option)(); /* interpret driver-specific options */
- X void (*start)(); /* output file header */
- X void (*arc)(); /* object generators */
- X void (*ellipse)();
- X void (*line)();
- X void (*spline)();
- X void (*text)();
- X void (*end)(); /* output file trailer */
- X int text_include; /* include text length in bounding box */
- X#define INCLUDE_TEXT 1
- X#define EXCLUDE_TEXT 0
- X};
- X
- Xextern char Err_badarg[];
- Xextern char Err_incomp[];
- Xextern char Err_mem[];
- X
- Xextern char *PSfontnames[];
- X
- Xextern int PSisomap[];
- X
- Xextern char *prog, *from;
- Xextern int font_size;
- Xextern double mag;
- Xextern FILE *tfp;
- X
- Xextern int llx, lly, urx, ury, coord_system;
- X
- Xextern void gendev_null();
- END_OF_FILE
- if test 2032 -ne `wc -c <'fig2dev/fig2dev.h'`; then
- echo shar: \"'fig2dev/fig2dev.h'\" unpacked with wrong size!
- fi
- # end of 'fig2dev/fig2dev.h'
- fi
- if test -f 'fig2dev/fig2ps2tex.script' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fig2dev/fig2ps2tex.script'\"
- else
- echo shar: Extracting \"'fig2dev/fig2ps2tex.script'\" \(456 characters\)
- sed "s/^X//" >'fig2dev/fig2ps2tex.script' <<'END_OF_FILE'
- X#! /bin/csh -f
- X#
- X# Fig2ps2tex - generate a TeX file for including a PostScript file
- X# involves calculating the bounding box from fig2ps output
- X#
- Xset bbox = `grep "^%%BoundingBox:" $1`
- X
- Xset xsp = `echo "3k $bbox[4] $bbox[2] - 72 / p" | dc`
- Xset ysp = `echo "3k $bbox[5] $bbox[3] - 72 / p" | dc`
- X
- Xecho "\makebox[${xsp}in][l]{"
- Xecho " \vbox to ${ysp}in{"
- Xecho " \vfill"
- Xecho " \special{psfile=$1}"
- Xecho " }"
- Xecho " \vspace{-\baselineskip}"
- Xecho "}"
- END_OF_FILE
- if test 456 -ne `wc -c <'fig2dev/fig2ps2tex.script'`; then
- echo shar: \"'fig2dev/fig2ps2tex.script'\" unpacked with wrong size!
- fi
- # end of 'fig2dev/fig2ps2tex.script'
- fi
- if test -f 'fig2dev/free.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fig2dev/free.c'\"
- else
- echo shar: Extracting \"'fig2dev/free.c'\" \(3264 characters\)
- sed "s/^X//" >'fig2dev/free.c' <<'END_OF_FILE'
- X/*
- X * TransFig: Facility for Translating Fig code
- X * Copyright (c) 1985 Supoj Sutantavibul
- X * Copyright (c) 1991 Micah Beck
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both that
- X * copyright notice and this permission notice appear in supporting
- X * documentation. The authors make no representations about the suitability
- X * of this software for any purpose. It is provided "as is" without express
- X * or implied warranty.
- X *
- X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- X * PERFORMANCE OF THIS SOFTWARE.
- X *
- X */
- X
- X#include <stdio.h>
- X#include <math.h>
- X#include "object.h"
- X
- Xfree_arc(list)
- XF_arc **list;
- X{
- X F_arc *a, *arc;
- X
- X for (a = *list; a != NULL;) {
- X arc = a;
- X a = a->next;
- X if (arc->for_arrow) free((char*)arc->for_arrow);
- X if (arc->back_arrow) free((char*)arc->back_arrow);
- X free((char*)arc);
- X }
- X *list = NULL;
- X }
- X
- Xfree_compound(list)
- XF_compound **list;
- X{
- X F_compound *c, *compound;
- X
- X for (c = *list; c != NULL;) {
- X compound = c;
- X c = c->next;
- X free_arc(&compound->arcs);
- X free_compound(&compound->compounds);
- X free_ellipse(&compound->ellipses);
- X free_line(&compound->lines);
- X free_spline(&compound->splines);
- X free_text(&compound->texts);
- X free((char*)compound);
- X }
- X *list = NULL;
- X }
- X
- Xfree_ellipse(list)
- XF_ellipse **list;
- X{
- X F_ellipse *e, *ellipse;
- X
- X for (e = *list; e != NULL;) {
- X ellipse = e;
- X e = e->next;
- X free((char*)ellipse);
- X }
- X *list = NULL;
- X }
- X
- Xfree_line(list)
- XF_line **list;
- X{
- X F_line *l, *line;
- X
- X for (l = *list; l != NULL;) {
- X line = l;
- X l = l->next;
- X free_linestorage(line);
- X }
- X *list = NULL;
- X }
- X
- Xfree_text(list)
- XF_text **list;
- X{
- X F_text *t, *text;
- X
- X for (t = *list; t != NULL;) {
- X text = t;
- X t = t->next;
- X cfree(text->cstring);
- X free((char*)text);
- X }
- X *list = NULL;
- X }
- X
- Xfree_spline(list)
- XF_spline **list;
- X{
- X F_spline *s, *spline;
- X
- X for (s = *list; s != NULL;) {
- X spline = s;
- X s = s->next;
- X free_splinestorage(spline);
- X }
- X *list = NULL;
- X }
- X
- Xfree_splinestorage(s)
- XF_spline *s;
- X{
- X F_point *p, *q;
- X F_control *a, *b;
- X
- X for (p = s->points; p != NULL; p = q) {
- X q = p->next;
- X free((char*)p);
- X }
- X for (a = s->controls; a != NULL; a = b) {
- X b = a->next;
- X free((char*)a);
- X }
- X if (s->for_arrow) free((char*)s->for_arrow);
- X if (s->back_arrow) free((char*)s->back_arrow);
- X free((char*)s);
- X }
- X
- Xfree_linestorage(l)
- XF_line *l;
- X{
- X F_point *p, *q;
- X
- X for (p = l->points; p != NULL; p = q) {
- X q = p->next;
- X free((char*)p);
- X }
- X if (l->for_arrow) free((char*)l->for_arrow);
- X if (l->back_arrow) free((char*)l->back_arrow);
- X free((char*)l);
- X }
- END_OF_FILE
- if test 3264 -ne `wc -c <'fig2dev/free.c'`; then
- echo shar: \"'fig2dev/free.c'\" unpacked with wrong size!
- fi
- # end of 'fig2dev/free.c'
- fi
- if test -f 'fig2dev/iso2tex.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fig2dev/iso2tex.c'\"
- else
- echo shar: Extracting \"'fig2dev/iso2tex.c'\" \(3395 characters\)
- sed "s/^X//" >'fig2dev/iso2tex.c' <<'END_OF_FILE'
- X/*
- X * TransFig: Facility for Translating Fig code
- X * Copyright (c) 1985 Supoj Sutantavibul
- X * Copyright (c) 1991 Micah Beck
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both that
- X * copyright notice and this permission notice appear in supporting
- X * documentation. The authors make no representations about the suitability
- X * of this software for any purpose. It is provided "as is" without express
- X * or implied warranty.
- X *
- X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- X * PERFORMANCE OF THIS SOFTWARE.
- X *
- X */
- X
- X/* map ISO-Font Symbols to appropriate sequences in TeX */
- X/* Herbert Bauer 22.11.1991 */
- X
- X/* B.Raichle 12.10.92, changed some of the definitions */
- X
- X
- X/* B.Raichle 12.10.92, changed some of the definitions */
- X
- X
- Xchar *ISOtoTeX[] = /* starts at octal 240 */
- X{
- X "{}",
- X "{!`}", /* inverse ! */
- X "{}", /* cent sign (?) */
- X "\\pounds{}",
- X "{}", /* circle with x mark */
- X "{}", /* Yen */
- X "{}", /* some sort of space - doen't work under mwm */
- X "\\S{}", /* paragraph sign */
- X "\\\"{}", /* diaresis points */
- X "\\copyright{}",
- X "\\b{a}",
- X "\\mbox{$\\ll$}", /* << */
- X "{--}", /* longer dash - doesn't work with mwm */
- X "{-}", /* short dash */
- X "{}", /* trademark */
- X "{}", /* overscore */
- X/* 0xb0 */
- X "{\\lower.2ex\\hbox{\\char\\'27}}", /* degree */
- X "\\mbox{$\\pm$}", /* plus minus - math mode */
- X "\\mbox{$\\mathsurround 0pt{}^2$}", /* squared - math mode */
- X "\\mbox{$\\mathsurround 0pt{}^3$}", /* cubed - math mode */
- X "\\'{}", /* accent egue */
- X "\\mbox{$\\mu$}", /* greek letter mu - math mode */
- X "\\P{}", /* paragraph */
- X "\\mbox{$\\cdot$}", /* centered dot - math mode */
- X "",
- X "\\mbox{$\\mathsurround 0pt{}^1$}", /* superscript 1 - math mode */
- X "\\b{o}",
- X "\\mbox{$\\gg$}", /* >> */
- X "\\mbox{$1\\over 4$}", /* 1/4 - math mode */
- X "\\mbox{$1\\over 2$}", /* 1/2 - math mode */
- X "\\mbox{$3\\over 4$}", /* 3/4 - math mode */
- X "{?`}", /* inverse ? */
- X/* 0xc0 */
- X "\\`A",
- X "\\'A",
- X "\\^A",
- X "\\~A",
- X "\\\"A",
- X "\\AA{}",
- X "\\AE{}",
- X "\\c C",
- X "\\`E",
- X "\\'E",
- X "\\^E",
- X "\\\"E",
- X "\\`I",
- X "\\'I",
- X "\\^I",
- X "\\\"I",
- X/* 0xd0 */
- X "{\\rlap{\\raise.3ex\\hbox{--}}D}", /* Eth */
- X "\\~N",
- X "\\`O",
- X "\\'O",
- X "\\^O",
- X "\\~O",
- X "\\\"O",
- X "\\mbox{$\\times$}", /* math mode */
- X "\\O{}",
- X "\\`U",
- X "\\'U",
- X "\\^U",
- X "\\\"U",
- X "\\'Y",
- X "{}", /* letter P wide-spaced */
- X "\\ss{}",
- X/* 0xe0 */
- X "\\`a",
- X "\\'a",
- X "\\^a",
- X "\\~a",
- X "\\\"a",
- X "\\aa{}",
- X "\\ae{}",
- X "\\c c",
- X "\\`e",
- X "\\'e",
- X "\\^e",
- X "\\\"e",
- X "\\`\\i{}",
- X "\\'\\i{}",
- X "\\^\\i{}",
- X "\\\"\\i{}",
- X/* 0xf0 */
- X "\\mbox{$\\partial$}", /* correct? - math mode */
- X "\\~n",
- X "\\`o",
- X "\\'o",
- X "\\^o",
- X "\\~o",
- X "\\\"o",
- X "\\mbox{$\\div$}", /* math mode */
- X "\\o{}",
- X "\\`u",
- X "\\'u",
- X "\\^u",
- X "\\\"u",
- X "\\'y",
- X "{}", /* letter p wide-spaced */
- X "\\\"y"
- X};
- X
- END_OF_FILE
- if test 3395 -ne `wc -c <'fig2dev/iso2tex.c'`; then
- echo shar: \"'fig2dev/iso2tex.c'\" unpacked with wrong size!
- fi
- # end of 'fig2dev/iso2tex.c'
- fi
- if test -f 'fig2dev/pi.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fig2dev/pi.h'\"
- else
- echo shar: Extracting \"'fig2dev/pi.h'\" \(1169 characters\)
- sed "s/^X//" >'fig2dev/pi.h' <<'END_OF_FILE'
- X/*
- X * TransFig: Facility for Translating Fig code
- X * Copyright (c) 1985 Supoj Sutantavibul
- X * Copyright (c) 1991 Micah Beck
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both that
- X * copyright notice and this permission notice appear in supporting
- X * documentation. The authors make no representations about the suitability
- X * of this software for any purpose. It is provided "as is" without express
- X * or implied warranty.
- X *
- X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- X * PERFORMANCE OF THIS SOFTWARE.
- X *
- X */
- X
- X#ifndef M_PI
- X#define M_PI 3.14159265358979323846
- X#define M_PI_2 1.57079632679489661923
- X#endif
- END_OF_FILE
- if test 1169 -ne `wc -c <'fig2dev/pi.h'`; then
- echo shar: \"'fig2dev/pi.h'\" unpacked with wrong size!
- fi
- # end of 'fig2dev/pi.h'
- fi
- if test -f 'fig2dev/pic2tpic.script' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fig2dev/pic2tpic.script'\"
- else
- echo shar: Extracting \"'fig2dev/pic2tpic.script'\" \(1034 characters\)
- sed "s/^X//" >'fig2dev/pic2tpic.script' <<'END_OF_FILE'
- X#!/bin/sh
- Xsed -e '
- X s/\(\\f[^(]\)\(\\s[0-9]*\)/\2\1/g
- X s/\(\\f(..\)\(\\s[0-9]*\)/\2\1/g
- X s/"\([^"]*\)\\fP\([^"]*\)"/"\1\2"/g
- X s/"\([^"]*\)\\fR\([^"]*\)"/"\1\\rm \2"/g
- X s/"\([^"]*\)\\fI\([^"]*\)"/"\1\\it \2"/g
- X s/"\([^"]*\)\\fB\([^"]*\)"/"\1\\bf \2"/g
- X s/"\([^"]*\)\\fH\([^"]*\)"/"\1\\sf \2"/g
- X s/"\([^"]*\)\\fC\([^"]*\)"/"\1\\tt \2"/g
- X s/"\([^"]*\)\\f(CO\([^"]*\)"/"\1\\tt \2"/g
- X s/"\([^"]*\)\\f(CW\([^"]*\)"/"\1\\tt \2"/g
- X s/"\([^"]*\)\\s0\([^"]*\)"/"\1\2"/g
- X s/"\([^"]*\)\\s[56]\([^0-9][^"]*\)"/"\1\\tiny \2"/g
- X s/"\([^"]*\)\\s7\([^0-9][^"]*\)"/"\1\\scriptsize \2"/g
- X s/"\([^"]*\)\\s8\([^0-9][^"]*\)"/"\1\\footnotesize \2"/g
- X s/"\([^"]*\)\\s9\([^0-9][^"]*\)"/"\1\\small \2"/g
- X s/"\([^"]*\)\\s1[01]\([^"]*\)"/"\1\\normalsize \2"/g
- X s/"\([^"]*\)\\s1[23]\([^"]*\)"/"\1\\large \2"/g
- X s/"\([^"]*\)\\s1[4-6]\([^"]*\)"/"\1\\Large \2"/g
- X s/"\([^"]*\)\\s1[7-9]\([^"]*\)"/"\1\\LARGE \2"/g
- X s/"\([^"]*\)\\s2[0-3]\([^"]*\)"/"\1\\huge \2"/g
- X s/"\([^"]*\)\\s2[4-9]\([^"]*\)"/"\1\\Huge \2"/g
- X s/"\([^"]*\)\\s3[0-9]\([^"]*\)"/"\1\\Huge \2"/g
- X ' $*
- END_OF_FILE
- if test 1034 -ne `wc -c <'fig2dev/pic2tpic.script'`; then
- echo shar: \"'fig2dev/pic2tpic.script'\" unpacked with wrong size!
- fi
- # end of 'fig2dev/pic2tpic.script'
- fi
- if test -f 'fig2dev/strstr.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'fig2dev/strstr.c'\"
- else
- echo shar: Extracting \"'fig2dev/strstr.c'\" \(1384 characters\)
- sed "s/^X//" >'fig2dev/strstr.c' <<'END_OF_FILE'
- X/*
- X * TransFig: Facility for Translating Fig code
- X * Copyright (c) 1985 Supoj Sutantavibul
- X * Copyright (c) 1991 Micah Beck
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both that
- X * copyright notice and this permission notice appear in supporting
- X * documentation. The authors make no representations about the suitability
- X * of this software for any purpose. It is provided "as is" without express
- X * or implied warranty.
- X *
- X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- X * PERFORMANCE OF THIS SOFTWARE.
- X *
- X */
- X
- X#define NULL 0
- X
- X/*
- X * Find the first occurrence of s2 in s1.
- X */
- Xchar *
- Xstrstr(s1, s2)
- X register char *s1, *s2;
- X{
- X register int i, len, n;
- X
- X if (s2[0] == '\0')
- X return(s1);
- X len = strlen(s2);
- X n = strlen(s1) - len;
- X for (i = 0; i <= n; i++)
- X if (strcmp(s1 + i, s2) == 0)
- X return(s1 + i);
- X return(NULL);
- X}
- END_OF_FILE
- if test 1384 -ne `wc -c <'fig2dev/strstr.c'`; then
- echo shar: \"'fig2dev/strstr.c'\" unpacked with wrong size!
- fi
- # end of 'fig2dev/strstr.c'
- fi
- if test ! -d 'transfig' ; then
- echo shar: Creating directory \"'transfig'\"
- mkdir 'transfig'
- fi
- if test -f 'transfig/Imakefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'transfig/Imakefile'\"
- else
- echo shar: Extracting \"'transfig/Imakefile'\" \(642 characters\)
- sed "s/^X//" >'transfig/Imakefile' <<'END_OF_FILE'
- X# TransFig : Fig code translation Makefile creation program
- X#
- X# Micah Beck
- X#
- X
- XDEPLIBS =
- XINCLUDES = -I..
- X
- XSRCS = transfig.c txfile.c mkfile.c sys.c
- XOBJS = transfig.o txfile.o mkfile.o sys.o
- X
- XComplexProgramTarget(transfig)
- X
- Xall:: transfig.man fig2dev.man fig2ps2tex.man pic2tpic.man
- X
- Xtransfig.man: ../doc/transfig.1
- X ln -s ../doc/transfig.1 transfig.man
- X
- XInstallManPage(fig2ps2tex,$(MANDIR))
- XInstallManPage(pic2tpic,$(MANDIR))
- X
- Xfig2dev.man: ../doc/fig2dev.1
- X ln -s ../doc/fig2dev.1 fig2dev.man
- X
- Xfig2ps2tex.man: ../doc/fig2ps2tex.1
- X ln -s ../doc/fig2ps2tex.1 fig2ps2tex.man
- X
- Xpic2tpic.man: ../doc/pic2tpic.1
- X ln -s ../doc/pic2tpic.1 pic2tpic.man
- END_OF_FILE
- if test 642 -ne `wc -c <'transfig/Imakefile'`; then
- echo shar: \"'transfig/Imakefile'\" unpacked with wrong size!
- fi
- # end of 'transfig/Imakefile'
- fi
- if test -f 'transfig/sys.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'transfig/sys.c'\"
- else
- echo shar: Extracting \"'transfig/sys.c'\" \(1933 characters\)
- sed "s/^X//" >'transfig/sys.c' <<'END_OF_FILE'
- X/*
- X * TransFig: Facility for Translating Fig code
- X * Copyright (c) 1985 Supoj Sutantavibul
- X * Copyright (c) 1991 Micah Beck
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both that
- X * copyright notice and this permission notice appear in supporting
- X * documentation. The authors make no representations about the suitability
- X * of this software for any purpose. It is provided "as is" without express
- X * or implied warranty.
- X *
- X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- X * PERFORMANCE OF THIS SOFTWARE.
- X *
- X */
- X
- X#include <stdio.h>
- X#include "transfig.h"
- X
- X#define MAXSYS 10000
- Xstatic char sysbuf[MAXSYS];
- X
- Xchar *sysls()
- X{
- X FILE *ls;
- X int i;
- X char c;
- X
- X ls = popen("/bin/ls *.fig", "r");
- X i = 0;
- X c = fgetc(ls);
- X while (c != EOF & i < MAXSYS-1)
- X {
- X sysbuf[i] = c;
- X i += 1;
- X c = fgetc(ls);
- X }
- X sysbuf[i] = '\0';
- X return sysbuf;
- X}
- X
- Xsysmv(f)
- Xchar *f;
- X{
- X sprintf(sysbuf, "%s~", f);
- X unlink(sysbuf);
- X if (!link(f, sysbuf)) unlink(f);
- X}
- X
- Xchar *strip(str, suf)
- Xchar *str, *suf;
- X{
- X char *p1, *p2;
- X
- X for (p1 = &str[strlen(str)-1], p2 = &suf[strlen(suf)-1];
- X (p1 >= str && p2 >= suf) && (*p1 == *p2);
- X --p1, --p2);
- X
- X if (p2 < suf)
- X {
- X *(p1+1) = '\0';
- X return str;
- X } else
- X return NULL;
- X}
- X
- Xchar *mksuff(name, suff)
- Xchar *name, *suff;
- X{
- X char *temp;
- X
- X temp = (char *)malloc(strlen(name)+strlen(suff)+1);
- X strcpy(temp, name);
- X strcat(temp, suff);
- X return temp;
- X}
- END_OF_FILE
- if test 1933 -ne `wc -c <'transfig/sys.c'`; then
- echo shar: \"'transfig/sys.c'\" unpacked with wrong size!
- fi
- # end of 'transfig/sys.c'
- fi
- if test -f 'transfig/transfig.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'transfig/transfig.h'\"
- else
- echo shar: Extracting \"'transfig/transfig.h'\" \(1928 characters\)
- sed "s/^X//" >'transfig/transfig.h' <<'END_OF_FILE'
- X/*
- X * TransFig: Facility for Translating Fig code
- X * Copyright (c) 1985 Supoj Sutantavibul
- X * Copyright (c) 1991 Micah Beck
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both that
- X * copyright notice and this permission notice appear in supporting
- X * documentation. The authors make no representations about the suitability
- X * of this software for any purpose. It is provided "as is" without express
- X * or implied warranty.
- X *
- X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- X * PERFORMANCE OF THIS SOFTWARE.
- X *
- X */
- X
- X#ifdef SYSV
- X#include <string.h>
- X#else
- X#include <strings.h>
- X#define strchr index
- X#define strrchr rindex
- X#endif
- X
- X/*
- X * converters program names
- X */
- X#define FIG2DEV "fig2dev"
- X#define PIC2FIG "pic2fig"
- X#define APG2FIG "apgto f"
- X
- X/*
- X * filename defaults
- X */
- X#define MK "Makefile"
- X#define TX "transfig.tex"
- X
- Xenum language {box, epic, eepic, eepicemu, latex,
- X pictex, postscript, psfig, pstex, textyl, tpic};
- X#define MAXLANG tpic
- X
- Xenum input {apg, fig, pic, ps};
- X#define MAXINPUT xps
- X
- Xtypedef struct argument{
- X char *name, *interm, *f, *s, *m, *o, *tofig, *topic, *tops;
- X enum language tolang;
- X enum input type;
- X struct argument *next;
- X} argument ;
- X
- Xextern enum language str2lang();
- Xextern char *lname[];
- Xextern char *iname[];
- X
- Xextern char *sysls(), *mksuff();
- Xextern argument *arglist;
- Xextern char *txfile, *mkfile;
- X
- Xextern char *optarg;
- Xextern int optind;
- X
- END_OF_FILE
- if test 1928 -ne `wc -c <'transfig/transfig.h'`; then
- echo shar: \"'transfig/transfig.h'\" unpacked with wrong size!
- fi
- # end of 'transfig/transfig.h'
- fi
- if test -f 'transfig/txfile.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'transfig/txfile.c'\"
- else
- echo shar: Extracting \"'transfig/txfile.c'\" \(3083 characters\)
- sed "s/^X//" >'transfig/txfile.c' <<'END_OF_FILE'
- X/*
- X * TransFig: Facility for Translating Fig code
- X * Copyright (c) 1985 Supoj Sutantavibul
- X * Copyright (c) 1991 Micah Beck
- X *
- X * Permission to use, copy, modify, distribute, and sell this software and its
- X * documentation for any purpose is hereby granted without fee, provided that
- X * the above copyright notice appear in all copies and that both that
- X * copyright notice and this permission notice appear in supporting
- X * documentation. The authors make no representations about the suitability
- X * of this software for any purpose. It is provided "as is" without express
- X * or implied warranty.
- X *
- X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- X * PERFORMANCE OF THIS SOFTWARE.
- X *
- X */
- X
- X#include <stdio.h>
- X#include "transfig.h"
- X
- X/*
- X * create appropriate .tex file
- X */
- Xtexfile(tx, in, arg_list)
- XFILE *tx;
- Xchar *in;
- Xargument *arg_list;
- X{
- X enum language to;
- X argument *a, *arg_l;
- X int texfonts = 1; /* do we use TeX fonts for output? */
- X
- X for (a = arglist; a; a = a->next) {
- X to = a->tolang;
- X
- X /* see if we already have this language */
- X for (arg_l = arglist; arg_l != a; arg_l = arg_l->next)
- X if ( arg_l->tolang == to ) break;
- X
- X if ( arg_l == a )
- X switch (to)
- X {
- X case box:
- X fprintf(tx, "\\typeout{TransFig: null figures.}\n");
- X texfonts = 0;
- X break;
- X
- X case eepicemu:
- X to = eepicemu;
- X
- X case eepic:
- X#ifdef eemulation
- X to = eepicemu;
- X#endif
- X
- X case epic:
- X fprintf(tx, "\\typeout{TransFig: figures in %s.}\n",
- X lname[(int)to]);
- X if (to == eepicemu || to == eepic)
- X fprintf(tx, "\\documentstyle{epic}");
- X fprintf(tx, "\\documentstyle{%s}\n", lname[(int)to]);
- X break;
- X
- X case latex:
- X fprintf(tx, "\\typeout{TransFig: figures in LaTeX.}\n");
- X break;
- X
- X case pictex:
- X fprintf(tx, "\\typeout{TransFig: figures in PiCTeX.}\n");
- X fprintf(tx, "\
- X\\ifx\\fivrm\\undefined\n\
- X \\font\\fivrm=cmr5\\relax\n\
- X\\fi\n\
- X\\input{prepictex}\n\
- X\\input{pictex}\n\
- X\\input{postpictex}\n");
- X break;
- X
- X case postscript:
- X fprintf(tx, "\\typeout{TransFig: figures in PostScript.}\n");
- X texfonts = 0;
- X break;
- X
- X case pstex:
- X fprintf(tx, "\\typeout{TransFig: figure text in LaTeX.}\n");
- X fprintf(tx, "\\typeout{TransFig: figures in PostScript.}\n");
- X break;
- X
- X case psfig:
- X fprintf(tx, "\\typeout{TransFig: figures in PostScript w/psfig.}\n");
- X fprintf(tx, "\\documentstyle{psfig}\n");
- X texfonts = 0;
- X break;
- X
- X case textyl:
- X fprintf(tx, "\\typeout{TransFig: figures in TeXtyl.}\n");
- X break;
- X
- X case tpic:
- X fprintf(tx, "\\typeout{TransFig: figures in tpic.}\n");
- X texfonts = 0;
- X break;
- X
- X default:
- X fprintf(tx, "Unknown graphics language %s\n", lname[(int)to]);
- X exit(1);
- X break;
- X
- X }
- X }
- X
- X if (*in) fprintf(tx, "\n\\input{%s}\n", in);
- X
- X fprintf(tx, "\n\\endinput\n");
- X}
- END_OF_FILE
- if test 3083 -ne `wc -c <'transfig/txfile.c'`; then
- echo shar: \"'transfig/txfile.c'\" unpacked with wrong size!
- fi
- # end of 'transfig/txfile.c'
- fi
- echo shar: End of archive 1 \(of 7\).
- cp /dev/null ark1isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 7 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-