
Xfig 2.1.6 and TransFig 2.1.6 for VMS                           April 1993
-------------------------------------

   This is a VMS port of the UNIX packages Xfig, Version 2.1.6 and TransFig, 
Version 2.1.6. All  #ifdef VMS  code was added by  brooke@leva.icf.leeds.ac.uk
and is nothing to do with any of the original authors of Xfig.

   Xfig makes use of X11R4 Athena Widgets, the files for which are not supplied 
with this package. See under 'Installation' below for details of how to get 
hold of a VMS version of the extra files needed if you do not already have them.

   As much of the original UNIX code as possible has been left unchanged, 
consistent with making the program usable under VMS. Some aspects, in 
particular the filename mask behaviour in the File... and Export... directory 
browsers could be made a little more intelligent with respect to VMS filename 
syntax.

   So far, the only part of the TransFig package to be ported to VMS is Fig2Dev
but this is adequate for basic support of the export formats offered by Xfig.

   The package has only been tried using VMS 5.5-2, DECwindows Motif 1.1 and 
Version 3.2 of the VAX C compiler. Earlier or later versions of any of these 
may introduce additional requirements and problems.

   Thanks are due to local users for extensive testing of the VMS port, 
to Ed Groth from Princeton for valuable comments about the installation 
procedure and for Beta testing of the package, to Patrick Mahan from TGV
for his excellent port of the X11R4 code to VMS, and not least to the original 
authors of Xfig and TransFig for making things relatively easy for me.

   THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE 
AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.


       David M Brooke,                  Department Of Mechanical Engineering,
                                        University Of Leeds,
                                        Leeds,
                                        LS2 9JT,
                                        United Kingdom.

  JANET: brooke@uk.ac.leeds.icf.leva    Internet: brooke@leva.icf.leeds.ac.uk

--------------------------------------------------------------------------------

The files and directories for Xfig and TransFig are as follows:
(Files marked '+' were added or modified for VMS)

[VMSXFIG]
      +  00README.VMS   - This file
      +  build.com      - VMS command procedure to build Xfig and Fig2Dev

   [.XFIG] ----- Source code for Xfig
         CHANGES        - who did what and when
         CompKeyDB      - multi-key character database file
         Fig.ad         - X resource samples for UNIX Xfig
         Fig-color.ad   - additional UNIX X resource samples for color screens
         Imakefile      - UNIX Imakefile
         Makefile       - UNIX Makefile
         README         - original UNIX README
      +  *.c            - C language source files
      +  *.h            - C language header files
      +  build.com      - VMS command procedure to compile and link Xfig
      +  fig.dat        - X resource samples for VMS Xfig
      +  fig.xbm        - 50x50 icon bitmap for DECwindows Motif
      +  xfig.opt       - VMS LINK option file

         [.DOC] ------ Documentation for Xfig
               FORMAT1.3   - old Fig file format specification
               FORMAT1.4   - old Fig file format specification
               FORMAT2.0   - old Fig file format specification
               FORMAT2.1   - latest Fig file format specification
               TODO        - suggestions for improvements to Xfig
               xfig.man    - unformatted UNIX 'man' page
            +  xfig.ps     - PostScript (troff formatted) version of xfig.man
            +  xfig.txt    - plain-text (nroff formatted) version of xfig.man

         [.EXAMPLES] - Example .FIG files
               README
               *.fig
               *.eps


   [.TRANSFIG]
         CHANGES
         Imakefile
         Makefile
         NOTES
         README
      +  SetFigFont.tex
         copyright     
         patchlevel.h

         [.DOC]
               fig2dev.1     - unformatted UNIX 'man' page
            +  fig2dev.ps    - PostScript (troff formatted) version of fig2dev.1
            +  fig2dev.txt   - plain-text (nroff formatted) version of fig2dev.1
               fig2ps2tex.1
               pic2tpic.1
               tpic.spec
               transfig.1

               [.MANUAL]
                     README
                     manual.tex
                     *.*

         [.FIG2DEV]
               Imakefile
               Makefile
            +  *.c           - C language source files
            +  *.h           - C language header files
            +  build.com     - VMS command procedure to compile and link Fig2Dev
               fig2ps2tex.script
               pic2tpic.script

               [.DEV]
                     Imakefile
                     Makefile
                  +  *.c           - C language source files
                  +  *.h           - C language header files
                  +  build.com     - VMS command procedure to compile the 
                                     device drivers

         [.TRANSFIG]
               Imakefile
               Makefile
               *.c
               *.h



Installation:
-------------

1 - The X11R4 files need to be installed:

   These files are on the Fall '92 DECUS Languages & Tools tape, and 
are also available for anonymous FTP as individual files from MVB.SAIC.COM
below the directory [DECUS.LT92B.X11R4]. 

The required files are:
   ...X11R4.INCLUDE]*.*
   ...X11R4.INCLUDE.XAW]*.*
   ...X11R4.INCLUDE.XMU]*.*
   ...X11R4.LIB]*.*
   ...X11R4.LIB.XAW]*.*
   ...X11R4.LIB.XMU]*.*
   ...X11R4.VMS]*.*
   ...X11R4.X11]*.*

