Ancient history
---------------
Release 4 (9th September 2003)
- First stand-alone release under the L.G.P.L.

Release 5 (11th September 2003)
- To make a listener accept all load requests regardless of drop location you
  must now pass NULL_ObjectId rather than -1 to loader_register_listener().
  This change breaks the F.I.D., but I felt it was necessary - sorry.
- loader_buffer_file() now guarantees not to change the 'file_path' string
  passed to it.

Release 6 (11th September 2003)
- s.timer had been assuming that *timeup_flag pointed to a word value. This
  was dangerous when linking with code generated by Castle's new compiler, so
  it is now set up to access a byte value instead. Which version to
  assemble can be configured by setting the variable BOOL_8_BIT.
- Changed the names of the 'FednetCompM' and 'AbortFileOp' modules to fit
  within the 10 character name limit on old filing systems.
- s.timer now assembles as either APCS-R or APCS-32 code, depending on the
  value of ObjASM's built-in variable {CONFIG}.

Release 7 (13th September 2003)
- Changed the names of various structures and types defined by h.SFFormats.
- The default state of c.err is now to record errors; renamed the 'err_rec'
  header as 'err'.
- o.ErrNotRec and o.FPCompOnly (which provide cut-down features of c.err and
  c.FilePerc respectively) can be built separately. Since the linker scans
  AOFs before libraries, programs can be linked with them and they will
  override the objects in CBLib.

Release 8 (23rd October 2003)
- Removed redundant (and misleading) 'NullPoll_suspend' header.
- The 'NullPoll' and 'Loader' modules no longer check the pointers
  returned by event_get_mask() and event_set_mask(), which are always NULL!
- Various 'NullPoll', 'NoBudge' and 'RoundRobin' functions that formerly
  returned a pointer to a fancy error message now merely assert() valid
  calling conditions (e.g. at least one client registered, for
  nullpoll_deregister). This should simplify production code, where such
  errors should not occur anyway.
- You can now define the symbol OLD_SCL_STUBS to compile code for use with
  StubsG rather than Castle's stubs for the new (C99 supporting) shared C
  library.

Release 9 (1st March 2004)
- The 'err' and 'ViewsMenu' modules now forceably terminate any strings
  that may have been truncated by strncpy().
- Added a new function msgs_globalsub() to the 'msgtrans' module, to
  allow use of global messages that require parameter substitution.
  Corresponding msgs_global_sub1...4 macros have been added to the 'msgtrans'
  header.
- Added the 'const' qualifier to function parameters of type char * for
  ViewsMenu_add(), ViewsMenu_setname() and ViewsMenu_findview().
- 'Loader' and 'ViewsMenu' now make less profligate use of strncpy(); for
  example where the length of the source string is known in advance.
- Changed the definition of macros WRITE_ERR(), WRITE_GERR(), and
  WRITE_ERR_SUB1() to forceably terminate the error message, in case it was
  truncated by strncpy().
- Added a new macro WRITE_GERR_SUB1() to give equivalent access to the new
  function msgs_globalsub() as WRITE_ERR_SUB1() does for msgs_lookupsub().

Release 10 (25th April 2004)
- The main 'CBLib' library file has been moved inside the 'o' sub directory
  (which seems to be the norm for C libraries). All makefiles will therefore
  require alteration to look for CBLibrary as 'C:o.CBLib' instead of as
  'C:CBLib'.
- Added new macros STRCPY_SAFE (copy string to array of known size,
  truncating if necessary) and CLONE_STR (copy a string into a new heap
  block). Existing library code has been updated to use these macros in place
  of custom code.
- The macros ABSDIFF and FLAG_SET now cope with non-parenthesised expressions
  as input arguments.
- Added verbose alternatives to many macro names that were felt to be concise
  to the point of obfuscation (for example RPT_ERR_RTN as opposed to R_RET).
  Existing library code has been updated to use the new macro names.
- Reduced the dimensions of the 256 colour palette from 576 to 512 OS units
  to make it more practical for use as a submenu. A Resource file containing
  a suitable Window object definition is now included in the library
  distribution.
- Because the the external dependencies of the 'Macros' header vary according
  to which macros are used, I have decided no longer to #include other
  headers from within it. Thus code that relied on "Macros.h" to include
  "kernel.h" and "msgtrans.h" will require modification.

Release 11 (18th June 2004)
- The 'Loader' module now uses the standard library function remove()
  rather than OS_FSControl 27.
- Created a new 'Canonical' module by moving the loader_canonicalise()
  function out of 'Loader' and renaming it as canonicalise(). This allows
  any code that doesn't use 'Loader' to use this function with no overheads.
- Macros that were defined as compound statements have been changed to one-
  time iteration statements in order to allow usage identical to a function.
- Where library code invokes macros, this has been modified to include a
  trailing ';' where necessary to work with the above change.

Release 12 (7th November 2004)
- The 'Err' module now uses abort() rather than exit(EXIT_FAILURE)
  because it gives the user the option of a stack backtrace.
- The 'FednetCmp' module now uses the 'NoBudge' functions rather than
  calling flex_set_budge directly.
- Added a new function equivalent to msgs_lookupsub() except that it
  accepts a variable number of parameter substitution arguments, which makes
  it more economical to call.
- Created new 'PathTail' module, which consists of a function to get the
  tail end of a RISC OS file path, consisting of a given number of path
  elements.
- Imported case-insensitive string comparison functions strnicmp() and
  stricmp() from the source of UnixLib 3.8. These are in separately linkable
  objects but declared together in a new 'StrCaseIns' header.
- The ViewsMenu_strcmp_nc() function has been deprecated in favour of
  stricmp(). As in the case of loader_canonicalise() it is now just a
  veneer.
- err_box_die() is no longer exported by the 'Err' module - questionable
  whether it was ever actually used externally.
- Added an extra element to the SF_GroundMapStampHdr structure defined in
  the 'SFFormats' header.
- Added extra constant definitions to the 'SprFormats' header to describe
  the layout of a sprite info word.
- Wrote a large amount of Clib-style documentation covering all functions in
  most of the library headers. Apart from the 'Loader' module this is
  the first real effort at documentation. Also documented external
  dependencies of code.
- The 'ErrNotRec' header is now just an alias for the 'Err' header (not worth
  maintaining in parallel).

Release 13 (29th November 2004)
- Fixed a bug in msgs_lookupsubn() which had caused the order of any
  substitution parameters to be reversed.

Release 14 (7th January 2005)
- Created new 'DateStamp' module, which contains functions for obtaining
  RISC OS 5-byte UTC times from file date stamps or the real time clock.
