home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume27 / transfig-2.1.8 / part01 next >
Text File  |  1993-10-05  |  78KB  |  2,390 lines

  1. Newsgroups: comp.sources.unix
  2. From: envbvs@epb12.lbl.gov (Brian V. Smith)
  3. Subject: v27i055: transfig-2.1.8 - a set of tools for creating TeX documents with graphics, Part01/07
  4. Message-id: <1.749903574.10622@gw.home.vix.com>
  5. Sender: unix-sources-moderator@gw.home.vix.com
  6. Approved: vixie@gw.home.vix.com
  7.  
  8. Submitted-By: envbvs@epb12.lbl.gov (Brian V. Smith)
  9. Posting-Number: Volume 27, Issue 55
  10. Archive-Name: transfig-2.1.8/part01
  11.  
  12. This is TransFig version 2.1 patchlevel 8.
  13.  
  14. TransFig is a set of tools for creating TeX documents with graphics which
  15. are portable, in the sense that they can be printed in a wide variety of
  16. environments.
  17.  
  18. The transfig directory contains the source for the transfig command which
  19. generates a Makefile which translates Fig code to various graphics
  20. description languages using the fig2dev program.  In previous releases,
  21. this command was implemented as a shell script.
  22.  
  23. The fig2dev directory contains a general program for translating from Fig
  24. code to other graphics desciption languages.  The dev subdirectory contains
  25. a library of output drivers used by fig2dev.
  26.  
  27. Drivers currently exist for the following graphics langauges: (E)EPIC
  28. macros, LaTeX picture environment, PIC, PiCTeX, PostScript, and TeXtyl.
  29. Fig2dev can be configured with a subset of these drivers
  30.  
  31. I have taken over the maintenance of TransFig from Micah Beck so please
  32. send any bug notices, fixes, contributions etc to me at bvsmith@lbl.gov.
  33.  
  34. - Brian V. Smith
  35. - Lawrence Berkeley Laboratory
  36.  
  37.  ----------------------------------------------------------------------------
  38. Transfig version 2.1.8 (Oct 1, 1993)
  39. Changes from 2.1.7:
  40.  
  41. New Features:
  42.  
  43. Bugs fixed:
  44.  
  45. o thick line threshold increased from 1 to 2 for latex lines
  46. o save/restore wraps EPS objects now
  47. o specifing nonexistant font with -f caused coredump
  48.     from Gordon W. Ross (gwr@jericho.mc.com)
  49. o newpath command given before EPS object for PostScript output
  50. o moved definition of SetFigFont to better place 
  51.     from Bernd Raichle (raichle@isr.uni-stuttgart.de)
  52. o #included sys/types for BSD4_3 systems in genps.c 
  53. o bug in eepic output - SetFigFont was being defined inside a \put
  54.     from Vivek Khera (khera@cs.duke.edu)
  55. o BoundingBox for EPS objects can be floating values
  56. o shortened file name (fig2dev/dev/)def_setfigfont.c to setfigfont.c
  57. o distribution version of fig2dev/dev/Makefile had (def_)setfigfont.c
  58.     instead of (def_)setfigfont.o in LIBOBJS definition
  59. o SUBDIR fig2dev/dev was missing from top-level Imakefile caused problems
  60.     where make would say something like "No rule to make target 
  61.     dev/libtransfig.a"
  62.  
  63. #! /bin/sh
  64. # This is a shell archive.  Remove anything before this line, then unpack
  65. # it by saving it into a file and typing "sh file".  To overwrite existing
  66. # files, type "sh file -c".  You can also feed this as standard input via
  67. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  68. # will see the following message at the end:
  69. #        "End of archive 1 (of 7)."
  70. # Contents:  CHANGES Imakefile NOTES README copyright doc
  71. #   doc/fig2ps2tex.1 doc/manual doc/pic2tpic.1 doc/transfig.1 fig2dev
  72. #   fig2dev/Imakefile fig2dev/alloc.h fig2dev/arrow.c fig2dev/dev
  73. #   fig2dev/dev/Imakefile fig2dev/dev/def_setfigfont.c
  74. #   fig2dev/dev/genbox.c fig2dev/dev/picfonts.h
  75. #   fig2dev/dev/picpsfonts.h fig2dev/dev/psfonts.h
  76. #   fig2dev/dev/setfigfont.c fig2dev/dev/texfonts.c
  77. #   fig2dev/dev/texfonts.h fig2dev/drivers.h fig2dev/fig2dev.h
  78. #   fig2dev/fig2ps2tex.script fig2dev/free.c fig2dev/iso2tex.c
  79. #   fig2dev/pi.h fig2dev/pic2tpic.script fig2dev/strstr.c transfig
  80. #   transfig/Imakefile transfig/sys.c transfig/transfig.h
  81. #   transfig/txfile.c
  82. # Wrapped by envbvs@epb12.lbl.gov.lbl.gov on Fri Oct  1 14:55:44 1993
  83. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  84. if test -f 'CHANGES' -a "${1}" != "-c" ; then 
  85.   echo shar: Will not clobber existing file \"'CHANGES'\"
  86. else
  87. echo shar: Extracting \"'CHANGES'\" \(3719 characters\)
  88. sed "s/^X//" >'CHANGES' <<'END_OF_FILE'
  89. XTransfig version 2.1.8 (Oct 1, 1993)
  90. XChanges from 2.1.7:
  91. X
  92. XNew Features:
  93. X
  94. XBugs fixed:
  95. X
  96. Xo thick line threshold increased from 1 to 2 for latex lines
  97. Xo save/restore wraps EPS objects now
  98. Xo specifing nonexistant font with -f caused coredump
  99. X    from Gordon W. Ross (gwr@jericho.mc.com)
  100. Xo newpath command given before EPS object for PostScript output
  101. Xo moved definition of SetFigFont to better place 
  102. X    from Bernd Raichle (raichle@isr.uni-stuttgart.de)
  103. Xo #included sys/types for BSD4_3 systems in genps.c 
  104. Xo bug in eepic output - SetFigFont was being defined inside a \put
  105. X    from Vivek Khera (khera@cs.duke.edu)
  106. Xo BoundingBox for EPS objects can be floating values
  107. Xo shortened file name (fig2dev/dev/)def_setfigfont.c to setfigfont.c
  108. Xo distribution version of fig2dev/dev/Makefile had (def_)setfigfont.c
  109. X    instead of (def_)setfigfont.o in LIBOBJS definition
  110. Xo SUBDIR fig2dev/dev was missing from top-level Imakefile caused problems
  111. X    where make would say something like "No rule to make target 
  112. X    dev/libtransfig.a"
  113. X
  114. X---------------------------------------------------------------------------
  115. XTransfig version 2.1.7
  116. XChanges from 2.1.6:
  117. X
  118. Xo no longer writes over input file if there is an error in the command line
  119. Xo added "%%Orientation: Landscape" comment for PostScript output in landscape
  120. X    orientation
  121. Xo moved definition of SetFigFont from transfig into genpstex.c so that there
  122. X    is no need to run transfig for pstex output
  123. Xo script pic2tpic was generating \ss instead of \sf for \fH
  124. X    from Mark Roth (mroth@afit.af.mil)
  125. Xo changed header for Encapsulated postscript files from "%!PS-Adobe-2.0 EPSF"
  126. X    to "%!PS-Adobe-2.0 EPSF-2.0" which allows FrameMaker and ghostview to
  127. X    read them properly.
  128. X    from Vivek Khera (khera@cs.duke.edu)
  129. Xo check for #ifdef SYSV to include string.h instead of strings.h in 
  130. X    fig2dev/dev/genibmgl.c
  131. Xo changed EXTRA_LIBRARIES to SYS_LIBRARIES in fig2dev/Imakefile so wouldn't 
  132. X    clobber system-dependent flags in EXTRA_LIBRARIES
  133. Xo fprintf and 'else' missing from genepic which caused incorrect information 
  134. X    to be generated when drawing arcs using epic output
  135. Xo removed dependencies on the X libraries (Imakefiles and Makefiles)
  136. Xo SGI machines had trouble with hypot() which caused arrow heads to mess up
  137. X    from Malcolm Davis (davis@nod.bms.com)
  138. Xo Flipped EPS objects were incorrectly flipped on output
  139. X    from Brian Boyter (boyter@pyrdc.va.pyramid.com)
  140. Xo POLYLINES were being drawn in sections (10 points per section) which 
  141. X    resulted in incorrect dashed line lengths and only one section 
  142. X    filled if area fill was on
  143. X    from Peter Egelberg (egel@neural.se)
  144. Xo added Sequent machines and Suns with SunOs < 4.1 to list of machines that
  145. X    don't have strstr()
  146. X    from Scott Erikson (sources@ics.uci.edu)
  147. Xo removed PATCHLEVEL from patchlevel.h file - version number is complete with 
  148. X    three parts (e.g. 2.1.6)
  149. Xo removed "extern coord_system" from fig2dev.h (wasn't used by fig2dev)
  150. Xo SPECIAL_CHAR split into three strings for systems which can't handle one
  151. Xo -P flag dissappeared from eepic output language - reinstated
  152. X
  153. X---------------------------------------------------------------------------
  154. XVersion 2.1.6
  155. XChanges from 2.1.5:
  156. X
  157. Xo Courier-BoldItalic changed to Courier-BoldOblique for PostScript fonts
  158. Xo "if" statement replaces copysign() call since some machines don't have it
  159. Xo some backslashes ('\') corrected in printf statements in transfig/mkfile.c and
  160. X    fig2dev/iso2tex.c
  161. Xo changed header for postscript files from "%!" to "%!PS-Adobe-2.0" when using
  162. X    -P (showpage) option and "%!PS-Adobe-2.0 EPSF" otherwise (Encapsulated)
  163. Xo corrupt transfig/Imakefile and typo (SCRS instead of SRCS)
  164. Xo some variables (cur_thickness and coord_system) were multiply defined in 
  165. X    various drivers in fig2dev/dev - made those static
  166. END_OF_FILE
  167. if test 3719 -ne `wc -c <'CHANGES'`; then
  168.     echo shar: \"'CHANGES'\" unpacked with wrong size!
  169. fi
  170. # end of 'CHANGES'
  171. fi
  172. if test -f 'Imakefile' -a "${1}" != "-c" ; then 
  173.   echo shar: Will not clobber existing file \"'Imakefile'\"
  174. else
  175. echo shar: Extracting \"'Imakefile'\" \(419 characters\)
  176. sed "s/^X//" >'Imakefile' <<'END_OF_FILE'
  177. X#
  178. X# Top level Makefile for TransFig
  179. X#
  180. X# to make fig2dev:         type "make"
  181. X#
  182. X#define IHaveSubdirs
  183. X#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
  184. X
  185. XDEPLIBS =
  186. XSUBDIRS = transfig fig2dev/dev fig2dev
  187. XMakeSubdirs($(SUBDIRS))
  188. XDependSubdirs($(SUBDIRS))
  189. X
  190. Xmanual: 
  191. X
  192. Xtransfig.man: ../doc/transfig.1
  193. X    ln -s ../doc/transfig.1 transfig.man
  194. X    cd doc/manual; make; latex manual; latex manual
  195. X
  196. Xclean::
  197. X    cd doc/manual; make clean
  198. END_OF_FILE
  199. if test 419 -ne `wc -c <'Imakefile'`; then
  200.     echo shar: \"'Imakefile'\" unpacked with wrong size!
  201. fi
  202. # end of 'Imakefile'
  203. fi
  204. if test -f 'NOTES' -a "${1}" != "-c" ; then 
  205.   echo shar: Will not clobber existing file \"'NOTES'\"
  206. else
  207. echo shar: Extracting \"'NOTES'\" \(2145 characters\)
  208. sed "s/^X//" >'NOTES' <<'END_OF_FILE'
  209. XA brief history of Fig translation programs.
  210. X
  211. XFig2dev is derived from f2p, the original program written by the author of Fig,
  212. XSupoj Sutanthavibul of the University of Texas at Austin, to translate Fig
  213. Xcode to PIC.  The devlopment is somewhat complex.
  214. X
  215. XSupoj adapted f2p for PostScript ouput: f2ps.
  216. X
  217. XMicah Beck adapted f2p for PiCTeX output: fig2tex.
  218. X
  219. XFrank Schmuck, then a graduate student at Cornell, adapted fig2tex for
  220. XLaTeX picture environment output: fig2latex.
  221. X
  222. XFrank also enhanced Fig, giving us Fig-FS.  Micah in turn extended the
  223. Xdefinition of Fig code and added corresponding features to Fig-FS.
  224. XMicah implemented this extension (TFX) in fig2tex, and in fig2ps, which
  225. Xis an adaption of f2ps.
  226. X
  227. XConrad Kwok, then of the University of California at Davis, adapted
  228. Xfig2tex for (E)EPIC output: fig2epic.
  229. X
  230. XHe also enhanced f2p to support the TFX extension: fig2pic.
  231. X
  232. XMicah then reorganized the five programs named fig2* into drivers for
  233. Xa single tranlation program: fig2dev.
  234. X
  235. XAs of October 1992, I have taken over the maintenence and distribution of 
  236. Xthe TransFig package from Micah.
  237. X
  238. X***************************************************************************
  239. XPlease refer any questions/bug fixes/contributions etc. about TransFig or 
  240. Xxfig to me.
  241. X
  242. XBrian Smith
  243. XLawrence Berkeley Laboratory
  244. Xbvsmith@lbl.gov
  245. XOctober 1992
  246. X***************************************************************************
  247. X
  248. XNote that although I work at Lawrence Berkeley Laboratory (LBL) I don't speak 
  249. Xfor LBL nor do I represent LBL with respect to my work on TransFig and xfig,
  250. Xnor does LBL make any representations about the suitability of this software 
  251. Xfor any purpose.
  252. XHere is the legal part:
  253. X
  254. XTHE LAWRENCE BERKELEY LABORATORY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 
  255. XSOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  256. XEVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 
  257. XDAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 
  258. XWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 
  259. XOUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  260. X
  261. END_OF_FILE
  262. if test 2145 -ne `wc -c <'NOTES'`; then
  263.     echo shar: \"'NOTES'\" unpacked with wrong size!
  264. fi
  265. # end of 'NOTES'
  266. fi
  267. if test -f 'README' -a "${1}" != "-c" ; then 
  268.   echo shar: Will not clobber existing file \"'README'\"
  269. else
  270. echo shar: Extracting \"'README'\" \(2490 characters\)
  271. sed "s/^X//" >'README' <<'END_OF_FILE'
  272. XTo make TransFig:
  273. X
  274. X1. Do a "make Makefiles"
  275. X2. Do a "make install" to create the executables and install them in the system
  276. X  or
  277. X   do a "make" to create the executables only
  278. X3. Do a "make install.man" to put the manual pages in the proper directories
  279. X
  280. X------------------------------------------------------------------------------------
  281. XGeneral information:
  282. X
  283. XTransFig is a set of tools for creating TeX documents with graphics
  284. Xwhich are portable, in the sense that they can be printed in a wide
  285. Xvariety of environments.
  286. X
  287. XThe transfig directory contains the source for the transfig command
  288. Xwhich generates a Makefile which translates Fig code to various graphics
  289. Xdescription languages using the fig2dev program.  In previous releases,
  290. Xthis command was implemented as a shell script.
  291. X
  292. XThe fig2dev directory contains a general program for translating from
  293. XFig code to other graphics desciption languages.  The dev subdirectory
  294. Xcontains a library of output drivers used by fig2dev.
  295. X
  296. XDrivers currently exist for the following graphics langauges:
  297. X(E)EPIC macros, LaTeX picture environment, PIC, PiCTeX, PostScript, and TeXtyl.
  298. XFig2dev can be configured with a subset of these drivers
  299. X
  300. XThe doc directory contains man pages for fig2dev and for the transfig command.
  301. XThe subdirectory doc/manual contains a manual for using TransFig to create
  302. Xdocuments with portable graphics.  The manual also contains a reference
  303. Xguide describing Fig code in detail, and a description of TFX, an extension to
  304. XFig code which is supported by the translators in this package.
  305. X
  306. XMicah Beck                
  307. XDept of Computer Science
  308. XCornell University
  309. X
  310. X1 May 1990
  311. X----------
  312. XVersion 2.0 note: The PostScript translation implemented by fig2dev
  313. Xnow supports both the TFX version of Fig code and the V2.0, the dialect
  314. Xused by XFig Version 2.0.  The other translations support only TFX.
  315. X
  316. X1 September 1990
  317. X----------------
  318. XVersion 2.1 note: fig2dev now supports Fig code V2.1, which implements
  319. Xthe features of both TFX and V2.0.  V2.1 has some options which are
  320. Ximplemented only in the PS output mode, most notably the use of PS font
  321. Xnames in specifying text objects.  However, unlike V2.0, this feature
  322. Xis optional in V2.1; TFX-style font specifiers are also supported and
  323. Xcan be translated in all output modes.  TFX and V2.0 are still supported.
  324. X
  325. X********************************
  326. XPROBLEMS and POSSIBLE SOLUTIONS:
  327. X********************************
  328. X
  329. XSolaris 2.x users:
  330. X
  331. XYou must use the /usr/ucb/cc compiler because gethosename() is used.
  332. END_OF_FILE
  333. if test 2490 -ne `wc -c <'README'`; then
  334.     echo shar: \"'README'\" unpacked with wrong size!
  335. fi
  336. # end of 'README'
  337. fi
  338. if test -f 'copyright' -a "${1}" != "-c" ; then 
  339.   echo shar: Will not clobber existing file \"'copyright'\"
  340. else
  341. echo shar: Extracting \"'copyright'\" \(1075 characters\)
  342. sed "s/^X//" >'copyright' <<'END_OF_FILE'
  343. X/*
  344. X * TransFig: Facility for Translating Fig code
  345. X * Copyright (c) 1985 Supoj Sutantavibul
  346. X * Copyright (c) 1991 Micah Beck
  347. X *
  348. X * Permission to use, copy, modify, distribute, and sell this software and its
  349. X * documentation for any purpose is hereby granted without fee, provided that
  350. X * the above copyright notice appear in all copies and that both that
  351. X * copyright notice and this permission notice appear in supporting
  352. X * documentation. The authors make no representations about the suitability 
  353. X * of this software for any purpose.  It is provided "as is" without express 
  354. X * or implied warranty.
  355. X *
  356. X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  357. X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  358. X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  359. X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  360. X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  361. X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  362. X * PERFORMANCE OF THIS SOFTWARE.
  363. X *
  364. X */
  365. X
  366. END_OF_FILE
  367. if test 1075 -ne `wc -c <'copyright'`; then
  368.     echo shar: \"'copyright'\" unpacked with wrong size!
  369. fi
  370. # end of 'copyright'
  371. fi
  372. if test ! -d 'doc' ; then
  373.     echo shar: Creating directory \"'doc'\"
  374.     mkdir 'doc'
  375. fi
  376. if test -f 'doc/fig2ps2tex.1' -a "${1}" != "-c" ; then 
  377.   echo shar: Will not clobber existing file \"'doc/fig2ps2tex.1'\"
  378. else
  379. echo shar: Extracting \"'doc/fig2ps2tex.1'\" \(963 characters\)
  380. sed "s/^X//" >'doc/fig2ps2tex.1' <<'END_OF_FILE'
  381. X.TH FIG2PS2TEX 1 "14 Mar 1991"
  382. X.SH NAME
  383. Xfig2ps2tex - generate a TeX file for including a PostScript file
  384. X
  385. X.SH SYNOPSIS
  386. X.B fig2ps2tex
  387. X.I file
  388. X
  389. X.SH DESCRIPTION
  390. X.PP
  391. X.I Fig2ps2tex
  392. Xgenerates a TeX file for including a PostScript file in a TeX document.
  393. XThis involves calculating the bounding box from the Postscript document.
  394. XThe TeX inclusion file is written to stdout.
  395. X.PP
  396. XNote that the
  397. X.I psfig
  398. Xmacro package provides a more sophisticated approach to including
  399. XPostscript files in LaTeX docuements.
  400. X.I Fig2ps2tex
  401. Xworks with plain TeX however.
  402. X
  403. X.SH USAGE
  404. X.PP
  405. XAssume the Postscript file is called
  406. X.I foo.ps .
  407. XThe command
  408. X
  409. X.ce
  410. X% fig2ps2tex foo.ps >foo.tex
  411. X
  412. Xwill create the inclusion file with bounding information.
  413. XThen include this file in your TeX document with the command
  414. X
  415. X.ce
  416. X\einput{foo}
  417. X
  418. X.SH "SEE ALSO"
  419. Xpsfig(1),
  420. Xlatex(1),
  421. Xf2ps(1),
  422. Xfig2dev(1),
  423. Xtransfig(1).
  424. X
  425. X.SH AUTHOR
  426. XMicah Beck
  427. X.br
  428. XCornell University
  429. X
  430. XMan page by George Ferguson, ferguson@cs.rochester.edu.
  431. X
  432. END_OF_FILE
  433. if test 963 -ne `wc -c <'doc/fig2ps2tex.1'`; then
  434.     echo shar: \"'doc/fig2ps2tex.1'\" unpacked with wrong size!
  435. fi
  436. # end of 'doc/fig2ps2tex.1'
  437. fi
  438. if test ! -d 'doc/manual' ; then
  439.     echo shar: Creating directory \"'doc/manual'\"
  440.     mkdir 'doc/manual'
  441. fi
  442. if test -f 'doc/pic2tpic.1' -a "${1}" != "-c" ; then 
  443.   echo shar: Will not clobber existing file \"'doc/pic2tpic.1'\"
  444. else
  445. echo shar: Extracting \"'doc/pic2tpic.1'\" \(1418 characters\)
  446. sed "s/^X//" >'doc/pic2tpic.1' <<'END_OF_FILE'
  447. X.TH PIC2TPIC 1 "14 Mar 1991"
  448. X.SH NAME
  449. Xpic2tpic - Convert pic files to tpic format
  450. X
  451. X.SH SYNOPSIS
  452. X.B pic2tpic
  453. X[ files ]
  454. X
  455. X.SH DESCRIPTION
  456. X.PP
  457. X.B Pic2tpic
  458. Xreads the
  459. X.B pic
  460. Xfiles given on the command line (or stdin if none are given) and
  461. Xwrites their 
  462. X.B tpic
  463. Xequivalent to stdout.
  464. X
  465. X.SH "SEE ALSO"
  466. Xtpic(1),
  467. Xfig2dev(1),
  468. Xtransfig(1).
  469. X.SH COPYRIGHT
  470. XCopyright (c) 1985 Supoj Sutantavibul
  471. X.br
  472. XCopyright (c) 1991 Micah Beck
  473. X.LP
  474. XPermission to use, copy, modify, distribute, and sell this software and its
  475. Xdocumentation for any purpose is hereby granted without fee, provided that
  476. Xthe above copyright notice appear in all copies and that both that
  477. Xcopyright notice and this permission notice appear in supporting
  478. Xdocumentation. The authors make no representations about the suitability 
  479. Xof this software for any purpose.  It is provided "as is" without express 
  480. Xor implied warranty.
  481. X.LP
  482. XTHE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  483. XINCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  484. XEVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  485. XCONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  486. XDATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  487. XTORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  488. XPERFORMANCE OF THIS SOFTWARE.
  489. X.SH AUTHOR
  490. XMicah Beck
  491. X.br
  492. XCornell University
  493. X
  494. XMan page by George Ferguson, ferguson@cs.rochester.edu.
  495. END_OF_FILE
  496. if test 1418 -ne `wc -c <'doc/pic2tpic.1'`; then
  497.     echo shar: \"'doc/pic2tpic.1'\" unpacked with wrong size!
  498. fi
  499. # end of 'doc/pic2tpic.1'
  500. fi
  501. if test -f 'doc/transfig.1' -a "${1}" != "-c" ; then 
  502.   echo shar: Will not clobber existing file \"'doc/transfig.1'\"
  503. else
  504. echo shar: Extracting \"'doc/transfig.1'\" \(3279 characters\)
  505. sed "s/^X//" >'doc/transfig.1' <<'END_OF_FILE'
  506. X.TH TRANSFIG 1 "1 Sept 1990"
  507. X.SH NAME
  508. Xtransfig \- creates a makefile for portable LaTeX figures
  509. X.SH SYNOPSIS
  510. X.B transfig
  511. X[ -L \fIlanguage\fR ]
  512. X[ -M \fImakefile\fR ]
  513. X[ -T \fItexfile\fR ]
  514. X[ -I \fImacrofile\fR ]
  515. X[ -V ] 
  516. X[ \fIcontrol_specs\fR figfile ... ] ...]
  517. X.SH DESCRIPTION
  518. X.I Transfig
  519. Xcreates a makefile to translate figures described in Fig code, PostScript,
  520. Xor PIC into a specified LaTeX graphics \fIlanguage\fR.
  521. XPostScript and PIC files are identified by the suffixes ".ps" and ".pic"
  522. Xrespectively;
  523. XFig files can be specified either with or without the suffix ".fig" .
  524. XTransfig also creates a TeX macro file appropriate to the target language.
  525. X.SH OPTIONS
  526. XThe \fIlanguage\fR specifier must be either
  527. X.T
  528. X.BR epic ,
  529. X.BR eepic ,
  530. X.BR eepicemu ,
  531. X.BR latex ,
  532. X.BR pictex ,
  533. X.BR ps ,
  534. X.BR psfig ,
  535. X.BR pstex ,
  536. X.BR textyl ,
  537. X.BR tpic ,
  538. Xor
  539. X.BR null .
  540. XThe specifier
  541. X.B psfig
  542. Xis like the 
  543. X.B ps
  544. Xspecifier, except that it
  545. Xmake use of the psfig macro package.
  546. XThe specifier
  547. X.B pstex
  548. Xis like
  549. X.B psfig,
  550. Xexcept that it uses LaTeX to process formatted (special) text.
  551. XThe specifier 
  552. X.B null
  553. Xresults in the figures being replaced by empty boxes of the
  554. Xappropriate size.
  555. XIf no language is specified,
  556. X.B epic
  557. Xis the default.
  558. X.PP
  559. XThe names of the makefile and TeX macro file can be set with the
  560. X-M and -T options.
  561. XThe default names are "Makefile" and "transfig.tex", respectively.
  562. XIf the -I option is specified, then a command to read in \fImacrofile\fR is
  563. X    inserted into the TeX macro file.
  564. XIf the -V option is specified, the program version number is printed only.
  565. X.PP
  566. XControl specifiers are 
  567. X.TP
  568. X\fB\-m\fI mag\fR
  569. Xset the magnification at which the figure is rendered (default 1.0).
  570. X.TP
  571. X\fB\-f\fI font\fR
  572. Xset the default font family used for text objects (default "\fBrm\fR").
  573. X.TP
  574. X\fB\-s \fIfontsize\fR
  575. Xset the default font size (in points) for text objects (default 11*\fImag\fR).
  576. X.TP
  577. X\fB\-o \fIoption\fR
  578. Xpass the specified option string through to fig2dev.
  579. X.PP
  580. XIf there is no scaling, the default font is an eleven point roman font.
  581. XLanguage and control specifiers may occur more than once;
  582. Xthey affect the translation of files which appear to their
  583. Xright in the argument list. 
  584. XIf no files are specified, then "*.fig" is assumed.
  585. X.SH "SEE ALSO"
  586. Xfig(1),
  587. Xfig2dev(1),
  588. Xpic(1),
  589. Xpic2fig(1),
  590. X.SH COPYRIGHT
  591. XCopyright (c) 1985 Supoj Sutantavibul
  592. X.br
  593. XCopyright (c) 1991 Micah Beck
  594. X.LP
  595. XPermission to use, copy, modify, distribute, and sell this software and its
  596. Xdocumentation for any purpose is hereby granted without fee, provided that
  597. Xthe above copyright notice appear in all copies and that both that
  598. Xcopyright notice and this permission notice appear in supporting
  599. Xdocumentation. The authors make no representations about the suitability 
  600. Xof this software for any purpose.  It is provided "as is" without express 
  601. Xor implied warranty.
  602. X.LP
  603. XTHE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  604. XINCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  605. XEVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  606. XCONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  607. XDATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  608. XTORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  609. XPERFORMANCE OF THIS SOFTWARE.
  610. X.SH AUTHOR
  611. XMicah Beck
  612. END_OF_FILE
  613. if test 3279 -ne `wc -c <'doc/transfig.1'`; then
  614.     echo shar: \"'doc/transfig.1'\" unpacked with wrong size!
  615. fi
  616. # end of 'doc/transfig.1'
  617. fi
  618. if test ! -d 'fig2dev' ; then
  619.     echo shar: Creating directory \"'fig2dev'\"
  620.     mkdir 'fig2dev'
  621. fi
  622. if test -f 'fig2dev/Imakefile' -a "${1}" != "-c" ; then 
  623.   echo shar: Will not clobber existing file \"'fig2dev/Imakefile'\"
  624. else
  625. echo shar: Extracting \"'fig2dev/Imakefile'\" \(2527 characters\)
  626. sed "s/^X//" >'fig2dev/Imakefile' <<'END_OF_FILE'
  627. X#    Fig2dev : General Fig code translation program
  628. X#
  629. X# TransFig: Facility for Translating Fig code
  630. X# Copyright (c) 1985 Supoj Sutantavibul
  631. X# Copyright (c) 1991 Micah Beck
  632. X#
  633. X# Permission to use, copy, modify, distribute, and sell this software and its
  634. X# documentation for any purpose is hereby granted without fee, provided that
  635. X# the above copyright notice appear in all copies and that both that
  636. X# copyright notice and this permission notice appear in supporting
  637. X# documentation. The authors make no representations about the suitability 
  638. X# of this software for any purpose.  It is provided "as is" without express 
  639. X# or implied warranty.
  640. X#
  641. X# THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  642. X# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  643. X# EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  644. X# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  645. X# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  646. X# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  647. X# PERFORMANCE OF THIS SOFTWARE.
  648. X#
  649. X#
  650. X# to include drivers for the following languages, 
  651. X# add the corresponding symbol to the DEFINES list:
  652. X#
  653. X# -DEPIC -DIBMGL -DLATEX -DPIC -DPICTEX -DPS -DPSTEX -DTEXTYL -DTPIC
  654. X#
  655. XDEFINES = -DEPIC -DIBMGL -DLATEX -DPIC -DPICTEX -DPS -DPSTEX -DTEXTYL -DTPIC
  656. XDEPLIBS =
  657. X
  658. X#if (defined(VaxArchitecture) && !defined(UltrixArchitecture)) || \
  659. X    (defined(RtArchitecture) && !defined(AIXArchitecture)) || \
  660. X    (defined(MipsArchitecture)) || defined(SequentArchitecture) || \
  661. X    (defined(SunOSPlatform) && (OSMinorVersion==0))
  662. X
  663. XSTRSTRC=    strstr.c
  664. XSTRSTRO=    strstr.o
  665. X#endif
  666. X
  667. X#define IHaveSubdirs
  668. X#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
  669. X
  670. XSUBDIRS = dev
  671. X
  672. XINCLUDES = -I..
  673. X
  674. XSRCS = fig2dev.c getopt.c psfonts.c iso2tex.c \
  675. X    arrow.c bound.c free.c read.c read1_3.c latex_line.c $(STRSTRC)
  676. XOBJS = fig2dev.o getopt.o psfonts.o iso2tex.o \
  677. X    arrow.o bound.o free.o read.o read1_3.o latex_line.o $(STRSTRO) \
  678. X    dev/libtransfig.a
  679. X
  680. XSYS_LIBRARIES = -lm
  681. X
  682. XMakeSubdirs($(SUBDIRS))
  683. XDependSubdirs($(SUBDIRS))
  684. X
  685. XComplexProgramTarget(fig2dev)
  686. X
  687. Xall:: fig2dev.man fig2ps2tex.man pic2tpic.man
  688. X
  689. XInstallScript(fig2ps2tex,$(BINDIR))
  690. XInstallScript(pic2tpic,$(BINDIR))
  691. X
  692. XInstallManPage(fig2ps2tex,$(MANDIR))
  693. XInstallManPage(pic2tpic,$(MANDIR))
  694. X
  695. Xfig2dev.man: ../doc/fig2dev.1
  696. X    ln -s ../doc/fig2dev.1 fig2dev.man
  697. X
  698. Xfig2ps2tex.man: ../doc/fig2ps2tex.1
  699. X    ln -s ../doc/fig2ps2tex.1 fig2ps2tex.man
  700. X
  701. Xpic2tpic.man: ../doc/pic2tpic.1
  702. X    ln -s ../doc/pic2tpic.1 pic2tpic.man
  703. END_OF_FILE
  704. if test 2527 -ne `wc -c <'fig2dev/Imakefile'`; then
  705.     echo shar: \"'fig2dev/Imakefile'\" unpacked with wrong size!
  706. fi
  707. # end of 'fig2dev/Imakefile'
  708. fi
  709. if test -f 'fig2dev/alloc.h' -a "${1}" != "-c" ; then 
  710.   echo shar: Will not clobber existing file \"'fig2dev/alloc.h'\"
  711. else
  712. echo shar: Extracting \"'fig2dev/alloc.h'\" \(1768 characters\)
  713. sed "s/^X//" >'fig2dev/alloc.h' <<'END_OF_FILE'
  714. X/*
  715. X * TransFig: Facility for Translating Fig code
  716. X * Copyright (c) 1985 Supoj Sutantavibul
  717. X * Copyright (c) 1991 Micah Beck
  718. X *
  719. X * Permission to use, copy, modify, distribute, and sell this software and its
  720. X * documentation for any purpose is hereby granted without fee, provided that
  721. X * the above copyright notice appear in all copies and that both that
  722. X * copyright notice and this permission notice appear in supporting
  723. X * documentation. The authors make no representations about the suitability 
  724. X * of this software for any purpose.  It is provided "as is" without express 
  725. X * or implied warranty.
  726. X *
  727. X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  728. X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  729. X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  730. X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  731. X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  732. X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  733. X * PERFORMANCE OF THIS SOFTWARE.
  734. X *
  735. X */
  736. X
  737. Xextern char    *malloc();
  738. Xextern char    *calloc();
  739. X
  740. X#define        Line_malloc(z)        z = (F_line*)malloc(LINOBJ_SIZE)
  741. X#define        Eps_malloc(z)        z = (F_eps*)malloc(EPS_SIZE)
  742. X#define        Spline_malloc(z)    z = (F_spline*)malloc(SPLOBJ_SIZE)
  743. X#define        Ellipse_malloc(z)    z = (F_ellipse*)malloc(ELLOBJ_SIZE)
  744. X#define        Arc_malloc(z)        z = (F_arc*)malloc(ARCOBJ_SIZE)
  745. X#define        Compound_malloc(z)    z = (F_compound*)malloc(COMOBJ_SIZE)
  746. X#define        Text_malloc(z)        z = (F_text*)malloc(TEXOBJ_SIZE)
  747. X#define        Point_malloc(z)        z = (F_point*)malloc(POINT_SIZE)
  748. X#define        Control_malloc(z)    z = (F_control*)malloc(CONTROL_SIZE)
  749. X#define        Arrow_malloc(z)        z = (F_arrow*)malloc(ARROW_SIZE)
  750. X
  751. Xextern char    Err_mem[];
  752. Xextern char    Err_incomp[];
  753. END_OF_FILE
  754. if test 1768 -ne `wc -c <'fig2dev/alloc.h'`; then
  755.     echo shar: \"'fig2dev/alloc.h'\" unpacked with wrong size!
  756. fi
  757. # end of 'fig2dev/alloc.h'
  758. fi
  759. if test -f 'fig2dev/arrow.c' -a "${1}" != "-c" ; then 
  760.   echo shar: Will not clobber existing file \"'fig2dev/arrow.c'\"
  761. else
  762. echo shar: Extracting \"'fig2dev/arrow.c'\" \(2441 characters\)
  763. sed "s/^X//" >'fig2dev/arrow.c' <<'END_OF_FILE'
  764. X/*
  765. X * TransFig: Facility for Translating Fig code
  766. X * Copyright (c) 1985 Supoj Sutantavibul
  767. X * Copyright (c) 1991 Micah Beck
  768. X *
  769. X * Permission to use, copy, modify, distribute, and sell this software and its
  770. X * documentation for any purpose is hereby granted without fee, provided that
  771. X * the above copyright notice appear in all copies and that both that
  772. X * copyright notice and this permission notice appear in supporting
  773. X * documentation. The authors make no representations about the suitability 
  774. X * of this software for any purpose.  It is provided "as is" without express 
  775. X * or implied warranty.
  776. X *
  777. X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  778. X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  779. X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  780. X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  781. X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  782. X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  783. X * PERFORMANCE OF THIS SOFTWARE.
  784. X *
  785. X */
  786. X
  787. X#include <stdio.h>
  788. X#include "alloc.h"
  789. X#include "object.h"
  790. X
  791. Xstatic double        forward_arrow_wid = 4;
  792. Xstatic double        forward_arrow_ht = 8;
  793. Xstatic int        forward_arrow_type = 0;
  794. Xstatic int        forward_arrow_style = 0;
  795. Xstatic double        forward_arrow_thickness = 1;
  796. X
  797. Xstatic double        backward_arrow_wid = 4;
  798. Xstatic double        backward_arrow_ht = 8;
  799. Xstatic int        backward_arrow_type = 0;
  800. Xstatic int        backward_arrow_style = 0;
  801. Xstatic double        backward_arrow_thickness = 1;
  802. X
  803. XF_arrow *
  804. Xforward_arrow()
  805. X{
  806. X    F_arrow        *a;
  807. X
  808. X    if (NULL == (Arrow_malloc(a))) {
  809. X        put_msg(Err_mem);
  810. X        return(NULL);
  811. X        }
  812. X    a->type = forward_arrow_type;
  813. X    a->style = forward_arrow_style;
  814. X    a->thickness = forward_arrow_thickness;
  815. X    a->wid = forward_arrow_wid;
  816. X    a->ht = forward_arrow_ht;
  817. X    return(a);
  818. X    }
  819. X
  820. XF_arrow *
  821. Xbackward_arrow()
  822. X{
  823. X    F_arrow        *a;
  824. X
  825. X    if (NULL == (Arrow_malloc(a))) {
  826. X        put_msg(Err_mem);
  827. X        return(NULL);
  828. X        }
  829. X    a->type = backward_arrow_type;
  830. X    a->style = backward_arrow_style;
  831. X    a->thickness = backward_arrow_thickness;
  832. X    a->wid = backward_arrow_wid;
  833. X    a->ht = backward_arrow_ht;
  834. X    return(a);
  835. X    }
  836. X
  837. XF_arrow *
  838. Xmake_arrow(type, style, thickness, wid, ht)
  839. Xint    type, style;
  840. Xdouble    thickness, wid, ht;
  841. X{
  842. X    F_arrow        *a;
  843. X
  844. X    if (NULL == (Arrow_malloc(a))) {
  845. X        put_msg(Err_mem);
  846. X        return(NULL);
  847. X        }
  848. X    a->type = type;
  849. X    a->style = style;
  850. X    a->thickness = thickness;
  851. X    a->wid = wid;
  852. X    a->ht = ht;
  853. X    return(a);
  854. X    }
  855. END_OF_FILE
  856. if test 2441 -ne `wc -c <'fig2dev/arrow.c'`; then
  857.     echo shar: \"'fig2dev/arrow.c'\" unpacked with wrong size!
  858. fi
  859. # end of 'fig2dev/arrow.c'
  860. fi
  861. if test ! -d 'fig2dev/dev' ; then
  862.     echo shar: Creating directory \"'fig2dev/dev'\"
  863.     mkdir 'fig2dev/dev'
  864. fi
  865. if test -f 'fig2dev/dev/Imakefile' -a "${1}" != "-c" ; then 
  866.   echo shar: Will not clobber existing file \"'fig2dev/dev/Imakefile'\"
  867. else
  868. echo shar: Extracting \"'fig2dev/dev/Imakefile'\" \(611 characters\)
  869. sed "s/^X//" >'fig2dev/dev/Imakefile' <<'END_OF_FILE'
  870. X#
  871. X#    Fig2dev Driver Library Makefile
  872. X#
  873. X# to set paper size to A4             add -DA4d    to DEFINES list
  874. X# to set IBM Graphics Enhancement Cartridge    add -DIBMGEC    to DEFINES list
  875. X# to set DVI-to-PostScript driver to dvips    add -DDVIPS    to DEFINES list
  876. X#
  877. XDEFINES = -DDVIPS
  878. XDEPLIBS =
  879. XINCLUDES = -I..
  880. X
  881. XSRCS =  genbox.c genepic.c genibmgl.c genlatex.c genpic.c genpictex.c \
  882. X    genps.c genpstex.c gentextyl.c gentpic.c setfigfont.c
  883. XLIBOBJS = genbox.o genepic.o genibmgl.o genlatex.o genpic.o genpictex.o \
  884. X    genps.o genpstex.o gentextyl.o gentpic.o setfigfont.o
  885. X
  886. XLIB = transfig
  887. X
  888. XNormalLibraryTarget($(LIB),$(LIBOBJS))
  889. XDependTarget()
  890. END_OF_FILE
  891. if test 611 -ne `wc -c <'fig2dev/dev/Imakefile'`; then
  892.     echo shar: \"'fig2dev/dev/Imakefile'\" unpacked with wrong size!
  893. fi
  894. # end of 'fig2dev/dev/Imakefile'
  895. fi
  896. if test -f 'fig2dev/dev/def_setfigfont.c' -a "${1}" != "-c" ; then 
  897.   echo shar: Will not clobber existing file \"'fig2dev/dev/def_setfigfont.c'\"
  898. else
  899. echo shar: Extracting \"'fig2dev/dev/def_setfigfont.c'\" \(0 characters\)
  900. sed "s/^X//" >'fig2dev/dev/def_setfigfont.c' <<'END_OF_FILE'
  901. END_OF_FILE
  902. if test 0 -ne `wc -c <'fig2dev/dev/def_setfigfont.c'`; then
  903.     echo shar: \"'fig2dev/dev/def_setfigfont.c'\" unpacked with wrong size!
  904. fi
  905. # end of 'fig2dev/dev/def_setfigfont.c'
  906. fi
  907. if test -f 'fig2dev/dev/genbox.c' -a "${1}" != "-c" ; then 
  908.   echo shar: Will not clobber existing file \"'fig2dev/dev/genbox.c'\"
  909. else
  910. echo shar: Extracting \"'fig2dev/dev/genbox.c'\" \(1875 characters\)
  911. sed "s/^X//" >'fig2dev/dev/genbox.c' <<'END_OF_FILE'
  912. X/*
  913. X * TransFig: Facility for Translating Fig code
  914. X * Copyright (c) 1985 Supoj Sutantavibul
  915. X * Copyright (c) 1991 Micah Beck
  916. X *
  917. X * Permission to use, copy, modify, distribute, and sell this software and its
  918. X * documentation for any purpose is hereby granted without fee, provided that
  919. X * the above copyright notice appear in all copies and that both that
  920. X * copyright notice and this permission notice appear in supporting
  921. X * documentation. The authors make no representations about the suitability 
  922. X * of this software for any purpose.  It is provided "as is" without express 
  923. X * or implied warranty.
  924. X *
  925. X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  926. X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  927. X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  928. X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  929. X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  930. X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  931. X * PERFORMANCE OF THIS SOFTWARE.
  932. X *
  933. X */
  934. X
  935. X/* 
  936. X *    genbox : Empty box driver for fig2dev translator
  937. X *
  938. X*/
  939. X#include <stdio.h>
  940. X#include "object.h"
  941. X#include "fig2dev.h"
  942. X
  943. Xvoid genbox_option(opt, optarg)
  944. Xchar opt, *optarg;
  945. X{
  946. X      switch (opt) {
  947. X
  948. X    case 's':
  949. X    case 'f':
  950. X    case 'm':
  951. X    case 'L':
  952. X        break;
  953. X
  954. X     default:
  955. X        put_msg(Err_badarg, opt, "box");
  956. X        exit(1);
  957. X    }
  958. X}
  959. X
  960. Xvoid genbox_start(objects)
  961. XF_compound    *objects;
  962. X{
  963. X    double ppi;
  964. X
  965. X    if (0 == (ppi = (double)objects->nwcorner.x)) {
  966. X        fprintf(stderr, "Resolution is zero!! default to 80 ppi\n");
  967. X        ppi = 80.0;
  968. X        }
  969. X
  970. X    /* draw box */
  971. X        fprintf(tfp, "\\makebox[%.3fin]{\\rule{0in}{%.3fin}}\n",
  972. X        (urx-llx)*mag/ppi, (ury-lly)*mag/ppi);
  973. X    }
  974. X
  975. Xstruct driver dev_box = {
  976. X    genbox_option,
  977. X    genbox_start,
  978. X    gendev_null,
  979. X    gendev_null,
  980. X    gendev_null,
  981. X    gendev_null,
  982. X    gendev_null,
  983. X    gendev_null,
  984. X    INCLUDE_TEXT
  985. X};
  986. END_OF_FILE
  987. if test 1875 -ne `wc -c <'fig2dev/dev/genbox.c'`; then
  988.     echo shar: \"'fig2dev/dev/genbox.c'\" unpacked with wrong size!
  989. fi
  990. # end of 'fig2dev/dev/genbox.c'
  991. fi
  992. if test -f 'fig2dev/dev/picfonts.h' -a "${1}" != "-c" ; then 
  993.   echo shar: Will not clobber existing file \"'fig2dev/dev/picfonts.h'\"
  994. else
  995. echo shar: Extracting \"'fig2dev/dev/picfonts.h'\" \(1606 characters\)
  996. sed "s/^X//" >'fig2dev/dev/picfonts.h' <<'END_OF_FILE'
  997. X/*
  998. X * TransFig: Facility for Translating Fig code
  999. X * Copyright (c) 1985 Supoj Sutantavibul
  1000. X * Copyright (c) 1991 Micah Beck
  1001. X *
  1002. X * Permission to use, copy, modify, distribute, and sell this software and its
  1003. X * documentation for any purpose is hereby granted without fee, provided that
  1004. X * the above copyright notice appear in all copies and that both that
  1005. X * copyright notice and this permission notice appear in supporting
  1006. X * documentation. The authors make no representations about the suitability 
  1007. X * of this software for any purpose.  It is provided "as is" without express 
  1008. X * or implied warranty.
  1009. X *
  1010. X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  1011. X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  1012. X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  1013. X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  1014. X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  1015. X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  1016. X * PERFORMANCE OF THIS SOFTWARE.
  1017. X *
  1018. X */
  1019. X
  1020. X/*  The selection of font names may be site dependent */
  1021. X
  1022. Xchar        *picfontnames[] = {
  1023. X            "R", "R",        /* default */
  1024. X            "R",            /* roman */
  1025. X            "B",            /* bold */
  1026. X            "I",            /* italic */
  1027. X            "H",            /* sans serif */
  1028. X            "C"            /* typewriter */
  1029. X        };
  1030. X#define MAXFONTSIZE 108
  1031. X
  1032. X#define PICFONT(F)    (picfontnames[((F) <= MAX_FONT) ? (F)+1 : MAX_FONT])
  1033. X#define PICFONTSIZE(S)  ((S) > 0 ? \
  1034. X                ((S) <= MAXFONTSIZE ? \
  1035. X                    round(S) : \
  1036. X                    MAXFONTSIZE) : \
  1037. X                font_size)
  1038. X#define PICFONTMAG(T)    PICFONTSIZE((int)(T->size*(rigid_text(T) ? 1.0 : mag)))
  1039. END_OF_FILE
  1040. if test 1606 -ne `wc -c <'fig2dev/dev/picfonts.h'`; then
  1041.     echo shar: \"'fig2dev/dev/picfonts.h'\" unpacked with wrong size!
  1042. fi
  1043. # end of 'fig2dev/dev/picfonts.h'
  1044. fi
  1045. if test -f 'fig2dev/dev/picpsfonts.h' -a "${1}" != "-c" ; then 
  1046.   echo shar: Will not clobber existing file \"'fig2dev/dev/picpsfonts.h'\"
  1047. else
  1048. echo shar: Extracting \"'fig2dev/dev/picpsfonts.h'\" \(2222 characters\)
  1049. sed "s/^X//" >'fig2dev/dev/picpsfonts.h' <<'END_OF_FILE'
  1050. X/*
  1051. X * TransFig: Facility for Translating Fig code
  1052. X * Copyright (c) 1985 Supoj Sutantavibul
  1053. X * Copyright (c) 1991 Micah Beck
  1054. X * Copyright (c) 1992 Uri Blumenthal, IBM
  1055. X *
  1056. X * Permission to use, copy, modify, distribute, and sell this software and its
  1057. X * documentation for any purpose is hereby granted without fee, provided that
  1058. X * the above copyright notice appear in all copies and that both that
  1059. X * copyright notice and this permission notice appear in supporting
  1060. X * documentation. The authors make no representations about the suitability 
  1061. X * of this software for any purpose.  It is provided "as is" without express 
  1062. X * or implied warranty.
  1063. X *
  1064. X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  1065. X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  1066. X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  1067. X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  1068. X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  1069. X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  1070. X * PERFORMANCE OF THIS SOFTWARE.
  1071. X *
  1072. X */
  1073. X
  1074. X#define              ULIMIT_FONT_SIZE        300
  1075. X#define           DEFAULT_PICFONT             13
  1076. X#define PICPSFONT(F)      (PICfontnames[ \
  1077. X        PICPSfontmap[(((F)->font) <= MAXFONT(F)) ? \
  1078. X        ((F)->font)+1 : \
  1079. X        DEFAULT_PICFONT]])
  1080. Xextern int v2_flag, v21_flag;
  1081. X#define ROMAN_DEFAULT 0
  1082. X#define ROMAN     1
  1083. X#define ITALIC     2
  1084. X#define BOLD    3
  1085. X#define ITABOL  4
  1086. X#define HELVET  5
  1087. X#define HELBOL  6
  1088. X#define HELOBL  7
  1089. X#define HELBOB  8
  1090. X#define COUR    9
  1091. X#define COURBL  10
  1092. X#define COUROB  11
  1093. X#define COURBO  12
  1094. X#define SYMBOL  13
  1095. X#define BRAKET  14
  1096. Xint    PICPSfontmap[] = {
  1097. X            ROMAN_DEFAULT, ROMAN,
  1098. X            ITALIC,
  1099. X            BOLD,
  1100. X            ITABOL,
  1101. X            HELVET,
  1102. X            HELOBL,
  1103. X            HELBOL,
  1104. X            HELBOB,
  1105. X            ROMAN,
  1106. X            ITALIC,
  1107. X            BOLD,
  1108. X            ITABOL,
  1109. X            COUR,
  1110. X            COUROB,
  1111. X            COURBL,
  1112. X            COURBO,
  1113. X            HELVET,
  1114. X            HELOBL,
  1115. X            HELBOL,
  1116. X            HELBOB,
  1117. X            HELVET,
  1118. X            HELOBL,
  1119. X            HELBOL,
  1120. X            HELBOB,
  1121. X            ROMAN,
  1122. X            ITALIC,
  1123. X            BOLD,
  1124. X            ITABOL,
  1125. X            ROMAN,
  1126. X            ITALIC,
  1127. X            BOLD,
  1128. X            ITABOL,
  1129. X            SYMBOL,
  1130. X            ITALIC,
  1131. X            BRAKET
  1132. X        };
  1133. Xchar        *PICfontnames[] = {
  1134. X        "R", "R",     /* default */
  1135. X        "I",
  1136. X        "B",
  1137. X        "BI",
  1138. X        "H",
  1139. X        "HB",
  1140. X        "HO",
  1141. X        "HX",
  1142. X        "C",
  1143. X        "CB",
  1144. X        "CO",
  1145. X        "CX",
  1146. X        "S",
  1147. X        "S2"
  1148. X        };
  1149. END_OF_FILE
  1150. if test 2222 -ne `wc -c <'fig2dev/dev/picpsfonts.h'`; then
  1151.     echo shar: \"'fig2dev/dev/picpsfonts.h'\" unpacked with wrong size!
  1152. fi
  1153. # end of 'fig2dev/dev/picpsfonts.h'
  1154. fi
  1155. if test -f 'fig2dev/dev/psfonts.h' -a "${1}" != "-c" ; then 
  1156.   echo shar: Will not clobber existing file \"'fig2dev/dev/psfonts.h'\"
  1157. else
  1158. echo shar: Extracting \"'fig2dev/dev/psfonts.h'\" \(1693 characters\)
  1159. sed "s/^X//" >'fig2dev/dev/psfonts.h' <<'END_OF_FILE'
  1160. X/*
  1161. X * TransFig: Facility for Translating Fig code
  1162. X * Copyright (c) 1985 Supoj Sutantavibul
  1163. X * Copyright (c) 1991 Micah Beck
  1164. X *
  1165. X * Permission to use, copy, modify, distribute, and sell this software and its
  1166. X * documentation for any purpose is hereby granted without fee, provided that
  1167. X * the above copyright notice appear in all copies and that both that
  1168. X * copyright notice and this permission notice appear in supporting
  1169. X * documentation. The authors make no representations about the suitability 
  1170. X * of this software for any purpose.  It is provided "as is" without express 
  1171. X * or implied warranty.
  1172. X *
  1173. X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  1174. X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  1175. X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  1176. X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  1177. X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  1178. X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  1179. X * PERFORMANCE OF THIS SOFTWARE.
  1180. X *
  1181. X */
  1182. X
  1183. Xstatic char        *psfontnames[] = {
  1184. X            "Times-Roman", "Times-Roman",    /* default */
  1185. X            "Times-Roman",            /* roman */
  1186. X            "Times-Bold",            /* bold */
  1187. X            "Times-Italic",            /* italic */
  1188. X            "Helvetica",            /* sans serif */
  1189. X            "Courier"            /* typewriter */
  1190. X        };
  1191. X
  1192. X#define PS_FONTNAMES(T)    \
  1193. X      (((v2_flag&&!v21_flag) || psfont_text(T)) ? PSfontnames : psfontnames)
  1194. X
  1195. X#define PSFONT(T) \
  1196. X ((T->font) <= MAXFONT(T) ? PS_FONTNAMES(T)[T->font+1] : PS_FONTNAMES(T)[0])
  1197. X
  1198. X#define PSFONTMAG(T)    (((T->size) > 0 ? \
  1199. X                ((T->size) <= ULIMIT_FONT_SIZE ? \
  1200. X                     (T->size) : \
  1201. X                    ULIMIT_FONT_SIZE) : \
  1202. X                font_size)/(rigid_text(T) ? mag : 1.0))
  1203. END_OF_FILE
  1204. if test 1693 -ne `wc -c <'fig2dev/dev/psfonts.h'`; then
  1205.     echo shar: \"'fig2dev/dev/psfonts.h'\" unpacked with wrong size!
  1206. fi
  1207. # end of 'fig2dev/dev/psfonts.h'
  1208. fi
  1209. if test -f 'fig2dev/dev/setfigfont.c' -a "${1}" != "-c" ; then 
  1210.   echo shar: Will not clobber existing file \"'fig2dev/dev/setfigfont.c'\"
  1211. else
  1212. echo shar: Extracting \"'fig2dev/dev/setfigfont.c'\" \(1224 characters\)
  1213. sed "s/^X//" >'fig2dev/dev/setfigfont.c' <<'END_OF_FILE'
  1214. X/* Add a (La)TeX macro, if TeX fonts are used. */
  1215. X/* This macro is called with three arguments:
  1216. X *    #1   fontsize (without `pt')
  1217. X *    #2   baselineskip (without `pt')
  1218. X *    #3   font  (without escape character)
  1219. X */
  1220. X
  1221. X#include <stdio.h>
  1222. X
  1223. Xdefine_setfigfont(tfp)
  1224. X     FILE *tfp;
  1225. X{
  1226. X    fprintf(tfp, "%%\n\
  1227. X\\begingroup\\makeatletter\\ifx\\SetFigFont\\undefined\n\
  1228. X%% extract first six characters in \\fmtname\n\
  1229. X\\def\\x#1#2#3#4#5#6#7\\relax{\\def\\x{#1#2#3#4#5#6}}%%\n\
  1230. X\\expandafter\\x\\fmtname xxxxxx\\relax \\def\\y{splain}%%\n\
  1231. X\\ifx\\x\\y   %% LaTeX or SliTeX?\n\
  1232. X\\gdef\\SetFigFont#1#2#3{%%\n\
  1233. X  \\ifnum #1<17\\tiny\\else \\ifnum #1<20\\small\\else\n\
  1234. X  \\ifnum #1<24\\normalsize\\else \\ifnum #1<29\\large\\else\n\
  1235. X  \\ifnum #1<34\\Large\\else \\ifnum #1<41\\LARGE\\else\n\
  1236. X     \\huge\\fi\\fi\\fi\\fi\\fi\\fi\n\
  1237. X  \\csname #3\\endcsname}%%\n\
  1238. X\\else\n\
  1239. X\\gdef\\SetFigFont#1#2#3{\\begingroup\n\
  1240. X  \\count@#1\\relax \\ifnum 25<\\count@\\count@25\\fi\n\
  1241. X  \\def\\x{\\endgroup\\@setsize\\SetFigFont{#2pt}}%%\n\
  1242. X  \\expandafter\\x\n\
  1243. X    \\csname \\romannumeral\\the\\count@ pt\\expandafter\\endcsname\n\
  1244. X    \\csname @\\romannumeral\\the\\count@ pt\\endcsname\n\
  1245. X  \\csname #3\\endcsname}%%\n\
  1246. X\\fi\n\
  1247. X\\fi\\endgroup\n");
  1248. X}
  1249. END_OF_FILE
  1250. if test 1224 -ne `wc -c <'fig2dev/dev/setfigfont.c'`; then
  1251.     echo shar: \"'fig2dev/dev/setfigfont.c'\" unpacked with wrong size!
  1252. fi
  1253. # end of 'fig2dev/dev/setfigfont.c'
  1254. fi
  1255. if test -f 'fig2dev/dev/texfonts.c' -a "${1}" != "-c" ; then 
  1256.   echo shar: Will not clobber existing file \"'fig2dev/dev/texfonts.c'\"
  1257. else
  1258. echo shar: Extracting \"'fig2dev/dev/texfonts.c'\" \(2338 characters\)
  1259. sed "s/^X//" >'fig2dev/dev/texfonts.c' <<'END_OF_FILE'
  1260. X/*
  1261. X * TransFig: Facility for Translating Fig code
  1262. X * Copyright (c) 1985 Supoj Sutantavibul
  1263. X * Copyright (c) 1991 Micah Beck
  1264. X *
  1265. X * Permission to use, copy, modify, distribute, and sell this software and its
  1266. X * documentation for any purpose is hereby granted without fee, provided that
  1267. X * the above copyright notice appear in all copies and that both that
  1268. X * copyright notice and this permission notice appear in supporting
  1269. X * documentation. The authors make no representations about the suitability 
  1270. X * of this software for any purpose.  It is provided "as is" without express 
  1271. X * or implied warranty.
  1272. X *
  1273. X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  1274. X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  1275. X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  1276. X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  1277. X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  1278. X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  1279. X * PERFORMANCE OF THIS SOFTWARE.
  1280. X *
  1281. X */
  1282. X
  1283. Xstatic char        *texfontnames[] = {
  1284. X            "rm", "rm",        /* default */
  1285. X            "rm",            /* roman */
  1286. X            "bf",            /* bold */
  1287. X            "it",            /* italic */
  1288. X            "sf",             /* sans serif */
  1289. X            "tt"            /* typewriter */
  1290. X        };
  1291. X
  1292. X/* The selection of font names may be site dependent.
  1293. X * Not all fonts are preloaded at all sizes.
  1294. X */
  1295. X
  1296. Xstatic char        *texfontsizes[] = {
  1297. X             "Elv", "elv",        /* default */
  1298. X             "Fiv", "Fiv", "Fiv", "Fiv",     /* small fonts */
  1299. X             "Fiv",            /* five point font */
  1300. X             "Six", "Sev", "Egt",    /* etc */
  1301. X             "Nin", "Ten", "Elv",
  1302. X             "Twl", "Twl", "Frtn",    
  1303. X             "Frtn", "Frtn", "Svtn",
  1304. X             "Svtn", "Svtn", "Twty",
  1305. X             "Twty", "Twty", "Twty", "Twty", "Twfv",
  1306. X                        "Twfv", "Twfv", "twfv", "Twentynine",
  1307. X                        "Twentynine", "Twentynine", "Twentynine", "Twentynine",
  1308. X                        "Thirtyfour", "Thirtyfour", "Thirtyfour", "Thirtyfour",
  1309. X                        "Thirtyfour", "Thirtyfour", "Thirtyfour", "Fortyone",
  1310. X                        "Fortyone", "Fortyone"
  1311. X              };
  1312. X
  1313. X#define MAXFONTSIZE 42
  1314. X
  1315. X#define TEXFONT(F)    (texfontnames[((F) <= MAX_FONT) ? (F)+1 : MAX_FONT])
  1316. X#define TEXFONTSIZE(S)    (texfontsizes[((S) <= MAXFONTSIZE) ? round(S)+1\
  1317. X                                      : MAXFONTSIZE])
  1318. X#define TEXFONTMAG(T)    TEXFONTSIZE(T->size*(rigid_text(T) ? 1.0 : mag))
  1319. X
  1320. END_OF_FILE
  1321. if test 2338 -ne `wc -c <'fig2dev/dev/texfonts.c'`; then
  1322.     echo shar: \"'fig2dev/dev/texfonts.c'\" unpacked with wrong size!
  1323. fi
  1324. # end of 'fig2dev/dev/texfonts.c'
  1325. fi
  1326. if test -f 'fig2dev/dev/texfonts.h' -a "${1}" != "-c" ; then 
  1327.   echo shar: Will not clobber existing file \"'fig2dev/dev/texfonts.h'\"
  1328. else
  1329. echo shar: Extracting \"'fig2dev/dev/texfonts.h'\" \(2256 characters\)
  1330. sed "s/^X//" >'fig2dev/dev/texfonts.h' <<'END_OF_FILE'
  1331. X/*
  1332. X * TransFig: Facility for Translating Fig code
  1333. X * Copyright (c) 1985 Supoj Sutantavibul
  1334. X * Copyright (c) 1991 Micah Beck
  1335. X *
  1336. X * Permission to use, copy, modify, distribute, and sell this software and its
  1337. X * documentation for any purpose is hereby granted without fee, provided that
  1338. X * the above copyright notice appear in all copies and that both that
  1339. X * copyright notice and this permission notice appear in supporting
  1340. X * documentation. The authors make no representations about the suitability 
  1341. X * of this software for any purpose.  It is provided "as is" without express 
  1342. X * or implied warranty.
  1343. X *
  1344. X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  1345. X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  1346. X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  1347. X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  1348. X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  1349. X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  1350. X * PERFORMANCE OF THIS SOFTWARE.
  1351. X *
  1352. X */
  1353. X
  1354. Xstatic char        *texfontnames[] = {
  1355. X            "rm",        /* default */
  1356. X            "rm",            /* roman */
  1357. X            "bf",            /* bold */
  1358. X            "it",            /* italic */
  1359. X            "sf",             /* sans serif */
  1360. X            "tt"            /* typewriter */
  1361. X        };
  1362. X
  1363. X/* The selection of font names may be site dependent.
  1364. X * Not all fonts are preloaded at all sizes.
  1365. X */
  1366. X
  1367. Xstatic char        texfontsizes[] = {
  1368. X                       11,            /* default */
  1369. X                       5, 5, 5, 5,    /* 1-4: small fonts */
  1370. X                       5,            /* five point font */
  1371. X                       6, 7, 8,    /* etc */
  1372. X                       9, 10, 11,
  1373. X                       12, 12, 14,
  1374. X                       14, 14, 17,
  1375. X                       17, 17, 20,
  1376. X                       20, 20, 20, 20, 25,
  1377. X                       25, 25, 25, 29,
  1378. X                       29, 29, 29, 29,
  1379. X                       34, 34, 34, 34,
  1380. X                       34, 34, 34, 41,
  1381. X                       41, 41
  1382. X              };
  1383. X
  1384. X#define MAXFONTSIZE     42
  1385. X
  1386. X#define TEXFONT(F)    (texfontnames[((F) <= MAX_FONT) ? (F) : (MAX_FONT-1)])
  1387. X#define TEXFONTSIZE(S)    (texfontsizes[((S) <= MAXFONTSIZE) ? round(S)\
  1388. X                                      : (MAXFONTSIZE-1)])
  1389. X#define TEXFONTMAG(T)    TEXFONTSIZE(T->size*(rigid_text(T) ? 1.0 : mag))
  1390. X
  1391. END_OF_FILE
  1392. if test 2256 -ne `wc -c <'fig2dev/dev/texfonts.h'`; then
  1393.     echo shar: \"'fig2dev/dev/texfonts.h'\" unpacked with wrong size!
  1394. fi
  1395. # end of 'fig2dev/dev/texfonts.h'
  1396. fi
  1397. if test -f 'fig2dev/drivers.h' -a "${1}" != "-c" ; then 
  1398.   echo shar: Will not clobber existing file \"'fig2dev/drivers.h'\"
  1399. else
  1400. echo shar: Extracting \"'fig2dev/drivers.h'\" \(1995 characters\)
  1401. sed "s/^X//" >'fig2dev/drivers.h' <<'END_OF_FILE'
  1402. X/*
  1403. X * TransFig: Facility for Translating Fig code
  1404. X * Copyright (c) 1985 Supoj Sutantavibul
  1405. X * Copyright (c) 1991 Micah Beck
  1406. X *
  1407. X * Permission to use, copy, modify, distribute, and sell this software and its
  1408. X * documentation for any purpose is hereby granted without fee, provided that
  1409. X * the above copyright notice appear in all copies and that both that
  1410. X * copyright notice and this permission notice appear in supporting
  1411. X * documentation. The authors make no representations about the suitability 
  1412. X * of this software for any purpose.  It is provided "as is" without express 
  1413. X * or implied warranty.
  1414. X *
  1415. X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  1416. X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  1417. X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  1418. X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  1419. X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  1420. X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  1421. X * PERFORMANCE OF THIS SOFTWARE.
  1422. X *
  1423. X */
  1424. X
  1425. Xextern struct driver dev_box;
  1426. Xextern struct driver dev_epic;
  1427. Xextern struct driver dev_ibmgl;
  1428. Xextern struct driver dev_latex;
  1429. Xextern struct driver dev_pic;
  1430. Xextern struct driver dev_pictex;
  1431. Xextern struct driver dev_ps;
  1432. Xextern struct driver dev_pstex;
  1433. Xextern struct driver dev_pstex_t;
  1434. Xextern struct driver dev_textyl;
  1435. Xextern struct driver dev_tpic;
  1436. X
  1437. Xstruct 
  1438. X    {char *name; struct driver *dev;}
  1439. X    drivers[]
  1440. X    = {
  1441. X        {"box",        &dev_box}, 
  1442. X#ifdef EPIC
  1443. X        {"epic",    &dev_epic},
  1444. X        {"eepic",    &dev_epic},
  1445. X        {"eepicemu",    &dev_epic},
  1446. X#endif
  1447. X#ifdef IBMGL
  1448. X        {"ibmgl",    &dev_ibmgl},
  1449. X#endif
  1450. X#ifdef LATEX
  1451. X        {"latex",    &dev_latex},
  1452. X#endif
  1453. X#ifdef PIC
  1454. X        {"pic",        &dev_pic},
  1455. X#endif
  1456. X#ifdef PICTEX
  1457. X        {"pictex",    &dev_pictex},
  1458. X#endif
  1459. X#ifdef PS
  1460. X        {"ps",        &dev_ps},
  1461. X#endif
  1462. X#ifdef PSTEX
  1463. X        {"pstex",    &dev_pstex},
  1464. X        {"pstex_t",    &dev_pstex_t},
  1465. X#endif
  1466. X#ifdef TEXTYL
  1467. X        {"textyl",    &dev_textyl},
  1468. X#endif
  1469. X#ifdef TPIC
  1470. X        {"tpic",    &dev_tpic},
  1471. X#endif
  1472. X        {"",        NULL}
  1473. X    };
  1474. END_OF_FILE
  1475. if test 1995 -ne `wc -c <'fig2dev/drivers.h'`; then
  1476.     echo shar: \"'fig2dev/drivers.h'\" unpacked with wrong size!
  1477. fi
  1478. # end of 'fig2dev/drivers.h'
  1479. fi
  1480. if test -f 'fig2dev/fig2dev.h' -a "${1}" != "-c" ; then 
  1481.   echo shar: Will not clobber existing file \"'fig2dev/fig2dev.h'\"
  1482. else
  1483. echo shar: Extracting \"'fig2dev/fig2dev.h'\" \(2032 characters\)
  1484. sed "s/^X//" >'fig2dev/fig2dev.h' <<'END_OF_FILE'
  1485. X/*
  1486. X * TransFig: Facility for Translating Fig code
  1487. X * Copyright (c) 1985 Supoj Sutantavibul
  1488. X * Copyright (c) 1991 Micah Beck
  1489. X *
  1490. X * Permission to use, copy, modify, distribute, and sell this software and its
  1491. X * documentation for any purpose is hereby granted without fee, provided that
  1492. X * the above copyright notice appear in all copies and that both that
  1493. X * copyright notice and this permission notice appear in supporting
  1494. X * documentation. The authors make no representations about the suitability 
  1495. X * of this software for any purpose.  It is provided "as is" without express 
  1496. X * or implied warranty.
  1497. X *
  1498. X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  1499. X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  1500. X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  1501. X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  1502. X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  1503. X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  1504. X * PERFORMANCE OF THIS SOFTWARE.
  1505. X *
  1506. X */
  1507. X
  1508. X#ifdef SYSV
  1509. X#include <string.h>
  1510. X#else
  1511. X#include <strings.h>
  1512. X#ifndef strchr
  1513. Xextern char *strchr();
  1514. X#endif
  1515. X#ifndef NeXT
  1516. X#define    strchr    index
  1517. X#define    strrchr    rindex
  1518. X#endif
  1519. X#endif
  1520. X
  1521. X#define round(x)    ((int) ((x) + ((x >= 0)? 0.5: -0.5)))
  1522. X
  1523. X/* 
  1524. X * Device driver interface structure
  1525. X */
  1526. Xstruct driver {
  1527. X     void (*option)();    /* interpret driver-specific options */
  1528. X      void (*start)();    /* output file header */
  1529. X    void (*arc)();        /* object generators */
  1530. X    void (*ellipse)();
  1531. X    void (*line)();
  1532. X    void (*spline)();
  1533. X    void (*text)();
  1534. X    void (*end)();        /* output file trailer */
  1535. X      int text_include;    /* include text length in bounding box */
  1536. X#define INCLUDE_TEXT 1
  1537. X#define EXCLUDE_TEXT 0
  1538. X};
  1539. X
  1540. Xextern char Err_badarg[];
  1541. Xextern char Err_incomp[];
  1542. Xextern char Err_mem[];
  1543. X
  1544. Xextern char *PSfontnames[];
  1545. X
  1546. Xextern int  PSisomap[];
  1547. X
  1548. Xextern char    *prog, *from;
  1549. Xextern int    font_size;
  1550. Xextern double    mag;
  1551. Xextern FILE    *tfp;
  1552. X
  1553. Xextern int llx, lly, urx, ury, coord_system;
  1554. X
  1555. Xextern void gendev_null();
  1556. END_OF_FILE
  1557. if test 2032 -ne `wc -c <'fig2dev/fig2dev.h'`; then
  1558.     echo shar: \"'fig2dev/fig2dev.h'\" unpacked with wrong size!
  1559. fi
  1560. # end of 'fig2dev/fig2dev.h'
  1561. fi
  1562. if test -f 'fig2dev/fig2ps2tex.script' -a "${1}" != "-c" ; then 
  1563.   echo shar: Will not clobber existing file \"'fig2dev/fig2ps2tex.script'\"
  1564. else
  1565. echo shar: Extracting \"'fig2dev/fig2ps2tex.script'\" \(456 characters\)
  1566. sed "s/^X//" >'fig2dev/fig2ps2tex.script' <<'END_OF_FILE'
  1567. X#! /bin/csh -f
  1568. X#
  1569. X# Fig2ps2tex - generate a TeX file for including a PostScript file
  1570. X#         involves calculating the bounding box from fig2ps output
  1571. X#
  1572. Xset bbox = `grep "^%%BoundingBox:" $1`
  1573. X
  1574. Xset xsp = `echo "3k $bbox[4] $bbox[2] - 72 / p" | dc`
  1575. Xset ysp = `echo "3k $bbox[5] $bbox[3] - 72 / p" | dc`
  1576. X
  1577. Xecho "\makebox[${xsp}in][l]{"
  1578. Xecho "  \vbox to ${ysp}in{"
  1579. Xecho "    \vfill"
  1580. Xecho "    \special{psfile=$1}"
  1581. Xecho "  }"
  1582. Xecho "  \vspace{-\baselineskip}"
  1583. Xecho "}"
  1584. END_OF_FILE
  1585. if test 456 -ne `wc -c <'fig2dev/fig2ps2tex.script'`; then
  1586.     echo shar: \"'fig2dev/fig2ps2tex.script'\" unpacked with wrong size!
  1587. fi
  1588. # end of 'fig2dev/fig2ps2tex.script'
  1589. fi
  1590. if test -f 'fig2dev/free.c' -a "${1}" != "-c" ; then 
  1591.   echo shar: Will not clobber existing file \"'fig2dev/free.c'\"
  1592. else
  1593. echo shar: Extracting \"'fig2dev/free.c'\" \(3264 characters\)
  1594. sed "s/^X//" >'fig2dev/free.c' <<'END_OF_FILE'
  1595. X/*
  1596. X * TransFig: Facility for Translating Fig code
  1597. X * Copyright (c) 1985 Supoj Sutantavibul
  1598. X * Copyright (c) 1991 Micah Beck
  1599. X *
  1600. X * Permission to use, copy, modify, distribute, and sell this software and its
  1601. X * documentation for any purpose is hereby granted without fee, provided that
  1602. X * the above copyright notice appear in all copies and that both that
  1603. X * copyright notice and this permission notice appear in supporting
  1604. X * documentation. The authors make no representations about the suitability 
  1605. X * of this software for any purpose.  It is provided "as is" without express 
  1606. X * or implied warranty.
  1607. X *
  1608. X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  1609. X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  1610. X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  1611. X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  1612. X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  1613. X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  1614. X * PERFORMANCE OF THIS SOFTWARE.
  1615. X *
  1616. X */
  1617. X
  1618. X#include <stdio.h>
  1619. X#include <math.h>
  1620. X#include "object.h"
  1621. X
  1622. Xfree_arc(list)
  1623. XF_arc    **list;
  1624. X{
  1625. X    F_arc    *a, *arc;
  1626. X
  1627. X    for (a = *list; a != NULL;) {
  1628. X        arc = a;
  1629. X        a = a->next;
  1630. X        if (arc->for_arrow) free((char*)arc->for_arrow);
  1631. X        if (arc->back_arrow) free((char*)arc->back_arrow);
  1632. X        free((char*)arc);
  1633. X        } 
  1634. X    *list = NULL;
  1635. X    }
  1636. X
  1637. Xfree_compound(list)
  1638. XF_compound    **list;
  1639. X{
  1640. X    F_compound    *c, *compound;
  1641. X
  1642. X    for (c = *list; c != NULL;) {
  1643. X        compound = c;
  1644. X        c = c->next;
  1645. X        free_arc(&compound->arcs);
  1646. X        free_compound(&compound->compounds);
  1647. X        free_ellipse(&compound->ellipses);
  1648. X        free_line(&compound->lines);
  1649. X        free_spline(&compound->splines);
  1650. X        free_text(&compound->texts);
  1651. X        free((char*)compound);
  1652. X        } 
  1653. X    *list = NULL;
  1654. X    }
  1655. X
  1656. Xfree_ellipse(list)
  1657. XF_ellipse    **list;
  1658. X{
  1659. X    F_ellipse    *e, *ellipse;
  1660. X
  1661. X    for (e = *list; e != NULL;) {
  1662. X        ellipse = e;
  1663. X        e = e->next;
  1664. X        free((char*)ellipse);
  1665. X        } 
  1666. X    *list = NULL;
  1667. X    }
  1668. X
  1669. Xfree_line(list)
  1670. XF_line    **list;
  1671. X{
  1672. X    F_line    *l, *line;
  1673. X
  1674. X    for (l = *list; l != NULL;) {
  1675. X        line = l;
  1676. X        l = l->next;
  1677. X        free_linestorage(line);
  1678. X        } 
  1679. X    *list = NULL;
  1680. X    }
  1681. X
  1682. Xfree_text(list)
  1683. XF_text    **list;
  1684. X{
  1685. X    F_text    *t, *text;
  1686. X
  1687. X    for (t = *list; t != NULL;) {
  1688. X        text = t;
  1689. X        t = t->next;
  1690. X        cfree(text->cstring);
  1691. X        free((char*)text);
  1692. X        } 
  1693. X    *list = NULL;
  1694. X    }
  1695. X
  1696. Xfree_spline(list)
  1697. XF_spline    **list;
  1698. X{
  1699. X    F_spline    *s, *spline;
  1700. X
  1701. X    for (s = *list; s != NULL;) {
  1702. X        spline = s;
  1703. X        s = s->next;
  1704. X        free_splinestorage(spline);
  1705. X        }
  1706. X    *list = NULL;
  1707. X    }
  1708. X
  1709. Xfree_splinestorage(s)
  1710. XF_spline      *s;
  1711. X{
  1712. X        F_point        *p, *q;
  1713. X        F_control    *a, *b;
  1714. X
  1715. X        for (p = s->points; p != NULL; p = q) {
  1716. X            q = p->next;
  1717. X            free((char*)p);
  1718. X            }
  1719. X        for (a = s->controls; a != NULL; a = b) {
  1720. X            b = a->next;
  1721. X            free((char*)a);
  1722. X            }
  1723. X    if (s->for_arrow) free((char*)s->for_arrow);
  1724. X    if (s->back_arrow) free((char*)s->back_arrow);
  1725. X        free((char*)s);
  1726. X        }
  1727. X
  1728. Xfree_linestorage(l)
  1729. XF_line    *l;
  1730. X{
  1731. X    F_point    *p, *q;
  1732. X
  1733. X    for (p = l->points; p != NULL; p = q) {
  1734. X        q = p->next;
  1735. X        free((char*)p);
  1736. X        }
  1737. X    if (l->for_arrow) free((char*)l->for_arrow);
  1738. X    if (l->back_arrow) free((char*)l->back_arrow);
  1739. X    free((char*)l);
  1740. X    }
  1741. END_OF_FILE
  1742. if test 3264 -ne `wc -c <'fig2dev/free.c'`; then
  1743.     echo shar: \"'fig2dev/free.c'\" unpacked with wrong size!
  1744. fi
  1745. # end of 'fig2dev/free.c'
  1746. fi
  1747. if test -f 'fig2dev/iso2tex.c' -a "${1}" != "-c" ; then 
  1748.   echo shar: Will not clobber existing file \"'fig2dev/iso2tex.c'\"
  1749. else
  1750. echo shar: Extracting \"'fig2dev/iso2tex.c'\" \(3395 characters\)
  1751. sed "s/^X//" >'fig2dev/iso2tex.c' <<'END_OF_FILE'
  1752. X/*
  1753. X * TransFig: Facility for Translating Fig code
  1754. X * Copyright (c) 1985 Supoj Sutantavibul
  1755. X * Copyright (c) 1991 Micah Beck
  1756. X *
  1757. X * Permission to use, copy, modify, distribute, and sell this software and its
  1758. X * documentation for any purpose is hereby granted without fee, provided that
  1759. X * the above copyright notice appear in all copies and that both that
  1760. X * copyright notice and this permission notice appear in supporting
  1761. X * documentation. The authors make no representations about the suitability 
  1762. X * of this software for any purpose.  It is provided "as is" without express 
  1763. X * or implied warranty.
  1764. X *
  1765. X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  1766. X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  1767. X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  1768. X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  1769. X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  1770. X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  1771. X * PERFORMANCE OF THIS SOFTWARE.
  1772. X *
  1773. X */
  1774. X
  1775. X/* map ISO-Font Symbols to appropriate sequences in TeX */
  1776. X/* Herbert Bauer 22.11.1991 */
  1777. X
  1778. X/* B.Raichle 12.10.92, changed some of the definitions */
  1779. X
  1780. X
  1781. X/* B.Raichle 12.10.92, changed some of the definitions */
  1782. X
  1783. X
  1784. Xchar *ISOtoTeX[] =   /* starts at octal 240 */
  1785. X{
  1786. X  "{}",
  1787. X  "{!`}",    /* inverse ! */
  1788. X  "{}",        /* cent sign (?) */
  1789. X  "\\pounds{}",
  1790. X  "{}",        /* circle with x mark */
  1791. X  "{}",        /* Yen */
  1792. X  "{}",        /* some sort of space - doen't work under mwm */
  1793. X  "\\S{}",    /* paragraph sign */
  1794. X  "\\\"{}",        /* diaresis points */
  1795. X  "\\copyright{}",
  1796. X  "\\b{a}",
  1797. X  "\\mbox{$\\ll$}",        /* << */
  1798. X  "{--}",     /* longer dash - doesn't work with mwm */
  1799. X  "{-}",        /* short dash */
  1800. X  "{}",        /* trademark */
  1801. X  "{}",        /* overscore */
  1802. X/* 0xb0 */
  1803. X  "{\\lower.2ex\\hbox{\\char\\'27}}",        /* degree */
  1804. X  "\\mbox{$\\pm$}",    /* plus minus - math mode */
  1805. X  "\\mbox{$\\mathsurround 0pt{}^2$}",        /* squared  - math mode */
  1806. X  "\\mbox{$\\mathsurround 0pt{}^3$}",        /* cubed  - math mode */
  1807. X  "\\'{}",        /* accent egue */
  1808. X  "\\mbox{$\\mu$}",    /* greek letter mu - math mode */
  1809. X  "\\P{}",    /* paragraph */
  1810. X  "\\mbox{$\\cdot$}",    /* centered dot  - math mode */
  1811. X  "",
  1812. X  "\\mbox{$\\mathsurround 0pt{}^1$}",        /* superscript 1  - math mode */
  1813. X  "\\b{o}",
  1814. X  "\\mbox{$\\gg$}",        /* >> */
  1815. X  "\\mbox{$1\\over 4$}",    /* 1/4 - math mode */
  1816. X  "\\mbox{$1\\over 2$}",    /* 1/2 - math mode */
  1817. X  "\\mbox{$3\\over 4$}",    /* 3/4 - math mode */
  1818. X  "{?`}",        /* inverse ? */
  1819. X/* 0xc0 */
  1820. X  "\\`A",
  1821. X  "\\'A",
  1822. X  "\\^A",
  1823. X  "\\~A",
  1824. X  "\\\"A",
  1825. X  "\\AA{}",
  1826. X  "\\AE{}",
  1827. X  "\\c C",
  1828. X  "\\`E",
  1829. X  "\\'E",
  1830. X  "\\^E",
  1831. X  "\\\"E",
  1832. X  "\\`I",
  1833. X  "\\'I",
  1834. X  "\\^I",
  1835. X  "\\\"I",
  1836. X/* 0xd0 */
  1837. X  "{\\rlap{\\raise.3ex\\hbox{--}}D}", /* Eth */
  1838. X  "\\~N",
  1839. X  "\\`O",
  1840. X  "\\'O",
  1841. X  "\\^O",
  1842. X  "\\~O",
  1843. X  "\\\"O",
  1844. X  "\\mbox{$\\times$}",    /* math mode */
  1845. X  "\\O{}",
  1846. X  "\\`U",
  1847. X  "\\'U",
  1848. X  "\\^U",
  1849. X  "\\\"U",
  1850. X  "\\'Y",
  1851. X  "{}",        /* letter P wide-spaced */
  1852. X  "\\ss{}",
  1853. X/* 0xe0 */
  1854. X  "\\`a",
  1855. X  "\\'a",
  1856. X  "\\^a",
  1857. X  "\\~a",
  1858. X  "\\\"a",
  1859. X  "\\aa{}",
  1860. X  "\\ae{}",
  1861. X  "\\c c",
  1862. X  "\\`e",
  1863. X  "\\'e",
  1864. X  "\\^e",
  1865. X  "\\\"e",
  1866. X  "\\`\\i{}",
  1867. X  "\\'\\i{}",
  1868. X  "\\^\\i{}",
  1869. X  "\\\"\\i{}",
  1870. X/* 0xf0 */
  1871. X  "\\mbox{$\\partial$}",    /* correct?  - math mode */
  1872. X  "\\~n",
  1873. X  "\\`o",
  1874. X  "\\'o",
  1875. X  "\\^o",
  1876. X  "\\~o",
  1877. X  "\\\"o",
  1878. X  "\\mbox{$\\div$}",    /* math mode */
  1879. X  "\\o{}",
  1880. X  "\\`u",
  1881. X  "\\'u",
  1882. X  "\\^u",
  1883. X  "\\\"u",
  1884. X  "\\'y",
  1885. X  "{}",        /* letter p wide-spaced */
  1886. X  "\\\"y"
  1887. X};
  1888. X
  1889. END_OF_FILE
  1890. if test 3395 -ne `wc -c <'fig2dev/iso2tex.c'`; then
  1891.     echo shar: \"'fig2dev/iso2tex.c'\" unpacked with wrong size!
  1892. fi
  1893. # end of 'fig2dev/iso2tex.c'
  1894. fi
  1895. if test -f 'fig2dev/pi.h' -a "${1}" != "-c" ; then 
  1896.   echo shar: Will not clobber existing file \"'fig2dev/pi.h'\"
  1897. else
  1898. echo shar: Extracting \"'fig2dev/pi.h'\" \(1169 characters\)
  1899. sed "s/^X//" >'fig2dev/pi.h' <<'END_OF_FILE'
  1900. X/*
  1901. X * TransFig: Facility for Translating Fig code
  1902. X * Copyright (c) 1985 Supoj Sutantavibul
  1903. X * Copyright (c) 1991 Micah Beck
  1904. X *
  1905. X * Permission to use, copy, modify, distribute, and sell this software and its
  1906. X * documentation for any purpose is hereby granted without fee, provided that
  1907. X * the above copyright notice appear in all copies and that both that
  1908. X * copyright notice and this permission notice appear in supporting
  1909. X * documentation. The authors make no representations about the suitability 
  1910. X * of this software for any purpose.  It is provided "as is" without express 
  1911. X * or implied warranty.
  1912. X *
  1913. X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  1914. X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  1915. X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  1916. X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  1917. X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  1918. X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  1919. X * PERFORMANCE OF THIS SOFTWARE.
  1920. X *
  1921. X */
  1922. X
  1923. X#ifndef M_PI
  1924. X#define M_PI    3.14159265358979323846
  1925. X#define M_PI_2    1.57079632679489661923
  1926. X#endif
  1927. END_OF_FILE
  1928. if test 1169 -ne `wc -c <'fig2dev/pi.h'`; then
  1929.     echo shar: \"'fig2dev/pi.h'\" unpacked with wrong size!
  1930. fi
  1931. # end of 'fig2dev/pi.h'
  1932. fi
  1933. if test -f 'fig2dev/pic2tpic.script' -a "${1}" != "-c" ; then 
  1934.   echo shar: Will not clobber existing file \"'fig2dev/pic2tpic.script'\"
  1935. else
  1936. echo shar: Extracting \"'fig2dev/pic2tpic.script'\" \(1034 characters\)
  1937. sed "s/^X//" >'fig2dev/pic2tpic.script' <<'END_OF_FILE'
  1938. X#!/bin/sh
  1939. Xsed -e '
  1940. X    s/\(\\f[^(]\)\(\\s[0-9]*\)/\2\1/g
  1941. X    s/\(\\f(..\)\(\\s[0-9]*\)/\2\1/g
  1942. X    s/"\([^"]*\)\\fP\([^"]*\)"/"\1\2"/g
  1943. X    s/"\([^"]*\)\\fR\([^"]*\)"/"\1\\rm \2"/g
  1944. X    s/"\([^"]*\)\\fI\([^"]*\)"/"\1\\it \2"/g
  1945. X    s/"\([^"]*\)\\fB\([^"]*\)"/"\1\\bf \2"/g
  1946. X    s/"\([^"]*\)\\fH\([^"]*\)"/"\1\\sf \2"/g
  1947. X    s/"\([^"]*\)\\fC\([^"]*\)"/"\1\\tt \2"/g
  1948. X    s/"\([^"]*\)\\f(CO\([^"]*\)"/"\1\\tt \2"/g
  1949. X    s/"\([^"]*\)\\f(CW\([^"]*\)"/"\1\\tt \2"/g
  1950. X    s/"\([^"]*\)\\s0\([^"]*\)"/"\1\2"/g
  1951. X    s/"\([^"]*\)\\s[56]\([^0-9][^"]*\)"/"\1\\tiny \2"/g
  1952. X    s/"\([^"]*\)\\s7\([^0-9][^"]*\)"/"\1\\scriptsize \2"/g
  1953. X    s/"\([^"]*\)\\s8\([^0-9][^"]*\)"/"\1\\footnotesize \2"/g
  1954. X    s/"\([^"]*\)\\s9\([^0-9][^"]*\)"/"\1\\small \2"/g
  1955. X    s/"\([^"]*\)\\s1[01]\([^"]*\)"/"\1\\normalsize \2"/g
  1956. X    s/"\([^"]*\)\\s1[23]\([^"]*\)"/"\1\\large \2"/g
  1957. X    s/"\([^"]*\)\\s1[4-6]\([^"]*\)"/"\1\\Large \2"/g
  1958. X    s/"\([^"]*\)\\s1[7-9]\([^"]*\)"/"\1\\LARGE \2"/g
  1959. X    s/"\([^"]*\)\\s2[0-3]\([^"]*\)"/"\1\\huge \2"/g
  1960. X    s/"\([^"]*\)\\s2[4-9]\([^"]*\)"/"\1\\Huge \2"/g
  1961. X    s/"\([^"]*\)\\s3[0-9]\([^"]*\)"/"\1\\Huge \2"/g
  1962. X    ' $*
  1963. END_OF_FILE
  1964. if test 1034 -ne `wc -c <'fig2dev/pic2tpic.script'`; then
  1965.     echo shar: \"'fig2dev/pic2tpic.script'\" unpacked with wrong size!
  1966. fi
  1967. # end of 'fig2dev/pic2tpic.script'
  1968. fi
  1969. if test -f 'fig2dev/strstr.c' -a "${1}" != "-c" ; then 
  1970.   echo shar: Will not clobber existing file \"'fig2dev/strstr.c'\"
  1971. else
  1972. echo shar: Extracting \"'fig2dev/strstr.c'\" \(1384 characters\)
  1973. sed "s/^X//" >'fig2dev/strstr.c' <<'END_OF_FILE'
  1974. X/*
  1975. X * TransFig: Facility for Translating Fig code
  1976. X * Copyright (c) 1985 Supoj Sutantavibul
  1977. X * Copyright (c) 1991 Micah Beck
  1978. X *
  1979. X * Permission to use, copy, modify, distribute, and sell this software and its
  1980. X * documentation for any purpose is hereby granted without fee, provided that
  1981. X * the above copyright notice appear in all copies and that both that
  1982. X * copyright notice and this permission notice appear in supporting
  1983. X * documentation. The authors make no representations about the suitability 
  1984. X * of this software for any purpose.  It is provided "as is" without express 
  1985. X * or implied warranty.
  1986. X *
  1987. X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  1988. X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  1989. X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  1990. X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  1991. X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  1992. X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  1993. X * PERFORMANCE OF THIS SOFTWARE.
  1994. X *
  1995. X */
  1996. X
  1997. X#define    NULL    0
  1998. X
  1999. X/*
  2000. X * Find the first occurrence of s2 in s1.
  2001. X */
  2002. Xchar *
  2003. Xstrstr(s1, s2)
  2004. X    register char *s1, *s2;
  2005. X{
  2006. X    register int i, len, n;
  2007. X
  2008. X    if (s2[0] == '\0')
  2009. X        return(s1);
  2010. X    len = strlen(s2);
  2011. X    n = strlen(s1) - len;
  2012. X    for (i = 0; i <= n; i++)
  2013. X        if (strcmp(s1 + i, s2) == 0)
  2014. X            return(s1 + i);
  2015. X    return(NULL);
  2016. X}
  2017. END_OF_FILE
  2018. if test 1384 -ne `wc -c <'fig2dev/strstr.c'`; then
  2019.     echo shar: \"'fig2dev/strstr.c'\" unpacked with wrong size!
  2020. fi
  2021. # end of 'fig2dev/strstr.c'
  2022. fi
  2023. if test ! -d 'transfig' ; then
  2024.     echo shar: Creating directory \"'transfig'\"
  2025.     mkdir 'transfig'
  2026. fi
  2027. if test -f 'transfig/Imakefile' -a "${1}" != "-c" ; then 
  2028.   echo shar: Will not clobber existing file \"'transfig/Imakefile'\"
  2029. else
  2030. echo shar: Extracting \"'transfig/Imakefile'\" \(642 characters\)
  2031. sed "s/^X//" >'transfig/Imakefile' <<'END_OF_FILE'
  2032. X#    TransFig : Fig code translation Makefile creation program
  2033. X#
  2034. X#    Micah Beck
  2035. X#
  2036. X
  2037. XDEPLIBS =
  2038. XINCLUDES = -I..
  2039. X
  2040. XSRCS = transfig.c txfile.c mkfile.c sys.c
  2041. XOBJS = transfig.o txfile.o mkfile.o sys.o
  2042. X
  2043. XComplexProgramTarget(transfig)
  2044. X
  2045. Xall:: transfig.man fig2dev.man fig2ps2tex.man pic2tpic.man
  2046. X
  2047. Xtransfig.man: ../doc/transfig.1
  2048. X    ln -s ../doc/transfig.1 transfig.man
  2049. X
  2050. XInstallManPage(fig2ps2tex,$(MANDIR))
  2051. XInstallManPage(pic2tpic,$(MANDIR))
  2052. X
  2053. Xfig2dev.man: ../doc/fig2dev.1
  2054. X    ln -s ../doc/fig2dev.1 fig2dev.man
  2055. X
  2056. Xfig2ps2tex.man: ../doc/fig2ps2tex.1
  2057. X    ln -s ../doc/fig2ps2tex.1 fig2ps2tex.man
  2058. X
  2059. Xpic2tpic.man: ../doc/pic2tpic.1
  2060. X    ln -s ../doc/pic2tpic.1 pic2tpic.man
  2061. END_OF_FILE
  2062. if test 642 -ne `wc -c <'transfig/Imakefile'`; then
  2063.     echo shar: \"'transfig/Imakefile'\" unpacked with wrong size!
  2064. fi
  2065. # end of 'transfig/Imakefile'
  2066. fi
  2067. if test -f 'transfig/sys.c' -a "${1}" != "-c" ; then 
  2068.   echo shar: Will not clobber existing file \"'transfig/sys.c'\"
  2069. else
  2070. echo shar: Extracting \"'transfig/sys.c'\" \(1933 characters\)
  2071. sed "s/^X//" >'transfig/sys.c' <<'END_OF_FILE'
  2072. X/*
  2073. X * TransFig: Facility for Translating Fig code
  2074. X * Copyright (c) 1985 Supoj Sutantavibul
  2075. X * Copyright (c) 1991 Micah Beck
  2076. X *
  2077. X * Permission to use, copy, modify, distribute, and sell this software and its
  2078. X * documentation for any purpose is hereby granted without fee, provided that
  2079. X * the above copyright notice appear in all copies and that both that
  2080. X * copyright notice and this permission notice appear in supporting
  2081. X * documentation. The authors make no representations about the suitability 
  2082. X * of this software for any purpose.  It is provided "as is" without express 
  2083. X * or implied warranty.
  2084. X *
  2085. X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  2086. X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  2087. X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  2088. X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  2089. X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  2090. X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  2091. X * PERFORMANCE OF THIS SOFTWARE.
  2092. X *
  2093. X */
  2094. X
  2095. X#include <stdio.h>
  2096. X#include "transfig.h"
  2097. X
  2098. X#define MAXSYS 10000
  2099. Xstatic char sysbuf[MAXSYS];
  2100. X
  2101. Xchar *sysls()
  2102. X{
  2103. X  FILE *ls;
  2104. X  int i;
  2105. X  char c;
  2106. X
  2107. X  ls = popen("/bin/ls *.fig", "r");
  2108. X  i = 0;
  2109. X  c = fgetc(ls);
  2110. X  while (c != EOF & i < MAXSYS-1)
  2111. X  {
  2112. X    sysbuf[i] = c;
  2113. X    i += 1;
  2114. X    c = fgetc(ls);
  2115. X  }
  2116. X  sysbuf[i] = '\0';
  2117. X  return sysbuf;
  2118. X}
  2119. X
  2120. Xsysmv(f)
  2121. Xchar *f;
  2122. X{
  2123. X  sprintf(sysbuf, "%s~", f);
  2124. X  unlink(sysbuf);
  2125. X  if (!link(f, sysbuf)) unlink(f);
  2126. X}
  2127. X
  2128. Xchar *strip(str, suf)
  2129. Xchar *str, *suf;
  2130. X{
  2131. X  char *p1, *p2;
  2132. X
  2133. X  for (p1 = &str[strlen(str)-1], p2 = &suf[strlen(suf)-1];
  2134. X    (p1 >= str && p2 >= suf) && (*p1 == *p2);
  2135. X    --p1, --p2);
  2136. X
  2137. X  if (p2 < suf)
  2138. X  {
  2139. X    *(p1+1) = '\0';
  2140. X    return str;
  2141. X  } else
  2142. X    return NULL;
  2143. X}
  2144. X
  2145. Xchar *mksuff(name, suff)
  2146. Xchar *name, *suff;
  2147. X{
  2148. X  char *temp;
  2149. X
  2150. X  temp = (char *)malloc(strlen(name)+strlen(suff)+1);
  2151. X  strcpy(temp, name);
  2152. X  strcat(temp, suff);
  2153. X  return temp;
  2154. X}
  2155. END_OF_FILE
  2156. if test 1933 -ne `wc -c <'transfig/sys.c'`; then
  2157.     echo shar: \"'transfig/sys.c'\" unpacked with wrong size!
  2158. fi
  2159. # end of 'transfig/sys.c'
  2160. fi
  2161. if test -f 'transfig/transfig.h' -a "${1}" != "-c" ; then 
  2162.   echo shar: Will not clobber existing file \"'transfig/transfig.h'\"
  2163. else
  2164. echo shar: Extracting \"'transfig/transfig.h'\" \(1928 characters\)
  2165. sed "s/^X//" >'transfig/transfig.h' <<'END_OF_FILE'
  2166. X/*
  2167. X * TransFig: Facility for Translating Fig code
  2168. X * Copyright (c) 1985 Supoj Sutantavibul
  2169. X * Copyright (c) 1991 Micah Beck
  2170. X *
  2171. X * Permission to use, copy, modify, distribute, and sell this software and its
  2172. X * documentation for any purpose is hereby granted without fee, provided that
  2173. X * the above copyright notice appear in all copies and that both that
  2174. X * copyright notice and this permission notice appear in supporting
  2175. X * documentation. The authors make no representations about the suitability 
  2176. X * of this software for any purpose.  It is provided "as is" without express 
  2177. X * or implied warranty.
  2178. X *
  2179. X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  2180. X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  2181. X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  2182. X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  2183. X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  2184. X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  2185. X * PERFORMANCE OF THIS SOFTWARE.
  2186. X *
  2187. X */
  2188. X
  2189. X#ifdef SYSV
  2190. X#include <string.h>
  2191. X#else
  2192. X#include <strings.h>
  2193. X#define    strchr    index
  2194. X#define    strrchr    rindex
  2195. X#endif
  2196. X
  2197. X/*
  2198. X * converters program names
  2199. X */
  2200. X#define FIG2DEV    "fig2dev"
  2201. X#define PIC2FIG "pic2fig"
  2202. X#define APG2FIG "apgto f"
  2203. X
  2204. X/*
  2205. X * filename defaults
  2206. X */
  2207. X#define MK "Makefile"
  2208. X#define TX "transfig.tex"
  2209. X
  2210. Xenum language  {box, epic, eepic, eepicemu, latex,
  2211. X    pictex, postscript, psfig, pstex, textyl, tpic};
  2212. X#define MAXLANG tpic
  2213. X
  2214. Xenum input {apg, fig, pic, ps};
  2215. X#define MAXINPUT xps
  2216. X
  2217. Xtypedef struct argument{
  2218. X    char *name, *interm, *f, *s, *m, *o, *tofig, *topic, *tops;
  2219. X    enum language tolang;
  2220. X    enum input type;
  2221. X    struct argument *next;
  2222. X} argument ;
  2223. X
  2224. Xextern enum language str2lang();
  2225. Xextern char *lname[];
  2226. Xextern char *iname[];
  2227. X
  2228. Xextern char *sysls(), *mksuff();
  2229. Xextern argument *arglist;
  2230. Xextern char *txfile, *mkfile;
  2231. X
  2232. Xextern char *optarg;
  2233. Xextern int optind;
  2234. X
  2235. END_OF_FILE
  2236. if test 1928 -ne `wc -c <'transfig/transfig.h'`; then
  2237.     echo shar: \"'transfig/transfig.h'\" unpacked with wrong size!
  2238. fi
  2239. # end of 'transfig/transfig.h'
  2240. fi
  2241. if test -f 'transfig/txfile.c' -a "${1}" != "-c" ; then 
  2242.   echo shar: Will not clobber existing file \"'transfig/txfile.c'\"
  2243. else
  2244. echo shar: Extracting \"'transfig/txfile.c'\" \(3083 characters\)
  2245. sed "s/^X//" >'transfig/txfile.c' <<'END_OF_FILE'
  2246. X/*
  2247. X * TransFig: Facility for Translating Fig code
  2248. X * Copyright (c) 1985 Supoj Sutantavibul
  2249. X * Copyright (c) 1991 Micah Beck
  2250. X *
  2251. X * Permission to use, copy, modify, distribute, and sell this software and its
  2252. X * documentation for any purpose is hereby granted without fee, provided that
  2253. X * the above copyright notice appear in all copies and that both that
  2254. X * copyright notice and this permission notice appear in supporting
  2255. X * documentation. The authors make no representations about the suitability 
  2256. X * of this software for any purpose.  It is provided "as is" without express 
  2257. X * or implied warranty.
  2258. X *
  2259. X * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  2260. X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  2261. X * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  2262. X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  2263. X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  2264. X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  2265. X * PERFORMANCE OF THIS SOFTWARE.
  2266. X *
  2267. X */
  2268. X
  2269. X#include <stdio.h>
  2270. X#include "transfig.h"
  2271. X
  2272. X/*
  2273. X * create appropriate .tex file
  2274. X */
  2275. Xtexfile(tx, in, arg_list)
  2276. XFILE *tx;
  2277. Xchar *in;
  2278. Xargument *arg_list;
  2279. X{
  2280. X  enum language to;
  2281. X  argument *a, *arg_l;
  2282. X  int texfonts = 1;  /* do we use TeX fonts for output? */
  2283. X
  2284. X  for (a = arglist; a; a = a->next) {
  2285. X     to = a->tolang;
  2286. X
  2287. X     /* see if we already have this language */
  2288. X     for (arg_l = arglist; arg_l != a; arg_l = arg_l->next)
  2289. X    if ( arg_l->tolang == to ) break;
  2290. X    
  2291. X     if ( arg_l == a )
  2292. X    switch (to)
  2293. X    {
  2294. X    case box:
  2295. X        fprintf(tx, "\\typeout{TransFig: null figures.}\n");
  2296. X        texfonts = 0;
  2297. X        break;
  2298. X
  2299. X    case eepicemu:
  2300. X        to = eepicemu;
  2301. X
  2302. X    case eepic:
  2303. X#ifdef eemulation
  2304. X        to = eepicemu;
  2305. X#endif
  2306. X
  2307. X    case epic:
  2308. X        fprintf(tx, "\\typeout{TransFig: figures in %s.}\n",
  2309. X                            lname[(int)to]);
  2310. X        if (to == eepicemu || to == eepic)
  2311. X            fprintf(tx, "\\documentstyle{epic}");
  2312. X        fprintf(tx, "\\documentstyle{%s}\n", lname[(int)to]);
  2313. X        break;
  2314. X
  2315. X    case latex:
  2316. X        fprintf(tx, "\\typeout{TransFig: figures in LaTeX.}\n");
  2317. X        break;
  2318. X
  2319. X    case pictex:
  2320. X        fprintf(tx, "\\typeout{TransFig: figures in PiCTeX.}\n");
  2321. X        fprintf(tx, "\
  2322. X\\ifx\\fivrm\\undefined\n\
  2323. X  \\font\\fivrm=cmr5\\relax\n\
  2324. X\\fi\n\
  2325. X\\input{prepictex}\n\
  2326. X\\input{pictex}\n\
  2327. X\\input{postpictex}\n");
  2328. X        break;
  2329. X
  2330. X    case postscript:
  2331. X        fprintf(tx, "\\typeout{TransFig: figures in PostScript.}\n");
  2332. X        texfonts = 0;
  2333. X        break;
  2334. X
  2335. X    case pstex: 
  2336. X        fprintf(tx, "\\typeout{TransFig: figure text in LaTeX.}\n");
  2337. X        fprintf(tx, "\\typeout{TransFig: figures in PostScript.}\n");
  2338. X        break;
  2339. X
  2340. X    case psfig:
  2341. X        fprintf(tx, "\\typeout{TransFig: figures in PostScript w/psfig.}\n");
  2342. X        fprintf(tx, "\\documentstyle{psfig}\n");
  2343. X        texfonts = 0;
  2344. X        break;
  2345. X
  2346. X    case textyl:
  2347. X        fprintf(tx, "\\typeout{TransFig: figures in TeXtyl.}\n");
  2348. X        break;
  2349. X
  2350. X    case tpic:
  2351. X        fprintf(tx, "\\typeout{TransFig: figures in tpic.}\n");
  2352. X        texfonts = 0;
  2353. X        break;
  2354. X
  2355. X    default:
  2356. X        fprintf(tx, "Unknown graphics language %s\n", lname[(int)to]);
  2357. X        exit(1);
  2358. X        break;
  2359. X
  2360. X    }
  2361. X  }
  2362. X
  2363. X  if (*in) fprintf(tx, "\n\\input{%s}\n", in);
  2364. X
  2365. X  fprintf(tx, "\n\\endinput\n");
  2366. X}
  2367. END_OF_FILE
  2368. if test 3083 -ne `wc -c <'transfig/txfile.c'`; then
  2369.     echo shar: \"'transfig/txfile.c'\" unpacked with wrong size!
  2370. fi
  2371. # end of 'transfig/txfile.c'
  2372. fi
  2373. echo shar: End of archive 1 \(of 7\).
  2374. cp /dev/null ark1isdone
  2375. MISSING=""
  2376. for I in 1 2 3 4 5 6 7 ; do
  2377.     if test ! -f ark${I}isdone ; then
  2378.     MISSING="${MISSING} ${I}"
  2379.     fi
  2380. done
  2381. if test "${MISSING}" = "" ; then
  2382.     echo You have unpacked all 7 archives.
  2383.     rm -f ark[1-9]isdone
  2384. else
  2385.     echo You still need to unpack the following archives:
  2386.     echo "        " ${MISSING}
  2387. fi
  2388. ##  End of shell archive.
  2389. exit 0
  2390.