-------------------- AmigaOS 3.1.4.(1) project -----------------------

hdtoolbox 40.5 (9.11.2016)

- Removed _main.c, hdtoolbox.lnk, preptest.c, printf.c, rdb.h, scsidisk.h,
  sure.h and verify.s

- Small rework to reduce the number of compiler warnings produced.

- Dropped unused code.

- Rebuilt the function prototype header file from source.

- All system header files are included through "headers.h", which also
  includes all global library base pointers.

hdtoolbox 40.6 (10.11.2016)

- Added notes on where partition/volume size calculations are being made
  which may be in need of updating.

- Fixed more compiler warnings, e.g. with regard to possibly uninitialized
  variables.

- Replaced all calls to _exit() with exit(). The _exit() shortcut, which
  would reduce the program size if a custom startup code was used, should
  not be necessary. It certainly can cause problems with the regular
  SAS/C startup code which may not release all the resources allocated

hdtoolbox 40.7 (11.11.2016)

- Changed 'long' to 'LONG' type, 'short' to 'int', etc. where possible.

- Fixed the last few compiler warnings with regard to assignments being
  used as truth values.

- Added workarounds for code that could run into NULL pointers and would
  not stop and abort.

- Memory allocation failure in handlefsm.c/MakeFileSys() is now handled
  correctly.

hdtoolbox 40.8 (11.11.2016)

- Added notes on the ranges of the various drive parameters (number of
  cylinders, number of blocks per cylinder, bytes per sector, etc.).

- RecalcSizeSetup() now prints the sizes of disks in TBytes, GBytes, MBytes
  and KBytes, depending upon how large it is.

- Added subtract_64_minus_32_to_64() function.

- ReCalcSizeText() now prints the sizes of partitions in TBytes, GBytes,
  MBytes, KBytes or bytes depending upon how large they are.

- ChangeDriveType() calculates the product of cylinders per drive and
  number of blocks per cylinder as a 64 bit integer. The warning message
  buffers now have enough room for both this product and the total number of
  blocks (an unsigned 32 bit integer) to be displayed without overflowing.

- DoQuickSetup() now correctly calculates the size of the medium before
  it chooses the sizes of the partitions to be added.

hdtoolbox 40.9 (11.11.2016)

- With scsi.device versions < 43 the sizes and positions of new partitions
  to be added will be limited to the first 4 GBytes of the disk.

hdtoolbox 40.10 (12.11.2016)

- PropGadget parameters are now calculated using 64 bit integer math,
  because all input parameters are 24 bit values. Note: to be on the safe
  side, this code should use 64 bit integer division, too. This is not
  implemented yet.

- Dropped unused math functions from "big_math.c".

- The command line parameters now support a keyword "No4GLimit" which may
  appear at any position in the argument list. If the "No4GLimit" is
  present, then the 4 GByte disk size limit will be deactivated.

- If the icon tool types include an entry "No4GLimit" then the 4 GByte disk
  size limit will be deactivated.

- Simplified the library/font/screen/visualinfo cleanup code.

- Removed the stcl_d() kludge, replacing the conversion with sprintf().

- The total number of cylinders is no longer printed as "*****", but as
  whatever that number is, although it might just overflow the display
  area intended for it.

hdtoolbox 40.11 (12.11.2016)

- The partition default setup (two partitions per disk) miscalculated
  the cylinder size. Fixed.

- The function which converts 64 bit integers to text now makes sure
  that the first digit comes out as the first byte of the buffer.

- You can no longer define new "XT" drive types, but you may edit or
  delete them.

- Disk and partition sizes on display are now rounded up, if necessary.
  For example, a partition smaller than 2 GByte by only a few MBytes
  would previously be shown as being 1 GByte in size only: it now
  shows up as being 2 GBytes in size.

- PropGadget size and position calculations are now being performed
  using 64 bit integers, too, because the involve cylinder numbers.

- The block storage device driver version is now cached, so that
  resizing and dragging partitions does not need to reopen the
  driver again and again.