- Minor change to 'Pal256' to make it use ECF patterns for more accurate
  colour rendering in non-8bpp screen modes.

Release 15 (5th March 2005)
- Created new 'Debug' module which allows debugging statements to be
  inserted into a program without binding it to a particular output system.
  Changed rest of the library to use this rather than ugly in-line code
  based on the *Report command.
- Made changes to 'Loader' module to allow a client supplied pre-filter
  function to be called when a request for data transfer is received.
- Added new function loader_deregister_listeners_for_object() to allow
  all listeners registered for a given object to be removed simultaneously
  (e.g. when that object has been deleted).
- Added new functions to 'MsgTrans' module to give access to the
  facilities provided by the SWI MessageTrans_ErrorLookup. Changed rest of
  library to use msgs_error() function rather than relying on an external
  _kernel_oserror structure 'shared_err_block'.
- Made changes to 'Pal256' module to make it highlight the selected
  colour with a border in addition to displaying it elsewhere. As a side
  effect a new function Pal256_colour_brightness() is available to client
  programs.
- Imported string duplication function strdup() from the source of UnixLib
  3.8, hence the equivalent macro CLONE_STR() is now deprecated. Added
  declaration of this function to 'StrCaseIns' header and renamed it
  'StrExtra' (former still works as alias).
- ViewsMenu_add, ViewsMenu_setname and ViewsMenu_remove now use assert() to
  ensure object id not duplicate/unknown rather than returning error (should
  never happen in correctly written programs).
- Fixed a bug in get_date_stamp(), which was not correctly initialising the
  object type before calling SWI OS_File 19.
- Fixed bug in load_compressed() where flex memory allocated for file would
  leak if compiled with OLD_SCL_STUBS and insufficient memory.
- Fixed longstanding memory leak: _Pal256_deleted() was failing to free the
  heap memory claimed upon Pal256_initialise().
- Memory for leaf name remembered by 'Loader' module between DataSave and
  DataLoad messages is now freed upon loader_finalise().
- Eliminated floating point arithmetic from get_comp_perc() and
  get_decomp_perc() - not worthwhile given unlikelihood of overflow.
- The size returned by MessageTrans_Lookup is now used to forceably
  terminate the resultant string, because this SWI seems to return crudely
  truncated strings if the buffer is too small.
- Title passed to a LoaderFinishedHandler in absence of leaf name is now
  '<untitled>' (as ROM Apps) rather than '<Untitled>'.
- Changed logic in _ldr_dataloadopen_listener() to cater for theoretical
  possibility of a message with ref -1.
- Qualified the strings passed to a LoaderFileHandler or
  LoaderFinishedHandler as 'const' (existing code will need updating).
- Moved deprecated macros out of h.Macros into a new header h.Deprecated,
  which is still (for the moment) included from the former.
- Added section on error propagation to the ReadMe file.

Release 16 (14th May 2005)
- Added a new function remove_event_handlers_reset_id() of type
  ToolboxEventHandler (declared in header h.EventExtra). This may be
  registered to be called on Toolbox_ObjectDeleted events to remove
  any Wimp or Toolbox event handlers registered for a given object.
- Added symbolic definitions of the dimensions of the two-dimensional array
  types SF_GroundMap and SF_ObjectsGrid (defined in h.SFFormats).
- New macros SYSTEM_BEEP, LOWEST and HIGHEST.
- Changed definition of macro TEST_BITS slightly to return 'true' instead of
  non-zero if any bits are set in both operands.
- Added second makefile 'MakeStubsG' to allow a separate StubsG version
  of the library to be built.

Release 17 (16th May 2005)
- Added missing #define to prevent multiple inclusion of the 'Debug' header.
- Added a new function delete_object_on_event() which is a generic
  event handler for deleting the object in question (declared in header
  h.EventExtra).
- Belatedly updated the 'Hourglass' header to use the DEBUG macro instead of
  *Report.
- Changed SYSTEM_BEEP macro to use the standard library function putchar()
  instead of _kernel_oswrch().

Release 18 (06 Aug 2005)
- Created new 'DeIconise' module which provides a veneer on top of the
  toolbox_show_object and toolbox_hide_object functions to ensure that any
  iconiser application (e.g. Pinboard) is kept informed.
- ViewsMenu_show_object is now obsolete but has been retained for backward
  compatibility (simply calls DeIconise_show_object).
- Updated the 'NullPoll' functions to use our bit manipulation macros and
  added debugging text output.
- Changed Pal256_colour_brightness argument type from unsigned int to
  unsigned long (must be at least 32 bits to accommodate palette entry).
- Amended _Pal256_deleted to use event library functions that deregister all
  handlers for a given object. Used this to improve the behaviour of
  Pal256_initialise if it fails midway through registering event handlers.
- Removed spurious 'extern' from definition of StackViews_configure.
- Added new function StackViews_open_get_bbox which is equivalent to
  StackViews_open except that it optionally outputs the visible area
  coordinates of the Window just shown.
- Added ARRAY_SIZE macro definition (gives no. of array elements) and
  optimised WORD_ALIGN macro to use bitwise AND instead of shifts.
- Updated all declarations in h.SFFormats to use types of guaranteed width
  (as defined in ISO header 'stdint'), made some members of SF_Animation
  unsigned and renamed all types & macros associated with map editor
  transfers (formerly known as 'stamps').
- Added macro definitions of OS_SpriteOp plot codes to h.SprFormats.
- Renamed functions ViewMenu_getfirst and ViewMenu_getnext (should be
  ViewsMenu_...) but kept synonyms for backward compatibility.

Release 19 (02 Feb 2006)
- Modified those C source files that use <stdlib.h> memory handling functions
  (e.g. malloc) to #include header "FORTIFY:FORTIFY.h". This is conditional
  upon pre-processor symbol FORTIFY so that it doesn't upset compilation for
  those that don't have Simon Bullen's fortified memory allocation shell.
- Modified 'MakeDebug' to predefine symbol FORTIFY when compiling C sources.
- Substituted sizeof(msg_block.data.words[0]) for sizeof(int) in
  _DeIconise_notify()'s calculation of message block size (slightly nicer).
- Added macro definition of FILETYPE_NONE for untyped files (pseudo-type
  &3000 is used in DataOpen message and by Loader module).
- Completely changed the definition of a LoaderPreFilter, thus breaking
  compatibility (although the original pre-filter mechanism was never
  documented). The listener's client handle is now passed, as is an
  indication of whether the drag destination is within the listener's drop
  zone. Whether the data source is 'safe' is now implicit in whether a file
  path is passed. Made valid return codes into an enumerated type.
