26 January 2006.  SMS.

                      BZIP2 1.0.3b Changes for VMS
                      ============================

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

      Disclaimer
      ----------

   No claims of any sort are made herein.  The main BZIP2 developer
seems indifferent to 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 BZIP2 version 1.0.3, a
freely available data compressor.  The most obvious features seem to
work, but many have not been tested.

   Built and tested (slightly) in these environments:

OpenVMS Alpha V7.3-2, HP C V7.1-015.

OpenVMS IA64 V8.2-1, HP C V7.2-001.  (See note below.)

OpenVMS VAX V7.3, Compaq C V6.4-005.

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

      Home source URL
      ---------------

http://www.bzip.org

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

      News
      ----

   Version 1.0.3b  2004-10-07
   --------------------------

- Added code to the access callback function to set the "sequential
  access only" (SQO) flag.  This avoids excessive lock time when writing
  to a file system with highwater marking enabled.

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

   Version 1.0.3a  2004-10-04
   --------------------------

- Added on VMS a version suffix ("a") for the main program, BZIP2.

- Changed on VMS to use "BZIP2_OPTS" and "BZIP_OPTS" as option
  "environment variables" (instead of "BZIP2" and "BZIP") to avoid
  colliding with foreign command symbols.

- Changed on VMS to use "-bz2" and "-out" instead of ".bz2" and ".out"
  on new compressed and uncompressed file names, respectively.

- Added "-bz" and "-bz2" to the list of recognized suffixes for
  compressed file names.  Changed suffix recognition on VMS to be
  case-insensitive and to ignore file versions.

- Added VMS wild-card file name expansion on VMS.

- Added non-default RMS parameter setting on VMS for better I/O speed.

- Command line case is preserved if SET PROCESS /PARSE_STYLE = EXTENDED.

- Added MMS/MMK builder files.

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

      Instructions
      ------------

   Extract the files from the distribution kit.  The kit includes
objects and executables for Alpha, IA64, and VAX, in the corresponding
host-specific subdirectories.

   For details on the MMS/MMK builder, see the comments in
[.VMS]DESCRIP.MMS.  The build must be done from the main directory, not
the [.VMS] subdirectory.  The basic operations look like these (MMS
shown, MMK similar):

      SET DEFAULT [.BZIP2-1_0_3A_VMS]

      MMS /DESC = [.VMS] CLEAN          ! Deletes all object, list, map,
                                        ! and executable files for the
                                        ! current CPU type (small-file).

      MMS /DESC = [.VMS]                ! Builds the small-file object
                                        ! library and executables.

      MMS /DESC = [.VMS] TEST           ! Runs the tests (small-file
                                        ! executable).

      MMS /DESC = [.VMS] /MACRO = LARGE=1 CLEAN ! Deletes all object,
                                                ! list, map, and
                                                ! executable files for
                                                ! the current CPU type
                                                ! (large-file, non-VAX).

      MMS /DESC = [.VMS] /MACRO = LARGE=1       ! Builds the large-file
                                                ! object library and
                                                ! executables (non-VAX).

      MMS /DESC = [.VMS] /MACRO = LARGE=1 TEST  ! Runs the tests
                                                ! (large-file
                                                ! executable, non-VAX).

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

      Note for VMS IA64
      -----------------

   There appears to be an optimizer problem with the HP C compilers
identifying themselves as follows (and perhaps others):

      HP C S7.1-013 on OpenVMS IA64 V8.2
      HP C V7.2-001 on OpenVMS IA64 V8.2-1
      
This problem causes the tests to fail ("bzip2/libbzip2: internal error
number 3005.  [...]").  A work-around which appears to be effective is
to compile HUFFMAN.C with /OPTIMIZE = LEVEL = 1.  One way to do this is
shown below.

      MMS /DESC = [.VMS] /MACRO = LARGE=1       ! Large-file shown.

      MMS /DESC = [.VMS] /MACRO = LARGE=1 TEST  ! If this fails:

      DELETE [.IA64L]HUFFMAN.OBJ;*              ! Small-file: [.IA64].

      MMS /DESC = [.VMS] /MACRO = ( LARGE=1, -  ! Special re-compile and
       "CCOPTS=/OPTIMIZE=LEVEL=1" )             ! re-link.

      MMS /DESC = [.VMS] /MACRO = LARGE=1 TEST  ! Re-test.

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

   The accompanying source kit may suffer from storage on an ODS2 file
system, which does not preserve case or allow multiple dots in a file
name.  Building this kit should work on VMS, but it may be expected to
fail on other systems.  To use this kit on a non-VMS system, the files
may need to be renamed to restore their original mixed-case and/or
multi-dot names.  The UNIX shell script "vms_name_fix.sh" (or something
like it) should do the job.

   When reporting problems, especially build problems, with BZIP2 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               (+1) 651-699-9818  (voice)
   382 South Warwick Street        sms@antinode.org
   Saint Paul  MN  55105-2547