|
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 and IA64 should work as well).
Build instructions for VMS
Get the distribution from the programmers/Linux version at linux/antiword-0.37.tar.gz . Decompress using gzip, then untar and set directory to [.antiword-0_37] .
Get VMS-specific build-files packed into antiword_vms_files.zip. Fetch this archive, and unpack in [.antiword-0_37] . If You have GNU make (gmake) with DCL: Execute (g)make -f makefile.vms " . With GNV bash: make -f makefile.vms_bash . This defines a few things different, but Makefile.Linux does also work. If You have MMS or MMK , simply type MMS ,using the DESCRIP.MMS descriptor file provided here.
Without make or MMS/MMK, 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).
On the HP VMS Freeware V8 site freeware80 there is a single ZIP file containing everything needed for a VMS build. See freeware_readme.txt after unpacking: freeware_antiword.zip . Executables for those without a C compiler: antiword_exe.zip . Contains antiword.exe , built on VMS/Alpha 7.3-1, .exe_IA64 8.3-1H1, .exe_vax62 VMS/Vax 6.2
Older VMS versions
Informed by Peter Weaver, who compiled on Vax VMS 7.1, DECC 5.7, it needs an additional definition in misc_vms_prefix.c . I made the definition conditionalized on CRTL < 7 . This may or may not be correct; if somebody with a DECC version between 5.7 and 6.4 can prove it, please inform me. Maybe one has to make the condition on the DECC rather than the CRTL version. I had the opportunity to compile and link with DEC C V5.6-003 on OpenVMS VAX V7.1, and -surprise- it does not need any change. Test and see! On Alpha VMS 7.1 with DECC 5.6: builds correctly using @vms_make "" "" CC/STANDARD=VAXC or MMS /Macro=("CC=CC/STANDARD=VAXC") . Until it is clear, what the right definitions are, I will not include a changed misc.c in the distribution. I definitely have no way to test, if it compiles with Vaxc or GCC !
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 user-shared files . VMS 7.3-1 introduces a SYS$POSIX_ROOT logical: simply create the usr/ directory tree under SYS$POSIX_ROOT. V 0.34 adds an environment-variable ANTIWORDHOME to find the global setup directory if not /usr/share/antiword . Define it as a VMS 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] files into the directory defined by /usr/share/antiword or leave the [.resources] subdirectory in place, and let the user (or sys$sylogin) execute this procedure: antiword_setup.com 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 or wordviewer testdoc PDF
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]
Legal: Antiword is distributed under the GPL
|