- Added 4GLIMIT command line option, as well as a tool type.

- PixelCyl() and CylPixel() calculations are no longer macros, but
  functions which use 64 bit integer calculation.

- If the disk size is limited to 4 GBytes, resizing and moving partitions
  beyond the 4 GByte boundary no longer works.

- The test which verifies the scsi.device driver version now correctly
  handles 2nd.scsi.device, 3rd.scsi.device, etc. properly, too.

- Recalculation of the number of cylinders used by a partition now uses
  64 bit integers, too.

hdtoolbox 40.12 (12.11.2016)

- Added another NULL pointer check in the drive parameter test code,
  just to be on the safe side.

hdtoolbox 40.13 (15.11.2016)

- Converting BCPL strings to 'C' strings no longer immediately runs into
  trouble with strings longer than 127 character.

- Fixed a few more compiler warnings related to the use of strlen().

- Figured out that readwrite.c/GetRDB() expects to read RigidDiskBlock
  data with each block containing as many bytes as there are in a sector,
  as reported by a READ_CAPACITY SCSI command. This means that the
  RigidDiskBlock is by no means independent of the medium which it is
  stored on.

hdtoolbox 40.14 (15.11.2016)

- If there is a RigidDiskBlock data structure on the medium which
  uses a shorter sector size than was reported by the medium, it will
  be examined and, if necessary, scanning for valid RDB data will
  resume with the shorter sector size.

- RDB blocks which report themselves as containing more data than
  was read from the medium are now ignored and their block checksums
  are no longer verified.

hdtoolbox 40.15 (16.11.2016)

- Check for number of summed long words was compared directly with
  sector size in bytes. Fixed.

hdtoolbox 40.16 (26.11.2016)

- Shell parameters are now read and processed with ReadArgs(). The
  names of the template parameters match the tool types which the
  correspond to.

- Dropped the 4GLIMIT and NO4GLIMIT parameters and tool types. They
  are replaced by LIMIT_4GBYTE, which can be ON/OFF/TRUE/FALSE.

- The sector size reported by the storage hardware can now be overridden
  with the MIN_SECTOR_SIZE and MAX_SECTOR_SIZE parameters/tool types.
  Each override value must be a multiple of 512 bytes, and it must be
  a power of two.

hdtoolbox 40.17 (11.12.2016)

- Added MASK, BUFMEMTYPE and MAXTRANSFER tool types/command line
  parameters. These options can be used to override the default values
  used by the RDB settings written to disk. The MASK, BUFMEMTYPE and
  MAXTRANSFER  parameters must all be given in hexadecimal notation,
  just as you would in a mount file.

- HDToolbox will respect the MASK and BUFMEMTYPE settings when
  performing disk I/O. It also respects the sector size which the
  disk hardware prefers, even if it differs from the MIN_SECTOR_SIZE and
  MAX_SECTOR_SIZE settings. This is accomplished through a new disk
  I/O translation layer.

- More low level code cleanup to improve readability, e.g. replacing
  bit shift operations by multiplication and division operations,
  respectively, removing unnecessary casts, adding function
  prototypes, declaring local functions as static, etc.

- Added checks for failed memory allocation attempts when copying
  RDB data structures. Previously, this would instantly lead to
  crashes.

- Reading the drive init code did not handle errors properly,
  leading to memory leaks. Fixed.

- Reading the bad block list leaked memory in the same way as
  reading the drive init code. Fixed.

- Converting bad block data into BadBlockLists through MakeBadBlockList()
  no longer crashes if memory allocations should fail. It no longer
  leaks memory or returns a truncated BadBlockList.

- Memory allocated for the DriveInit code is now released properly.
  The DriveInit data is also copied properly.

- Memory allocation failure while copying the contents of a
  RigidDiskBlock structure no longer results in the copy to
  contain truncated information.

- Setting up the default partition layout (two partitions of the
  same size, filling all the available storage space; one single
  partition if push comes to shove) may fail due to memory
  allocation problems. This situation is handled a bit better,
  but there's a whole lot of code which is built on top of it
  which will leak memory...