- Extended _ldr_dataloadopen_listener() and _ldr_find_suitable_listener() to
  translate between inconsistent representation of untyped files in
  different messages (-1 in DataSave and &3000 in DataOpen; well done Acorn).
- Modified _ldr_dataloadopen_listener() so that any client-supplied
  LoaderFileHandler is called for files only (as claimed in documentation
  but not previously true).
- Modified _ldr_datasave_listener() so that it doesn't attempt to use RAM
  transfer for directories!
- Trimmed arguments to _ldr_find_suitable_listener(); permanence of incoming
  data is now indicated by whether file path is NULL. This fits more
  elegantly with _ldr_dataloadopen_listener() and changes to pre-filter
  functions.
- Modified _ldr_replyto_datasave() to use WORD_ALIGN macro.
- Modified _ldr_find_suitable_listener() to call the pre-filter function for
  a listener regardless of whether the drag destination matches its drop
  zone. It now understands new return code 3 (LOADER_PREFILTER_IGNORE) to
  allow a pre-filter to reject incoming data without implying file type is
  invalid.
- Fixed a bug in _ldr_find_suitable_listener(), which treated the file type
  of the incoming data as unrecognised if 0 was returned by the last pre-
  filter function to be called. Hence error reported when no suitable
  listener found depended on the order of listener registration! We now
  record the file type as recognised if any pre-filter returns code 3.

Release 20 (06 Feb 2006)
- Miscellaneous changes in perc_operation() aimed at simplifying program
  control flow.
- Updated _ldr_replyto_datasave(), ViewsMenu_add() and ViewsMenu_setname()
  to use strdup() instead of deprecated macro CLONE_STR.
- Switched to using an enumerated type instead of #define'd constants to
  specify the type of file operation for perc_operation().
- Added symbol definition of the flag in bit 31 of the file type passed to
  perc_operation().
- Eliminated unnecessary casts to void pointer type in c.Loader and some
  hardcoded values where sizeof() is now used instead.
- Renamed various functions in c.Loader (see source file for details).
- Moved registration of handlers for Wimp_MRAMTransmit and
  Wimp_EUserMessageAcknowledge from _ldr_new_thread() to
  loader_initialise() and deregistration from _ldr_kill_thread()
  to loader_finalise(). This should fix crashes in Event library caused by
  _ldr_msg_bounce_handler() deregistering itself.
- Because of the above change _ldr_kill_thread() and _ldr_kill_listener()
  cannot fail soft and therefore no longer return a _kernel_oserror pointer.
- Added code at start of _ldr_ramtransmit_msg_handler() and
  _ldr_msg_bounce_handler() to search linked list of RAM transfer status
  blocks for relevant one (can no longer rely on client handle passed by
  Event library).
- If c.Loader is compiled with symbol USE_FILEPERC #define'd then
  loader_buffer_file() will be just a veneer to perc_operation() - user
  gains percentage hourglass and the facility to interrupt loading big files.

Release 21 (14 Sep 2006)
- The 'Loader' module no longer faults DataSave or DataOpen messages with
  non-zero 'your ref' (for compatibility with application note 241). Hence a
  message for token "TransUXreq" is no longer required. The 'your_ref' value
  is now passed to a LoaderFinishedHandler to allow clients to associate
  incoming data with an earlier DragClaim message.
- The drop coordinates from a DataSave or DataLoad message are now passed to
  a LoaderFinishedHandler to allow accurate positioning of imported data.
- The generic symbol COPY_ARRAY_ARGS is now used to control whether library
  functions copy arrays passed by pointer (instead of NO_STATIC_GADGETS_LIST
  just for c.Loader).
- Added assertions to prevent use of 'Loader' module when not initialised.
- Fixed a bug where loader_deregister_listeners_for_object() read from a
  LoaderListenerBlk immediately after it had been freed (only showed up when
  built with Fortify).
- Fixed a heinous bug in _ldr_kill_listener()'s traversal of the linked list
  of LoaderDialogueBlk's. When killing a listener with open RAM transfer(s),
  it instead attempted to deallocate the following LoaderDialogueBlk,
  probably causing _ldr_kill_thread() to deference a NULL pointer.
- A new library module 'Saver' handles the sender's half of the data
  transfer protocol.
- A new library module 'Scheduler' provides a mechanism for scheduling
  functions to be called on Wimp null events and informing them when it is
  time to cede control to another task. It is designed as a replacement for
  'RoundRobin'.
- Added a macro definition of file type &feb ('Obey').
- Updated "SprFormats.h" to use unsigned integers of guaranteed width within
  the sprite header and area header structures. (PRM volume 5a says that
  OS_SpriteOp 17 treats offsets as unsigned).
- A new header "WimpExtra.h" declares additional types and macros to aid
  implementation of the message protocol described in Acorn application note
  241. It also defines a structure for the Wimp_AutoScroll parameter block.

Release 22 (25 Oct 2006)
- Updated the 'Pal256' module to support keyboard control or a number
  range gadget to display/update the colour number. Can now select a colour
  and close the dialogue box straight away by double-clicking. The selected
  colour is now indicated within the palette by a little square, which can
  be dragged using the mouse. Drags are now restricted to the palette area.
- A new library module 'Entity' manages ownership of system-wide entities
  such as the clipboard and caret.
- Moved the code to handle an incoming data transfer from the 'Loader'
  module to a new module 'Loader2'. This is for flexibility when
  dealing with extensions to the basic data transfer protocol (e.g. when
  clipboard data is requested).
- Moved the code to handle the sender's half of the drag and drop protocol
  from the 'Saver' module to a new module 'Drag'.
- Extended save_compressedM() and save_fileM() to allow any sub-section of a
  flex block to be saved rather than the whole thing (or in the latter case,
  all but the first word). These functions no longer set the file type,
  which can easily be done separately.
- Removed special provision in load_fileM() for prepending the length of a
  sprite file, which can easily be done separately.
- Split function perc_operation() into two new functions file_perc_load()
  and file_perc_save(), thus eliminating unused arguments for load
  operations. The latter allows any subsection of a flex block to be saved
  instead of just making special provision for sprite areas.
- Modified _scheduler_null_handler() so that client functions that return
  before their allocated time is up, do not have their next time slice
  reduced if they want to sleep.
- Rewrote scheduler_finalise() so that it actually compiles!
- _kernel_oserror pointers returned by CBLibrary functions are now qualified
  as 'const'.
- Removed the 'NullPoll' and 'RoundRobin' modules from normal library
  builds; both have been superseded by the new 'Scheduler' module.
