Various patches and packages for Corman Lisp 2.51

Getting and installing the patches

To install the patches, simply copy the files into the appropriate subdirectory of your Corman Lisp installation.

Alternatively, you can download all the patches as a ZIP file and unpack that in the root directory of your Corman Lisp installation.

Applying the patches

After the patches have been installed, you must get them into your lisp image.

If you want the patches in your default image (recommended), rename CormanLisp.img to something else and run

clconsole -execute sys/compile-sys.lisp
    

If you do not want them in the default image, you must perform the above steps, rename the newly created CormanLisp.img to something else and then put the old image back. This is because some of the patches change low-level functions and thus I cannot guarantee that simply loading them will work.

The patches

There are three types of patches here:

  1. Bug fixes
  2. ANSI compliance fixes
  3. Enhancements — nice-to-have features

Patches for core functionality (files in sys)

clos.lisp
  • Ensure existence of type specifiers standard-object, class, standard-class, generic-function and standard-generic-function.
compile-file.lisp
  • Allow literal package objects in fasl files (will do a find-package on load).
conditions.lisp
  • Only call restart-interactive-function if it actually exists.
defpackage.lisp
  • Only add the default packages (:CL :CCL) to the package use list if no explicit use list is supplied.
  • iterate-over-package should skip uninterned symbols.
format.lisp
  • Fix for ~^ nested within ~(~).
misc-features.lisp
  • Switch test order of structureness and hashtableness (since hash tables happen to be structures.
  • Implement equalp for structures and hash tables.
parse-c-decls.lisp
  • Stop #! barfing on a void fun(void); prototype.
pretty.lisp
  • Print (function foo) as #'foo.
streams.lisp
  • open should accept :if-exists :error.
symbols.lisp
  • Wrap expansion of defconstant in an appropriate eval-when.
write.lisp
  • Print (function foo) as #'foo.
xp.lisp
  • Recognize xp-structure objects as streams.

Patches for non-core functionality (files in modules)

sockets.lisp

This patch is for Chris Double's sockets implementation, included in the Corman Lisp distribution.

  • Accept null bytes in socket input.
  • Accept 0 (zero) as a port number for local-socket objects and update the port slot of the instance after connect or bind..
windef.lisp
  • Define the various BOOL types as :long-bool.

Additional packages

composite-streams.lisp

An implementation of composite streams (two-way and synonym streams) for Corman Lisp 2.51, based on Chris Double's Gray streams.

gray-streams.lisp

Chris Double's Gray streams package, with some additional modifications. If you have retrieved gray-streams.lisp from Chris Double's website and the version of that file is 1.4 or greater, you don't need this.

misc-ansi.lisp

An implementation of various small ANSI bits missing from Corman Lisp 2.51:

  • get-standard-pprint-dispatch-table
  • get-standard-readtable
  • machine-instance
  • machine-type
  • machine-version
  • user-homedir-pathname
  • wild-pathname-p