- Scanned the "Using a hard disk" chapter from the 1990 "Using the
  system software" manual which shipped with the Amiga 3000. This
  is the only comprehensive documentation for the program which
  I could find.

hdtoolbox 40.18 (16.12.2016)

- Converted memory allocations and deallocations from AllocMem()
  and FreeMem() to use memory pools.

hdtoolbox 40.19 (18.12.2016)

- Overriding the sector size reported by the drive now adjusts
  the number of cylinders accordingly, preserving the size of
  the medium (if possible). Previously, the total size of the
  medium would be misrepresented, which would lead to all sorts
  of strange effects.

hdtoolbox 40.20 (31.12.2016)

- SCSI transfer buffers and IO buffers are now always allocated
  consistently of the proper BufMemType, and are no longer taken
  from the stack. This should avoid massive problems in setups
  where DMA is not possible into specific memory types.

- The drive detection mechanism always checked for SCSI-1 and
  disregarded SCSI-2 drive types. Fixed.

- Drive scanning made too many redundant requests and was
  therefore unnecessarily slow.

- Bad block scanning made too many redundant requests and caused
  on some drive/host adapter combinations recoverable warnings.
  40.20 at least attempts to minimize the number of warnings.

- Previous releases read the sector size once, and then continued
  to use the physical sectorsize of the first drive (whether
  detected or undetected) for all further activities. This release
  resets the sector size accordingly before attempting to switch
  to a new drive.

- SCSI direct transfers were indicated with the wrong io_Data size
  and did not follow the recommendations in the RKRMs. This release
  fixes this and sets IO_Length to sizeof(struct HDScsiCmd) as it
  should. The size of the SCSI transfer is in HDScsiCmd, as always.

hdtoolbox 40.21 (21.1.2017)

- Also uses MODE_SENSE now as an attempt to read the block size
  from a device. Apparently, some optical storage devices do not
  support READ_CAPACITY correctly.

- Runs now INQUIRY first before attempting any other command, and
  does not attempt to run this command again if the first try
  fails. This speeds up scanning by a factor of two.

hdtoolbox 40.22 (22.3.2017)

- Following the discussion with Ralph, HDToolBox now first tries to
  check for the presence of drives with TEST_UNIT_READY and assumes
  a direct access device class if the drive does not respond to
  INQUIRY.

- Ensured that the code now communicates the LUN back to the SCSI
  interface layer. Previous code just always used the LUN 0 (and, hence
  potentially formatted the wrong drive... Ooops!)

- In case a drive does not react on TEST_UNIT_READY, it is not added
  to the drive list anymore.

- Still need to fiddle in a flag for direct SCSI transfer... TODO.

hdtoolbox 40.23 (2.4.2017)

- Added a new checkmark gadget to enable the SCSI direct transfer.
  Seems to work according to my tests, at least.

hdtoolbox 40.24 (3.4.2017)

- Modified the manually created gadgets in the intuition requesters
  to draw in the correct color (though not inverse).

hdtoolbox 40.25 (28.4.2017)

- Added support for DOS\8, FFS with long file names. The FFS itself
  is still experimental.

hdtoolbox 40.26 (12.8.2017)

- A couple of pointers were not reset correctly, causing memory corruption
  in case the file system page was re-openend.

- The DirCache and LongFileName flags were not un-checked correctly.

- The memory release of the gadget structures were very questionable
  and could have leaked (or worse)

hdtoolbox 46.1 (12.8.2017)

- This release replaces DOS\8 support with DOS\6 and DOS\7 support.

- Some minor cleanup avoids code replication in multiple places.

hdtoolbox 46.2 (23.9.2017)

- The partition size always selected the largest unit such that the partition
  size is at least one digit large, then rounds up. This is confusing if only
  a single digit remains. Changed this.

hdtoolbox 46.3 (24.9.2017)

- Scanning for drives failed as soon as a device failed to open. While this
  works according to the specs, some devices don't seem to like to open even
  just because no medium is attached.

