Release Notes for MCL 4.3.1 ---------------- MCL 4.3.1 works in Classic Mode with OSX Public Beta and later. This MCL release includes new interfaces in the folder "ccl:library;interfaces;". These files are new tranlations of Universal Interfaces 3.3 (dated Nov 4 1999) Beyond that, this is mostly a bug fix release. It has better ANSI compatibility re: conditions, changes to menu item icons and script for AppearanceManager, some optimizations, and a few enhancements. ------------------- All the patches for MCL 4.3 are built into MCL 4.3.1 The readme file for the MCL 4.3 patches (on the MCL 4.3 CD) is included below --------------- This folder contains patches for problems that have been reported since the new MCL 4.3 images were built. pprint-format-patch.lisp fixes some cases of pretty printing and format such that the string-output-streams created for internal use do not result in an error when writing an extended-character, or an extended-string that actually contains an extended-character. apropos-methods-patch.lisp - in do-apropos, copy-list before sort slot-accessor-patch.lisp - check for existence of predicate before use process-abort-patch.lisp - disallow scheduling during modal dialog re: choose process to abort. break-loop-patch.lisp - break-loop prints a message about modal-dialog-on-top on exit. listener-patch.lisp - Fixes long standing but rare "should have returned already" error in wrapped fred-items. Use this patch with caution. It has not been tested very much. unbound-slot-patch.lisp - unbound slot signals error of type unbound-slot vs. simple-error per ansi CL. window-under-patch.lisp - don't error if window has no wptr. Function window-under is called by various event handlers when the top window is a windoid which may have disappeared in the meantime. setf-values-patch.lisp - adds (setf (values place1 ...) ...) per Ansi CL. log-patch.lisp - log really uses #_log2 when appropriate.The promised change did not make it into 4.3 (the patch is PPC only but harmless if loaded in 68K MCL) choose-new-file-patch.lisp - fix for prompt nil This patch only matters when *nav-services-available* is nil. If you use new-file-dialogs it should be loaded before this patch is loaded driver-read-patch.lisp patches the function driver-read in the file "CCL:examples;driver.lisp" which is used by "CCL:examples;serial-streams.lisp". The change makes it less likely (but not impossible) to hang MCL by doing serial-stream/driver operations on the same stream from two separate process. Either load this patch after loading serial-streams, or merge the change into "ccl:examples;driver.lisp". xchar-up-down-patch.lisp fixes char-upcase and char-downcase for non Japanese 2 byte scripts. Note that if the system script is a non Japanese 2 byte script then this patch is essential!! One must load the compiled version of the patch in an init file (which is also compiled). End of readme for 4.3 patches. 4.3.1 specific information below. ---------------- Thanks to the community of MCL users for your feedback, suggestions, enhancements, bug reports, and bug fixes. New files -------------------- "ccl:examples;defsystem.lisp" - this is the version of defsystem used for CLIM (but in a different package) "ccl:examples;contextual-menu-mixin.lisp" - a slightly modified version of the contribution from Eric Russell - Thanks, Eric Russell. Fixed so interaction with modal-dialogs works correctly with MCL 4.3 and later. Also fixed so a contextual-menu-mixin view that contains subviews or overlaps other views works correctly. The contextual-menu-mixin.lisp file contains the contextual-menu-cursor resource. The cursor resource is also included in: "ccl:examples;contextual-menu-cursor.rsrc" "ccl:examples;drag-and-drop.lisp" - a slightly modified version of the contribution from Dan S. Camper. Fixed so interaction with modal-dialogs works correctly with MCL 4.3 and later. "ccl:examples;font-search.lisp" - search in Fred for particular font, style, and or color. "ccl:examples;platinum-pop-up-menus.lisp" - a slightly modified version of the contribution from Eric Russell . It draws pop-up-menus ala appearance manager with round corners etc. Changed to advise existing methods vs copying the existing code which changes from time to time. Modified to not affect pull-down-menus. Also included is "ccl:examples;appearance-globals.lisp" which is "required" by platinum-pop-up-menus. New functions ----------------- appearance-available-p - true if the appearance manager exists string-2-date (string &key (start 0) (end (length string))) and string-2-time (string &key (start 0) (end (length string))) from Terje Norderhaug reset-timer-relative (timer seconds) - in "ccl:examples;timers.lisp" Menu items - new slots and methods for icon and script (AppearanceManager related) ------------------- New menu-item slots (defclass menu-item (menu-element) ( ... (menu-item-icon-handle ;:reader menu-item-icon-handle :writer (setf menu-item-icon-handle-slot) :initform nil :initarg :icon-handle) (menu-item-icon-type :reader menu-item-icon-type :writer (setf menu-item-icon-type-slot) :initform nil :initarg :icon-type) (menu-item-script :reader menu-item-script :writer (setf menu-item-script-slot) :initform nil :initarg :menu-item-script))) New menu-item initarg: :icon can be list, handle, or fixnum New menu-item methods: menu-item-icon-handle menu-item-icon-type menu-item-script set-menu-item-icon-handle ((item menu-item) icon-handle &optional item-num) icon-handle should be a handle or Nil. If the appearance manager is available it calls #_SetMenuItemHandle. If the appearance manager is not available (or if 68K) it uses the handle to obtain a resource id and calls #_SetMenuItem. This case doesn't work for id's < 256 set-menu-item-icon-type ((item menu-item) icon-type &optional item-num) icon-type should be one of #$kMenuNoIcon, $kMenuShrinkIconType or nil Nil means use the icon type of the provided icon-handle This does nothing when the appearance manager is not available or the icon-handle is NIL. set-menu-item-script ((item menu-item) script &optional item-num) If the appearance manager is available this will call #_SetMenuItemTextEncoding, otherwise its done the old way using both the command-key (= #\backarrow) and menu-item-icon-num. This method is now used within MCL when appropriate. set-menu-item-icon ((item menu-item) thing &optional item-num) Methods for thing being fixnum, macptr (aka handle) cons and nil. If thing is a cons it should be a list of (handle-or-nil ostype id) - if handle is not a handle the icon-handle is obtained with (#_getresource ostype id) Note that ostype and id are always saved when thing is a handle or cons, which allows survival of menu-item-icons across save-application at least in some cases. Ansi compatibility ----------------------- Some condition types for float exceptions have changed names to be Ansi CL compliant. They are floating-point-invalid-operation and floating-point-inexact. Proclaim allows any defined type, not just Common Lisp types. Changed some simple-errors to type-error or program-error. Optimizations ------------------------ The function log uses #_log10 when appropriate - it's faster. Add and subtract of bignums don't cons when result is a fixnum. Many of the time functions such as get-universal-time, encode-universal-time etc. cons less. %get-ostype - doesn't cons if symbol already exists in keyword package - from Terje N. somewhat modified. Some optimizations to expt for integers especially if base is 2 or 10. Some new dynamic-extent declarations in the code generated by compiler macros for position and find. Add compiler macro for logtest of known fixnums. Truncate, round and rem can constant fold. Add compiler macro for float when second arg is some specific float type. Bug fixes ------------------------ Optimizer for + of known fixnums assumed result to be known fixnum, now checks at compile time and possibly run time. Do-appleevent - fix so works when a quit event originates from MCL. Fix a Fred bug in ed-yank-file (c-x c-y). 3d-button fixes: view-draw-text for 3d-button clips to inner size, text-position deals with possibly too small for text. text-position centers text vertically if possible. Interpreter - some fixes re declarations to match compiler. Fixed bad bug in ff-long-to-ostype when symbol did not already exist in keyword package (from Terje N.). Add stuff to defer view-mouse-enter-event-handler till the window containing the view is drawn. Set-view-container - if view = *mouse-view* and new container nil set *mouse-view* nil. Window-hide ditto. Avoid double warning about unknown type declarations in setf expansion. Fix alphanumericp for Roman script and char-code > #xff. Fix to stream-clear-output for buffered-output-stream-mixin in "ccl:library;io-buffer.lisp" from Terje N. The Navservices versions of choose-xxx-dialog set the default directory when cancelled. The code that makes colored dialog items work in the presence of OS efforts to subvert that ability uses appearance-available-p instead of os-8.5-or-later-p to determine whether the color song and dance is necessary. Button-dialog-item with body color or text-color and appearance-available-p is prettier. Radio-button and check-box with appearance-available-p and text-color retain text-color during #_trackcontrol All control dialog items with colors and appearance-available-p clip to the dialog item in case text is too big. Backtrace fix for variables that are closed over and setq'd (previously printed as bogus objects). Fix the function gen-file-name which is used by OPEN :if-exists :supersede to preserve the original file in case of error/abort. (this bug occurred as a result of some pathname optimizations in MCL 4.3, but was rarely a problem) Modal-dialog - if the provided eventhook returns true, do no more with the event. The function draw-string-crop uses #_TruncString rather than assuming we know what the ellipsis character is in any random script. Suggestion from Terje Norderhaug. ADVISE or TRACE of standard-reader and writer methods never worked. Now signals an error rather than confusing an unsuspecting user such as myself (akh). (Advise or trace the generic function instead.) Broadcast-stream, concatenated-stream and two-way-stream check direction of provided streams at instance- initialize time. Signal type-error if a stream is not a stream or has wrong direction. Read-byte signals end-of-file error vs. file-error when appropriate. Fred-item class defaults text-edit-sel-p to t. That's the thing that makes selections look contiguous. Most creators pass in T but a direct call to make-instance defaulted to NIL. The Font menu omits fonts starting with "." as well as fonts whose name is the empty string. The function that opens the resource fork of the MCL help file opens it for :input so that more than one MCL application can access that fork, which is mostly used for balloon help of menu items. The function that restores a Fred window position accounts for the variation in window-title-height between Mac OS versions. (Actually it's the presence or absence of appearance manager this week). Create-directory - avoid acquiring :type from *default-pathnname-defaults* Ensure-directories-exist - second value (true or NIL) was backwards. Should be true if a directory was created, Nil otherwise. (declare (type foo ...)) no longer warns when foo is a class or structure defined in the file being compiled. Set-view-size for 2 dimensional table-dialog-item moves and resizes the scroll-bars. Previously only did so for 1 dimensional tables. Fix expt for short-floats to return a short-float value. Fix an optimization to stream-write-string for output-file-stream so that things don't become pessimal when *print-pretty* is true. Other enhancements and miscellany ------------------ Apropos dialog: add initargs button - active when the requested thing is a class. Add some *fasl-save.. variables to Preferences dialog. Add Defsystem, Font Color Palette, Font Search, Drag and Drop, and Platinum Pop Up Menus to Extensions dialog. The titles of Edit menu items "Search..." and "Search Again" changed to "Find..." and "Find Again" for consistency with Finder and other applications. The pop-up menu obtained via command-click in the title of a fred window invokes choose-file-dialog for the directory of the selected menu-item. (The first item, which is the filename, does nothing) Open-resource-file and with-open-resource-file take a :direction argument. The default value is :io for backward compatibility. (Also take a :perm argument if you are fond of #$FsRdPerm etal. If :perm is supplied it takes precedence over :direction) Pop-up-menu - the part-color :menu-title only applies to text, not the frame or triangle. New part-color :menu-frame applies to frame. Pull-down menus draw with fore and back color switched when selected, vs #_invertrect. In view-draw-contents the back-color defaults to back-color of window vs white. Print-object for pop-up-menu and pull-down-menu is somewhat more informative. Remove some more direct references to low memory globals. Added a NOOP appleevent handler for :|pmgt| :|wake| which occurs on PB G3 with OS9. The existing *sleep-wakeup-functions* mechanism still works. Too bad Apple didn't think of the Appleevent sooner. Also added noop appleevent handler for :|pmgt| :|pmsd| aka battery-going-dead. Removed method appleevent-not-handled-error. It caused some misbehavior. You can get the effect of just a warning by setting ccl::*signal-appleevent-errors* to nil and ccl::*report-appleevent-errors* to t. Or set both to nil if you don't care at all about appleevent errors. ppc-asm.lisp - fixes for Altivec stuff from Shannon Spires. (not here yet?) old-file-dialogs - closeWD -> PBCloseWDSync examples;NotinROM;*.lisp - updated for new interfaces. pprint.lisp - a fix for *print-circle* t, *print-pretty* nil which matters for ~&. color-dialog-items - fix something about drawing text and background color. Fix format-* when *print-circle* t Several fixes for define-symbol-macro - thanks Kim Barrett. apropos-dialog.lisp - use ccl::*apropos-types* when creating the dialog so users can customize the order in the type pop-up-menu. Also add *apropos-type-functions* an alist of types and functions to find a type so users can augment *apropos-types*. Fred - add changing linefeed to newline for whole buffer = c-x c-f Fix open for element-type base-char from Shannon Spires. The functions font-codes and font-spec know about more transfer modes. ;; actually both pen and text modes (defparameter *pen-modes-alist* `((:srcCopy . #.#$srccopy) (:srcOr . #.#$srcor) (:srcXor . #.#$srcxor) (:srcBic . #.#$srcbic) (:notSrcCopy . #.#$notSrcCopy) (:notSrcOr . #.#$notSrcOr) (:notsrcXor . #.#$notsrcXor) (:notsrcBic . #.#$notsrcBic) (:patCopy . #.#$patCopy) (:patOr . #.#$pator) (:patXor . #.#$patxor) (:patBic . #.#$patbic) (:notPatCopy . #.#$notpatcopy) (:notPatOr . #.#$notpator) (:notPatXor . #.#$notpatxor) (:notPatBic . #.#$notPatBic) (:blend . #.#$blend) (:addpin . #.#$addpin) (:addover . #.#$addover) (:subpin . #.#$subpin) (:transparent . #.#$transparent) (:addmax . #.#$addmax) (:subover . #.#$subover) (:admin . #.#$admin) (:grayishTextOr . #.#$grayishTextOr) (:hilite . #.#$hilite) (:dithercopy . #.#$dithercopy))) Added some machine-types and keyboard-types Printing an anonymous funtion adds "Interpreted" if that is the case. Add :CCL-4.3.1 to *features* Ignore possible provided library name when loading a shared-library-entry-point - it can change from day to day or one OS to another. Random for bignums - don't leave 1 bit holes on 32 bit boundaries. There is a patches folder "ccl:patches 4.3.1" The patch files contain comments describing the fixes. Some of the patches are especially important if you wish to run in Classic mode under OSX. This release does not include a 68K version. By the way, MCL 3.4 (for 68K) on the MCL 4.3 CD does not work with OS 9. Known bugs ----------------- There is a long standing but rarely occurring Fred display bug with split panes that causes an error "Shouldn't happen". No one has yet found a reproducible case. Some users have reported a crash the first time MCL 4.3.1 is started under OSX Classic. Macsbug says the heap is corrupt. Second and subsequent launches work without problems. Starting another Classic application before starting MCL also avoids the problem.