- Made inclusion of all deprecated functions conditional upon pre-processor
  symbol INCLUDE_OBSOLETE when building the library.
- Tidied up the documentation of the InputFocus module.

Release 23 (28 Oct 2006)
- Minor corrections and clarifications to the documentation in the header
  files.

Release 24 (28 Oct 2006)
- Further correction to the documentation in the header files.
- Qualified the pointer to a list of ComponentId's passed to
  loader_register_listener() as 'const'.
- Fixed a serious bug where our clone of the list of ComponentId's passed to
  loader_register_listener() was unterminated. The length could also be
  grossly overestimated if the first item (skipped) was the list terminator.
- Fixed a bug where _ldr_find_listener() could return false positives if a
  listener had no gadgets list, or none was passed to this function.
- Fixed a recently introduced bug where _ldr_dataloadopen_msg_handler() was
  treating the input buffer pointer, rather than its address, as a double-
  indirected pointer to a sprite area (crashed if LISTENER_SPRITEAREAS set).
- The coordinates passed to a LoaderFinishedHandler are now relative to the
  destination window's work area, rather than absolute.

Release 25 (10 Nov 2006)
- A new library module 'CSV' comprises a function for parsing ASCII strings
  that contain numeric values in the industry standard comma-separated value
  format.
- The 'FOpenCount' module now produces debugging output (if enabled).
- The 'Loader' module now uses the "LoadFail" message prefix to report
  failure of data transfer between tasks, as well as for unsolicited
  DataLoad and DataOpen messages (lost in conversion to use 'Loader2').
- Amendments to the debugging output produced by the 'LoadSaveMT' module.
- Added the export file format used by SFColours to the 'SFFormats' header,
  renamed some struct members & symbolic constants, and removed the
  'planets' member of the _SF_PlanetsSetHdr struct (because the image data
  needn't be immediately after the header).
- Given a sprite's width and the no. of bits per pixel, a new macro
  SPRITE_RIGHT_BIT will calculate the last binary bit used in the last word
  of each row of pixel data.

Release 26 (19 Nov 2006)
- drag_start() now deregisters its scheduler function if an error
  occurs after registration.
- A new function _drag_finished() incorporates code that was common to
  drag_abort() and _drag_userdrag_handler().
- During a drag the mouse pointer position is no longer read separately in
  different functions, and never after a drag has terminated.
- Fixed a bug where a spurious DragClaim message reference was passed to a
  DragFinishedHandler even if the drag was not claimed.
- Fixed a loophole where the default mouse pointer shape was not restored if
  flags bit 0 was set in a DragClaim message received after the drop, but
  not in the preceding DragClaim message.
- Now guards against badly-behaved tasks claiming a drag despite flags bit 4
  being set in our Dragging message.
- Reduced the size of the heap pre-expansion done by the Loader2 module
  before it disables flex budging (from 1024 to 512 bytes).
- Minor correction to documentation of type DragBoxHandler.
- Corrected the definitions of types SF_MapTile and SF_PlanetBitmap to be
  [rows][columns] rather than vice-versa. Added symbolic definitions of the
  width and height of the pixel data for a sky, and modified SF_SkyColours
  to represent it as a two dimensional array of bytes (instead of 126 words).
- Added symbolic definition of OS_SpriteOp reason code 24.

Release 27 (27 Nov 2006)
- Removed the 'Loader' module from normal library builds; it has been
  deprecated in favour of the 'Loader2' module.
- Added debugging output from the 'DateStamp' module.
- Standardised the debugging output from the 'StackViews' module.
- Removed an overzealous assertion that only a flex_ptr to NULL was
  acceptable as an argument to loader2_buffer_file().

Release 28 (10 Sep 2007)
- Added definition of a new type os_date_and_time, which is exactly 5 bytes
  in size. It should be used instead of an integer array with two elements;
  too bad about fileinfo_set_date().
- Changed the hourglass_percentage macro to suppress a compiler warning when
  the argument is a wider type than plain ordinary 'int'.
- Fixed the SPRITE_RIGHT_BIT macro to work with pixel sizes other than 8
  bits.
- Added conditional definition of sprite file type in "SprFormats.h". Made
  the existing definition of this macro value in "Macros.h" conditional.
- Added macro definition of mathematical constant PI.
- Added SIGNED_R_SHIFT and SIGNED_L_SHIFT macros, because C doesn't usually
  allow shifts by negative values.
- Added definition of a MERGE_ERR macro to overwrite one error with another
  if the first is NULL (i.e. no error occurred previously). Modified the
  drag_finalise, entity_finalise, loader_finalise, loader2_finalise,
  roundrobin_finalise, saver_finalise and scheduler_finalise functions to use
  this macro; they will now complete even if an error occurs.
- Changed type 'sch_clock_t', and the 'wait_time' argument to function
  timer_register, from 'int32_t' to 'long int' to prevent spurious 'implicit
  narrowing cast' warnings from the Norcroft C compiler when assigning 'long'
  values to them. A new macro SCH_CLOCK_MAX gives the maximum possible value.
- Added structure and macro value definitions to describe the file format for
  polygonal graphics in Star Fighter 3000. Also defined a new structure type
  SF_ObjectsGridTransferHdr for the map editor.
- Modified the dprintf function (used by the DEBUG macro) to use SWI
  Report_Text0 instead of the equivalent star command. The SWI is
  significantly faster.
- Added a check in the remove_event_handlers_reset_id function, so that it
  does not reset the Toolbox object ID referred to by the client handle
  unless it matches the event being handled. This allows reuse of the storage
  location before delivery of the Toolbox_ObjectDeleted event for the object
  whose ID was previously stored.
- Created a new library module 'TrigTable', which provides functions to pre-
  calculate trigonometric tables and use them to perform fast look-up of sine
  and cosine values.

Release 29 (27 Jan 2008)
- Created a new library module 'PseudoFlex' which intercepts calls to Acorn's
  'flex' library so that Simon P. Bullen's fortified memory allocation shell
  is used instead. This is intended as a debugging aid.
- Updated those source files which invoke flex library functions to #include
  "PseudoFlex.h" when compiled with FORTIFY defined, to allow debugging with
  Fortify.
- Fixed a memory corruption bug in the get_date_stamp function which was
  revealed by Fortify: '*UTC[4]' means the 5th os_date_and_time (i.e. at
  offset +20), whereas '(*UTC)[4]' means the fifth uint8_t array element
  (i.e. at offset +4).
- "DateStamp.h" now defines 'os_date_and_time' as an array of 'uint8_t'
  rather than 'unsigned char'.
- Fixed two memory leaks in the _ent_datarequest_msg_handler function,
  for entities with non-persistent data (i.e. should be freed when no longer
  required):
  1) It neglected to free the flex pointer returned by the EntityDataMethod
     function if it could not be re-anchored.
  2) It neglected to free the heap block containing the new anchor, if the
     saver_send_data function failed.