hdtoolbox 46.4 (2.10.2017)

- Due to a pointer mismatch, the bad block list and the file system table
  was never written back to the drive. Due to another pointer mismatch the
  file system segment failed to update.

hdtoolbox 46.5 (29.10.2017)

- Added a file requester for the file system selection.

- Default gadget settings for custom file systems were wrong. The
  file type selection gadgets should be disabled, and the file type
  identifier should be enabled.

hdtoolbox 46.6 (7.11.2017)

- The file requester gadget is now disabled in case HDToolBox
  cannot open ASL. Note that evn the 46.5 code worked correctly
  in the absence of ASL.

hdtoolbox 46.7 (3.1.2018)

- Refreshes now the window frame after dragging the partition size arrow
  to avoid a graphical glitch.

hdtoolbox 46.8 (13.1.2018)

- Default DOS type for newly created drive types is now DOS/3, not DOS/1.

- Fixed the logic by which selection of drive types disables or enables
  the identifier button.

- Standard FFS/DOS file types no longer appear in the checkbox gadget but
  are selected by the buttons below.

hdtoolbox 46.9 (21.1.2018)

- Fixed an off-by-one error in the computation of the high cylinder within
  a 4GB boundary.

hdtoolbox 46.10 (7.2.2018)

- Fixed a graphical glitch leading to partition size arrow label's text
  damaging the right window border

- Window is now opening in the center of the screen

- Rewrote the startup code, shortening the binary a bit by removing
  all the SAS/C cruft.

hdtoolbox 46.11 (10.2.2018)

- Due to an oversight, the hdtoolbox did not release some resources when aborting.

- The code no longer warns in automatic setup if the FFS is missing on the disk
  but the ROM contains a very recent FFS version (>= V45).

- If the autosetup still warns, "continue" continues now without an FFS being
  installed. This may, unfortunately, result in setups where the user will not be
  able to access all partitions and/or even damage partitions. You asked for it, so
  I afraid this is what you get...

hdtoolbox 46.12 (11.2.2018)

- In case hdtoolbox could not load the FFS, it released the wrong RDB,
  hence causing a complete mess-up.

hdtoolbox 46.13 (4.3.2018)

- HDToolBox now also accepts 0x and $ as prefixes for hex numbers in command line
  arguments and tooltypes.

hdtoolbox 46.14 (7.3.2018)

- Experimentally requesting at least the defect list header when requesting the
  defect list such that the data size is non-zero.

hdtoolbox 46.15 (7.7.2018)

- In case a file system was deleted from the list of file systems, HDToolBox
  forgot to adjust the active element of the listview gadget showing all
  file systems such that the displayed list was inconsistent with the internally
  selected list.

hdtoolbox 46.16 (17.7.2018)

- When probing devices, the HDToolBox no longer continues on the same unit in
  case one of the LUNs already times out.

hdtoolbox 46.17 (28.7.2018)

- The interaction between the long file names and dir cache file system type
  gadgets were not yet correct. Fixed.

hdtoolbox 46.18 (6.10.2018)

- The arcane magic how to arrive at a disk geometry was modified a bit such
  that at least the number of heads coincides with what the drive delivers.

- ReadCapacity no longer falls back to mode sense if the track size is
  to be read.

hdtoolbox 46.19 (6.10.2018)

- The HDToolBox stopped scanning when it failed to detect a unit, and did not
  try any further units behind a non-found unit.

hdtoolbox 46.20 (24.11.2018)

- The HDToolBox always set the low cylinder of the first partition to 2,
  even though this may result in too few blocks for the RDB. Instead, the
  computation ensures now that the RDB is at least 128K in size.

----------------------- AmigaOS 3.2 project --------------------------

hdtoolbox 46.21 (29.12.2018)

- In case a harddisk has more than 2^23 blocks (4GB with 512 byte blocks),
  the default block size will be set to 4096 (8 sectors per block) thus
  allowing the FFS to reduce the size of the bitmap.

