Antiword 0.34 for VMS

Antiword is a MS Word document file reader.
Author: Adri van Os. Homepage: www.winfield.demon.nl

With a minimum of changes, I have made a version working on VMS ( Alpha, Compaq C V6.+ , Vax should work as well).

Current version is 0.33:


Build instructions for VMS

Get the distribution from the programmers/Linux version at linux/antiword-0.34.tar.gz ,
Decompress using gzip, then untar and set directory to [.antiword-0_34] . Preliminary: replace misc.c by the version modified for VMS here: misc.c

Execute "make -f makefile.vms" (if You have GNU make).
Or, if You have MMS , simply type "MMS" using the DESCRIP.MMS descriptor file provided here.

Without make or MMS, compile everything, except main_r, then link main_u (the common Unix- and VMS main program) and all other object files.
(all commands are in vms_make.com).


Optional changes for VMS

Global file directory and the /usr path

You may want to change the location of the global file directory ( macro GLOBAL_ANTIWORD_DIR in header-file antiword.h ) holding the files from the [.resources] subdirectory:
change /usr/share/antiword to a different location (in Unix syntax), unless You define a VMS logical device "/usr" ( USR:[SHARE.ANTIWORD] ).
On my system the logical usr looks like this:
"USR" [super] = "SYS$SYSDEVICE:[UTIL.]" [concealed] (LNM$SYSTEM_TABLE)
I will not change the source for this , since there is no convention in VMS for those user-shared files (or ?).
VMS 7.3-1 introduces a SYS$POSIX_ROOT logical: simply create the usr/ directory tree under SYS$POSIX_ROOT.
V 0.34so uses an environment-variable ANTIWORDHOME to find the global setup directory. Define it in VMS as a logical, directory-name in VMS-syntax (dev:[directory]).

DEBUG option and the /tmp path

To compile the sources with the DEBUG option, have a look into the *2eps.c files: they write image files to a directory /tmp/pics/...

Either define a concealed logical TMP (e.g. to point to sys$scratch), or change the 3 source files to point to sys$scratch: instead of /tmp/pics/.
All newer VMS versions (since V7.?) contain a DECC RTL, with a specific handling of "/tmp": it translates to sys$scratch, if no "tmp" logical is defined. So usually it is enough to create a directory [.pics] in your user root.

Installation:


define a foreign command pointing to antiword.exe
or
copy antiword.exe into dcl$path:

Setup/font files:

System-wide: copy the [.resources] file into the directory defined by /usr/share/antiword

Private: create directory [.ANTIWORD] in sys$login:
copy the [.resources] files into the newly created directory.

Usage


Produce a postscript file from a word-document:

pipe antiword -p a4 file.doc >file.ps

A DCL commandfile in our DCL$PATH directory does the postscript conversion and X11 display with Ghostscript in one go:
wordviewer.com

Use it in a commandline like this: wordviewer testdoc

Comment applying to all GNU/Unix style programs compiled with DECC:

The interpretation of command-line switches and path-names can be influenced by several DECC$* logical names, most important ones are:

$ define DECC$ARGV_PARSE_STYLE "ENABLE"
$ SET PROCESS/PARSE_STYLE=EXTENDED 

 These 2 settings  preserve case of foreign command-lines
 ( otherwise `antiword -L` has to be typed as `antiword -"L"` )

$ define DECC$DISABLE_TO_VMS_LOGNAME_TRANSLATION "ENABLE"  
 path foo/bar translates to [.foo]bar; if disabled, it translates to foo:[bar]
 (but some programs will not work , java in particular !)

How to define a global antiword directory /usr/share/antiword :


Let's assume the global directory in VMS is SYS$SYSDEVICE:[UTIL.SHARE.ANTIWORD]
$ dir sys$sysdevice:[util.share.antiword]
 Directory SYS$SYSDEVICE:[UTIL.SHARE.ANTIWORD]
 8859-1.TXT;1        ...
$ define/trans=concealed usr sys$sysdevice:[util.]
$ ls /usr/share/antiword/
 8859-1.txt   ...
This way "/usr/share/antiword/" in the C program is equvalent to SYS$SYSDEVICE:[UTIL.SHARE.ANTIWORD]


Please send VMS-specific questions to me: huber@mppmu.mpg.de
Joseph Huber , http://wwwvms.mppmu.mpg.de/~huber/
2003-10-06   huber@mppmu.mpg.de