28 August 2012. SMS. Gzip 1.5 for VMS (1.5b) ======================= ------------------------------------------------------------------------ Disclaimer ---------- No claims of any sort are made herein. The main gzip developers are probably unaware of this effort. Any suggestions for improving the code in the VMS-specific sections are welcome, but low expectations are more realistic than high ones. ------------------------------------------------------------------------ Description ----------- This note accompanies a quick VMS port of gzip version 1.5, a GNU free file compression utility. The most obvious features seem to work, but many have not been tested. Built and tested (slightly) in these environments: OpenVMS Alpha V8.3, HP C V7.3-009. OpenVMS IA64 V8.3-1H1, HP C V7.3-019. OpenVMS VAX V7.3, Compaq C V6.4-005. ------------------------------------------------------------------------ News ---- Version 1.5b 2012-08-28 ------------------------ - On VMS, only the first member of a multi-member gzip archive was processed. With DEC C, compressed files should be opened with "ctx=stm", so RECORD_IO should not be set. (tailor.h.) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 1.5a 2012-07-08 ------------------------ - General update to gzip version 1.5. The gzip developers have removed several OS-specific directories from the distribution kit, including [.vms], which removes some clutter. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 1.4a 2011-03-30 ------------------------ - General update to gzip version 1.4. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 1.3.12e 2012-08-28 --------------------------- - On VMS, only the first member of a multi-member gzip archive was processed. With DEC C, compressed files should be opened with "ctx=stm", so RECORD_IO should not be set. (tailor.h.) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 1.3.12d 2011-02-16 --------------------------- - Changed on VMS not to strip a leading dot (".") from a user-specified ("-S") file-name suffix. (gzip.c.) - Changed VMS command-line argument expansion code not to interpret a space-separated "-S" suffix value as a file specification. ([.vms]vms.c.) Typical symptom: $ gzip -S xyz fred.txt gzip: incorrect suffix 'ALP$DKA0:[UTILITY.SOURCE.GZIP]xyz.;' - Suffix-related changes in this and the previous version should reduce some old annoyances when dealing with ODS5 multi-dot file names. "-gz" remains the default suffix when compressing on VMS, but the user can now explicitly specify ".gz". For example (on an ODS5 volume), a command like "gzip -S .gz fred.txt" should produce "fred^.txt.gz". And plain "gzip -d fred^.txt.gz" (or "gzip -d fred.txt.gz" or "gzip -d fred.txt") should recover "fred.txt". - Changed the VMS version-stripping code to deal with caret-escaped semi-colons properly. (gzip.c, tailor.h, [.vms]vms.c, [.vms]vms.h.) - Added CLEAN and CLEAN_ALL targets to [.vms]descrip_mkdeps.mms. (Comments in the file explain the usage details.) - Changed the kit packaging to preserve the original case of file names, obviating [.VMS]VMS_NAME_FIX.SH, which has been removed from the kit. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 1.3.12c 2010-11-30 --------------------------- - Changed the options used when opening an input file. Now, by default, input files (compressed or uncompressed), except those with Record format: Variable (VAR) or VFC, are treated as "binary", and are read in stream mode. (That is, "ctx=stm" is specified when an input file is opened.) This allows gzip to handle compressed files with unusual attributes, such as Record format: Stream, which may be produced by PATHWORKS or Advanced Server. Files with Record format: Variable (VAR) or VFC are automatically recognized and read in record mode ("ctx=rec"), as in previous gzip versions. The "-a" ("--ascii") option has been enabled on VMS to allow the user to specify record mode access explicitly, to avoid any undesirable side effects of this change which might affect compression of text files. - Output file names are now adjusted after suffix removal, to avoid undesired dot retention. For example, the result of expanding "fred^.tar.gz" should now be "fred.tar", not "fred^.tar.". - Added some braces to resolve a %CC-E-BADSTMT complaint from DEC C V4.0-000 in gzip.c. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 1.3.12b 2007-10-03 --------------------------- - Fixed some problems with file attribute setting (date-time, owner, protection). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 1.3.12a 2007-08-15 --------------------------- - General update to gzip version 1.3.12. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 1.3.5a 2006-07-01 -------------------------- - New. VMS-specific changes include: - Where C RTL support is available, command-line case is preserved on (non-VAX) systems with SET PROCESS /PARSE_STYLE = EXTENDED. - Where C RTL support is available, file open operations use a callback function to set non-default RMS parameters: file extend quantity (deq) = 16384, multi-block count (mbc) = 127, and multi-buffer count (mbf) = 2. Explicitly set RMS_DEFAULT values override these built-in values. ("-vv" shows details.) - New MMS or MMK builders with automatically generated source file dependencies. ------------------------------------------------------------------------ Changes to Source Files ----------------------- Files new for VMS (all in [.vms]): collect_deps.com Dependency collector for descrip_mkdeps.mms. config.h_vms VMS-specific config.h. configmake.h Dummy configmake.h. decc_ver.c Program to show versions: VMS, C compiler, C run-time library. descrip.mms Main MMK or MMS description ("make") file. descrip_config.mms config.h description file. descrip_deps.mms Source dependency description file. descrip_mkdeps.mms Source dependency generator description file. descrip_src.mms Source list description file. dirent.h Booster for . fcntl.h Booster/replacement for . getopt.h Wrapper to include [.lib]getopt_.h. signal.h Booster for . stat-time.h VAXC-safe replacement for [.lib]stat-time.h. stat.h Booster for . stdbool.h Booster/replacement for . string.h Booster for . time.h Booster for . unistd.h Booster/replacement for . utime.h Wrapper/replacement for . version.c VMS-specific version.c. version.h VMS-specific version.h. vms.h VMS-specific header file. (Mate for vms.c.) vms_notes.txt These notes. Files new for VMS (all in [.vms]), based on pre-1.5 files: vms.c Added various VMS-specific code to the original file name wildcard expansion: DEC C run-time initialization, file open callback function for better RMS parameters, utime() (as needed). Changed not to treat a space-separated "-S" option value as a file name. Added trim_file_name_version() to replace old code which did a simple search for SUFFIX_SEP (";") when removing the version from a file spec. Added vms_redot() to adjust caret-escaped dots in a file name after suffix removal. gzip.hlp Reconciled with reality. Adjusted format in minor ways. Files modified for VMS: gzip.c Rearranged the code for setting file attributes (date-time, owner, protection) to accomodate VMS limitations. (Set date-time last. Operate only on a closed file.) Added some braces to prevent complaints from DEC C V4.0-000, which apparently objects to mid-code storage declarations. Changed file name suffix handling on VMS. Changed to retain a user-specified leading dot in a "-S" ("--suffix") option value. Changed to use a less simple VMS version removal method. tailor.h Changed to avoid C macro conflicts with config.h. Added macros to use VMS-specific functions for EXPAND() and OPEN(). Changed not to define RECORD_IO for DEC C compiler. Changed to include "vms.h", for compiler complaint reduction. Replaced the old SUFFIX_SEP macro with a new macro, VERSION_FILTER() to handle VMS file name version removal. util.c Changed to use VERSION_FILTER() to handle VMS file name version removal. (See "tailor.h".) [.lib]stdio-impl.h Added a VMS-specific definition of "fp_". [.lib]xmalloc.c Changed an enum to a #define in two places to accomodate VAX C. ------------------------------------------------------------------------ Source URLs ----------- http://www.gzip.org/ http://ftp.gnu.org/gnu/gzip/ ------------------------------------------------------------------------ Instructions ------------ Building -------- Extract the files from the distribution kit. The full kit includes objects and executables for Alpha, IA64, and VAX, in the corresponding host-specific subdirectories. These builds were done with option "LARGE" (except VAX). MMS or MMK is required. Various build options are explained in the main builder file, [.vms]descrip.mms. The builder must be run from the main source directory, not the [.vms] subdirectory. A simple build might look like this (MMS shown, but MMK should work as well): MMS /DESCRIP = [.VMS] ! Small-file (DEC C). MMS /DESCRIP = [.VMS] /MACRO = LARGE=1 ! Large-file (DEC C). System-architecture-specific files (like objects and executables) are placed in separate directories, such as [.ALPHA], [.IA64], or [.VAX]. Large-file products get their own directories, [.ALPHAL] or [.IA64L]. On VAX, VAX C products are placed in [.VAXV], GNU C products in [.VAXG]. Each product builder announces what the destination directory will be when it is run. Alert compilers will emit some harmless complaints ("%CC-I-EXPANDEDDEFINED", "%CC-I-QUESTCOMPARE"). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Installation ------------ To complete the installation, the executable may be left in place, or moved (or copied) to a convenient place. While other methods (like DCL$PATH) exist, it's common to define one or more DCL symbols to make the gzip executable available as a foreign command. These symbol definitions may be placed in a user's SYS$LOGIN:LOGIN.COM, or in a more central location, like SYS$MANAGER:SYLOGIN.COM. A typical symbol definition might look like this: GZIP :== $ dev:[dir]GZIP.EXE It's common to define additional foreign-command symbols for other related commands, "gunzip" and "gzcat", to obviate specifying "-d" and "-cd", respectively, on a "gzip" command line. For example: GUNZIP :== $ dev:[dir]GZIP.EXE -d GZCAT :== $ dev:[dir]GZIP.EXE -cd Currently, on UNIX systems, "gunzip" and "gzcat" are, by default, short shell scripts which act similarly. It was once common on UNIX systems (and it may still be) to create hard links to the "gzip" executable from "gunzip" and "gzcat" to get the same behavior. On a VMS system, this may be done using SET FILE /ENTER to create aliases. For example: SET FILE /ENTER = dev:[dir]GZCAT.EXE dev:[dir]GZIP.EXE SET FILE /ENTER = dev:[dir]GUNZIP.EXE dev:[dir]GZIP.EXE See HELP SET FILE /ENTER for cautions regarding its use. Using this scheme, however, requires that gzip be compiled with the C macro GNU_STANDARD defined to be zero, which is _not_ done by default. For example: MMS /DESC = [.VMS] /MACR = (LARGE=1, LOCAL_GZIP=GNU_STANDARD=0) By default (GNU_STANDARD _not_ zero), the name of the program is ignored (GNU standard behavior), and it will act as gzip, no matter what its name. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Help Library ------------ A VMS HELP file is supplied in [.vms]gzip.hlp. To be used, it must be added to a HELP library, either an existing library or one just for gzip. A new gzip help library may be created using a command like: MMS /DESCRIP = [.VMS] HELP When a new HELP library is created, a logical name "HLP$LIBRARY_n" may be defined to allow the HELP utility to find it. See "HELP HELP /USERLIBRARY" for details. ------------------------------------------------------------------------ When reporting problems, especially build problems, with gzip for VMS, it is often useful to reveal precise compiler, run-time library, and VMS version information. The program DECC_VER.C (included in the kit) is intended to make that easier. ------------------------------------------------------------------------ Steven M. Schweda sms@antinode.info 382 South Warwick Street (+1) 651-699-9818 Saint Paul MN 55105-2547