- Under the same conditions, the number of blocks per cylinder is rounded
  down to the next multiple of 8 to ensure that partition boundaries lie
  at 4K block bounds. This may help to reduce write-amplification on SD
  cards and harddisks using 4K sectors internally.

hdtoolbox 46.22 (13.05.2019)

- Fixed a bug that caused SCSI Address and Lun always being printed as
  zero in the partitioning window. Possibly introduced with switching
  compiler from Lattice to SAS/C.

hdtoolbox 46.23 (11.06.2019)

- When creating a new file system, HDToolBox now also fills in a more
  reasonable stacksize as the default stack size of 600 bytes is
  probably a bit too low to be practical.

hdtoolbox 46.24 (23.06.2019)

- When changing the block size to something different than 512 bytes/block,
  HDToolBox always created a file system entry with patch flags that patch
  up the byte size. This has the side effect that this file system uses
  the indicated number of bytes per block, regardless of what the RDB has to
  say about it, potentially causing invalid mounts or even data loss. As
  I have no idea what this feature was supposed to do, I am disabling it
  and instead relying on the RDB to provide valid information.

hdtoolbox 46.25 (26.08.2019)

- hdtoolbox resets now some fields before it attempts to read them.

- The READ CAPACITY command used to return the track size interpreted
  the return code incorrectly as track size, so it is the block number
  of the last block within the track. There is now a conditional fix
  for this problem.

hdtoolbox 47.1 (19.10.2019)

- Added the possibility to modify the BUFMEMTYPE of the partition.

hdtoolbox 47.2 (19.10.2019)

- A bit of cleanup: utility.library used for math, exec functions
  instead of sc.lib function, zero-initialized variables moved into
  the bss segment.

- The size of the BufMemType selector was adjusted to fit to the
  rest of the gadgets above.

- Enabling/Disabling the BufMemType gadget did not work consistently.

hdtoolbox 47.3 (7.12.2019)

- For some strange reason, HDToolBox did not refresh the arrow for
  partition dragging if it was at the left edge of the dragging
  area.

hdtoolbox 47.4 (27.1.2020)

- The partition size gadget was not recomputed in case the partition
  was moved by dragging.

- The computation of the partition size for the decision of the default
  file system block size was wrong.

hdtoolbox 47.5 (10.04.2020)

- All figures are now KB, MB, GB, TB

hdtoolbox 47.6 (06.08.2020)

- Fixed a cosmetic issue of the drive type view

hdtoolbox 47.7 (17.8.2020)

- Updated the function which writes the drive definitions to disk.
  It now checks every step along the way that seeking, reading and
  writing works and will show an error message if this does not
  work out. Only if there is no existing drive definition file will
  it attempt to create a new one (previously, it would have tried this
  if any other kind of error had occured). The names of the function
  parameters now follow their purpose, e.g. "flag" now reads as
  "overwrite_def", indicating whether or not an existing definition
  should be overwritten instead of appended to an existing file.

- Updated the function which deals with removal of drive definition
  records from the drive definition file. It now pays closer attention
  to the results/error indications returned by the dos.library functions
  it uses.

- Added a new commmand line parameter and corresponding tool type
  SKIP_WRITE_PROTECTED which can be set to YES/ON or NO/OFF. If
  this switch is enabled, then any attempt to update or overwrite
  the drive definitions file will be skipped if either an existing
  drive definitions file is protected from deletion, or if the
  volume on which the drive definitions file would reside is not
  write-enabled.

hdtoolbox 47.8 (29.8.2020)

- The possible options for the LIMIT_4GBYTE and SKIP_WRITE_PROTECTED
  parameters used to be on/off/true/no, which is more than a little
  inconsistent. The options now are: on/off, true/false and yes/no.

- The partition memory type validation which is part of reading the
  RDB structures should be a little bit more robust now.

hdtoolbox 47.9 (29.10.2020)

- The cylinder numbers could only be up to 6 digits- now extended to 7 digits
  Let's hope no ill overflow happens - at least a test worked nicely