- Reduced the inordinate number of arguments to the saver_send_data function
  by passing a pointer to a WimpMessage structure instead of individually
  specifying the file type, leaf name, drag destination and message ID to
  reply to. Updated the _ent_datarequest_msg_handler function to allocate and
  partially populate a WimpMessage message for saver_send_data.
- Fixed a memory leak in the _svr_datasaveack_msg_handler function, when
  compiled with SLOW_TEST defined; if scheduler_register_delay returned an
  error then the SaveOpData record was never destroyed. It now calls
  _svr_save_as_file directly as a fallback (i.e. non-SLOW_TEST behaviour).
- Fixed a bug where the _ldr2_decapitate_list function passed a direct
  pointer to the RAM fetch buffer to 'flex_free', instead of a 'flex_ptr' to
  its anchor. Caused the Flex library to blow up if loader2_receive_data
  allocated this buffer and then failed to create or send the RAMFetch
  message.

Release 30 (15 Jun 2009)
- Corrected an overzealous assertion 'at < size' in the PseudoFlex_midextend
  function (prevented extension at end). Changed same function to use memcpy
  instead of memmove when truncating (the new block can't overlap the old).
- If pre-processor symbol USE_LOGFILE has been defined then debugging output
  will now be directed to a log file in the Wimp scrap directory, via a new
  function named dlogf.
- Fixed a serious flaw in the ON_ERR_RPT_RTN_V macro, which was evaluating
  its 'error_source' argument twice unless it evaluated as NULL the first
  time.
  This macro is typically used to wrap function calls that may return an
  error; the compiler can't assume that a function is pure, and therefore it
  had to generate code to call it twice! This macro was broken some time
  between release 26 (okay) and release 29 (bust).
- Got rid of 'lower precision in wider context' warnings when compiling
  c.TrigTable by casting type of certain sub-expressions to 'int'.

Release 31 (21 Jun 2009)
- Fixed a bug where the Loader2 module would have been left with a stale
  'ExtraOpData' pointer, if any data transfers were outstanding at the time
  that a listener was deregistered or the Loader module was finalised.
- Unified the implementation of the similar functions entity_probe_data() and
  entity_request_data().
- Removed an advisory restriction upon calling entity_probe_data() and
  entity_request_data() with more than one flag set: a separate DataRequest
  message will now be broadcast for each requested entity not owned by the
  client task instead of a single broadcast with multiple flags set.
- If the data associated with an entity cannot be transmitted in response to
  a DataRequest broadcast then the reported error is now prefixed by a
  message looked up from token "EntitySendFail" instead of the more generic
  "SaveFail" message.
- The Loader2FinishedHandler function specified by the caller of
  entity_probe_data() or entity_request_data() will now be called with an
  entity-specific error message (e.g. "Clipboard is empty") if no data could
  be obtained for a requested entity.
- Titivated source code formatting for readability.
- Use variable names with 'sizeof' operator in preference to type names.
- Removed unnecessary casts from type 'void *' to other pointer types.
- Corrected some erroneous uses of field specifier '%d' instead of '%u' for
  unsigned values.

Release 32 (29 Aug 2009)
- Added support for sending debugging output to the standard output stream
  (first splitting the text and graphics cursors), standard error stream, a
  buffered file, or the SysLog module (optionally as a session log). Standard
  output was previously useless because text strings were not separated by
  linefeeds. Likewise, output via SysLog appeared to be supported but the
  definition of the DEBUG macro was broken.
- Subsumed the old dlogf and dprintf functions into a new function named
  debug_vprintf (for which debug_printf and debug_printfl are variadic
  veneers). This allows the output method to be changed without recompiling
  all the code to be debugged.
- Another new function, debug_set_output, allows programs to configure the
  output method to be used subsequently by debug_vprintf.
- Two new utility functions allow a Toolbox gadget to be faded or unfaded
  without altering its other flags, or hidden by moving it outside the extent
  of its window's work area.
- The InputFocus_recordcaretpos function now gives up if it can't get the
  Wimp handle of the window underlying the Toolbox object about to be shown,
  and no longer records a window handle to be matched with
  Message_MenusDeleted if it fails to record the caret position.
- The msgs_errorsubn and msgs_lookupsubn implementations now use the
  ARRAY_SIZE macro where appropriate.
- A new function scheduler_set_time_slice allows the amount of time spent in
  scheduler_poll to be reconfigured without reinitialising the scheduler.
- A new function get_screen_size outputs the dimensions of the current screen
  mode. Updated the implementation of StackViews_open to use this function
  instead of custom code.
- Fixed a minor bug where the StackViews_open function misused the X eigen
  factor (instead of Y) to calculate the height of a single-pixel bottom
  border for a window, if Wimp_Extend 11 was not available.
- Wrapped the macros defined by "Hourglass.h" in do-while loops to allow use
  with a trailing semi-colon as the first statement associated with an
  if-else.
- Six new functions convert bitmap graphics formats used internally by the
  game 'Star Fighter 3000' to RISC OS's standard sprite format, and vice-
  versa.
- A new function sprite_has_8_bpp can be used to find out whether a given
  sprite's colour depth is 8 bits per pixel.
- A new header file "SpriteArea.h" contains prototypes of functions to
  initialise a sprite area's header and allocate space within an area for a
  specified amount of extension data or a sprite of given size.
- Minor optimisations to reduce the size of existing code.

Release 33 (09 Sep 2009)
- Invented a general-purpose string transformation function strinflate(),
  which inflates a string whilst copying it to an array, by replacing every
  character in a specified set with the corresponding string from an array of
  pointers.
- Created a new function set_file_type(), which sets the numeric type of a
  specified file to indicate its contents. Updated existing code to use this
  function instead of calling _kernel_osfile() directly, where appropriate.
- Moved the prototype of the canonicalise() function to a new header file
  "FileUtils.h", which also contains a prototype of set_file_type().
- Widespread changes to stop using reserved identifiers (those containing
  double underscores or which start with an underscore followed by a capital
  letter).
- Removed many superfluous structure tags (they are only required for
  separate type definitions or self-referential structures).
- Modified the definition of type 'TrigTable' so that it no longer hides a
  pointer.
- Removed the signature from the head of the 'TrigTable' structure (there is
  no more reason to suppose pointers to that type of structure are likely to
  be invalid than any other).
- The initialisation and finalisation functions for the 'Entity', 'Saver' and
  'Loader' modules now iterate over arrays of message numbers and function
  pointers when registering or deregistering Wimp message handlers (reduces
  code size and ensures symmetry).
- Renamed some variables to follow the pattern where words are separated by
  underscores.

Release 34 (15 Oct 2009)
- Created more flexible veneers for the MessageTrans_ErrorLookup and
  MessageTrans_Lookup SWIs which allow the caller to specify the messages
  file to be used and - in the latter case - the output buffer. Rewrote
  the MsgTrans module to use them.
- Created a new function msgs_initialise to allow the client program to
  specify the messages file descriptor to be used by the MsgTrans module.
  Otherwise it will now use the global messages file instead of reporting a
  cryptic error "Filing system 'ADFS' must be given a filename".
- If no messages file descriptor has been specified for use by MsgTrans
  then msgs_get_descriptor will instate a static descriptor, for backward
  compatibility. The caller must initialise it prior to looking up messages.
- The following functions have been deprecated and are only included if
  compiled with INCLUDE_OBSOLETE: msgs_get_descriptor, msgs_global,
  msgs_lookupsub and msgs_globalsub.
- Renamed msgs_lookupsubn as msgs_lookup_subn and msgs_errorsubn as
  msgs_error_subn.
- Created type-safe veneers for the ColourTrans_SetGCOL,
  ColourTrans_ReadPalette and ColourTrans_GenerateTable SWIs. These are
  declared in a new header "ClrTrans.h" with named constants for flag bits,
  translation table formats, and struct types to specify the source or
  destination for a colour translation. Updated Pal256 to use the new
  function colourtrans_set_gcol instead of calling _swix directly.
- The get_current_time and get_date_stamp functions are now in separate link
  units to avoid incorporating both if only one is required.
- Simplified the control flow in the _ent_probe_or_request function.
- Removed dependency of the following modules on MsgTrans by passing a
  pointer to a messages file descriptor as an extra argument to their
  initialisation functions: Drag, Entity, Loader2, Pal256, Saver, Scheduler
  and ViewsMenu.
  Existing clients will require modification.
- Removed dependency of the Err module on MsgTrans by inventing a new
  initialisation function which supersedes err_set_taskname and takes a
  pointer to a messages file descriptor as an additional argument.
  err_set_taskname is still included if compiled with INCLUDE_OBSOLETE (it
  calls err_initialise with a descriptor borrowed from the MsgTrans module).
- Removed dependency of the following modules on MsgTrans by inventing
  initialisation functions which store a pointer to a messages file
  descriptor: FedCompMT, FilePerc and LoadSaveMT. If compiled with
  INCLUDE_OBSOLETE then they will borrow the messages file descriptor from
  MsgTrans as a fallback.
- Removed dependency of the following modules on Err, by passing a pointer to
  a function to be called to report errors as an extra argument to their
  initialisation functions: Drag, Entity, Pal256, Scheduler and ViewsMenu.
  Existing clients will require modification.
- The Err and MsgTrans modules now generate debugging output.
- Rewrote _drag_decide_file_type as a pure function, with idiomatic 'for'
  loops over arrays.
- Made compilation of the FednetComp module dependent on INCLUDE_OBSOLETE
  (deprecated in favour of FedCompMT).
- The FilePerc module now uses MERGE_ERR macro where appropriate.
- Created a more flexible veneer for SWI OS_FSControl 37 (canonicalise path)
  which requires the caller to provide an output buffer. Updated the existing
  canonicalise function to use it.
- Removed dependency of the canonicalise function on MsgTrans by calling
  messagetrans_error_lookup directly and using the global message "NoMem".
- When compiled without STATIC_BUFFER defined, LoadSaveMT now pre-expands the
  heap by BUFSIZ instead of 4096 before disabling flex budging across calls
  to fread/fwrite (breathing space is intended to allow allocation of I/O
  buffer).
- Created type-safe veneers for the OS_Plot, OS_ReadModeVariable and
  OS_ReadVduVariables SWIs. These are declared in a new header "OSVDU.h"
  with named constants for plot command codes, GCOL actions, mode flag bits,
  mode and VDU variable numbers. Updated Pal256, ScreenSize and StackViews to
  use them instead of calling _swix or _kernel_swi directly.
- Rewrote the Pal256 module's redraw handler to use unsigned ints for
  positive values, which means that it now draws upward instead of downward.
- A new module named PalEntry provides functions to calculate the brightness
  of palette entries or RGB triplets, make palette entries from RGB triplets,
  and find the nearest entry of a given palette to a colour expressed as a
  palette entry or RGB triplet. Pal256_colour_brightness is now deprecated
  as an alternative entrypoint for palette_entry_brightness.
- Amended assertions to allow PseudoFlex_alloc to allocate blocks of size 0
  and PseudoFlex_extend to truncate blocks to size 0. PseudoFlex_init checks
  that Fortify was compiled with the user options required to support this.
- The Scheduler, Saver, Loader2 and ViewsMenu modules now use 'for' loops in
  preference to 'while' loops when iterating over linked lists.
- The same code is now used to cancel any ticker event still pending upon
  program termination as when a SchedulerIdleFunction returns prematurely.
- The Scheduler module now calls SWI OS_ReadMonotonicTime through a simple
  type-safe veneer.
- Fixed a bug in the get_screen_size function, which had been returning
  dimensions too short by one pixel.
- Fixed a bug where the ViewsMenu_showall function would have looped forever
  upon encountering a list item awaiting removal.
- Renamed many types to follow the Toolbox library convention of
  concatenating words with the first letter of each word in upper case,
  instead of using a mixture of upper and lower case and underscores. A
  subset of the old names (those used in released source code) are supported
  by macro aliases.
- Put parentheses around all arguments within the definition of macro
  SPRITE_RIGHT_BIT to ensure correct order of evaluation.
- Created an alternative macro SPRITE_RIGHT_BIT_LOG2 which is much more
  efficient when dealing with non-constant colour depths.
- "WimpExtra.h" now defines named constants for Wimp colour numbers and
  scroll request directions.
- Finally sorted out the embarrassing hard-to-maintain mess of duplication
  between alternative Makefiles.
- Reduced the type defined for centisecond timer values from 'long int' to
  'int' to avoid the need to cast when passing values to Acorn's libraries.
- Titivated formatting of source code and replaced many 'magic' values with
  named constants.

Release 35 (16 Oct 2009)
- Arguments to colourtrans_set_gcol were passed in the wrong order when
  drawing the border of the selected colour in the 256 colour palette.

Release 36 (17 Oct 2009)
- Fixed overzealous assertion in Pseudoflex_midextend function to allow
  removal of the start of a block.
- Missing argument to DEBUGF macro in _ent_probe_or_request caused crash if
  debugging output enabled.

Release 37 (21 Oct 2009)
- Created veneers for the MessageTrans_FileInfo, OpenFile and CloseFile SWIs.
- Rescinded deprecation of the 'NullPoll' module - it has a legitimate role
  in simpler client programs.
- Moved the various WARN_GLOB and RPT_GLOB_ERR macro definitions from
  "Macros.h" to "Deprecated.h" because they rely upon a deprecated function.

Release 38 (26 Jun 2010)
- Fixed a bug where _ent_probe_or_request wrongly freed persistent entity
  data if there wasn't enough memory to create a copy for the
  Loader2FinishedHandler function.
- Specified the appropriate switches to prevent the Norcroft C compiler from
  generating unaligned memory accesses incompatible with ARM v6 and later
  (for RISC OS on BeagleBoard).
- Renamed macro INCLUDE_OBSOLETE as CBLIB_OBSOLETE and made definitions of
  deprecated numeric constant and type names conditional upon it having been
  defined. This makes it easy to detect which programs still use them.
- Deprecated source and header files now cause an #error if preprocessed
  without first defining CBLIB_OBSOLETE.
- Updated various library source files to stop using deprecated names.
- Parenthesised the arguments in the definitions of various error macros and
  ARRAY_SIZE.

Release 39 (05 Jan 2011)
- Created 'GKeyDecomp' and 'GKeyComp' modules: new state machines with
  minimal dependencies that can be used to encode or decode Gordon Key's
  compressed data format. Unlike the previous implementation, these operate
  on data in memory.
- Created the 'RingBuffer' module - a ring buffer implementation shared by
  the compressor and decompressor. Data can be copied into the buffer from an
  external source, copied within the buffer, and individual bytes can be
  read.
- Rewrote the 'FedCompMT' module to use 'GKeyDecomp' and 'GKeyComp' instead
  of code derived from David O'Shea's. This required changes to
  abort_file_op, which previously assumed that any multi-tasking file
  operation could be aborted by closing the file and freeing the heap block
  containing a pointer to its FILE object.
- Made inclusion of various deprecated macro definitions and function
  prototypes conditional upon CBLIB_OBSOLETE.

Release 40 (09 Jan 2011)
- Additional debugging output, and created DEBUG_VERBOSE... macros to hide
  frequent messages. Matching sequences are now reported as closed intervals.
- In the compressor, write_bits with nbits == 0 now behaves as expected
  (flush is instead triggered by nbits == UINT_MAX).
- Fixed a bug where the compressor could enter state Flush wrongly if the
  input buffer were empty upon entering state FindSequence.
- Removed a superfluous variable from the save_compressedM2 function.
- gkeycomp_compress no longer returns status TruncatedInput (flush is always
  required anyway).
- Defined FOURTH_DIMENSION so that most recently (de)compressed byte is never
  copied (17% faster, not significantly worse compression).

Release 41 (26 Jan 2011)
- Modified the compressor to search for the first character of a sequence and
  compare subsequent characters with the previous best match as distinct
  optimised steps. The search for the first character takes into account that
  the ring buffer was zero-initialised, if relevant. These changes increase
  compression speed by up to 187%.
- Moved sprite creation to new functions sf_planets_to_lone_spr,
  sf_sky_to_lone_spr and sf_tiles_to_lone_spr which can be invoked without
  first initialising a sprite area.
- Made the const-ness of OS errors conditional upon CBLIB_OBSOLETE, since it
  was hindering compilation of old code.

Release 42 (28 Jan 2011)
- Now checks that the sum of the read offset and size doesn't exceed the ring
  buffer size, to detect corrupt input.

Release 43 (19 Feb 2012)
- Additional assertions to detect null parameters, string formatting errors
  and sprintf/snprintf buffer overflow/truncation.
- Amended the err_check[_rep], err_check_fatal[_rep] and
  ON_ERR_RPT[_RTN|_RTN_V] functions and macros to accept pointers to 'const'
  _kernel_oserror objects even if CBLIB_OBSOLETE is defined. To avoid
  qualifier-losing casts, this cannot be done to macros that do not consume
  their input, such as ON_ERR_RTN_E.
- Allow sprite names of maximum length (no trailing nuls) to be generated
  when compiled for a C99 library.
- Fixed debugging output of unterminated sprite names.
- Delete redundant memset call in the sf_sky_to_lone_spr function.

Release 44 (07 May 2012)
- A new module 'DirIter' provides iterator objects to allow traversal of a
  directory tree in depth-first order, with optional wildcarded name matching
  and recursion into sub-directories.
- A new module 'StringBuff' provides dynamically-allocated flexible string
  buffers with three methods: append, truncate and undo. These are used by
  'DirIter' to limit the frequency of calls to 'malloc' and 'free'.
- A new module 'PseudoKern' is a veneer to Acorn's C library kernel which
  uses Fortify to do one-byte allocations in every function and returns an
  error if they fail (for tests of error handling). The _swix function is
  the only notable omission.
- Created a new function decode_load_exec for decoding filing system objects'
  load and execution addresses into date stamp and file type.
- All of the new functionality has unit tests.
- A new STRING_OR_NULL macro substitutes an empty string for a null pointer.
- Made the arguments that were added to drag_initialise, entity_initialise,
  Pal256_initialise, scheduler_initialise and ViewsMenu_create (to reduce
  inter-module dependencies) conditional upon CBLIB_OBSOLETE.
- Added an obsolete header file "Err_Rec.h" as a proxy for "Err.h" to
  facilitate compilation of very old software.
- Defined filing system object types as enumerated constants.
- Made the obsolete RoundRobin_resume, RoundRobin_suspend and
  RoundRobin_deregister functions return NULL to facilitate compilation of
  very old software.

Release 45 (09 Dec 2014)
- Added a diriterator_reset function to allow directory iterator objects
  to be reset to their initial state.
- Added a make_path function to ensure that some or all of the directories
  in a file path actually exist.
- Added functions to read and write 32-bit signed integers stored in a file
  using little-endian byte order. Updated load_compressedM and
  save_compressedM2 to use these.
- The pointer returned by the stringbuffer_get_pointer function is no longer
  const-qualified, to allow use with the make_path function and Acorn
  toolbox library veneers which don't accept const strings.
- Two new functions, stringbuffer_prepare_append and
  stringbuffer_finish_append, allow string buffers to be used as the target
  for functions like snprintf.
- String buffer truncate and append operations now remove any pending undo
  even if they have no other effect, so less guesswork is needed by callers.
- The entity_claim function no longer misuses the size of
  WimpReleaseEntityMessage instead of WimpClaimEntityMessage. Luckily they
  are equal.
- Added veneers for SWI OS_File 8, 17 and 19, and also OS_GBPB 10. Updated
  the directory iterator's buffer refill code and the load_fileM2 function
  to use these.
- Titivated debugging output from gkeycomp_compress.

Release 46 (19 Dec 2014)
- Added a generic double-linked list implementation and replaced all other
  linked list code with it.
- Added a new module to manage a list of user data and provide functions to
  enumerate unsaved data, destroy all data, and find data by file name.
  Some functionality overlaps ViewsMenu.h and is expected to supersede it.
- Deferred removal of entries from the views menu is now forced upon program
  exit, to avoid apparent memory leaks.
- Fixed a bug where ViewsMenu_getnext returned NULL_ObjectId if the view
  menu entry straight after that for the 'current' object was pending
  removal even if a menu entry beyond that might not have been.

Release 47 (02 Jan 2015)
- Rewrote the get_date_stamp function to use the os_file_read_cat_no_path
  and os_file_generate_error functions instead of calling _kernel_osfile
  directly.
- Created macro veneers to intercept calls to most Event, Wimp & Toolbox
  library functions, and some of the standard library's I/O functions. The
  intercepted functions return error indications if allocations via Fortify
  fail, to allow error handling to be tested.
- Failure to look up error prefix or buttons string messages no longer
  abnormally terminates execution.
- The first error suppressed no longer turns off error suppression: now
  subsequent errors aren't reported either.
- Removed definition of unused enum value FednetHeaderSize.
- The load_compressedM and load_fileM2 functions now detect failure of the
  standard library's fseek function.
- The fclose_dec function now decrements the count of open files even if
  the standard library's fclose function returns a failure indication.
- A DataLoad message should never be sent in reply to a RAMFetch; the action
  code of the last message sent is now stored with its reference no. to guard
  against that eventuality. (Previously, the buffer allocated for incoming
  data was leaked.)
- msgs_... functions now return a copy of the message token in case of a
  failed lookup, instead of an empty string.
- Modified the Saver module to use the standard library's I/O functions
  instead of _kernel_osfile (when compiled without USE_FILEPERC defined).
- For convenience, added a userdata_destroy function to destroy a specified
  user data item by calling its destructor (if it has one) or alternatively
  simply removing it from the list.
- Got rid of most 'goto' statements.

Release 48 (22 Sep 2015)
- The debugging output function now deals nicely with truncated
  Syslog/Reporter output instead of aborting on assertion failure.
- Added alternative definitions of the standard C library's assert macro to
  ensure that the reason for any assertion failure is properly logged.
- Recategorised per-list-item and per-palette-entry debugging output as
  verbose.
- Added a STRINGIFY macro to convert compile-time numeric constants such as
  __LINE__ into string literals.
- Replaced 'const' with the macro CONST in the definition of function
  set_gadget_faded to ensure that it matches the function's declaration.
- Stopped abusing format specifier %ld for centisecond timer values (since
  the last change to type alias SchedulerTime).
- Deleted a bad assertion (since 2011 if not earlier) that the sprite_name
  parameter was not NULL even if not used in the sf_planets_to_lone_spr
  and sf_planets_to_spr functions. Documented which parameters to conversion
  functions are ignored if no output buffer is specified.
- Switched to signed integer types for all data words in a sprite area
  because some address offsets in a Wimp tool sprites area header are
  negative. The members' type now matches OSLib and RISCOSLib. Updated the
  spritearea_alloc_ext and spritearea_alloc_spr functions to guard against
  negative address offsets.
- Extra debugging output, including printing of events and messages received
  via event_poll or event_poll_idle.
- Added the pseudo_event_wait_for_idle function to poll the event library
  until a null event is received.
- Fixed the function-like macro veneer to optionbutton_get_state by removing
  a spurious extra argument.
- The toolbox library veneer now intercepts iconbar_get_icon_handle,
  window_force_redraw, menu_set_fade and menu_get_fade too.
- The event library veneer now updates the toolbox library veneer's list of
  objects when a toolbox object is auto-created or deleted.
- Added the pseudo_toolbox_object_is_showing function to allow unit tests to
  find out whether an object has been shown by calling toolbox_show_object.
- Added the pseudo_wimp_get_message2 function to allow unit tests to query
  more of the parameters passed to the wimp_send_message function.
- Outgoing Wimp messages are now recorded only if primed by a unit test (in
  which case the call is now suppressed too). The same policy applies to the
  saveas_file_save_completed and saveas_buffer_filled functions.
- The redraw protocol is now completed before returning a simulated error
  from the wimp_redraw_window or wimp_get_rectangle function.

Release 49 (04 Jan 2016)
- Ensured that the drag_finished and drag_aborted flags aren't set to false
  before the drag_start function returns an error. Previously they could be
  left in an inconsistent state.
- Created functions to delete drag claims and reset the mouse pointer shape
  in order to avoid code duplication. Consequently the drag_finalise
  function now zeros the task handle of the current drag claimant instead of
  merely resetting the pointer shape.
- Plugged leaks in the case where a drag has already finished and
  the wimp_send_message function returns an error: any drag claim is now
  deleted and any memory associated with the drag is freed because we can't
  wait for Dragging message(s) to return unacknowledged.
- Corrected a parameter name in the description of type DragFinishedHandler.
- Added veneers and flag bit definitions for DragAnObject SWIs.
- The wimp_poll function is now used instead of event_poll within the
  pseudo_event_wait_for_idle function to avoid messing around with the
  actual event library mask.
- Added a mechanism for unit tests to intercept calls to the standard
  library's exit function.
- Fixed bugs in the intercepted toolbox_create_object function: previously
  the (unpredictable) initial value of an output parameter was printed
  instead of the new object's ID, and passing a null pointer resulted in
  undefined behaviour.
- Added a new function to allow unit tests to specify the information
  returned by subsequent calls to the intercepted wimp_get_pointer_info
  function.
- The toolbox library veneer now intercepts window_set_extent too.
- Fixed a bug in the intercepted wimp_send_message function: it previously
  attempted to fill in the sender's task handle and message reference even
  if not being used to send a user message, thereby corrupting the second
  and third words of non-user message data.
- Modified the intercepted wimp_transfer_block function so that it simply
  copies data from the source to the destination address, ignoring task
  handles, on the assumption that's what unit tests require.