@MAKE in ...X11R4.VMS] creates ...X11R4.LIB]XVMSUTILS.EXE
@MAKE in ...X11R4.LIB] creates ...X11R4.LIB]XAW.EXE and ...X11R4.LIB]XMU.EXE


   The earlier versions of these files (on the Spring '92 tape) can also be 
used but: 
   - the libraries are generated as OLBs, not sharable objects.
     [VMSXFIG.XFIG]XFIG.OPT and [VMSXFIG.TRANSFIG.FIG2DEV]FIG2DEV.OPT need to 
     be modified to reflect this.
   - when using VAX C 3.2, ...X11R4.LIB.XMU]CloseHook.c fails to compile
     because of a change in the DEC supplied header files from version 3.1.
     Edit CloseHook.h and add the following 5 lines just before the line that 
     goes:  "typedef caddr_t CloseHook;"

	 #ifdef vax11c
	 #include <decw$include/Xresource.h>
	 #else
	 #include <X11/Xresource.h>
	 #endif /* vax11c */


2 - Executables need to be created for Xfig and Fig2Dev:

   The file [VMSXFIG]BUILD.COM is a DCL command procedure that will compile 
the source files and link the executables for Xfig and Fig2Dev. BUILD.COM 
needs to be edited so that the X11R4_ROOT logical correctly refers to the 
location of your X11R4 directory. This master command procedure calls slave
BUILD.COMs in the [.XFIG], [.TRANSFIG] and [.TRANSFIG.DEV] directories. 
These should be checked to ensure that the compile-time /DEFINE settings are
appropriate, e.g. for the default paper size (A or A4).

   Running @BUILD in the [VMSXFIG] directory should be sufficient to 
create XFIG.EXE and FIG2DEV.EXE. Any compiler or linker warnings should be 
investigated.


3 - Run-time symbols and logicals need to be defined:

   Xfig and Fig2Dev need to be defined as 'foreign commands' (DCL symbols)
which point at the .EXE files. See the end of this section for samples.

   Unless you choose to install the sharable object libraries for XAW, XMU
and XVMSUTILS in SYS$SHARE, logical names will need to be defined to
specify the location of these libraries. Samples are included below.

   PostScript Printing under VMS is less standard than under UNIX, so instead
of coding a particular command verb into the C source the XFIG_PS_PRINT symbol 
has been introduced to permit easier site-specific customization. When a user 
selects the 'Print to Printer' option from the Print... popup, Xfig executes: 
      XFIG_PS_PRINT temporary_PostScript_filename
if the 'Printer' field is empty, or:   
      XFIG_PS_PRINT /QUEUE=printer_string temporary_PostScript_filename
if a printer is specified. An initial value for printer_string can be supplied 
as an X resource - see the description of FIG.DAT below. A typical setting for 
the XFIG_PS_PRINT symbol would be  PRINT/DELETE/QUEUE=PostScript  where the 
queue specification here is only a default; it can be overriden by the 
'Printer' field entry. It is important that /DELETE is included if possible, 
since under VMS Xfig does not attempt to delete the PostScript files it 
creates.

   Xfig reads a data file on startup to fix the settings of the multi-key
sequences for non-ASCII text characters. This file is conventionally called
CompKeyDB. and is located in the directory specified by the logical name
XFIGLIBDIR although the full path name for the file can also be specified as
an X resource.

   Three sample X resource files are supplied in the [VMSXFIG.XFIG] directory.
The two .AD files are the original UNIX application defaults samples, whereas
FIG.DAT contains a number of resources which are appropriate for use under VMS.
Xfig will work fine without any sort of application defaults, but moderate use 
of color for command buttons and intelligent filename mask settings make life 
easier for users and the recommendation is that FIG.DAT be used. Check that 
the startup setting of  Fig*printer*string:  is suitable for your installation. 
In order for FIG.DAT to be visible to all Xfig users it needs to be copied to 
one of the directories specified by the logical DECW$SYSTEM_DEFAULTS. Individual
users can then tailor Xfig's settings by creating a FIG.DAT in their own 
DECW$USER_DEFAULTS directory, usually SYS$LOGIN. The system FIG.DAT is read 
first, followed by the user's which can add or override resource settings.


   These run-time setups can usefully be collected into a SETUP_XFIG.COM file
which will look something like:

$ XFIG :== $disk:[VMSXFIG.XFIG]XFIG.EXE
$ FIG2DEV :== $disk:[VMSXFIG.TRANSFIG.FIG2DEV]FIG2DEV.EXE
$ XFIG_PS_PRINT :== PRINT/DELETE/QUEUE=PostScript
$ DEFINE XFIGLIBDIR disk:[VMSXFIG.XFIG]
$ DEFINE XAW disk:[X11R4.LIB]XAW.EXE
$ DEFINE XMU disk:[X11R4.LIB]XMU.EXE
$ DEFINE XVMSUTILS disk:[X11R4.LIB]XVMSUTILS.EXE



Notes For Users:
----------------

   Most of the basic features of Xfig are fairly obvious, but it is a very 
good idea to print out [VMSXFIG.XFIG.DOC]XFIG.PS (25 pages) and read it.

   It should not really be necessary to use Fig2Dev from the command line. 
Xfig does a pretty good job of supplying all of the right options for
Fig2Dev from its export popup.

   In order to use figures exported in LaTeX picture format which contain text,
the file SetFigFont.tex (in the [VMSXFIG.TRANSFIG] directory) needs to be 
\input into the LaTeX file in order to make the SetFigFont command available.
[ Under UNIX, SetFigFont is defined in the TransFig.TeX file generated by the 
TransFig program, but that's not part of the VMS port. ]

   Users may want to know about the sample figures in [VMSXFIG.XFIG.EXAMPLES].