hdtoolbox 47.10 (05.11.2020)

- Move some elements a little bit further to make space for max cylinder number

----------------------- AmigaOS 3.3 project --------------------------

hdtoolbox 47.11 (27.10.2021)

- For reasons hard to fathom "5th.scsi.device" was missing in the list
  of aliases which the scsi.device is actually pretty unlikely to use
  anyway. But we'd better be prepared!


hdtoolbox 47.12 (11.10.2022)

- New and never before seen combined "Molehills to mountain ranges" and
  "No stone unturned" edition! Not for the faint of heart.

- Time for another round of bafflement and general surprises, as
  to be expected when trying to fix just one small aspect of
  HDToolbox: you generally find more than a handful of risky
  code and the always popular buffer overflow. If you're lucky...

  If you are reading this: all I really wanted to do was to check
  if the code which writes RDB data to disk verifies if the
  respective DoIO() CMD_WRITE operations succeeded and follows
  them up with a CMD_UPDATE, eventually. Witness how that ended
  up for me ;-)

- Now linked against amiga.lib V47 which matters because the
  memory pool functions in sc.lib are older and contain bugs
  which had been fixed in amiga.lib more than 20 years ago...

- Shortened CheckParts() and hopefully rendered it more readable.

- Changed AddToCommit() to be less cavalier with pointers to
  pointers and, of course, how these might interact with
  buffer overflows.

