diff options
author | Karl Berry <karl@freefriends.org> | 2021-02-25 19:22:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-02-25 19:22:25 +0000 |
commit | ad547a6b5986815fda458221149728d9d9ab1d87 (patch) | |
tree | 16296910eb3eca724371474ea9aea3994dc69614 /Build/source/texk/dvipsk/vms | |
parent | 947b43de3dd21d58ccc2ffadefc4441ea1c2a813 (diff) |
restore Build,TODO from r57911
git-svn-id: svn://tug.org/texlive/trunk@57915 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipsk/vms')
-rw-r--r-- | Build/source/texk/dvipsk/vms/MAKETEXPK.COM | 127 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/vms/Makefile | 281 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/vms/README | 128 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/vms/README.VMS | 48 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/vms/dvips.cld | 55 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/vms/dvips.hlp | 435 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/vms/dvips.rnh | 532 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/vms/make.com | 351 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/vms/newmake.com | 387 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/vms/texc_scr.com | 104 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/vms/vaxcrtl.opt | 1 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/vms/vaxvms.c | 470 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/vms/vms.h | 17 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/vms/vms_gcc.txt | 75 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/vms/vms_gcc_paths.h | 33 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/vms/vmscli.c | 466 |
16 files changed, 3510 insertions, 0 deletions
diff --git a/Build/source/texk/dvipsk/vms/MAKETEXPK.COM b/Build/source/texk/dvipsk/vms/MAKETEXPK.COM new file mode 100644 index 00000000000..594d49092d7 --- /dev/null +++ b/Build/source/texk/dvipsk/vms/MAKETEXPK.COM @@ -0,0 +1,127 @@ +!!/bin/sh +! +! This script file makes a new TeX PK font, because one wasn't +! found. Parameters are: +! +! name dpi bdpi magnification [mode] +! +! `name' is the name of the font, such as `cmr10'. `dpi' is +! the resolution the font is needed at. `bdpi' is the base +! resolution, useful for figuring out the mode to make the font +! in. `magnification' is a string to pass to MF as the +! magnification. `mode', if supplied, is the mode to use. +! +! Note that this file must execute Metafont, and then gftopk, +! and place the result in the correct location for the PostScript +! driver to find it subsequently. If this doesn't work, it will +! be evident because MF will be invoked over and over again. +! +! Of course, it needs to be set up for your site. +! +! +$ set mess/nofa/nose/note/noid +$ newtex +$ set mess/se/fa/id/te +$ NAME = f$sear("mf_inputs:"+p1+".mf") +$ onlyname=f$parse(name,,,"name") +$ name= f$parse(name,,,"device")+f$parse(name,,,"directory")+f$parse(name,,, - + "name") +$ DPI = f$integer(P2) +$ BDPI = f$integer(P3) +$ MAG = f$edit(P4,"LOWERCASE") +$ MODE = P5 +$ if MODE .EQS. "" then +$ if BDPI .EQ. 300 +$ then +$ MODE := "imagen" +$ goto GotMode +$ endif +$ if BDPI .EQ. 400 +$ then +$ MODE := "nexthi" +$ goto GotMode +$ endif +$ if BDPI .EQ. 100 +$ then +$ MODE := "nextscreen" +$ goto GotMode +$ endif +$ if BDPI .EQ. 635 +$ then +$ MODE := "linolo" +$ goto GotMode +$ endif +$ if BDPI .EQ. 1270 +$ then +$ MODE := "linohi" +$ goto GotMode +$ endif +$ if BDPI .EQ. 2540 +$ then +$ MODE := "linosuper" +$ goto GotMode +$ endif +$ write sys$output "I don't know the mode for ",BDPI +$ write sys$output "Have your system admin update MakeTeXPK" +$ exit 1 +$ GotMode: +$ +$ GFNAME = f$fao("!AS.!ASgf",onlyNAME,f$string(DPI)) +$ PKNAME = f$fao("!AS.!ASPK",onlyNAME,f$string(DPI)) +$ +$ pkfilename = f$fao("tex_pk:!AS",PKNAME) +$ pkfile = f$search (pkfilename) +$ if pkfile .EQS. "" +$ then +$! Clean up on normal or abnormal exit +$ on control_y then goto ControlY +$ on error then goto ControlY +$ on severe_error then goto ControlY +$ +$ OLDDIR = f$environment("DEFAULT") +$ set def sys$login +$ command = f$fao - + ("mf ""\mode:=!AS; mag:=!AS; scrollmode ; input !AS""", - + MODE,MAG,NAME) +$ write sys$output "Creating font file for ",onlyname +$ write sys$output "Please wait about 2 minutes" +$ write sys$output "" +$ set noon +$ command +$ set on +$ +$ gffile=f$sear(onlyname+"."+f$str(dpi)+"gf") +$ if gffile .EQS. "" +$ then +$ write sys$output "Metafont failed for some reason on ",gfname +$ goto ControlY +$ endif +$ +$ gftopk 'gfname' +$ delete/noconf/nolog 'gfname'; +$ delete/noconf/nolog 'onlyname'.lis; +$ +$ if f$getsyi("nodename").eqs."VAXSNS" +$ then +$ on error then goto goodexit +$ on severe_error then goto goodexit +$ send/file/vms 'pkname' newtex +$! write sys$output "------- ",pkname," has been sent to NEWTEX" +$ send/file/vms 'onlyname'.tfm newtex +$! write sys$output "------- ",onlyname,".TFM has been sent to NEWTEX" +$ endif +$ +$ goto GoodExit +$ else +$ write sys$output "tex_pk:",PKNAME," already exists!" +$ exit +$ endif +$ +$ +$ GoodExit: +$ set default 'olddir +$ exit +$ +$ ControlY: +$ set default 'olddir +$ exit 1 diff --git a/Build/source/texk/dvipsk/vms/Makefile b/Build/source/texk/dvipsk/vms/Makefile new file mode 100644 index 00000000000..3bdd15523c7 --- /dev/null +++ b/Build/source/texk/dvipsk/vms/Makefile @@ -0,0 +1,281 @@ +# +# Makefile for dvips. Edit this first part of the file. +# +# This version is for Vax/VMS running the Todd Aven MAKE program. +# +# First, the things that absolutely must be edited for your system. +# Please, don't forget to edit MakeTeXPK in the same way! + +# where TeX is `rooted'. Sometimes /usr/local/lib/tex. +# TEXDIR = /usr/lib/tex +TEXDIR = /usr/lib/tex + +# another place pk, tfm, and vf files might be found. +# LOCALDIR = /LocalLibrary/Fonts/TeXFonts +LOCALDIR = /LocalLibrary/Fonts/TeXFonts + +# the default path to search for TFM files +# (this usually is identical to TeX's defaultfontpath, which omits `.') +# (private fonts are given an explicit directory, which overrides the path) +# overridden by the environment variable TEXFONTS +# TFMPATH = $(LOCALDIR)/tfm:$(TEXDIR)/fonts/tfm +TFMPATH = ""TEX_FONTS:"" # TEX_FONTS is a searchlist. + +# the default path to search for PK files (usually omits `.') +# Don't forget to add the directory that +# MakeTeXPK puts the files! (In this case, /LocalLibrary/Fonts...) +# overridden by the environment variable TEXPKS or TEXPACKED or PKFONTS +# PKPATH = $(LOCALDIR)/pk:$(TEXDIR)/fonts/pk +PKPATH = ""VC$3:[PHS595F.FONTS.%d]%f.PK,TEX_DISK:[TEX.FONTS.%d]%f.PK,"" + +# the default path to search for VF files (usually omits `.') +# overridden by the environment variable VFFONTS +# VFPATH = $(LOCALDIR)/vf:$(TEXDIR)/fonts/vf +VFPATH = ""TEX_VF:"" # TEX_VF may be a searchlist. + +# additional directories in which to search for subdirectories to find +# both tfm and pk files +FONTSUBDIRPATH = """" + +# where the config files go +# CONFIGDIR = $(TEXDIR)/ps +CONFIGDIR = TEX$POSTSCRIPT: # The Physics Dept. DVIPS directory + +# the default path to search for config files +# overridden by the environment variable TEXCONFIG +# CONFIGPATH = .:$(CONFIGDIR) +CONFIGPATH = "" ,SYS$LOGIN:,$(CONFIGDIR),"" + +# the name of your config file +# CONFIGFILE = config.ps +CONFIGFILE = config.ps + +# where the header PS files go +# HEADERDIR = $(TEXDIR)/ps +HEADERDIR = TEX$POSTSCRIPT: # The Physics Dept. DVIPS directory + +# the default path to search for header files +# HEADERPATH = .:$(HEADERDIR) +HEADERPATH = "" ,SYS$LOGIN:,$(HEADERDIR),"" + +# where epsf.tex and rotate.tex go (usually the TeX macros directory) +# TEXMACRODIR = $(TEXDIR)/inputs +TEXMACRODIR = TEX_INPUTS: + +# the default path to search for epsf and psfiles +# (usually the same as TeX's defaultinputpath) +# FIGPATH = .:..:$(TEXDIR)/inputs +FIGPATH = "" ,TEX_INPUTS:,"" # Include blank so it looks on default dir. + +# the place man pages are located. +# MANDIR = /usr/man/man1 +MANDIR = TEX_INPUTS: + +# change -DDEFRES=300 or whatever is required +# if the default resolution is not 300 dpi, +# add -DDEBUG to turn on debugging capability +# add -DTPIC for tpic support +# add -DFONTLIB to search font libraries +# add -DSEARCH_SUBDIRECTORIES to search the FONTSUBDIRPATH. +# add -DHAVE_GETCWD if you have getcwd (relevant only for subdir searching) +# add -DIBM6000 for compiling on IBM 6000 systems +# add -DCREATIONDATE if your system has a working time() and you want dated files +# (for VM/CMS, see the MKDVIPS.EXEC file in the vmcms subdirectory). +# +# If you define FONTLIB, make sure to also give definitions to +# FLIPATH and FLINAME. +# +# DEFS= -DTPIC -DDEBUG -DDEFRES=400 +DEFS= TPIC,DEBUG,DEFRES=300,HAVE_GETCWD,ANSI,CREATIONDATE + +# either use +# OPT = -g -Wall -funsigned-char +# or +# OPT = -O -s -Wall -funsigned-char +OPT = + +# libraries to include (-lm -lc on most systems) +#FLIBS= -lNeXT_s -lsys_s +FLIBS=,sys$disk:[.vms]vaxcrtl/opt +# LIBS= # VAXC +LIBS= ,gnu_cc:[000000]GCCLIB/LIB # GNUC + +# If you are compiling dvips for suid or other privileges, you will +# definitely want to define the following symbol; else don't. +# SECURE = -DSECURE +SECURE = + +# If you want EMTEX specials, define the following. +EMTEX =,EMTEX + +# for SYSV (and friends which use <string.h> instead of <strings.h>) +# define the c-compiler flag +# add -D_POSIX_SOURCE if you are POSIX (also define SYSV) (only relevant +# for subdir searching) +# SYS = -DSYSV +SYS = + +# Define this to be whatever you use for installation. If you don't have +# install, use a script that invokes copy and chmod's the files +# appropriately. +# INSTALL = install +INSTALL = copy + +# where the installed binary goes +# BINDIR = /usr/bin +BINDIR = TEX$POSTSCRIPT: # The Physics Dept. DVIPS directory + +# Define the default paper format (Actually no longer used) +DEFPFMT = + +# PATHS =\ # VAXC +# ,TFMPATH="$(TFMPATH)",\ +# PKPATH="$(PKPATH)",\ +# VFPATH="$(VFPATH)",\ +# HEADERPATH="$(HEADERPATH)",\ +# CONFIGPATH="$(CONFIGPATH)",\ +# CONFIGFILE="""$(CONFIGFILE)""",\ +# FONTSUBDIRPATH="$(FONTSUBDIRPATH)",\ +# FIGPATH="$(FIGPATH)" +PATHS = # GNUC + +INC = /include="SYS$DISK:[],SYS$SHARE:" +# CC = CC # VAXC +CC = GCC/NoCase_Hack # GNUC +CFLAGS = /NoList $(INC)- + /Define=($(DEFS) $(OPT) $(SYS) $(SECURE) $(EMTEX) $(DEFPFMT)) +CFLAGS2 = /NoList $(INC)- + /Define=($(DEFS) $(OPT) $(SYS) $(SECURE) $(EMTEX) $(DEFPFMT) $(PATHS)) +LFLAGS = /NoMap + +SRC = dospecial.c dviinput.c fontdef.c loadfont.c dvips.c tfmload.c \ + download.c prescan.c scanpage.c skippage.c output.c scalewidth.c \ + dosection.c dopage.c resident.c search.c unpack.c drawPS.c \ + header.c makefont.c repack.c virtualfont.c dpicheck.c finclude.c \ + pprescan.c papersiz.c flib.c color.c bbox.c emspecial.c + +OBJ = dospecial.obj, dviinput.obj, fontdef.obj, loadfont.obj, dvips.obj,\ + tfmload.obj, download.obj, prescan.obj, scanpage.obj, skippage.obj,\ + output.obj, scalewidth.obj, dosection.obj, dopage.obj, resident.obj,\ + search.obj, unpack.obj, drawPS.obj, header.obj, makefont.obj,\ + repack.obj, virtualfont.obj, dpicheck.obj, finclude.obj, \ + pprescan.obj, papersiz.obj, flib.obj, color.obj, bbox.obj, \ + emspecial.obj, vaxvms.obj + +all : afm2tfm.exe dvips.exe tex.pro texps.pro texc.pro special.pro \ + finclude.pro color.pro crop.pro dvips.hlb + +dvips.exe : $(OBJ) + Link /Exe=DviPS.exe $(LFLAGS) $(OBJ) $(LIBS) $(FLIBS) + +# dvips.obj : dvips.c vmscli.c # VAXC +dvips.obj : dvips.c vmscli.c vms_gcc_paths.h # GNUC + $(CC) $(CFLAGS2) dvips.c + +afm2tfm.exe : afm2tfm.obj + Link $(LFLAGS) afm2tfm.obj $(LIBS) $(FLIBS) + +afm2tfm.obj : afm2tfm.c + $(CC) $(CFLAGS) afm2tfm.c + +$(OBJ) : dvips.h debug.h vms.h + +flib.obj resident.obj dvips.obj loadfont.obj tfmload.obj : paths.h + +vaxvms.obj : [.vms]vaxvms.c +! $(CC) $(CFLAGS) [.vms]vaxvms.c /object=[]vaxvms.obj + +vmscli.c : [.vms]vmscli.c + Copy /Log [.vms]vmscli.c [] + +vms.h : [.vms]vms.h + Copy /Log [.vms]vms.h [] + +vms_gcc_paths.h : [.vms]vms_gcc_paths.h # GNUC + Copy /Log [.vms]vms_gcc_paths.h [] # GNUC + +*.obj : *.c + $(CC) $(CFLAGS) $< + +squeeze.exe : squeeze.obj + Link $(LFLAGS) squeeze.obj $(LIBS) $(FLIBS) + +squeeze.obj : squeeze.c + $(CC) $(CFLAGS) squeeze.c + +tex.pro : tex.lpro squeeze.exe + MCR sys$disk:[]squeeze tex.lpro tex.pro + +texc.pro: texc.lpro squeeze.exe + MCR sys$disk:[]squeeze texc.lpro texc.pro + +texc.lpro: tex.lpro + @[.vms]texc_scr.com # tex.lpro texc.lpro + +texps.pro : texps.lpro squeeze.exe + MCR sys$disk:[]squeeze texps.lpro texps.pro + +special.pro : special.lpro squeeze.exe + MCR sys$disk:[]squeeze special.lpro special.pro + +finclude.pro : finclude.lpro squeeze.exe + MCR sys$disk:[]squeeze finclude.lpro finclude.pro + +color.pro : color.lpro squeeze.exe + MCR sys$disk:[]squeeze color.lpro color.pro + +crop.pro : crop.lpro squeeze.exe + MCR sys$disk:[]squeeze crop.lpro crop.pro + +dvips.hlb : dvips.hlp + Library/Create=Blocks:40/Help dvips.hlb dvips.hlp + +dvips.hlp : [.vms]dvips.rnh + Runoff [.vms]dvips.rnh + +install : afm2tfm.exe dvips.exe dvips.hlb [.vms]MakeTeXPK.com \ + tex.pro texc.pro texps.pro special.pro finclude.pro color.pro \ + crop.pro config.ps psfonts.map epsf.tex epsf.sty rotate.tex \ + rotate.sty colordvi.tex colordvi.sty blackdvi.tex blackdvi.sty +# - mkdir $(BINDIR) +# - mkdir $(HEADERDIR) +# - mkdir $(CONFIGDIR) +# - mkdir $(MANDIR) +# - mkdir $(TEXMACRODIR) + $(INSTALL) afm2tfm.exe $(BINDIR)afm2tfm.exe + $(INSTALL) dvips.exe $(BINDIR)dvips.exe + $(INSTALL) dvips.hlb $(BINDIR)dvips.hlb +# $(INSTALL) [.VMS]MakeTeXPK.COM $(BINDIR)MakeTeXPK.COM + $(INSTALL) tex.pro $(HEADERDIR) + $(INSTALL) texc.pro $(HEADERDIR) + $(INSTALL) texps.pro $(HEADERDIR) + $(INSTALL) special.pro $(HEADERDIR) + $(INSTALL) finclude.pro $(HEADERDIR) + $(INSTALL) color.pro $(HEADERDIR) + $(INSTALL) crop.pro $(HEADERDIR) + $(INSTALL) config.ps $(CONFIGDIR)$(CONFIGFILE) + $(INSTALL) psfonts.map $(CONFIGDIR) + $(INSTALL) epsf.tex $(TEXMACRODIR) + $(INSTALL) epsf.sty $(TEXMACRODIR) + $(INSTALL) rotate.tex $(TEXMACRODIR) + $(INSTALL) rotate.sty $(TEXMACRODIR) + $(INSTALL) colordvi.sty $(TEXMACRODIR) + $(INSTALL) colordvi.tex $(TEXMACRODIR) + $(INSTALL) blackdvi.sty $(TEXMACRODIR) + $(INSTALL) blackdvi.tex $(TEXMACRODIR) + $(INSTALL) dvips.tex $(TEXMACRODIR) + $(INSTALL) dvipsmac.tex $(TEXMACRODIR) + $(INSTALL) dvips.1 $(MANDIR) + $(INSTALL) afm2tfm.1 $(MANDIR) + +veryclean : + Delete *.obj;*, dvips.exe;*, squeeze.exe;*, afm2tfm.exe;*,\ + texc.lpro;*, *.pro;*, *.log;*, *.dvi;* + +clean : + Delete *.obj;*, squeeze.exe;*, afm2tfm.exe;*, *.log;*, *.dvi;* + +# lint : +# lint $(DEFS) $(PATHS) $(SRC) +# lint $(DEFS) squeeze.c +# lint $(DEFS) afm2tfm.c diff --git a/Build/source/texk/dvipsk/vms/README b/Build/source/texk/dvipsk/vms/README new file mode 100644 index 00000000000..ec89bbc988a --- /dev/null +++ b/Build/source/texk/dvipsk/vms/README @@ -0,0 +1,128 @@ +I backed out some of the changes, but it should compile and run on VMS. +I removed the changes that guarantee that the scratch files get unique +names; I did this because the resulting filenames would not work on +some systems, and because if this is a problem I feel the correct +solution would be to make sure each user is actually running in the +correct unique directory, rather than changing the names of all of the +temporary files that dvips might create. -tgr + +Original message: + +From: "Edward J. Groth" <groth@PUPGG.PRINCETON.EDU> +To: doyle@mmm.lanl.gov, rokicki@CS.Stanford.EDU +CC: groth@PUPGG.PRINCETON.EDU +Message-ID: <009A5364.5D7EC83B.21977@PUPGG.PRINCETON.EDU> +Subject: vms port and mods of hyper dvips 5.58 +Content-Type: text +Content-Length: 155227 +Status: RO + +To: Mark Doyle and Tomas Rokicki + +I've picked up dvips version 5.58 from LANL, with Mark's hps +modifications. I've ported (reported?) this to VMS. Below is a +summary of my changes, followed by a copy of each changed +routine (all changes are annotated with EJG). + +(It looks like whoever was keeping the vms port going hasn't +worked on it for a while.) + +Thanks for the good work! + + - Ed + + + + + +EJG 08-Jul-1996 + +This directory contains dvips 5.58 hacked by Mark Doyle to put in +mods for hyperps and hacked by me to make sure it ports to VMS. + +This was obtained by following links from http://xxx.lanl.gov/hypertex +in early July, 1996. + +Dvips has been made for vms v6.2 (alpha and vax) using DEC C +v5.0. + +Main changes I made: + +****** +dvips.c + +include subdirectory [.vms] where vmscli.c is included. + +get process id and use in constructing file names +dvips_h_pidxxxxx.tmp and dvips_b_pidxxxxx.tmp to replace head.tmp +and body.tmp, so we don't get a name collision if two users are +using the same scratch space. Change all references to these +names to reference the variables holding the new names. + +****** +hps.c + +replace head.tmp and body.tmp as above. + +replace ERROR with ERROR_HPS to avoid collision with error() +function. Question: why us a boolean variable to represent a +constant? + +after the former head.tmp and body.tmp files are copied to the +output, they are deleted. (neatness) + + +****** +output.c + +replace head.tmp and body.tmp as above. Required a little bit of +extra logic when testing to see if the output file is the former +head.tmp (so we don't put in a \n). Don't want to do the test if +the HPS_FLAG hasn't been set. + +****** +dvips.h + +include subdirectory [.vms] where vms.h is included. + +****** +[.vms]vmscli.c + +add qualifiers for new options since this file was last updated. + +fix up some bugs in qualifiers. + +****** +[.vms]dvips.cld + +add qualifiers for new options since this file was last updated. + +fix up some bugs in qualifiers. + +****** +[.vms]dvips.hlp + +add help for new qualifiers added above. + +make help agree with what the qualifiers actually do. For +example, the /filter qualifier, sends the output to stdout, but +still requires an input file (it will not read from stdin). + +****** +[.vms]newmake.com + +Made from [.vms]make.com. Don't prompt for options - all +hardwired as defaults, except fontlib is turned off. HPS is +defined in all cc's, and /standard=vaxc is added to all cc's. + +hps.c is included in the compile and link steps + +options file is removed from the link steps. + +/----------------------------------------------------------------------\ +| Edward J. Groth | Phone: 609-258-4361 Fax: 609-258-6853 | +| Physics Dept., Jadwin Hall | URL: http://pupgg.princeton.edu/~groth/ | +| Princeton University | SPAN/HEPNET: PUPGG::GROTH=44117::GROTH | +| Princeton, NJ 08544 | Internet: groth@pupgg.princeton.edu | +\----------------------------------------------------------------------/ + diff --git a/Build/source/texk/dvipsk/vms/README.VMS b/Build/source/texk/dvipsk/vms/README.VMS new file mode 100644 index 00000000000..93698e30c02 --- /dev/null +++ b/Build/source/texk/dvipsk/vms/README.VMS @@ -0,0 +1,48 @@ +This is the beginnings of a port to VMS. The documentation is not yet +complete, but the program works. To compile, set the following in +MAKE.COM: + +Set TFMPATH to where the TFM files are located. Default is TEX$FONTS: + ($ TFMPATH = "TEX$FONTS:") + +Set PKPATH to where the PK fonts are located. Default is TEX_PK: + ($ PKPATH = "TEX_PK:") + +Set VFPATH to where the VF fonts are located. Default is TEX_VF: + ($ VFPATH = "TEX_VF:") + +Set FIGPATH to where the epsf and psfiles are located. Default is TEX_INPUTS: + ($ FIGPATH = "TEX_INPUTS:") + +Set HEADERPATH to where the header files are located. Default is +TEX$POSTSCRIPT:,SYS$LOGIN:," + ($ HEADERPATH = "TEX$POSTSCRIPT:,SYS$LOGIN:,") + +Set CONFIGPATH to where the config files are located. Default is +TEX$POSTSCRIPT: + ($ CONFIGPATH = "TEX$POSTSCRIPT:") + +Set TPIC to ",TPIC" if you want TPIC support enabled. Default is enabled. + ($ TPIC = ",TPIC") + +Set DEBUG to ",DEBUG" if you want DEBUG support enabled. Default is enabled. + ($ DEBUG = ",DEBUG") + +Expect 1 warning in dospecial.c + +To install: + +dvips := $DIRECTORY:dvips +maketexpk := @DIRECTORY:maketexpk + +Make sure that all the logicals defined above (eg, tex_pk, tex_vf) are +actually defined. + +Again, this is a first cut, with improvements to come later. It has +not been thoroughly tested. More documentation will be coming later, +and possibly a VMS command line interface. If you have any problems or +improvements, please let me know. + +Xev Gittler +GTE Laboratories, Inc. +xev@bunny.gte.com diff --git a/Build/source/texk/dvipsk/vms/dvips.cld b/Build/source/texk/dvipsk/vms/dvips.cld new file mode 100644 index 00000000000..a246e692448 --- /dev/null +++ b/Build/source/texk/dvipsk/vms/dvips.cld @@ -0,0 +1,55 @@ +! EJG 02-Jul-1996 +! Add secure qualifier +! Add oddpages qualifier +! Add evenpages qualifier +! Default mode is letter rather than A4 +! Add downloadPS (as PK) fonts qualifier +! Add hyperPS qualifier +! EJG 07-Jul-1996 +! change output qualifier to remove placement=positional +define verb dvips + image tex$postscript:dvips + parameter p1, label=dvifile, prompt="DVI File", + value(required,type=$infile) + qualifier copies, default, value(default=1) + qualifier debug default, value(required) + qualifier maxdrift default, value(required) + qualifier filter negatable + qualifier last, default, value(required) + qualifier manual, negatable + qualifier number, default, value(required) + qualifier output, nonnegatable, + value(type=$file,required) !EJG 07-Jul-1996 + qualifier start, default, value(required) + qualifier quiet, negatable + qualifier reverse, negatable + qualifier sav_res, negatable + qualifier mode, value(list,default="letter") ! EJG 02-Jul-1996 + qualifier magnification,default, value(required) + qualifier collate, default, value(default=1) + qualifier dpi, default, value(default=300) + qualifier ctrld, negatable + qualifier inc_com, negatable + qualifier comment, negatable + qualifier vm_save, negatable + qualifier h_dpi, default, value(required) + qualifier v_dpi, default, value(required) + qualifier compress, negatable + qualifier printer, default, value(required) + qualifier header, negatable, value(list,required) + qualifier absolute + qualifier epsf, negatable + qualifier prescan, negatable + qualifier pagecopies, default, value(default=1) + qualifier separate, negatable + qualifier cropmarks, negatable + qualifier sec_size, default, value(required) + qualifier help + qualifier makefont, default, negatable + qualifier psize, value(required) + qualifier poffset, value(required) + qualifier secure, negatable ! EJG 02-Jul-1996 + qualifier oddpages, negatable ! EJG 02-Jul-1996 + qualifier evenpages, negatable ! EJG 02-Jul-1996 + qualifier downloadps, negatable ! EJG 02-Jul-1996 + qualifier hyperps, negatable ! EJG 02-Jul-1996 diff --git a/Build/source/texk/dvipsk/vms/dvips.hlp b/Build/source/texk/dvipsk/vms/dvips.hlp new file mode 100644 index 00000000000..760abc3bac4 --- /dev/null +++ b/Build/source/texk/dvipsk/vms/dvips.hlp @@ -0,0 +1,435 @@ +1 DVIPS + +! Modified 07-Jul-1996 - EJG +! Fix description of filter (can write to stdout, but not read from stdin! +! Change mode description, landscape used with others just gives +! landscape. So took that out. Removed warning about quotes (not +! necessary). Added tabloid. +! Changed qualifier ctrl_d to ctrld to agree with cld file +! Changed default for inc_com to be noinc_com to agree with dvips +! Fix header qualifier +! +! Added comment about the manual to front and also under the +! special heading. + +The dvips program converts a TEX dvi file into a PostScript file for +printing or distribution. Seldom has such a seemingly easy programming +task required so much effort. The dvips program has a number of features +that set it apart from other PostScript drivers for TEX. The dvips +driver generates excellent, standard PostScript, that can be included in +other documents as figures or printed through a variety of spoolers. The +generated PostScript requires very little printer memory, so very complex +documents with a lot of fonts can easily be printed even on PostScript +printers without much memory, such as the original Apple LaserWriter. The +PostScript output is also compact, requiring less disk space to store and +making it feasible as a transfer format. Missing fonts can be automatically +generated if METAFONT exists on the system, or fonts can be converted from +gf to pk format on demand. If a font cannot be generated, a scaled +version of the same font at a different size can be used instead, although +dvips will complain loudly about the poor aesthetics of the resulting +output. + +A manual for dvips may be printed with the command: + + printps tex_root:[local]dvips.ps + +In this manual, the command line options are for the unix variant +of dvips. Our version has the qualifiers as detailed in this help +file. Also, some of the latest options are not in the manual (in +particular, the /hyperps option). + + usage: + DVIPS filename[.dvi] + +2 /COPIES + /COPIES=num + + Generate num copies of every page. Default is 1. + (For collated copies, see the /COLLATE option.) + +2 /DEBUG + /DEBUG=num + + Set the debug flags. This is intended only for + emergencies or for unusual fact-finding expeditions; it + will work only if dvips has been compiled with the + DEBUG option. Use + + num=1 for special + + num=2 for paths + + num=4 for fonts + + num=8 for pages + + num=16 for headers + + num=32 for font compression + + num=64 for files + + num=128 for memory allocation + + Use a value of -1 for maximum output. + +2 /MAXDRIFT + /MAXDRIFT=num + + Make sure that each character is placed at most this many pixels + from its `true' resolution-independent position on the page. The + default value of this parameter is resolution dependent (it is the + number of entries in the list [100, 200, 300, 400, 500, 600, 800, + 1000, 1200, 1600, 2000, 2400, 2800, 3200, : : :] that are less + than or equal to the resolution in dots per inch). Allowing + individual characters to `drift' from their correctly rounded + positions by a few pixels, while regaining the true position at + the beginning of each new word, improves the spacing of letters in + words. + +2 /FILTER + + Run as a filter writing the output to the standard output. + (The input must still be specified as the argument.) + +2 /LAST + /LAST=num + + The last page printed will be the first one numbered num. Default + is the last page in the document. + + +2 /MANUAL + + Specify manual feed for printer. + +2 /NUMBER + /NUMBER=num + At most num pages will be printed. Default is 100000. + +2 /OUTPUT + /OUTPUT=filename.ext + + The output will be sent to file name. If no file name is given, + the default name is file.ps where the dvi file was called + file.dvi . + +2 /START + /START=num + + The first page printed will be the first one numbered + num. Default is the first page in the document. + +2 /QUIET + + Run in quiet mode. Don't chatter about pages converted, + etc.; report nothing but errors to standard error. + +2 /REVERSE + + Stack pages in reverse order. Normally, page 1 will be printed + first. + +2 /SAV_RES + + Causes the entire global output to be enclosed in a save/restore + pair. This causes the file to not be truly conformant, and is + thus not recommended, but is useful if you are driving the printer + directly and don't care too much about the portability of the + output. + +2 /MODE + /MODE=modename + + This sets the paper mode to modename. Currently, the only modes + allowable are + + "letter", which selects an 8.5 by 11 inch page, + "a3", which selects an a3 sized page, + "a4" , which selects an a4 sized page, + "legal", which selects an 8.5 by 14 inch page, + "ledger", which selects an 11 by 17 inch page, and + "tabloid", which selects a 17 by 11 inch page, and + "landscape", which rotates a letter size document by 90 degrees. + + + The default mode is "letter". The upper left corner of each page in + the dvi file is placed one inch from the left and one inch from the top. + +2 /MAGNIFICATION + /MAGNIFICATION=num + + Set the magnification ratio to num/1000. Overrides the + magnification specified in the dvi file. Must be between 10 and + 100000. + +2 /COLLATE + /COLLATE=num + + Create num copies, but collated (by replicating the data in the + PostScript file). Slower than the /COPIES option, but easier on + the hands, and faster than resubmitting the same PostScript file + multiple times. + +2 /DPI + /DPI=num + + Set the resolution in dpi (dots per inch) to num. This + affects the choice of bitmap fonts that are loaded and also the + positioning of letters in resident PostScript fonts. Must be + between 10 and 10000. This affects both the horizontal and + vertical resolution. If a high resolution (something greater than + 400 dpi, say) is selected, the /COMPRESS flag should probably also + be used. + +2 /CTRLD + + Causes Control-D (ASCII code 4) to be appended as the + very last character of the PostScript file. This is useful + when dvips is driving the printer directly instead of working + through a spooler, as is common on extremely small systems. + Otherwise, it is not recommended. + +2 /INC_COM + /INC_COM + /NOINC_COM (default) + + /NOINC_COM option causes comments in included PostScript graphics, + font files, and headers to be removed. This is sometimes + necessary to get around bugs in spoolers or PostScript + post-processing programs. Specifically, the %%Page comments, + when left in, often cause difficulties. Use of this flag can + cause some included graphics to fail, since the PostScript header + macros from some software packages read portions of the + input stream line by line, searching for a particular comment. + +2 /COMMENT + /COMMENT (default) + /NOCOMMENT + + /NOCOMMENT turns off structured comments; this might be necessary + on some systems that try to interpret PostScript comments in weird + ways, or on some PostScript printers. Old versions of Transcript + in particular cannot handle modern Encapsulated PostScript. + +2 /PRINTER + /PRINTER=printername + + Sets up the output for the appropriate printer. This is + implemented by reading in config.printername , which can set + various parameters such as the font paths and any other defaults + for that printer only. It is recommended that all standard + defaults go in the one master config.ps file and only things that + vary printer to printer go in the config.printername files. Note + that config.ps is read before config.printername. In + addition, another file called "/.dvipsrc is searched for + immediately after config.ps; this file is intended for user + defaults. If no /PRINTER command is given, the environment + variable PRINTER is checked. If that variable exists, and a + corresponding configuration file exists, that configuration file + is read in. + +2 /HEADER + /HEADER=(file1,file2,...) + /NOHEADER + + Prepend file1, file2, ... as additional header files. + This header file gets added to the PostScript userdict. + With /NOHEADER, suppress all header output. + + +2 /VM_SAVE + /VM_SAVE (default) + /NOVM_SAVE + + /NOVM_SAVE disables a PostScript virtual memory saving + optimization that stores the character metric information in the + same string that is used to store the bitmap information. This + is only necessary when driving the Xerox 4045 PostScript + interpreter, and it is caused by a bug in that interpreter that + results in `garbage' on the bottom of each character. Not + recommended unless you must drive this printer. + +2 /H_DPI + /H_DPI=num + + Set the horizontal resolution in dots per inch to num. + + +2 /V_DPI + /V_DPI=num + + Set the vertical resolution in dots per inch to num. + +2 /COMPRESS + + Causes bitmapped fonts to be compressed before they are + downloaded, thereby reducing the size of the PostScript + font-downloading information. Especially useful at high + resolutions or when very large fonts are used. Will slow down + printing somewhat, especially on early 68000-based PostScript + printers. + +2 /ABSOLUTE + + Makes references to page numbers absolute (rather than TeX + page numbers). + +2 /EPSF + /EPSF + /NOEPSF (default) + + /EPSF makes dvips attempt to generate an EPSF file with a + tight bounding box. This only works on one-page files, and it + only looks at marks made by characters and rules, not by any + included graphics. In addition, it gets the glyph metrics + from the tfm file, so characters that lie outside their + enclosing tfm box may confuse it. In addition, the bounding + box might be a bit too loose if the character glyph has + significant left or right side bearings. Nonetheless, this + option works well for creating small EPSF files for equations + or tables or the like. (Note, of course, that dvips output is + resolution dependent and thus does not make very good EPSF + files, especially if the images are to be scaled; use these + EPSF files with a great deal of care.) + + +2 /PRESCAN + /PRESCAN + /NOPRESCAN (default) + + Conserve memory by making three passes over the .dvi file + instead of two and only loading those characters actually + used. Generally only useful on machines with a very limited + amount of memory, like some PCs. + +2 /PAGECOPIES + /PAGECOPIES=num (default=1) + + Number of times to print each page. Executes the postscript + for each page this number of times (unlike /COPIES which + executes the postscript once and prints multiple times.) + +2 /SEPARATE + /SEPARATE + /NOSEPARATE (default) + + Make each section be a separate file. Under certain + circumstances, dvips will split the document up into + `sections' to be processed independently; this is most often + done for memory reasons. Using this option tells dvips to + place each section into a separate file; the new file names + are created replacing the suffix of the supplied output file + name by a three-digit sequence number. This option is most + often used in conjunction with the /SEC_SIZE option which + sets the maximum section length in pages. For instance, some + phototypesetters cannot print more than ten or so consecutive + pages before running out of steam; these options can be used + to automatically split a book into ten-page sections, each to + its own file. + +2 /CROPMARKS + /CROPMARKS + /NOCROPMARKS (default) + + Print crop marks. This option increases the paper size + (which should be specified, either with a paper size special + or with the /PSIZE option) by a half inch in each dimension. + It translates each page by a quarter inch and draws + cross-style crop marks. It is mostly useful with typesetters + that can set the page size automatically. + + +2 /SEC_SIZE + /SEC_SIZE=number + + Set the maximum number of pages in each `section'. This + option is most commonly used with the /SEPARATE option; see + that documentation above for more information. + + +2 /HELP + /HELP + + Given with a dummy file name, causes dvips to output a one + page listing of options in unix form. Not very useful! + + + +2 /MAKEFONT + /MAKEFONT (default) + /NOMAKEFONT + + The /NOMAKEFONT option turns off the automatic font + generation facility. If any fonts are missing, commands to + generate the fonts are appended to the file missfont.log in + the current directory; this file can then be executed and + deleted to create the missing fonts. + +2 /PSIZE + /PSIZE="dim,dim" + + Set the paper size to the given pair of dimensions. This + option takes its arguments in the same syntax as the + papersize special, for example 8.5in,11in. It overrides any + paper size special in the dvi file. The dimensions must + resolve to a papersize specified in the configuration files. + + +2 /POFFSET + /POFFSET="dim,dim" + + Move the origin by a certain amount. The offset is a + comma-separated pair of dimensions, such as .1in,-.3cm (in + the same syntax used in the papersize special). The origin + of the page is shifted from the default position (of one inch + down, one inch to the right from the upper left corner of the + paper) by this amount. + + +2 /SECURE + /SECURE + /NOSECURE (default) + + With the /SECURE option, dvips will not attempt to open pipes + or run commands (such as commands to make fonts). + +2 /ODDPAGES + /ODDPAGES + /NOODDPAGES (default) + + Print only odd pages (TeX pages, not sequence pages). + +2 /EVENPAGES + /EVENPAGES + /NOEVENPAGES (default) + + Print only even pages (TeX pages, not sequence pages). + +2 /DOWNLOADPS + /DOWNLOADPS + /NODOWNLOADPS (default) + + Downloadable postscript fonts are set in PK (compressed + bitmap) format. + +2 /HYPERPS + /HYPERPS + /NOHYPERPS (default) + + Outputs \specials containing hyperlinks to the output file as + pdf marks embedded in postscript comments. These can then be + turned into hyperlinks with Adobe Distiller and viewed with + Adobe Acrobat. + +2 Specials + + The specials are described in the manual which may be printed + with the command + + printps tex_root:[local]dvips.ps + + In this manual, the command line options are for the unix + variant of dvips. Our version has the qualifiers as detailed + in this help file. Also, some of the latest options are not + in the manual (in particular, the /hyperps option). diff --git a/Build/source/texk/dvipsk/vms/dvips.rnh b/Build/source/texk/dvipsk/vms/dvips.rnh new file mode 100644 index 00000000000..d1da4f998f5 --- /dev/null +++ b/Build/source/texk/dvipsk/vms/dvips.rnh @@ -0,0 +1,532 @@ +.RM 68 +.NO NUMBER +.NO PAGING +.STHL 5,1,1 +.lm 0 +1 DVIPS +.lm 2 +The dvips program converts a TEX dvi file into a PostScript file for +printing or distribution. Seldom has such a seemingly easy programming task +required so much effort. The dvips program has a number of features that set +it apart from other PostScript drivers for TEX. The dvips driver generates +excellent, standard PostScript, that can be included in other documents as +figures or printed through a variety of spoolers. The generated PostScript +requires very little printer memory, so very complex documents with a lot of +fonts can easily be printed even on PostScript printers without much memory, +such as the original Apple LaserWriter. The PostScript output is also +compact, requiring less disk space to store and making it feasible as a +transfer format. +.skip 1 +Missing fonts can be automatically generated if METAFONT exists on the +system, or fonts can be converted from gf to pk format on demand. If a +font cannot be generated, a scaled version of the same font at a different +size can be used instead, although dvips will complain loudly about the +poor aesthetics of the resulting output. +.skip 1 +.literal + usage: + DVIPS filename[.dvi] +.end literal +.skip 1 +.lm 0 +2 Parameters +.s +.lm 2 +Filename +.s +Specifies the name of the .DVI file that is to be processed. +.lm 0 +2 Command__Qualifiers +.skip 1 +/COPIES +.lm 6 +.skip 1 +/COPIES=num +.lm 2 +.skip 1 + Generate num copies of every page. Default is 1. + (For collated copies, see the /COLLATE option.) +.skip 1 +.lm 0 +/DEBUG +.skip 1 +.lm 6 + /DEBUG=num +.lm 2 +.skip 1 + Set the debug flags. This is intended only for + emergencies or for unusual fact-finding expeditions; it + will work only if dvips has been compiled with the + DEBUG option. Use +.skip 1 +.literal + num=1 for special + + num=2 for paths + + num=4 for fonts + + num=8 for pages + + num=16 for headers + + num=32 for font compression + + num=64 for files + + num=128 for memory allocation +.end literal +.skip 1 + Use a value of -1 for maximum output. +.skip 1 +.lm 0 +/MAXDRIFT +.skip 1 +.lm 6 + /MAXDRIFT=num +.lm 2 +.skip 1 + Make sure that each character is placed at most this many pixels + from its `true' resolution-independent position on the page. The + default value of this parameter is resolution dependent (it is the + number of entries in the list [100, 200, 300, 400, 500, 600, 800, + 1000, 1200, 1600, 2000, 2400, 2800, 3200, : : :] that are less + than or equal to the resolution in dots per inch). Allowing + individual characters to `drift' from their correctly rounded + positions by a few pixels, while regaining the true position at + the beginning of each new word, improves the spacing of letters in + words. +.skip 1 +.lm 0 +/FILTER +.skip 1 +.lm 2 +Run as a filter. Read the dvi file from standard input and write +the PostScript to standard output. The standard input must be seekable, so +it cannot be a pipe. If you must use a pipe, write a shell script that copies +the pipe output to a temporary file and then points dvips at this file. i-h +name: Prepend file name as an additional header file. (However, if the name +is simply `- ', suppress all header files from the output.) This header file +gets added to the PostScript userdict. +.skip 1 +.lm 0 +/LAST +.skip 1 +.lm 6 + /LAST=num +.lm 2 +.skip 1 + The last page printed will be the first one numbered num. Default + is the last page in the document. +.skip 1 +If the /ABSOLUTE qualifier has been used then it (and any argument to the +/START qualifier) is treated as a sequence number, rather than a value to +compare with \count0 values. Thus, using /LAST=9/ABSOLUTE will end with +the ninth page of the document, no matter what the pages are actually +numbered. +.skip 1 +.lm 0 +/MANUAL +.skip 1 +.lm 2 + Specify manual feed for printer. +.skip 1 +.lm 0 +/NUMBER +.skip 1 +.lm 6 + /NUMBER=num +.lm 2 +.skip 1 + At most num pages will be printed. Default is 100000. +.skip 1 +.lm 0 +/OUTPUT +.skip 1 +.lm 6 + /OUTPUT=filename.ext +.lm 2 +.skip 1 + The output will be sent to file name. If no file name is given, + the default name is file.ps where the dvi file was called + file.dvi . +.skip 1 +.lm 0 +/START +.skip 1 +.lm 6 + /START=num +.lm 2 +.skip 1 + The first page printed will be the first one numbered + num. Default is the first page in the document. +.skip 1 +If the /ABSOLUTE qualifier has been used then it (and any argument to the +/LAST qualifier) is treated as a sequence number, rather than a value to +compare with \count0 values. Thus, using /START=3/ABSOLUTE will start with +the third page of the document, no matter what the pages are actually +numbered. +.skip 1 +.lm 0 +/QUIET +.skip 1 +.lm 2 + Run in quiet mode. Don't chatter about pages converted, + etc.; report nothing but errors to standard error. +.skip 1 +.lm 0 +/REVERSE +.skip 1 +.lm 2 + Stack pages in reverse order. Normally, page 1 will be printed + first. +.skip 1 +.lm 0 +/SAV__RES +.skip 1 +.lm 2 + Causes the entire global output to be enclosed in a save/restore + pair. This causes the file to not be truly conformant, and is + thus not recommended, but is useful if you are driving the printer + directly and don't care too much about the portability of the + output. +.skip 1 +.lm 0 +/MODE +.skip 1 +.lm 6 + /MODE=modename +.lm 2 +.skip 1 + This sets the paper mode to modename. Currently, the only modes + allowable are +.skip 1 +.literal + "letter", which selects an 8.5 by 11 inch page, + "a3", which selects an a3 sized page, + "a4" , which selects an a4 sized page, + "legal", which selects an 8.5 by 14 inch page, + "ledger", which selects an 11 by 17 inch page, and + "landscape", which rotates a letter size document by 90 degrees. +.end literal +.skip 1 + WARNING: always include paper format between quotation marks! +.skip 1 + The default mode is "letter". The upper left corner of each page in + the dvi file is placed one inch from the left and one inch from the top. +.skip 1 + If you want to specify a paper format (e.g. a4) AND landscape + mode, you must use something like +.literal + /MODE=("landscape","a4") +.end literal + putting "landscape" as the first value. +.skip 1 +.lm 0 +/MAGNIFICATION +.skip 1 +.lm 6 + /MAGNIFICATION=num +.lm 2 +.skip 1 + Set the magnification ratio to num/1000. Overrides the + magnification specified in the dvi file. Must be between 10 and + 100000. +.skip 1 +.lm 0 +/COLLATE +.skip 1 +.lm 6 + /COLLATE=num +.lm 2 +.skip 1 + Create num copies, but collated (by replicating the data in the + PostScript file). Slower than the /COPIES option, but easier on + the hands, and faster than resubmitting the same PostScript file + multiple times. +.skip 1 +.lm 0 +/DPI +.skip 1 +.lm 6 + /DPI=num +.lm 2 +.skip 1 + Set the resolution in dpi (dots per inch) to num. This + affects the choice of bitmap fonts that are loaded and also the + positioning of letters in resident PostScript fonts. Must be + between 10 and 10000. This affects both the horizontal and + vertical resolution. If a high resolution (something greater than + 400 dpi, say) is selected, the /COMPRESS flag should probably also + be used. +.skip 1 +.lm 0 +/CTRL__D +.skip 1 +.lm 2 + Causes Control-D (ASCII code 4) to be appended as the + very last character of the PostScript file. This is useful + when dvips is driving the printer directly instead of working + through a spooler, as is common on extremely small systems. + Otherwise, it is not recommended. +.skip 1 +.lm 0 +/INC__COM +.skip 1 +.lm 6 + /INC__COM (default) +.break + /NOINC__COM +.lm 2 +.skip 1 + /NOINC__COM option causes comments in included PostScript graphics, + font files, and headers to be removed. This is sometimes + necessary to get around bugs in spoolers or PostScript + post-processing programs. Specifically, the %%Page comments, + when left in, often cause difficulties. Use of this flag can + cause some included graphics to fail, since the PostScript header + macros from some software packages read portions of the + input stream line by line, searching for a particular comment. +.skip 1 +.lm 0 +/COMMENT +.skip 1 +.lm 6 + /COMMENT (default) +.break + /NOCOMMENT +.lm 2 +.skip 1 + /NOCOMMENT turns off structured comments; this might be necessary + on some systems that try to interpret PostScript comments in weird + ways, or on some PostScript printers. Old versions of Transcript + in particular cannot handle modern Encapsulated PostScript. +.skip 1 +.lm 0 +/PRINTER +.skip 1 +.lm 6 + /PRINTER=printername +.lm 2 +.skip 1 + Sets up the output for the appropriate printer. This is + implemented by reading in config.printername , which can set + various parameters such as the font paths and any other defaults + for that printer only. It is recommended that all standard + defaults go in the one master config.ps file and only things that + vary printer to printer go in the config.printername files. Note + that config.ps is read before config.printername. In + addition, another file called "/.dvipsrc is searched for + immediately after config.ps; this file is intended for user + defaults. If no /PRINTER command is given, the environment + variable PRINTER is checked. If that variable exists, and a + corresponding configuration file exists, that configuration file + is read in. +.skip 1 +.lm 0 +/VM__SAVE +.skip 1 +.lm 6 + /VM__SAVE (default) +.break + /NOVM__SAVE +.lm 2 +.skip 1 +/NOVM__SAVE disables a PostScript virtual memory saving optimization that +stores the character metric information in the same string that is used to +store the bitmap information. This is only necessary when driving the Xerox +4045 PostScript interpreter, and it is caused by a bug in that interpreter that +results in `garbage' on the bottom of each character. Not recommended unless +you must drive this printer. +.skip 1 +.lm 0 +/H__DPI +.skip 1 +.lm 6 +/H__DPI=num +.lm 2 +.skip 1 +Set the horizontal resolution in dots per inch to num. +.skip 1 +.lm 0 +/V__DPI +.skip 1 +.lm 6 +/V__DPI=num +.lm 2 +.skip 1 +Set the vertical resolution in dots per inch to num. +.skip 1 +.lm 0 +/COMPRESS +.skip 1 +.lm 2 +Causes bitmapped fonts to be compressed before they are downloaded, thereby +reducing the size of the PostScript font-downloading information. Especially +useful at high resolutions or when very large fonts are used. Will slow down +printing somewhat, especially on early 68000-based PostScript printers. +.skip 1 +.lm 0 +.!----------------------------------------------------------------------- +.! New stuff for version 5.497 +.!----------------------------------------------------------------------- +/HEADER +.skip 1 +.lm 6 +/HEADER=file-spec +.break +/NOHEADER +.lm 2 +.skip 1 +Prepend file "file-spec" as an additional header file. However, if the name +is simply `-', suppress all header files from the output. Similarly, +/NOHEADER suppress all header files from the output. This header file gets +added to the PostScript userdict. (Corresponds to the -h option) +.skip 1 +.lm 0 +/ABSOLUTE +.lm 2 +.skip 1 +If the /ABSOLUTE qualifier has been used then any argument to the /START +and/or /LAST qualifiers are treated as sequence numbers, rather than a +value to compare with \count0 values. Thus, using /START=3/ABSOLUTE will +start with the third page of the document, no matter what the pages are +actually numbered. +(Corresponds to the -p and -l options) +.skip 1 +.lm 0 +/EPSF +.lm 2 +.skip 1 +Makes `dvips' attempt to generate an EPSF file with a tight bounding box. +This only works on one-page files, and it only looks at marks made by +characters and rules, not by any included graphics. In addition, it gets +the glyph metrics from the `tfm' file, so characters that lie outside their +enclosing `tfm' box may confuse it. In addition, the bounding box might be +a bit too loose if the character glyph has significant left or right side +bearings. Nonetheless, this option works well for creating small EPSF files +for equations or tables or the like. (Note, of course, that `dvips' output +is resolution dependent and thus does not make very good EPSF files, +especially if the images are to be scaled; use these EPSF files with a great +deal of care.) +(Corresponds to the -E option) +.skip 1 +.lm 0 +/PRESCAN +.lm 2 +.skip 1 +Conserve memory by making three passes over the `dvi' file instead of two +and only loading those characters actually used. Generally only useful on +machines with a very limited amount of memory, like some PCs. +(Corresponds to the -a option) +.skip 1 +.lm 0 +/PAGECOPIES +.skip 1 +.lm 6 +/PAGECOPIES=num +.lm 2 +.skip 1 +Generate `num' copies of each page, but duplicating the page body rather +than using the `#numcopies' option. This can be useful in conjunction with +a header file setting \bop-hook to do color separations or other neat +tricks. (Corresponds to the -b option) +.skip 1 +.lm 0 +/SEPARATE +.skip 1 +.lm 2 +Make each section be a separate file. Under certain circumstances, +`dvips' will split the document up into `sections' to be processed +independently; this is most often done for memory reasons. Using this +option tells `dvips' to place each section into a separate file; the +new file names are created replacing the suffix of the supplied output +file name by a three-digit sequence number. +.break +This option is most often used in conjunction with the /SEC_SIZE qualifier +which sets the maximum section length in pages. For instance, some +phototypesetters cannot print more than ten or so consecutive pages before +running out of steam; these options can be used to automatically split a +book into ten-page sections, each to its own file. (Corresponds to the -i +option) +.skip 1 +.lm 0 +/CROPMARKS +.skip 1 +.lm 2 +Print crop marks. This option increases the paper size (which should be +specified, either with a paper size special or with the /PSIZE qualifier) by +a half inch in each dimension. It translates each page by a quarter inch +and draws cross-style crop marks. It is mostly useful with typesetters that +can set the page size automatically. (Corresponds to the -k option) +.skip 1 +.lm 0 +/SEC_SIZE +.skip 1 +.lm 6 +/SEC_SIZE=num +.lm 2 +.skip 1 +Set the maximum number of pages in each `section'. This option is most +commonly used with the /SEPARATE qualifier; see that documentation above for +more information. (Corresponds to the -S option) +.skip 1 +.lm 0 +/HELP +.skip 1 +.lm 2 +Displays a summary of the comand line options for the DVIPS program, but it +show the UNIX version. Not much use to the VMS people, maybe one day we can +set it to read this help library through the LBR$ utility routines. +(Corresponds to the -? option) +.skip 1 +.lm 0 +/MAKEFONT +.skip 1 +.lm 6 +/MAKEFONT (default) +/NOMAKEFONT +.lm 2 +By default an attempt is made to make missing fonts. Use of /NOMAKEFONT +turns off the automatic font generation facility. If any fonts are missing, +commands to generate the fonts are appended to the file `missfont.log' in +the current directory; this file can then be executed and deleted to create +the missing fonts. +.skip 1 +.lm 0 +/PSIZE +.skip 1 +.lm 6 +/PSIZE="xsize,ysize" +.lm 2 +.skip 1 +Set the paper size to the given pair of dimensions. This option takes +its arguments in the same style as /POFFSET. It overrides any paper +size special in the `dvi' file. +.skip 1 +Example : /PSIZE="6in,8in" +.skip 1 +.lm 0 +/POFFSET +.skip 1 +.lm 6 +/POFFSET="xoffset,yoffset" +.lm 2 +.skip 1 +Move the origin by a certain amount. The `offset' is a comma-separated +pair of dimensions, such as ".1in,-.3cm" (in the same syntax used in +the /PSIZE qualifier). The origin of the page is shifted from the +default position (of one inch down, one inch to the right from the upper +left corner of the paper) by this amount. +.skip 1 +Example : /POFFSET=".1in,-.3cm" +.skip 1 +.!----------------------------------------------------------------------- +.lm 0 +2 Specials +.skip 1 +.lm 2 +For a description of the special features of dvips see the dvips manual a LaTeX +version of which may be copied using the command +.skip 1 +copy tex$postscript:dvips.tex dvips.tex diff --git a/Build/source/texk/dvipsk/vms/make.com b/Build/source/texk/dvipsk/vms/make.com new file mode 100644 index 00000000000..e3fcd15209a --- /dev/null +++ b/Build/source/texk/dvipsk/vms/make.com @@ -0,0 +1,351 @@ +$ ! +$ ! dvips for VAX/VMS +$ ! +$ ! +$ ! Use to compile and link dvips with VAXC under VMS. Before using +$ ! this command file you must set the following definitions according +$ ! to your own environment; +$ ! +$ ! TFMPATH - The directory where TFM files live ( needed for +$ ! the compilation of dvips.c ). Be sure and include +$ ! the needed directory separator in the path ( i.e. +$ ! TEX_FONTS: ) +$ ! PKPATH - The directory where PK files live ( needed for the +$ ! compilation of dvips.c ). You should also decided +$ ! whether you need VMS_ROOTED ( needed for the +$ ! compilation of loadfont.c ) defined so that +$ ! PKPATH will be interpreted as a rooted directory +$ ! under VMS. Be sure and include the needed directory +$ ! separator in the path ( i.e. TEX_FONTS: ). +$ ! HEADERPATH - The directory where the PostScript prologue file +$ ! live ( needed for the compilation of output.c & +$ ! dvips.c). Be sure and include a trailing comma in +$ ! your definition of the header path as dvips uses this +$ ! definition as a path for both PostScript prologue +$ ! files and files which are included with \special +$ ! options. This definition should be a comma +$ ! separated list of directories where dvips will +$ ! look for a specified file. As an example; +$ ! +$ ! "HEADERPATH=""TEX_POSTSCRIPT:,SYS$LOGIN:,""" +$ ! +$ ! to look first in TEX_POSTSCRIPT:, then in SYS$LOGIN:, +$ ! and finally in the current default directory. +$ ! CONFIGPATH - The directory where the configuration file lives +$ ! ( needed for the compilation of resident.c ). Be +$ ! sure and include the needed directory separator +$ ! in the path ( i.e. TEX_POSTSCRIPT: ). +$ ! +$ ! FIGPATH - Where the .ps and .eps files are +$ ! +$ ! After dvips has been compiled and linked the user will be given the +$ ! option of compressing the PostScript prologue files which are used +$ ! by dvips and copying the resultant prologue files to the specifed +$ ! HEADERPATH. The user will also be given the option of copying the +$ ! dvips image file to the area where TeX related images are stored. +$ ! Answering "yes" to either of these options should be done only if +$ ! the user has write priviledges to the directories which are specified. +$ ! +$ ! Command file by: Robert Schneider +$ ! Department of Petroleum Engineering +$ ! The University of Texas at Austin +$ ! +$ ! October 1989 +$ ! +$ ! Updates by: Earle Ake +$ ! Science Applications International Corporation +$ ! Dayton, Ohio +$ ! ake@dayton.saic.com +$ ! +$ ! Updated for DVIPS 5.34 +$ ! August 1990 +$ ! +$ ! Ted Nieland +$ ! Control Data Corporation +$ ! DECUS TeX Collection Editor +$ ! ted@nieland.dayton.oh.us +$ ! +$ ! Updated for DVIPS 5.47, February 1991 +$ ! +$ ! Updated for DVIPS 5.474, March 1992 +$ ! Earle F. Ake +$ ! +$! Updated for DVIPS 5.493, Sept 1992 +$! Added HAVE_GETCWD,ANSI in CC for +$! dvips.c and resident.c +$! Max Calvani +$! calvani@astrpd.astro.it +$! +$! Updated for DVIPS 5.495, Oct. 1992 +$! calvani@astrpd.astro.it +$! +$! Updated for DVIPS 5.499, Jan. 1993 +$! Added FONTLIB support +$! calvani@astrpd.astro.it +$! +$ on error then goto bad_exit +$ on severe_error then goto bad_exit +$ ! +$ TFMPATH = "TEX_FONTS:" +$ PKPATH = "TEX_PKDIR:" +$ VFPATH = "TEX_VFDIR:" +$ HEADERPATH = "DVI_INPUTS:,TEX_INPUTS:,SYS$LOGIN:,SYS$DISK:[]," +$ PLACEHEADER_DIR = "TEX_DISK:[TEX.INPUTS.DVIDRIVERS]" +$ CONFIGPATH = "TEX_INPUTS:" +$ FIGPATH = "TEX_INPUTS:,SYS$DISK:" +$ TPIC = ",TPIC" +$ EMTEX = ",EMTEX" +$ FONTLIB = ",FONTLIB" +$ VMS_ROOTED = ",VMS_ROOTED" +$ TEXEXEPATH = "TEX_DISK:[TEX.EXE]" +$ DEBUG = ",DEBUG" +$ ! +$ write sys$output " " +$ inquire/nop ANSWER "Have you read the file VMS_INSTALL.TXT [no]? " +$ if ANSWER .eqs. "" then ANSWER = 0 +$ if ANSWER then goto read_instructions +$ write sys$output " " +$ write sys$output "Please read the VMS_INSTALL.TXT file, edit this command" +$ write sys$output "file if necessary, and then execute this file again." +$ write sys$output " " +$ exit +$ read_instructions: +$ write sys$output " " +$ inquire/nop ANSWER "Compile sources [no]? " +$ if ANSWER .eqs. "" then ANSWER = 0 +$ if .not. ANSWER then goto linkstep +$ ! +$ get_definitions: +$ write sys$output " " +$ ! +$ inquire/nop ANSWER "TFM path [''TFMPATH']? " +$ if ANSWER .nes. "" then TFMPATH = ANSWER +$ inquire/nop ANSWER "PK path [''PKPATH']? " +$ if ANSWER .nes. "" then PKPATH = ANSWER +$ inquire/nop ANSWER "VF path [''VFPATH']? " +$ if ANSWER .nes. "" then VFPATH = ANSWER +$ inquire/nop ANSWER "PostScript HEADER path [''HEADERPATH']? " +$ if ANSWER .nes. "" then HEADERPATH = ANSWER +$ inquire/nop ANSWER "PostScript CONFIG path [''CONFIGPATH'])? " +$ if ANSWER .nes. "" then CONFIGPATH = ANSWER +$ inquire/nop ANSWER "FIG path [''FIGPATH'])? " +$ if ANSWER .nes. "" then FIGPATH = ANSWER +$ inquire/nop ANSWER "Do you want TPIC support [yes]? " +$ if ANSWER .eqs. "" then ANSWER = 1 +$ if .not. ANSWER then TPIC = "" +$ inquire/nop ANSWER "Do you want EMTEX support [yes]? " +$ if ANSWER .eqs. "" then ANSWER = 1 +$ if .not. ANSWER then EMTEX = "" +$ inquire/nop ANSWER "Do you want FONTLIB support [yes]? " +$ if ANSWER .eqs. "" then ANSWER = 1 +$ if .not. ANSWER then FONTLIB = "" +$ inquire/nop ANSWER "Do you want DEBUG support [yes]? " +$ if ANSWER .eqs. "" then ANSWER = 1 +$ if .not. ANSWER then DEBUG = "" +$ inquire/nop ANSWER "Is ''PKPATH' a rooted directory [yes]? " +$ if ANSWER .eqs. "" then ANSWER = 1 +$ if .not. ANSWER then VMS_ROOTED = "" +$ write sys$output " " +$ write sys$output "dvips will be compiled with the following definitions;" +$ write sys$output " " +$ write sys$output "TFMPATH = ",TFMPATH +$ write sys$output "PKPATH = ",PKPATH +$ write sys$output "VFPATH = ",VFPATH +$ write sys$output "HEADERPATH = ",HEADERPATH +$ write sys$output "CONFIGPATH = ",CONFIGPATH +$ write sys$output "FIGPATH = ",FIGPATH +$ if TPIC .eqs. "" then - + write sys$output "TPIC support is not enabled." +$ if TPIC .nes. "" then - + write sys$output "TPIC support is enabled." +$ if FONTLIB .eqs. "" then - + write sys$output "FONTLIB support is not enabled." +$ if FONTLIB .nes. "" then - + write sys$output "FONTLIB support is enabled." +$ if EMTEX .eqs. "" then - + write sys$output "EMTEX support is not enabled." +$ if EMTEX .nes. "" then - + write sys$output "EMTEX support is enabled." +$ if DEBUG .eqs. "" then - + write sys$output "DEBUG support is not enabled." +$ if DEBUG .nes. "" then - + write sys$output "DEBUG support is enabled." +$ if VMS_ROOTED .eqs. "" then - + write sys$output PKPATH," is not a rooted directory." +$ if VMS_ROOTED .nes. "" then - + write sys$output PKPATH," is a rooted directory." +$ write sys$output " " +$ inquire/nop ANSWER "Is this correct [yes]? " +$ if ANSWER .eqs. "" then ANSWER = 1 +$ if .not. ANSWER then goto get_definitions +$ ! +$ if VMS_ROOTED .nes. "" then PKPATH = "''PKPATH'[%d]%f.PK" +$ write sys$output " " +$ write sys$output "Compiling sources ..." +$ write sys$output " " +$ write sys$output "afm2tfm.c ..." +$ cc /define=(VMS'DEBUG') AFM2TFM.C +$ write sys$output "color.c ..." +$ cc /define=(VMS'DEBUG') COLOR.C +$ write sys$output "dopage.c ..." +$ cc /define=(VMS'DEBUG''EMTEX') DOPAGE.C +$ write sys$output "dosection.c ..." +$ cc /define=(VMS'DEBUG') DOSECTION.C +$ write sys$output "dospecial.c ..." +$ cc /define=(VMS'DEBUG''TPIC') DOSPECIAL.C +$ write sys$output "download.c ..." +$ cc /define=(VMS'DEBUG') DOWNLOAD.C +$ write sys$output "dpicheck.c ..." +$ cc /define=(VMS'DEBUG') DPICHECK.C +$ write sys$output "drawps.c ..." +$ cc /define=(VMS'DEBUG''TPIC') DRAWPS.C +$ write sys$output "dviinput.c ..." +$ cc /define=(VMS'DEBUG') DVIINPUT.C +$ write sys$output "dvips.c ..." +$ cc /define=(VMS'DEBUG',"TFMPATH=""''TFMPATH'""","PKPATH=""''PKPATH'""", - + "VFPATH=""''VFPATH'""","FIGPATH=""''FIGPATH'""",HAVE_GETCWD,ANSI, - + "CONFIGPATH=""''CONFIGPATH'""","HEADERPATH=""''HEADERPATH'""") DVIPS.C +$ write sys$output "finclude.c ..." +$ cc /DEF=(VMS'DEBUG') FINCLUDE.C +$ write sys$output "flib.c ..." +$ cc /DEF=(VMS'DEBUG''FONTLIB') FLIB.C +$ write sys$output "fontdef.c ..." +$ cc /define=(VMS'DEBUG') FONTDEF.C +$ write sys$output "header.c ..." +$ cc /define=(VMS'DEBUG') HEADER.C +$ write sys$output "loadfont.c ..." +$ cc /define=(VMS'DEBUG') LOADFONT.C +$ write sys$output "makefont.c ..." +$ cc /define=(VMS'DEBUG') MAKEFONT.C +$ write sys$output "output.c ..." +$ cc /define=(VMS'DEBUG',"HEADERPATH=""''HEADERPATH'""") OUTPUT.C +$ write sys$output "papersiz.c ..." +$ cc /define=(VMS'DEBUG') PAPERSIZ.C +$ write sys$output "pprescan.c ..." +$ cc /define=(VMS'DEBUG') PPRESCAN.C +$ write sys$output "prescan.c ..." +$ cc /define=(VMS'DEBUG') PRESCAN.C +$ write sys$output "repack.c ..." +$ cc /define=(VMS'DEBUG') REPACK.C +$ write sys$output "resident.c ..." +$ cc /define=(VMS'DEBUG',"CONFIGPATH=""''CONFIGPATH'""",HAVE_GETCWD,ANSI) - + RESIDENT.C +$ write sys$output "scalewidth.c ..." +$ cc /define=(VMS'DEBUG') SCALEWIDTH.C +$ write sys$output "scanpage.c ..." +$ cc /define=(VMS'DEBUG') SCANPAGE.C +$ write sys$output "search.c ..." +$ cc /define=(VMS'DEBUG') SEARCH.C +$ write sys$output "skippage.c ..." +$ cc /define=(VMS'DEBUG') SKIPPAGE.C +$ write sys$output "squeeze.c ..." +$ cc /define=(VMS'DEBUG') SQUEEZE.C +$ write sys$output "tfmload.c ..." +$ cc /define=(VMS'DEBUG') TFMLOAD.C +$ write sys$output "unpack.c ..." +$ cc /define=(VMS'DEBUG') UNPACK.C +$ write sys$output "virtualfont.c ..." +$ cc /define=(VMS'DEBUG') VIRTUALFONT.C +$ write sys$output "bbox.c ..." +$ cc /define=(VMS'DEBUG') BBOX.C +$ write sys$output "emspecial.c ..." +$ cc /define=(VMS'DEBUG''EMTEX') EMSPECIAL.C +$ ! +$ ! vaxvms fixes some irritating problems with VAXC ( particulary +$ ! fseek and ftell ). Thanks to Nelson Beebee at Utah. +$ ! +$ write sys$output "vaxvms.c ..." +$ cc /define=(VMS'DEBUG') [.VMS]VAXVMS.C +$ ! +$ linkstep: +$ write sys$output " " +$ write sys$output "Linking dvips ..." +$ link /exe=dvips dvips,dopage,dosection,dospecial,download,dpicheck,drawps, - + dviinput,header,finclude,flib,fontdef,loadfont,tfmload,prescan, - + scanpage,skippage,output,scalewidth,resident,search,unpack, - + makefont,repack,virtualfont,vaxvms,color,papersiz,pprescan, - + bbox,emspecial,[.vms]vaxcrtl.opt/opt +$ write sys$output " " +$ write sys$output "Linking squeeze ..." +$ link /exe=squeeze squeeze,vaxvms,[.vms]vaxcrtl.opt/opt +$ write sys$output " " +$ write sys$output "Linking afm2tfm ..." +$ write sys$output " " +$ link /exe=afm2tfm afm2tfm,vaxvms,[.vms]vaxcrtl.opt/opt +$ ! +$ inquire/nop ANSWER - + "Do you wish to compress the PostScript prologue files [no]? " +$ if ANSWER .eqs. "" then ANSWER = 0 +$ if .not. ANSWER then goto copy_prologue +$ squeeze :== $'f$environment("DEFAULT")'squeeze.exe +$ write sys$output " " +$ set verify +$ squeeze COLOR.LPRO COLOR.PRO +$ squeeze FINCLUDE.LPRO FINCLUDE.PRO +$ squeeze TEX.LPRO TEX.PRO +$ squeeze TEXPS.LPRO TEXPS.PRO +$ squeeze SPECIAL.LPRO SPECIAL.PRO +$ verify = 'f$verify(0) +$ write sys$output " " +$ copy_prologue: +$ FIRSTPATH = PLACEHEADER_DIR +$ inquire/nop ANSWER - + "Do you wish to copy the prologue files to ''FIRSTPATH' [yes]? " +$ if ANSWER .eqs. "" then ANSWER = 1 +$ if .not. ANSWER then goto copy_config +$ write sys$output " " +$ set verify +$ copy COLOR.PRO 'FIRSTPATH'COLOR.PRO +$ copy FINCLUDE.PRO 'FIRSTPATH'FINCLUDE.PRO +$ copy TEX.PRO 'FIRSTPATH'TEX.PRO +$ copy TEXPS.PRO 'FIRSTPATH'TEXPS.PRO +$ copy SPECIAL.PRO 'FIRSTPATH'SPECIAL.PRO +$ set protection=(s:rwed,o:rwed,g:re,w:re) 'FIRSTPATH'COLOR.PRO +$ set protection=(s:rwed,o:rwed,g:re,w:re) 'FIRSTPATH'FINCLUDE.PRO +$ set protection=(s:rwed,o:rwed,g:re,w:re) 'FIRSTPATH'TEX.PRO +$ set protection=(s:rwed,o:rwed,g:re,w:re) 'FIRSTPATH'SPECIAL.PRO +$ set protection=(s:rwed,o:rwed,g:re,w:re) 'FIRSTPATH'TEXPS.PRO +$ verify = 'f$verify(0) +$ write sys$output " " +$ copy_config: +$ FIRSTPATH = PLACEHEADER_DIR +$ inquire/nop ANSWER - + "Do you wish to copy the CONFIG.PS file to ''FIRSTPATH' [yes]? " +$ if ANSWER .eqs. "" then ANSWER = 1 +$ if .not. ANSWER then goto copy_image +$ write sys$output " " +$ set verify +$ copy CONFIG.PS 'FIRSTPATH'CONFIG.PS +$ set protection=(s:rwed,o:rwed,g:re,w:re) 'FIRSTPATH'CONFIG.PS +$ verify = 'f$verify(0) +$ write sys$output " " +$ copy_image: +$ inquire/nop ANSWER "Do you wish to copy DVIPS.EXE to the TeX area [yes]? " +$ if ANSWER .eqs. "" then ANSWER = 1 +$ if .not. ANSWER then goto done +$ inquire/nop ANSWER "TeX image area [''TEXEXEPATH']? " +$ if ANSWER .nes. "" THEN TEXEXEPATH = ANSWER +$ write sys$output " " +$ set verify +$ copy dvips.exe 'TEXEXEPATH' +$ set protect=(s:rwed,o:rwed,g:re,w:re) 'TEXEXEPATH'dvips.exe +$ verify = 'f$verify(0) +$ write sys$output " " +$ done: +$ write sys$output " " +$ write sys$output "Be sure to add dvips to your CLI by using the SET " +$ write sys$output "COMMAND syntax and do the other steps which are" +$ write sys$output "necessary to finish up the installation of dvips." +$ write sys$output " " +$ goto good_exit +$ bad_exit: +$ write sys$output " " +$ write sys$output "Something's wrong here. You might want to take a look" +$ write sys$output "at the offending code or command and start over." +$ write sys$output " " +$ exit +$ good_exit: +$ write sys$output "Done." +$ write sys$output " " +$ exit +$! --------------------- EOF ------------------------------------- diff --git a/Build/source/texk/dvipsk/vms/newmake.com b/Build/source/texk/dvipsk/vms/newmake.com new file mode 100644 index 00000000000..e137caf39c7 --- /dev/null +++ b/Build/source/texk/dvipsk/vms/newmake.com @@ -0,0 +1,387 @@ +$! EJG - 02-Jul-1996 - Made from Make.com +$! PWD - 03-Mar-1997 - Add t1part.c +$! Changes: +$! +$! Added HPS define to compilation. +$! Skip all the questions at the beginning and go straight to compile. +$! Reorder modules (bbox and emspecial) to be in alphabetical order +$! during compile. +$! Add hps.c to compile. +$! Add hps to link. +$! Remove option file from links. +$! Add /standard=vaxc to all cc commands +$! Remove FONTLIB (if included, need to define FLINAME and FLIPATH, but +$! before I do this I need to find out what a font library is!) +$! +$! PWD: add t1part.c to compile and link +$! change TEX$POSTSCRIPT to TEX_POSTSCRIPT +$ ! +$ ! dvips for VAX/VMS +$ ! +$ ! +$ ! Use to compile and link dvips with VAXC under VMS. Before using +$ ! this command file you must set the following definitions according +$ ! to your own environment; +$ ! +$ ! TFMPATH - The directory where TFM files live ( needed for +$ ! the compilation of dvips.c ). Be sure and include +$ ! the needed directory separator in the path ( i.e. +$ ! TEX_FONTS: ) +$ ! PKPATH - The directory where PK files live ( needed for the +$ ! compilation of dvips.c ). You should also decided +$ ! whether you need VMS_ROOTED ( needed for the +$ ! compilation of loadfont.c ) defined so that +$ ! PKPATH will be interpreted as a rooted directory +$ ! under VMS. Be sure and include the needed directory +$ ! separator in the path ( i.e. TEX_FONTS: ). +$ ! HEADERPATH - The directory where the PostScript prologue file +$ ! live ( needed for the compilation of output.c & +$ ! dvips.c). Be sure and include a trailing comma in +$ ! your definition of the header path as dvips uses this +$ ! definition as a path for both PostScript prologue +$ ! files and files which are included with \special +$ ! options. This definition should be a comma +$ ! separated list of directories where dvips will +$ ! look for a specified file. As an example; +$ ! +$ ! "HEADERPATH=""TEX_POSTSCRIPT:,SYS$LOGIN:,""" +$ ! +$ ! to look first in TEX_POSTSCRIPT:, then in SYS$LOGIN:, +$ ! and finally in the current default directory. +$ ! CONFIGPATH - The directory where the configuration file lives +$ ! ( needed for the compilation of resident.c ). Be +$ ! sure and include the needed directory separator +$ ! in the path ( i.e. TEX_POSTSCRIPT: ). +$ ! +$ ! FIGPATH - Where the .ps and .eps files are +$ ! +$ ! After dvips has been compiled and linked the user will be given the +$ ! option of compressing the PostScript prologue files which are used +$ ! by dvips and copying the resultant prologue files to the specifed +$ ! HEADERPATH. The user will also be given the option of copying the +$ ! dvips image file to the area where TeX related images are stored. +$ ! Answering "yes" to either of these options should be done only if +$ ! the user has write priviledges to the directories which are specified. +$ ! +$ ! Command file by: Robert Schneider +$ ! Department of Petroleum Engineering +$ ! The University of Texas at Austin +$ ! +$ ! October 1989 +$ ! +$ ! Updates by: Earle Ake +$ ! Science Applications International Corporation +$ ! Dayton, Ohio +$ ! ake@dayton.saic.com +$ ! +$ ! Updated for DVIPS 5.34 +$ ! August 1990 +$ ! +$ ! Ted Nieland +$ ! Control Data Corporation +$ ! DECUS TeX Collection Editor +$ ! ted@nieland.dayton.oh.us +$ ! +$ ! Updated for DVIPS 5.47, February 1991 +$ ! +$ ! Updated for DVIPS 5.474, March 1992 +$ ! Earle F. Ake +$ ! +$! Updated for DVIPS 5.493, Sept 1992 +$! Added HAVE_GETCWD,ANSI in CC for +$! dvips.c and resident.c +$! Max Calvani +$! calvani@astrpd.astro.it +$! +$! Updated for DVIPS 5.495, Oct. 1992 +$! calvani@astrpd.astro.it +$! +$! Updated for DVIPS 5.499, Jan. 1993 +$! Added FONTLIB support +$! calvani@astrpd.astro.it +$! +$ on error then goto bad_exit +$ on severe_error then goto bad_exit +$ ! +$ TFMPATH = "TEX_FONTS:" +$ PKPATH = "TEX_PKDIR:" +$ VFPATH = "TEX_VFDIR:" +$ HEADERPATH = "TEX_POSTSCRIPT:,TEX_INPUTS:,SYS$LOGIN:,SYS$DISK:[]," ! PWD +$ PLACEHEADER_DIR = "TEX_POSTSCRIPT:,TEX_ROOT:[TEX.DVIDRIVERS]" ! Changed by PWD +$ CONFIGPATH = "TEX_POSTSCRIPT:" !Changed by PWD +$ FIGPATH = "TEX_INPUTS:,SYS$DISK:" +$ TPIC = ",TPIC" +$ EMTEX = ",EMTEX" +$! FONTLIB = ",FONTLIB" !EJG 02-Jul-1996 +$ FONTLIB = "" !EJG 02-Jul-1996 +$ VMS_ROOTED = ",VMS_ROOTED" +$ TEXEXEPATH = "TEX_DISK:[TEX.EXE]" +$ DEBUG = ",DEBUG" +$ HPS = ",HPS" !EJG 02-Jul-1996 +$ GOTO DOCOMPILE !EJG 02-Jul-1996 +$ ! +$ write sys$output " " +$ inquire/nop ANSWER "Have you read the file VMS_INSTALL.TXT [no]? " +$ if ANSWER .eqs. "" then ANSWER = 0 +$ if ANSWER then goto read_instructions +$ write sys$output " " +$ write sys$output "Please read the VMS_INSTALL.TXT file, edit this command" +$ write sys$output "file if necessary, and then execute this file again." +$ write sys$output " " +$ exit +$ read_instructions: +$ write sys$output " " +$ inquire/nop ANSWER "Compile sources [no]? " +$ if ANSWER .eqs. "" then ANSWER = 0 +$ if .not. ANSWER then goto linkstep +$ ! +$ get_definitions: +$ write sys$output " " +$ ! +$ inquire/nop ANSWER "TFM path [''TFMPATH']? " +$ if ANSWER .nes. "" then TFMPATH = ANSWER +$ inquire/nop ANSWER "PK path [''PKPATH']? " +$ if ANSWER .nes. "" then PKPATH = ANSWER +$ inquire/nop ANSWER "VF path [''VFPATH']? " +$ if ANSWER .nes. "" then VFPATH = ANSWER +$ inquire/nop ANSWER "PostScript HEADER path [''HEADERPATH']? " +$ if ANSWER .nes. "" then HEADERPATH = ANSWER +$ inquire/nop ANSWER "PostScript CONFIG path [''CONFIGPATH'])? " +$ if ANSWER .nes. "" then CONFIGPATH = ANSWER +$ inquire/nop ANSWER "FIG path [''FIGPATH'])? " +$ if ANSWER .nes. "" then FIGPATH = ANSWER +$ inquire/nop ANSWER "Do you want TPIC support [yes]? " +$ if ANSWER .eqs. "" then ANSWER = 1 +$ if .not. ANSWER then TPIC = "" +$ inquire/nop ANSWER "Do you want EMTEX support [yes]? " +$ if ANSWER .eqs. "" then ANSWER = 1 +$ if .not. ANSWER then EMTEX = "" +$ inquire/nop ANSWER "Do you want FONTLIB support [yes]? " +$ if ANSWER .eqs. "" then ANSWER = 1 +$ if .not. ANSWER then FONTLIB = "" +$ inquire/nop ANSWER "Do you want DEBUG support [yes]? " +$ if ANSWER .eqs. "" then ANSWER = 1 +$ if .not. ANSWER then DEBUG = "" +$ inquire/nop ANSWER "Is ''PKPATH' a rooted directory [yes]? " +$ if ANSWER .eqs. "" then ANSWER = 1 +$ if .not. ANSWER then VMS_ROOTED = "" +$ write sys$output " " +$ write sys$output "dvips will be compiled with the following definitions;" +$ write sys$output " " +$ write sys$output "TFMPATH = ",TFMPATH +$ write sys$output "PKPATH = ",PKPATH +$ write sys$output "VFPATH = ",VFPATH +$ write sys$output "HEADERPATH = ",HEADERPATH +$ write sys$output "CONFIGPATH = ",CONFIGPATH +$ write sys$output "FIGPATH = ",FIGPATH +$ if TPIC .eqs. "" then - + write sys$output "TPIC support is not enabled." +$ if TPIC .nes. "" then - + write sys$output "TPIC support is enabled." +$ if FONTLIB .eqs. "" then - + write sys$output "FONTLIB support is not enabled." +$ if FONTLIB .nes. "" then - + write sys$output "FONTLIB support is enabled." +$ if EMTEX .eqs. "" then - + write sys$output "EMTEX support is not enabled." +$ if EMTEX .nes. "" then - + write sys$output "EMTEX support is enabled." +$ if DEBUG .eqs. "" then - + write sys$output "DEBUG support is not enabled." +$ if DEBUG .nes. "" then - + write sys$output "DEBUG support is enabled." +$ if VMS_ROOTED .eqs. "" then - + write sys$output PKPATH," is not a rooted directory." +$ if VMS_ROOTED .nes. "" then - + write sys$output PKPATH," is a rooted directory." +$ write sys$output " " +$ inquire/nop ANSWER "Is this correct [yes]? " +$ if ANSWER .eqs. "" then ANSWER = 1 +$ if .not. ANSWER then goto get_definitions +$ ! +$DOCOMPILE: !EJG 02-Jul-1996 +$ if VMS_ROOTED .nes. "" then PKPATH = "''PKPATH'[%d]%f.PK" +$ write sys$output " " +$ write sys$output "Compiling sources ..." +$ write sys$output " " +$ write sys$output "afm2tfm.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') AFM2TFM.C +$ write sys$output "bbox.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') BBOX.C +$ write sys$output "color.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') COLOR.C +$ write sys$output "dopage.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS''EMTEX') DOPAGE.C +$ write sys$output "dosection.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') DOSECTION.C +$ write sys$output "dospecial.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS''TPIC') DOSPECIAL.C +$ write sys$output "download.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') DOWNLOAD.C +$ write sys$output "dpicheck.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') DPICHECK.C +$ write sys$output "drawps.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS''TPIC') DRAWPS.C +$ write sys$output "dviinput.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') DVIINPUT.C +$ write sys$output "dvips.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS',"TFMPATH=""''TFMPATH'""","PKPATH=""''PKPATH'""", - + "VFPATH=""''VFPATH'""","FIGPATH=""''FIGPATH'""",HAVE_GETCWD,ANSI, - + "CONFIGPATH=""''CONFIGPATH'""","HEADERPATH=""''HEADERPATH'""") DVIPS.C +$ write sys$output "emspecial.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS''EMTEX') EMSPECIAL.C +$ write sys$output "finclude.c ..." +$ cc/standard=vaxc /DEF=(VMS'DEBUG''HPS') FINCLUDE.C +$ write sys$output "flib.c ..." +$ cc/standard=vaxc /DEF=(VMS'DEBUG''HPS''FONTLIB') FLIB.C +$ write sys$output "fontdef.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') FONTDEF.C +$ write sys$output "header.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') HEADER.C +$ write sys$output "hps.c ..." !EJG 02-Jul-1996 +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') HPS.C !EJG 02-Jul-1996 +$ write sys$output "loadfont.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') LOADFONT.C +$ write sys$output "makefont.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') MAKEFONT.C +$ write sys$output "output.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS',"HEADERPATH=""''HEADERPATH'""") OUTPUT.C +$ write sys$output "papersiz.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') PAPERSIZ.C +$ write sys$output "pprescan.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') PPRESCAN.C +$ write sys$output "prescan.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') PRESCAN.C +$ write sys$output "repack.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') REPACK.C +$ write sys$output "resident.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS',"CONFIGPATH=""''CONFIGPATH'""",HAVE_GETCWD,ANSI) - + RESIDENT.C +$ write sys$output "scalewidth.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') SCALEWIDTH.C +$ write sys$output "scanpage.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') SCANPAGE.C +$ write sys$output "search.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') SEARCH.C +$ write sys$output "skippage.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') SKIPPAGE.C +$ write sys$output "squeeze.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') SQUEEZE.C +$ write sys$output "t1part.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') T1PART.C +$ write sys$output "tfmload.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') TFMLOAD.C +$ write sys$output "unpack.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') UNPACK.C +$ write sys$output "virtualfont.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') VIRTUALFONT.C +$ ! +$ ! vaxvms fixes some irritating problems with VAXC ( particulary +$ ! fseek and ftell ). Thanks to Nelson Beebee at Utah. +$ ! +$ write sys$output "vaxvms.c ..." +$ cc/standard=vaxc /define=(VMS'DEBUG''HPS') [.VMS]VAXVMS.C +$ ! +$ linkstep: +$ write sys$output " " +$ write sys$output "Linking dvips ..." +$ link /exe=dvips dvips,dopage,dosection,dospecial,download,dpicheck,drawps, - + t1part, - + dviinput,header,hps,finclude,flib,fontdef,loadfont,tfmload,prescan, - + scanpage,skippage,output,scalewidth,resident,search,unpack, - + makefont,repack,virtualfont,vaxvms,color,papersiz,pprescan, - + bbox,emspecial !EJG 02-Jul-1996 +$ write sys$output " " +$ write sys$output "Linking squeeze ..." +$ link /exe=squeeze squeeze,vaxvms !EJG 02-Jul-1996 +$ write sys$output " " +$ write sys$output "Linking afm2tfm ..." +$ write sys$output " " +$ link /exe=afm2tfm afm2tfm,vaxvms !EJG 02-Jul-1996 +$ exit !EJG 02-Jul-1996 +$ ! +$ inquire/nop ANSWER - + "Do you wish to compress the PostScript prologue files [no]? " +$ if ANSWER .eqs. "" then ANSWER = 0 +$ if .not. ANSWER then goto copy_prologue +$ squeeze :== $'f$environment("DEFAULT")'squeeze.exe +$ write sys$output " " +$ set verify +$ squeeze COLOR.LPRO COLOR.PRO +$ squeeze FINCLUDE.LPRO FINCLUDE.PRO +$ squeeze TEX.LPRO TEX.PRO +$ squeeze TEXC.LPRO TEXC.PRO +$ squeeze TEXPS.LPRO TEXPS.PRO +$ squeeze SPECIAL.LPRO SPECIAL.PRO +$ squeeze CROP.LPRO CROP.PRO +$ squeeze HPS.LPRO HPS.PRO +$ verify = 'f$verify(0) +$ write sys$output " " +$ copy_prologue: +$ FIRSTPATH = PLACEHEADER_DIR +$ inquire/nop ANSWER - + "Do you wish to copy the prologue files to ''FIRSTPATH' [yes]? " +$ if ANSWER .eqs. "" then ANSWER = 1 +$ if .not. ANSWER then goto copy_config +$ write sys$output " " +$ set verify +$ copy COLOR.PRO 'FIRSTPATH'COLOR.PRO +$ copy FINCLUDE.PRO 'FIRSTPATH'FINCLUDE.PRO +$ copy TEX.PRO 'FIRSTPATH'TEX.PRO +$ copy TEXC.PRO 'FIRSTPATH'TEXC.PRO +$ copy TEXPS.PRO 'FIRSTPATH'TEXPS.PRO +$ copy SPECIAL.PRO 'FIRSTPATH'SPECIAL.PRO +$ copy HPS.PRO 'FIRSTPATH'HPS.PRO +$ copy CROP.PRO 'FIRSTPATH'CROP.PRO +$ set protection=(s:rwed,o:rwed,g:re,w:re) 'FIRSTPATH'COLOR.PRO +$ set protection=(s:rwed,o:rwed,g:re,w:re) 'FIRSTPATH'FINCLUDE.PRO +$ set protection=(s:rwed,o:rwed,g:re,w:re) 'FIRSTPATH'TEX.PRO +$ set protection=(s:rwed,o:rwed,g:re,w:re) 'FIRSTPATH'TEXC.PRO +$ set protection=(s:rwed,o:rwed,g:re,w:re) 'FIRSTPATH'SPECIAL.PRO +$ set protection=(s:rwed,o:rwed,g:re,w:re) 'FIRSTPATH'TEXPS.PRO +$ set protection=(s:rwed,o:rwed,g:re,w:re) 'FIRSTPATH'HPS.PRO +$ set protection=(s:rwed,o:rwed,g:re,w:re) 'FIRSTPATH'CROP.PRO +$ verify = 'f$verify(0) +$ write sys$output " " +$ copy_config: +$ FIRSTPATH = PLACEHEADER_DIR +$ inquire/nop ANSWER - + "Do you wish to copy the CONFIG.PS file to ''FIRSTPATH' [yes]? " +$ if ANSWER .eqs. "" then ANSWER = 1 +$ if .not. ANSWER then goto copy_image +$ write sys$output " " +$ set verify +$ copy CONFIG.PS 'FIRSTPATH'CONFIG.PS +$ set protection=(s:rwed,o:rwed,g:re,w:re) 'FIRSTPATH'CONFIG.PS +$ verify = 'f$verify(0) +$ write sys$output " " +$ copy_image: +$ inquire/nop ANSWER "Do you wish to copy DVIPS.EXE to the TeX area [yes]? " +$ if ANSWER .eqs. "" then ANSWER = 1 +$ if .not. ANSWER then goto done +$ inquire/nop ANSWER "TeX image area [''TEXEXEPATH']? " +$ if ANSWER .nes. "" THEN TEXEXEPATH = ANSWER +$ write sys$output " " +$ set verify +$ copy dvips.exe 'TEXEXEPATH' +$ set protect=(s:rwed,o:rwed,g:re,w:re) 'TEXEXEPATH'dvips.exe +$ verify = 'f$verify(0) +$ write sys$output " " +$ done: +$ write sys$output " " +$ write sys$output "Be sure to add dvips to your CLI by using the SET " +$ write sys$output "COMMAND syntax and do the other steps which are" +$ write sys$output "necessary to finish up the installation of dvips." +$ write sys$output " " +$ goto good_exit +$ bad_exit: +$ write sys$output " " +$ write sys$output "Something's wrong here. You might want to take a look" +$ write sys$output "at the offending code or command and start over." +$ write sys$output " " +$ exit +$ good_exit: +$ write sys$output "Done." +$ write sys$output " " +$ exit +$! --------------------- EOF ------------------------------------- diff --git a/Build/source/texk/dvipsk/vms/texc_scr.com b/Build/source/texk/dvipsk/vms/texc_scr.com new file mode 100644 index 00000000000..40519a41e2d --- /dev/null +++ b/Build/source/texk/dvipsk/vms/texc_scr.com @@ -0,0 +1,104 @@ +$!---------------------------------------------------------------------- +$! +$! TEXC_SCR.COM +$! +$! Convert TEX.LPRO to TEXC.LPRO +$! This command file replaces the TexC.script file, intended for Unix OS, +$! with its TPU equivalent. +$! +$! Tony McGrath 5-OCT-1990 +$! Dept. of Physics, Monash University, Victoria, Australia 3168 +$! +$!---------------------------------------------------------------------- +$! +$ Edit/TPU/NoSection/NoDisplay/Command=SYS$Input/Output=TEXC.LPRO TEX.LPRO +! +PROCEDURE texc$script + +LOCAL string_1, string_2, string_3, a_range, a_line, two_chars; + +!----------------------------------------------------------------------- +! Won't bother with CREATE_ARRAY, try to keep the TPU as basic as possible +! so it works on older versions of VMS. +!----------------------------------------------------------------------- +string_1 := "% begin code for uncompressed fonts only"; +string_2 := "% end code for uncompressed fonts only"; +string_3 := "% end of code for unpacking compressed fonts"; +!----------------------------------------------------------------------- +! Search for the first of the 3 special strings. +! Exit if we can't find it. +!----------------------------------------------------------------------- +a_range := search( string_1, forward); +if( a_range = 0) +then + message( "TEXC-F-NoString, Couldn't locate first string, Aborting"); + return(0); +endif; +!----------------------------------------------------------------------- +! Go to the start of the first string. +!----------------------------------------------------------------------- +position( beginning_of( a_range)); +!----------------------------------------------------------------------- +! Search for the second of the 3 special strings. +! Exit if we can't find it. +!----------------------------------------------------------------------- +a_range := search( string_2, forward); +if( a_range = 0) +then + message( "TEXC-F-NoString, Couldn't locate second string, Aborting"); + return(0); +endif; +!----------------------------------------------------------------------- +! Then start deleting lines until the second special string is found. +!----------------------------------------------------------------------- +loop + a_line := erase_line; + exitif a_line = string_2; +endloop; +!----------------------------------------------------------------------- +! Search for the third of the 3 special strings. +! Exit if we can't find it. +!----------------------------------------------------------------------- +a_range := search( string_3, forward); +if( a_range = 0) +then + message( "TEXC-F-NoString, Couldn't locate third string, Aborting"); + return(0); +endif; +!----------------------------------------------------------------------- +! Again start looping, deleting the first 2 characters from each line +! until the 3rd special string is found, making sure that the first two +! characters are "% " +!----------------------------------------------------------------------- +loop + two_chars := erase_character(2); + if two_chars <> "% " + then + message( "TEXC-F-NoComment, First 2 chars not correct, Aborting"); + return(0); + endif; + exitif current_line = string_3; + move_vertical(1); +endloop; +!----------------------------------------------------------------------- +! Assume all is well, return TRUE. +!----------------------------------------------------------------------- +return(1); + +ENDPROCEDURE +!----------------------------------------------------------------------- +! Initialize the main buffer. +!----------------------------------------------------------------------- +f:=Get_Info(Command_Line,"File_Name"); +b:=Create_Buffer("",f); +o:=Get_Info(Command_Line,"Output_File"); +Set (Output_File,b,o); +Position (Beginning_of(b)); +! +if texc$script +then + Exit; +else + message( "TEXC-W-NoSave, current buffer not saved, errors were encountered"); + Quit; +endif; diff --git a/Build/source/texk/dvipsk/vms/vaxcrtl.opt b/Build/source/texk/dvipsk/vms/vaxcrtl.opt new file mode 100644 index 00000000000..a01884977fe --- /dev/null +++ b/Build/source/texk/dvipsk/vms/vaxcrtl.opt @@ -0,0 +1 @@ +sys$share:vaxcrtl/share diff --git a/Build/source/texk/dvipsk/vms/vaxvms.c b/Build/source/texk/dvipsk/vms/vaxvms.c new file mode 100644 index 00000000000..d13e362b951 --- /dev/null +++ b/Build/source/texk/dvipsk/vms/vaxvms.c @@ -0,0 +1,470 @@ +/*********************************************************************** +This file provides alternative functions for several VMS VMS C library +routines which either unacceptable, or incorrect, implementations. They +have been developed and tested under VMS Version 4.4, but indications +are that they apply to earlier versions, back to 3.2 at least. They +should be retested with each new release of VMS C. + +Contents: + EXIT + FSEEK + FTELL + GETCHAR + GETENV + READ + UNGETC + getlogin + qsort + system + tell + unlink + +The VAX VMS file system record structure has unfortunate consequences +for random access files. + +By default, text files written by most system utilities, and languages +other than C, have a variable length record format, in which a 16-bit +character count is aligned on an even-byte boundary in the disk block +b(always 512 bytes in VMS, independent of record and file formats), +followed by <count> bytes of data. Binary files, such as .EXE, .OBJ, +and TeX .DVI and font files, all use a 512-byte fixed record format +which has no explicit length field. No file byte count is stored; +instead, the block count, and the offset of the last data byte in the +last block are recorded in the file header (do ``DUMP/HEADER filespec'' +to see it). For binary files with fixed-length records, the last block +is normally assumed to be full, and consequently, file transfer of +binary data from other machines via Kermit, FTP, or DCL COPY from ANSI +tapes, generally fails because the input file length is not a multiple +of 512. + +This record organization may be contrasted with the STREAM, STREAM_LF, +and STREAM_CR organizations supported from Version 4.0; in these, disk +blocks contain a continuous byte stream in which nothing, or LF, or CR, +is recognized as a record terminator. These formats are similar to the +Unix and TOPS-20 file system formats which also use continuous byte +streams. + +For C, this means that a program operating on a file in record format +cannot count input characters and expect that count to be the same value +as the offset parameter passed to fseek(), which numerous C programs +assume to be the case. The draft ANSI C standard, and Harbison and +Steele's ``C Reference Manual'', emphasize that only values returned by +ftell() should be used as arguments to fseek(), allowing the program to +return to a position previously read or written. UNFORTUNATELY, VMS C +ftell() DOES NOT RETURN A CORRECT OFFSET VALUE FOR RECORD FILES. +Instead, for record files, it returns the byte offset of the start of +the current record, no matter where in that record the current position +may be. This misbehavior is completely unnecessary, since the +replacements below perform correctly, and are written entirely in C. + +Another problem is that ungetc(char c, FILE* fp) is unreliable. VMS C +implements characters as signed 8-bit integers (so do many other C +implementations). fgetc(FILE* fp) returns an int, not a char, whose +value is EOF (-1) in the event of end-of-file; however, this value will +also be returned for a character 0xFF, so it is essential to use +feof(FILE *fp) to test for a true end-of-file condition when EOF is +returned. ungetc() checks the sign of its argument c, and if it is +negative (which it will be for 128 of the 256 signed bytes), REFUSES TO +PUT IT BACK IN THE INPUT STREAM, on the assumption that c is really EOF. +This too can be fixed; ungetc() should only do nothing if feof() +indicates a true end-of-file condition. The overhead of this is +trivial, since feof() is actually implemented as a macro which does +nothing more than a logical AND and compare-with-zero. + +getchar() waits for a <CR> to be typed when stdin is a terminal; the +replacement vms_getchar() remedies this. + +Undoubtedly other deficiencies in VMS C will reveal themselves. + +VMS read() returns only a single disk block on each call. Its +replacment, vms_read(), will return the requested number of bytes, if +possible. + +There are also a few Unix standard functions which are unimplemented. +qsort() is not provided. getlogin() and unlink() have VMS equivalents +provided below. tell() is considered obsolete, since its functionality +is available from lseek(), but it is still seen in a few programs, so is +provided below. getenv() fails if the name contains a colon; its +replacement allows the colon. + +In the interest of minimal source perturbation, replacements for VMS +functions are given the same names, but prefixed "vms_". For +readability, the original names are preserved, but are converted to +upper-case: + + #define FTELL vms_ftell + #define FSEEK vms_fseek + #define GETCHAR vms_getchar + #define GETENV vms_getenv + #define UNGETC vms_ungetc + +These are only defined to work correctly for fixed length 512-byte +records, and no check is made that the file has that organization (it is +possible, but not without expensive calls to fstat(), or access to +internal library structures). + +[02-Apr-87] -- Nelson H.F. Beebe, University of Utah Center for + Scientific Computing +***********************************************************************/ + +#define EXIT vms_exit +#define FTELL vms_ftell +#define FSEEK vms_fseek +#define GETENV vms_getenv +#define GETCHAR vms_getchar +#define READ vms_read +#define UNGETC vms_ungetc + +#include <stdio.h> +#include <types.h> +#include <ctype.h> +#include <stat.h> +#include <descrip.h> +#include <iodef.h> /* need for vms_getchar() */ +#include <ssdef.h> + +#ifdef __GNUC__ +#include <stdlib.h> +#endif + +void EXIT(int code); +long FTELL(FILE *fp); +long FSEEK(FILE *fp, long n, long dir); +long UNGETC(char c, FILE *fp); +int GETCHAR(void); +int READ(int file_desc, char *buffer, int nbytes); +char *GETENV(char *name); +char *getlogin(void); +long tell(int handle); +int unlink(char *filename); + +/**********************************************************************/ +/*-->EXIT*/ + +void +vms_exit(int code) +{ + switch (code) + { + case 0: + exit(1); /* success */ + break; + + default: + exit(2); /* error */ + break; + } +} + + +/**********************************************************************/ +/*-->FSEEK*/ + +/* VMS fseek() and ftell() on fixed-length record files work correctly +only at block boundaries. This replacement code patches in the offset +within the block. Directions from current position and from +end-of-file are converted to absolute positions, and then the code for +that case is invoked. */ + +long +FSEEK(FILE *fp, long n, long dir) +{ + long k,m,pos,val,oldpos; + struct stat buffer; + + for (;;) /* loops only once or twice */ + { + switch (dir) + { + case 0: /* from BOF */ + oldpos = FTELL(fp); /* get current byte offset in file */ + k = n & 511; /* offset in 512-byte block */ + m = n >> 9; /* relative block number in file */ + if (((*fp)->_cnt) && ((oldpos >> 9) == m)) /* still in same block */ + { + val = 0; /* success */ + (*fp)->_ptr = ((*fp)->_base) + k; /* reset pointers to requested byte */ + (*fp)->_cnt = 512 - k; + } + else + { + val = fseek(fp,m << 9,0); /* move to start of requested 512-byte block */ + if (val == 0) /* success */ + { + (*fp)->_cnt = 0; /* indicate empty buffer */ + (void)fgetc(fp); /* force refill of buffer */ + (*fp)->_ptr = ((*fp)->_base) + k; /* reset pointers to requested byte */ + (*fp)->_cnt = 512 - k; + } + } + return(val); + + case 1: /* from current pos */ + pos = FTELL(fp); + if (pos == EOF) /* then error */ + return (EOF); + n += pos; + dir = 0; + break; /* go do case 0 */ + + case 2: /* from EOF */ + val = fstat(fileno(fp),&buffer); + if (val == EOF) /* then error */ + return (EOF); + n += buffer.st_size - 1; /* convert filesize to offset and */ + /* add to requested offset */ + dir = 0; + break; /* go do case 0 */ + + default: /* illegal direction parameter */ + return (EOF); + } + } +} + +/**********************************************************************/ +/*-->FTELL*/ + +/* With fixed-length record files, ftell() returns the offset of the +start of block. To get the true position, this must be biased by +the offset within the block. */ + +long +FTELL(FILE *fp) +{ + char c; + long pos; + long val; + if ((*fp)->_cnt == 0) /* buffer empty--force refill */ + { + c = fgetc(fp); + val = UNGETC(c,fp); + if (val != c) + return (EOF); /* should never happen */ + } + pos = ftell(fp); /* this returns multiple of 512 (start of block) */ + if (pos >= 0) /* then success--patch in offset in block */ + pos += ((*fp)->_ptr) - ((*fp)->_base); + return (pos); +} + +/**********************************************************************/ +/*-->GETCHAR*/ + +static int tt_channel = -1; /* terminal channel for image QIO's */ + +#define FAILED(status) (~(status) & 1) /* failure if LSB is 0 */ + +int +GETCHAR() +{ + int ret_char; /* character returned */ + int status; /* system service status */ + static $DESCRIPTOR(sys_in,"TT:"); + + if (tt_channel == -1) /* then first call--assign channel */ + { + status = sys$assign(&sys_in,&tt_channel,0,0); + if (FAILED(status)) + lib$stop(status); + } + ret_char = 0; + status = sys$qiow(0,tt_channel,IO$_TTYREADALL | IO$M_NOECHO,0,0,0, + &ret_char,1,0,0,0,0); + if (FAILED(status)) + lib$stop(status); + + return (ret_char); +} + +/**********************************************************************/ +/*-->READ*/ +int +READ(register int file_desc,register char *buffer,register int nbytes) +{ + register int ngot; + register int left; + + for ((left = nbytes, ngot = 0); left > 0; /* NOOP */) + { + ngot = read(file_desc,buffer,left); + if (ngot < 0) + return (-1); /* error occurred */ + buffer += ngot; + left -= ngot; + } + return(nbytes-left); +} + +/**********************************************************************/ +/*-->UNGETC*/ +long +UNGETC(char c, FILE *fp) /* VMS ungetc() is a no-op if c < 0 */ +{ /* (which is half the time!) */ + + if ((c == EOF) && feof(fp)) + return (EOF); /* do nothing at true end-of-file */ + else if ((*fp)->_cnt >= 512)/* buffer full--no fgetc() done in this block!*/ + return (EOF); /* must be user error if this happens */ + else /* put the character back in the buffer */ + { + (*fp)->_cnt++; /* increase count of characters left */ + (*fp)->_ptr--; /* backup pointer to next available char */ + *((*fp)->_ptr) = c; /* save the character */ + return (c); /* and return it */ + } +} + +/**********************************************************************/ +/*-->getenv*/ +char* +GETENV(char *name) +{ + char* p; + char* result; + char ucname[256]; + + p = ucname; + while (*name) /* VMS logical names must be upper-case */ + { + *p++ = islower(*name) ? toupper(*name) : *name; + ++name; + } + *p = '\0'; + + p = strchr(ucname,':'); /* colon in name? */ + if (p == (char *)NULL) /* no colon in name */ + result = getenv(ucname); + else /* try with and without colon */ + { + result = getenv(ucname); + if (result == (char *)NULL) + { + *p = '\0'; + result = getenv(ucname); + *p = ':'; + } + } + return (result); +} + +/**********************************************************************/ +/*-->getlogin*/ +char* +getlogin() +{ + return ((char *)getenv("USER")); /* use equivalent VMS routine */ +} + +/**********************************************************************/ +/*-->qsort*/ + +/*********************************************************************** +TeXindex uses the standard Unix library function qsort() for +record sorting. Unfortunately, qsort() is not a stable sorting +algorithm, so input order is not necessarily preserved for equal +sort keys. This is important, because the sorting is +case-independent, while the actual entries may not be. For +example, the input + +\entry{i}{22}{{\CODE{i}}} +\entry{i}{42}{{\CODE{i}}} +\entry{I}{41}{{\CODE{I}}} +\entry{I}{42}{{\CODE{I}}} + +produces + +\initial {I} +\entry {{\CODE{i}}}{22} +\entry {{\CODE{I}}}{41--42} +\entry {{\CODE{i}}}{42} + +instead of the correct + +\initial {I} +\entry {{\CODE{i}}}{22, 42} +\entry {{\CODE{I}}}{41--42} + +We therefore provide this stable shellsort replacement for +qsort() based on the code given on p. 116 of Kernighan and +Ritchie, ``The C Programming Language'', Prentice-Hall (1978). +This has order N**1.5 average performance, which is usually +slower than qsort(). In the interests of simplicity, we make no +attempt to handle short sequences by alternative methods. + +[07-Nov-86] +***********************************************************************/ + +#if VMS_QSORT +#define BASE(i) &base[(i)*width] + +void +qsort(base, nel, width, compar) + char base[]; /* start of data in memory */ + int nel; /* number of elements to be sorted */ + int width; /* size (in bytes) of each element */ + int (*compar)(); /* comparison function */ +{ + int gap; + int i; + int j; + + register int k; /* inner exchange loop parameters */ + register char* p; + register char* q; + register char c; + + for (gap = nel/2; gap > 0; gap /= 2) + { + for (i = gap; i < nel; i++) + { + for (j = i-gap; j >= 0; j -= gap) + { + p = BASE(j); + q = BASE(j+gap); + if ((*compar)(p,q) <= 0) + break; /* exit j loop */ + else + { + for (k = 0; k < width; (++p, ++q, ++k)) + { + c = *q; + *q = *p; + *p = c; + } + } + } + } + } +} +#endif +/********************************************************************** +*-->system* +int +system(char *s) +{ + struct dsc$descriptor t; + + t.dsc$w_length = strlen(s); + t.dsc$a_pointer = s; + t.dsc$b_class = DSC$K_CLASS_S; + t.dsc$b_dtype = DSC$K_DTYPE_T; + return (LIB$SPAWN(&t) == SS$_NORMAL) ? 0 : 127; +} + + +**********************************************************************/ +/*-->tell*/ +long +tell(int handle) +{ + return (lseek(handle,0L,1)); +} + +/**********************************************************************/ +/*-->unlink*/ +int +unlink(char *filename) +{ + return (delete(filename)); /* use equivalent VMS routine */ +} diff --git a/Build/source/texk/dvipsk/vms/vms.h b/Build/source/texk/dvipsk/vms/vms.h new file mode 100644 index 00000000000..f9088861b43 --- /dev/null +++ b/Build/source/texk/dvipsk/vms/vms.h @@ -0,0 +1,17 @@ +#ifdef VMS +/* The replacement ftell and fseek functions in the vaxvms.c file dated + * [02-Apr-87] do not work properly under OpenVMS 1.5 on DEC Alpha, when + * compiled using DEC C 1.3. However, the DEC supplied ftell and fseek + * functions work fine. They should also work for DEC C on a VAX. + */ +#ifndef __DECC +#define ftell vms_ftell +#define fseek vms_fseek +#endif /* __DECC */ +#define getchar vms_getchar +#define getenv vms_getenv +#define ungetc vms_ungetc +#define getname vms_getname +#define popen(pcmd, pmode) fopen(pcmd, pmode) +#define pclose(pstream) fclose(pstream) +#endif /* VMS */ diff --git a/Build/source/texk/dvipsk/vms/vms_gcc.txt b/Build/source/texk/dvipsk/vms/vms_gcc.txt new file mode 100644 index 00000000000..5159ce6ddb1 --- /dev/null +++ b/Build/source/texk/dvipsk/vms/vms_gcc.txt @@ -0,0 +1,75 @@ + DVIPS & GNU C + +Changes that had to be made in order to compile the DVIPS program with the GNU +CC (GCC) compiler on Vax/VMS. + +(1) DVIPS.C +(a) Problem with 'include' files. The person who did the original port to VMS +used the : +#include filename +notation rather than the more traditional +#include "filename.h" +notation. With the VAX C compiler this means that the chosen header file is +extracted from the SYS$SHARE:VAXCDEF.TLB text library. Well, the GCC compiler +doesn't understand this notation. Now, I could've simply changed it so that if +the code was being compiled on a VMS machine then use the +#include "filename.h" +notation regardless of the compiler. But some sites may not have extracted the +header files from the text library when the VAX C compiler was installed. +This problem also affects the VMSCLI.C file on the [.VMS] directory. + +(b) The TFMPATH, PKPATH, etc.., definitions cannot be defined in the MAKEFILE +because the GCC.EXE program complains with the following error message... +% gcc-cpp command too long. Unable to compile. + +After removing some of the path definitions to shorten the command (just too +see roughly how big the buffer was) I eventually tricked the GCC.EXE program +into getting as far as executing the GNU_CC:[000000]GCC.COM command file but +it then complained, giving the following message... +%DCL-W-TKNOVF, command element is too long - shorten +So, I gave up and took the easy way out, i.e. put these PATH definitions back +in to a new GCC-specific PATHS.H, called VMS_GCC_PATHS.H + +(2) DOSPECIAL.C +The "tolower" macro, defined in GNU_CC:[INCLUDE]CTYPE.H, is too simple. It +doesn't check to see if the character is in the range 'A' to 'Z' therefore +we may as well use the "Tolower" function supplied in the DOSPECIAL.C file. + +(3) The MAKEFILE has been updated to handle the GCC compiler. It must be edited +by the user to select either the VAX11C or the GCC compiler. Search for the +strings VAXC or GNUC and comment out the appropriate lines. + +(4) VMS.H +The "getchar" macro is undefined if it already exists. This is just to stop the +warning message from the GCC compiler informing us that it is being redefined. +GNUC defines it in GNU_CC:[INCLUDE]STDIO.H + +(5) VAXVMS.C +Defined all the functions at the top of the file to keep the GCC compiler +quiet, since it reported the following problems... + +vaxvms.c;1: In function vms_ftell: +vaxvms.c;1:223: warning: `vms_ftell' was previously implicitly declared to return `int' +vaxvms.c;1: In function vms_ungetc: +vaxvms.c;1:296: warning: `vms_ungetc' was previously implicitly declared to return `int' +vaxvms.c;1: In function vms_getenv: + +Next, if using the GNU CC compiler then #include <stdlib.h> so that the +compiler knows all about the `strchr' and `getenv' functions, hence avoiding +the following warnings... + +vaxvms.c;1:331: warning: assignment of pointer from integer lacks a cast +vaxvms.c;1:333: warning: assignment of pointer from integer lacks a cast +vaxvms.c;1:336: warning: assignment of pointer from integer lacks a cast +vaxvms.c;1:340: warning: assignment of pointer from integer lacks a cast + +------------------------------------------------------------------------------- +These changes were tested with GCC 1.42 which is the current official release +of VMS GCC, available from any of the many GNU archive sites. These changes +were also tested with GCC 2.3.3 which is avaliable from MANGO.RSMAS.MIAMI.EDU +(pub/VMS-gcc). The problem to be aware of is that GNUC doesn't have a +CLIMSGDEF.H header file (needed for DVIPS.C). One way out it to create one by +hand from the output from ... +$ LIBRARY/MACRO/EXTRACT=$CLIMSGDEF/OUTPUT=SYS$OUTPUT SYS$LIBRARY:STARLET.MLB +The other solution is to use the more complete package of C header files +provided by Pat Rankin, also available at MANGO.RSMAS.MIAMI.EDU diff --git a/Build/source/texk/dvipsk/vms/vms_gcc_paths.h b/Build/source/texk/dvipsk/vms/vms_gcc_paths.h new file mode 100644 index 00000000000..520c2b46b9a --- /dev/null +++ b/Build/source/texk/dvipsk/vms/vms_gcc_paths.h @@ -0,0 +1,33 @@ +/*-----------------------------------------------------------------------* + * These definitions cannot be defined on the command line because so many + * DEFINE's overflow the DCL buffer when using the GNU CC compiler. + *-----------------------------------------------------------------------*/ +#ifndef TFMPATH +#define TFMPATH "TEX_FONTS:" +#endif +#ifndef PKPATH +#define PKPATH "TEX_DISK:[TEX.FONTS.%d]%f.PK" +#endif +#ifndef VFPATH +#define VFPATH "TEX_VF:" +#endif +#ifndef FIGPATH +#define FIGPATH ",TEX_INPUTS:,TEX$POSTSCRIPT:," /* Include blank so it looks on default dir. */ +#endif +#ifndef HEADERPATH +#define HEADERPATH "TEX$POSTSCRIPT:,SYS$LOGIN:" +#endif +#ifndef CONFIGPATH +#define CONFIGPATH "TEX$POSTSCRIPT:" +#endif +#ifndef CONFIGFILE +#define CONFIGFILE "config.ps" +#endif +#ifdef FONTLIB +#ifndef FLIPATH +#define FLIPATH "" +#endif +#ifndef FLINAME +#define FLINAME "" +#endif +#endif diff --git a/Build/source/texk/dvipsk/vms/vmscli.c b/Build/source/texk/dvipsk/vms/vmscli.c new file mode 100644 index 00000000000..438e23ec841 --- /dev/null +++ b/Build/source/texk/dvipsk/vms/vmscli.c @@ -0,0 +1,466 @@ +/* EJG - 02-Jul-1996 */ +/* fix processing of filter qualifier */ +/* add secure qualifier */ +/* add oddpages qualifier */ +/* add evenpages qualifier */ +/* set sendcontrold only if qualifier present, not if merely negated */ +/* check for setting or resetting disablecomments was cli$_negated in both cases - fix */ +/* add downloadps (as PK) fonts qualifier */ +/* add hyperps qualifier */ +/* EJG - 07-Jul-1996 */ +/* test for INC_COM was looking for negated in both cases, so fixed */ +#ifdef __GNUC__ +#include "ssdef.h" +#else +#include ssdef +#endif +/* this code is included into dvips.c; don't compile it separately. */ +int vmscli() + {long int k,scnt; + int length,status,maxdrift,jext; + float offset,conversion; + char *u; + static char dummy[100],prtr[20]; + static $DESCRIPTOR(qual1,"copies"); + static $DESCRIPTOR(qual2,"debug"); + static $DESCRIPTOR(qual3,"maxdrift"); + static $DESCRIPTOR(qual4,"filter"); + static $DESCRIPTOR(qual5,"last"); + static $DESCRIPTOR(qual6,"manual"); + static $DESCRIPTOR(qual7,"number"); + static $DESCRIPTOR(qual8,"output"); + static $DESCRIPTOR(qual9,"start"); + static $DESCRIPTOR(qual10,"quiet"); + static $DESCRIPTOR(qual11,"reverse"); + static $DESCRIPTOR(qual12,"sav_res"); + static $DESCRIPTOR(qual13,"mode"); + static $DESCRIPTOR(qual14,"magnification"); + static $DESCRIPTOR(qual15,"collate"); + static $DESCRIPTOR(qual16,"dpi"); + static $DESCRIPTOR(qual17,"ctrld"); + static $DESCRIPTOR(qual18,"inc_com"); + static $DESCRIPTOR(qual19,"comment"); + static $DESCRIPTOR(qual20,"vm_save"); + static $DESCRIPTOR(qual21,"h_dpi"); + static $DESCRIPTOR(qual22,"v_dpi"); + static $DESCRIPTOR(qual23,"compress"); + static $DESCRIPTOR(qual24,"printer"); + static $DESCRIPTOR(qual25,"header"); + static $DESCRIPTOR(qual26,"absolute"); + static $DESCRIPTOR(qual27,"epsf"); + static $DESCRIPTOR(qual28,"prescan"); + static $DESCRIPTOR(qual29,"pagecopies"); + static $DESCRIPTOR(qual30,"separate"); + static $DESCRIPTOR(qual31,"cropmarks"); + static $DESCRIPTOR(qual32,"sec_size"); + static $DESCRIPTOR(qual33,"help"); + static $DESCRIPTOR(qual34,"makefont"); + static $DESCRIPTOR(qual35,"psize"); + static $DESCRIPTOR(qual36,"poffset"); + static $DESCRIPTOR(qual37,"secure"); /* EJG 02-Jul-1996 */ + static $DESCRIPTOR(qual38,"oddpages"); /* EJG 02-Jul-1996 */ + static $DESCRIPTOR(qual39,"evenpages"); /* EJG 02-Jul-1996 */ + static $DESCRIPTOR(qual40,"downloadps"); /* EJG 02-Jul-1996 */ + static $DESCRIPTOR(qual41,"hyperps"); /* EJG 02-Jul-1996 */ + static $DESCRIPTOR(dumdum,dummy); + static $DESCRIPTOR(dvi_file,"dvifile"); + static $DESCRIPTOR(input_file,infnme); + scnt=0; + status = cli$present(&dvi_file); + + if(status == CLI$_PRESENT) + {status = cli$get_value(&dvi_file,&input_file,&jext); + length=0; + for(k=0;k<252;k++) + { if(infnme[k] == ':' || infnme[k] == ']') + scnt=k+1; + } + for(k=scnt;k<252;k++) + {if(infnme[k]=='.') + {length=k; + jext=k; + } + else + {if(infnme[k]=='/' || infnme[k]==' ' || infnme[k]=='\0') + infnme[k]='\0'; + } + } + if(length==0) + {jext= strlen(infnme); + strcat(infnme,".DVI");} + + iname = &infnme[0] ; + length = 0; /* Initialize length...VAX C bug? */ + + } + status = cli$present(&qual1); + + if(status == CLI$_PRESENT | status == CLI$_DEFAULTED) + {status = cli$get_value(&qual1,&dumdum,&length); + + if(sscanf(&dummy[0],"%d",&numcopies) == 0) + error("!Bad copies option"); + } +#ifdef DEBUG + status = cli$present(&qual2); + + if(status == CLI$_PRESENT) + { + status = cli$get_value(&qual2,&dumdum,&length); + + if(sscanf(&dummy[0],"%d",&debug_flag) == 0) + error("!Bad debug option"); + } +#else + error("not compiled in debug mode"); +#endif + status = cli$present(&qual3); + + if(status == CLI$_PRESENT) + {status = cli$get_value(&qual3,&dumdum,&length); + + if(sscanf(&dummy[0],"%d",&maxdrift) == 0 ||maxdrift <0) + error("bad maxdrift option"); + vmaxdrift=maxdrift; + } + + + status = cli$present(&qual5); + + if(status == CLI$_PRESENT) + {status = cli$get_value(&qual5,&dumdum,&length); + +#ifdef SHORTINT + switch(sscanf(&dummy[0], "%ld.%ld", &lastpage, &lastseq)) { +#else /* ~SHORTINT */ + switch(sscanf(&dummy[0], "%ld.%ld", &lastpage, &lastseq)) { +#endif /* ~SHORTINT */ +case 1: lastseq = 0 ; +case 2: break ; +default: + error("! Bad last page option.") ; + } + notlast = 1 ; + } + status = cli$present(&qual6); + + if(status == CLI$_PRESENT) + manualfeed=1; + else + if(status == CLI$_NEGATED) + manualfeed=0; + + status = cli$present(&qual7); + if(status == CLI$_PRESENT) + {status = cli$get_value(&qual7,&dumdum,&length); +#ifdef SHORTINT + if (sscanf(&dummy[0], "%ld", &maxpages)==0) +#else /* ~SHORTINT */ + if (sscanf(&dummy[0], "%d", &maxpages)==0) +#endif /* ~SHORTINT */ + error("! Bad number of pages option.") ; + } + + status = cli$present(&qual8); + if(status == CLI$_PRESENT) + {status = cli$get_value(&qual8,&dumdum,&length); + sscanf(&dummy[0],"%s",ofnme); + } + else + {for(k=scnt;k<jext;k++)ofnme[k-scnt]=infnme[k]; + strcat(ofnme,".PS");} + oname = &ofnme[0] ; + + status = cli$present(&qual4); + + if(status == CLI$_PRESENT) + {oname=""; + filter=1; /* EJG 02-Jul-1996 */ + noenv=(1==1); + } + else /* EJG 02-Jul-1996 */ + filter=0; /* EJG 02-Jul-1996 */ + + status = cli$present(&qual9); + if(status == CLI$_PRESENT) + {status = cli$get_value(&qual9,&dumdum,&length); +#ifdef SHORTINT + switch(sscanf(&dummy[0], "%ld.%ld", &firstpage, &firstseq)) { +#else /* ~SHORTINT */ + switch(sscanf(&dummy[0], "%ld.%ld", &firstpage, &firstseq)) { +#endif /* ~SHORTINT */ +case 1: firstseq = 0 ; +case 2: break ; +default: + error("! Bad first page option.") ; + } + notfirst = 1 ; + } + + status = cli$present(&qual10); + + if(status == CLI$_PRESENT) + quiet=(1==1); + else + if(status == CLI$_NEGATED) + quiet=(1==0); + + status = cli$present(&qual11); + + if(status == CLI$_PRESENT) + reverse=1; + else + if(status == CLI$_NEGATED) + reverse=0; + + status = cli$present(&qual12); + + if(status == CLI$_PRESENT) + safetyenclose=1; + else + if(status == CLI$_NEGATED) + safetyenclose=0; + + status = cli$present(&qual13); + if(status == CLI$_PRESENT | status == CLI$_DEFAULTED) + {status = cli$get_value(&qual13,&dumdum,&length); + sscanf(&dummy[0],"%s",pap); + if (strcmp(&pap[0], "landscape") == 0) + { if (hpapersize || vpapersize) + error( "both landscape and papersize specified; ignoring landscape") ; + else + landscape = 1 ; + /* The following lines have been added by G.Bonacci */ + if ((status=cli$get_value(&qual13,&dumdum,&length))==1) + { + sscanf(&dummy[0],"%s",pap); + + paperfmt = &pap[0] ; + } + /* end G.Bonacci 20.3.92 */ + } + else + paperfmt = &pap[0] ; + } + + status = cli$present(&qual14); + + if(status == CLI$_PRESENT) + {status = cli$get_value(&qual14,&dumdum,&length); + + if(sscanf(&dummy[0],"%d",&mag) == 0 || mag < 10 || mag >100000) + error("!Bad magnification parameter."); + overridemag=1; + } + status = cli$present(&qual15); + + if(status == CLI$_PRESENT | status == CLI$_DEFAULTED) + {status = cli$get_value(&qual15,&dumdum,&length); + + if(sscanf(&dummy[0],"%d",&collatedcopies) == 0) + error("!Bad number of collated copies"); + } + status = cli$present(&qual16); + + if(status == CLI$_PRESENT | status == CLI$_DEFAULTED) + {status = cli$get_value(&qual16,&dumdum,&length); + + if(sscanf(&dummy[0],"%d",&actualdpi) == 0 || + actualdpi < 10 || actualdpi >10000) + error("!Bad dpi parameter."); + vactualdpi=actualdpi; + } + + status = cli$present(&qual17); + + if(status == CLI$_PRESENT) /* EJG 02-Jul-1996 */ + sendcontrolD =1; + else + if(status == CLI$_NEGATED | status==CLI$_DEFAULTED) /* EJG 02-Jul-1996 */ + sendcontrolD =0; + + status = cli$present(&qual18); + + if(status == CLI$_PRESENT) /* EJG 07-Jul-1996 */ + removecomments =0; + else + if(status == CLI$_NEGATED) + removecomments =1; + + status = cli$present(&qual19); + + if(status == CLI$_PRESENT) /* EJG 02-JUL-1996 */ + disablecomments = 0; + else + if(status == CLI$_NEGATED) + disablecomments = 1; + + status = cli$present(&qual20); + + if(status == CLI$_PRESENT) + nosmallchars=1; + else + if(status == CLI$_NEGATED) + nosmallchars=0; + + status = cli$present(&qual21); + + if(status == CLI$_PRESENT) + {status = cli$get_value(&qual21,&dumdum,&length); + + if(sscanf(&dummy[0],"%d",&actualdpi) == 0 || + actualdpi < 10 || actualdpi >10000) + error("!Bad dpi parameter in X."); + } + + status = cli$present(&qual22); + + if(status == CLI$_PRESENT) + {status = cli$get_value(&qual22,&dumdum,&length); + + if(sscanf(&dummy[0],"%d",&vactualdpi) == 0 || + vactualdpi < 10 || vactualdpi >10000) + error("!Bad dpi parameter in Y."); + } + + status = cli$present(&qual23); + + if(status == CLI$_PRESENT) + compressed=1; + else + if(status == CLI$_NEGATED) + compressed=0; + + status = cli$present(&qual24); + if(status == CLI$_PRESENT) + {status = cli$get_value(&qual24,&dumdum,&length); + sscanf(&dummy[0],"%s",prtr); + u = &dummy[0] ; + strcpy(u,"config."); + strcat(u,&prtr[0]); + getdefaults(""); + noenv=1; + getdefaults(u); + } + + status = cli$present(&qual25); + if(status == CLI$_PRESENT) { + while (status != SS$_NORMAL) { + status = cli$get_value(&qual25,&dumdum,&length); + dummy[length] = '\0'; + if (strcmp(dummy, "-") == 0) + headers_off = 1; + else + (void)add_header(dummy) ; + } + } + else { + if(status == CLI$_NEGATED) + headers_off = 1; + } + + status = cli$present(&qual26); + if(status == CLI$_PRESENT) abspage = 1; + + status = cli$present(&qual27); + if(status == CLI$_PRESENT | status==CLI$_DEFAULTED) tryepsf = 1; + else + if(status == CLI$_NEGATED) tryepsf = 0; + + status = cli$present(&qual28); + if(status == CLI$_PRESENT | status==CLI$_DEFAULTED) dopprescan = 1; + else + if(status == CLI$_NEGATED) dopprescan = 0; + + status = cli$present(&qual29); + + if(status == CLI$_PRESENT | status == CLI$_DEFAULTED) + {status = cli$get_value(&qual29,&dumdum,&length); + + if(sscanf(&dummy[0],"%d",&pagecopies) == 0) + error("!Bad number of page copies option /PAGECOPIES"); + if (pagecopies < 1 || pagecopies > 1000) + error("! can only print one to a thousand page copies") ; + } + + status = cli$present(&qual30); + if(status == CLI$_PRESENT | status==CLI$_DEFAULTED) sepfiles = 1; + else + if(status == CLI$_NEGATED) sepfiles = 0; + + status = cli$present(&qual31); + if(status == CLI$_PRESENT | status==CLI$_DEFAULTED) cropmarks = 1; + else + if(status == CLI$_NEGATED) cropmarks = 0; + + status = cli$present(&qual32); + if(status == CLI$_PRESENT) + {status = cli$get_value(&qual32,&dumdum,&length); +#ifdef SHORTINT + if (sscanf(&dummy[0], "%ld", &maxsecsize)==0) +#else /* ~SHORTINT */ + if (sscanf(&dummy[0], "%d", &maxsecsize)==0) +#endif /* ~SHORTINT */ + error("! Bad section size arg (/SEC_SIZE).") ; + } + + status = cli$present(&qual33); + if(status == CLI$_PRESENT) + { (void)fprintf(stderr, banner) ; + help() ; + } + + status = cli$present(&qual34); + if(status == CLI$_NEGATED) dontmakefont = 1; +/*----------------------------------------------------------------------- + * Currently one uses /PSIZE="5mm,10mm" This way CASE is preserved + * Should I convert the PSIZE to allow a LIST => /PSIZE=(5mm,10mm) and + * convert the case back to lowercase in here. + *-----------------------------------------------------------------------*/ + status = cli$present(&qual35); + if(status == CLI$_PRESENT) { + status = cli$get_value(&qual35,&dumdum,&length); + dummy[length] = '\0'; + handlepapersize(&dummy[0], &hpapersize, &vpapersize) ; + if (landscape) { + error("both landscape and papersize specified; ignoring landscape") ; + landscape = 0 ; + } + } + + status = cli$present(&qual36); + if(status == CLI$_PRESENT) { + status = cli$get_value(&qual36,&dumdum,&length); + dummy[length] = '\0'; + handlepapersize(&dummy[0], &hoff, &voff) ; + } + + status = cli$present(&qual37); /* EJG 02-Jul-1996 */ + if(status == CLI$_PRESENT) secure = 1; /* EJG 02-Jul-1996 */ + else /* EJG 02-Jul-1996 */ + if(status == CLI$_NEGATED | status == CLI$_DEFAULTED) secure = 0; /* EJG 02-Jul-1996 */ + + status = cli$present(&qual38); /* EJG 02-Jul-1996 */ + if(status == CLI$_PRESENT) oddpages = 1; /* EJG 02-Jul-1996 */ + else /* EJG 02-Jul-1996 */ + if(status == CLI$_NEGATED | status == CLI$_DEFAULTED) oddpages = 0; /* EJG 02-Jul-1996 */ + + status = cli$present(&qual39); /* EJG 02-Jul-1996 */ + if(status == CLI$_PRESENT) evenpages = 1; /* EJG 02-Jul-1996 */ + else /* EJG 02-Jul-1996 */ + if(status == CLI$_NEGATED | status == CLI$_DEFAULTED) evenpages = 0; /* EJG 02-Jul-1996 */ + + status = cli$present(&qual40); /* EJG 02-Jul-1996 */ + if(status == CLI$_PRESENT) downloadpspk = 1; /* EJG 02-Jul-1996 */ + else /* EJG 02-Jul-1996 */ + if(status == CLI$_NEGATED | status == CLI$_DEFAULTED) downloadpspk = 0; /* EJG 02-Jul-1996 */ + +#ifdef HPS /* EJG 02-Jul-1996 */ + + status = cli$present(&qual41); /* EJG 02-Jul-1996 */ + if(status == CLI$_PRESENT) HPS_FLAG = 1; /* EJG 02-Jul-1996 */ + else /* EJG 02-Jul-1996 */ + if(status == CLI$_NEGATED | status == CLI$_DEFAULTED) HPS_FLAG = 0; /* EJG 02-Jul-1996 */ +#endif /* EJG 02-Jul-1996 */ + +} |