- Finally replaced all uses of sprintf() with snprintf(), strcat()
  with strlcat() and both strncpy() & strcpy() with strlcpy(). This
  is undoubtedly going have interesting results :-(

- Replaced magic numbers for buffer sizes with actual sizeof()
  expressions referencing the respective buffer in question. Same goes
  for array lengths. Small exception: MakeFSLabel() now uses
  a constant called FSTYPE_LABEL_NAME_SIZE instead of the
  magic number 24.

- Raised the maximum length of the file system path and file name
  from 100 characters to 256, in case it might become useful. This
  in turn required changes to raise the size of the string gadget
  undo buffer (there is just one) to 256 characters.

- Reworked getFSName() to be less complex and to pay attention to
  the maximum length of the file system name buffer.

- Simplified the FixString() function which fills in the text
  string corresponding to the number entered for an integer
  gadget.

- PartitionSetup() no longer overwrites the partition text for
  SCSI/XT as declared but just puts a pointer to "SCSI" or "XT"
  into the IntuiText.IText field.

- Reworked the redraw_drivelist() and AllocDriveList() functions
  so that they could share code to fill in the respective
  drive information instead of winding up using duplicated
  duplicate code.

- redraw_drivelist() now correctly processes the list of nodes
  it has to update.

- Replaced short/WORD/UWORD where possible with plain int.

- redraw_drivetype() and AllocTypeList() no longer spend the
  equivalent of the entire Project Mercury space program on the
  mighty effort of constructing a single line of text. Mind you,
  this involves strings which are not NUL-terminated and might
  need another round of not-shooting-yourself-in-the-foot-by-accident-again.

- ChangeDriveType() no longer assumes that querying the version of
  the file system always succeeds. Previously, that lead to a questionable
  file system block to be added to the RDB.

- ChangeDriveType() now has the potential to safely write an empty
  RDB to the disk.

- DeleteDiskType() now properly deletes the temporary file it created,
  should something to wrong.

- GetDefs() now checks if what could be a drive definition file is
  non-empty. Also, the full path name to the respective drive
  definition file may now be much longer than 256 characters in
  case it might be useful. Because GetDefs() performs no sanity
  checking or error reporting, I reckon it's a win if a silent
  "we didn't find that file because the buffer for it was just
  too small" is avoided. Also, GetDefs() correctly handles an
  empty directory name, consistency being a virtue or somesuch.

- Increased the size of the device name, as stored in a drive
  record, to be larger than 32 characters.

- write_blocks() now finishes the series of checked CMD_WRITE
  operations with a checked CMD_UPDATE to make sure that the
  data ends up on the disk.

- CommitChanges() no longer leaks memory if something goes
  worng.

- GetDrives() now stops scanning further LUN values for a unit
  number if there is no target which responds to LUN=0. The
  scanning process will continue with the next SCSI ID.

- Notify() now uses varargs parameters.

- Added stch_l(), strlcat(), strlcpy(), vsnprintf() and
  snprintf() to startup.c. stch_l() is a reimplementation
  of a Lattice 'C' library function.

- Replaced the use of stccpy(), which is a Lattice 'C' library
  function, with strlcpy().

- Simplified AllocCommit() which would use clever pointer arithmetics
  involving multiplication and other such fancy stuff, which is not
  really warranted here.

- VerifyXTError() no longer pokes the cylinder, head, sector and
  block numbers directly into the respective IntuiText.IText buffers
  of the requester which it updates periodically. This information
  is now written into the buffers which the respective IntuiText.IText
  references. This allows buffer overflow testing to be performed.
  Not bad for a function which is useful only for XT-IDE drives.

- The special rules for the DMA address mask which HDToolbox applies
  for device drivers whose version number is < 36 now come with a
  condition: such drivers must be called "scsi.device".


hdtoolbox 47.13 (11.10.2022)

- Lucky number 13!

- Removed scores of unused #include directives from almost all the 'C'
  source code files.

- Removed unused variables, too, especially global variables.

- Fixed a few trivial typos and replaced them with less trivial ones.

- HDToolbox now opens asl.library during startup, but does not insist
  on it actually opening. This may happen if you set up your own installation
  disk and choose not to copy asl.library to it. The ASL file requester
  is now allocated once and will be reused as needed.

  Note that prior to these changes, HDToolbox would reopen asl.library,
  create a new file requester, then free it and close asl.library
  again every time the file requester was needed.

- LowLevelSendIO() now properly initializes all the mode select parameters,
  instead of just setting the first four bytes to zero.

- Turns out that the "headers.h" header file can be a lot shorter.

- The "compiler.h" header file is no longer needed.

- Documented why the local "hardblocks.h" header file is needed and cannot
  be conveniently replaced by the standard <devices/hardblocks.h> header
  file. Read it and, well, be somewhat surprised!


hdtoolbox 47.14 (11.10.2022)

- Found a few more uses of strcpy() which were inherently unsafe, but
  not even entertainingly unsafe. Replaced them with calls to strlcpy().

- HandleName() now uses FilePart() to figure out if a path name was
  provided. This should be simpler than the previous implementation
  which ended up parsing the entire path, shrinking it one segment
  at a time.

- HDToolbox fundamentally plays by the rules of SCSI-1 and SCSI-2,
  which means that SCSI IDs must be in the range 0..7 and the same
  applies to logical unit numbers (LUNs). Yes, this also goes for
  the A4091 which uses a SCSI-2 compliant chip. HDToolbox now
  makes sure that SCSI IDs and LUNs are never greater than 7.
  Previously, you could have used values up to 2^31-1...

- You can now use a project icon to launch HDToolbox. No need to
  manually edit the HDToolbox tool icon itself if you want to
  use HDToolbox with configurations for different devices or
  ID/LUN ranges. This feature was suggested by Thomas Klein.


hdtoolbox 47.15 (13.10.2022)

- Small space savings because DeleteIORequest(), DeleteMsgPort()
  and FreeVecPooled() already check for a NULL argument.

- AddToCommit() no longer prepends a blank space to the device name
  if the respective row is still empty.

- Added safeguards to freeing the same allocation twice by setting
  the pointer to the allocation to NULL. You'd be surprised by how
  many times this was not done...

- AllocVecPooled() now checks if the allocation size is 0 and will
  return NULL if this should be the case. This may have interesting
  consequences, or maybe not.

- Rounding up the total allocation size used by AllocVecPooled()
  has its merits, but it should have rounded up to MEM_BLOCKSIZE
  instead of sizeof(ULONG).

- CopyPartList() would leak memory if even one allocation attempt
  failed. The code kept calling FreeVecPooled() with a NULL pointer
  rather than a pointer to the partition block to be freed.

- Documented why the _BSSBAS and _BSSLEN references in startup.c
  are helpful and what their purpose is.

- More typos fixed, again...



hdtoolbox 47.16 (13.10.2022)

- Delete the only record from the drive definition file and guess
  what happens? HDToolbox will claim that it cannot read from
  the now empty drive definition file. Because you will never
  ever be able to add a drive definition record to the empty
  file, you'll be stuck.

  Added a file size check to remedy the situation.

- Making changes to the drive definitions could accidentally
  prevent you from saving them to disk. Fixed.

- Adding a new drive definition to the file now makes sure
  that the definitions are zeroed before they are written.

- Removed the last and only remaining case of allocating
  memory for a 'struct FileInfoBlock' because it has to
  be long-aligned, you know.

- The locally cached name of the device being used was
  still 33 characters in size. Updated to 108 characters
  to match the actual size.

- Because it's nice not to leak random information, the last
  holdouts (LSEG and BADB blocks) are now zeroed before they
  are filled with data.

- The HDToolbox window never featured any pull-down menus.
  Added "WA_RMBTrap, TRUE," to the window open TagItem
  list for good measure.


hdtoolbox 47.17 (16.10.2022)

- From the "Who ordered that?!?!" department: one more try to
  render the HDToolbox code as is a bit more readable and saner
  because it contains enough relevant code to study when building
  a working replacement. No major code reformatting yet, but I
  see it looming on the horizon :-/

- Identified static data and functions which had not been
  tagged as such, tagging them as "static".

- Changed all functions which still made use of K&R parameter
  declaration to finally face up to C90 rules. Not that they
  became more readable as a result of that, but so there...

- Changed various global variables of type UWORD, int, WORD,
  etc. which were really boolean variables and changed them
  to type BOOL, with the respective initializations of 0 and 1
  to match FALSE and TRUE.

- Collected local variables and function parameters of type
  UBYTE, UWORD, WORD, etc. which were used like plain integers
  and changed them to int, as needed.

- Moved the fancy area fill pattern out of its image.c file
  into where it really belongs.

- Documented how DoReadDefect() and why it works to some degree,
  now that the SCSI documentation which explains all of that has
  been available for some 20+ years. For good measure, changed
  DoReadDefect() not to be recursive.

- Dropped a small number of global variables which were not
  even used after getting initialized.

- Lost the SetSCSI() and SetSt506() functions which turned out
  to be no longer needed after having cleaned out the #ifdef
  ADAPTEC/A2090BADBLOCKS/USEPARK/PATCHIN_BLOCKSIZE/INTERLEAVE_REQ
  sections.

- Replaced all instances of memcpy() with memmove() because it
  actually saves disk space.

- Fixed up the "hardblocks.h" file of ancient times so that its
  PartitionBlock.pb_Environment[] table has room for 20 entries
  such as might be needed to store the DE_BOOTBLOCKS value.

- Initializing the PartitionBlock.pb_Environment[] table now
  makes use of the constants defined in "hardblocks.h" instead
  of magic numbers, e.g. DE_DOSTYPE instead of 16.

- Replaced toupper() with utility.library/ToUpper and isascii()
  and isspace() with local macros. Which saved disk space.

- Simplified MakeFSLabel() so that it no longer uses transcendental
  math functions, or what may have looked like it, just to fill
  the DOSType label string with something readable. Also: filling
  that label string will no longer overflow by accident.

- Replaced the home-grown atol() implementation, which leveraged
  atoi() which in turn built upon a custom conversion function
  called ParseLONG() with a much simpler atoi() implementation
  built around dos.library/StrToLong. This saved disk space and
  rendered the codebase a smidgen saner. Replaced all uses of
  atol() with atoi(). Note: modern strtol() could have handled
  all of that, and the stch_l() functionality, too, but we don't
  want to take sanitizing this code too far.
