------------------------ AmigaOS 4 project ---------------------------

Edit 37.3 (2.3.2004)

- Moved to SAS/C build (used to be Lattice 'C' 5.10b).

- No longer references 'struct DosLibrary'.

- Fixed a potential problem in the insert() function, which may
  have been caused by an uninitialized variable.

Edit 50.1 (21.3.2004)

- Lost all the global data structures.

- Replaced the compiler program startup code.

- Now uses utility.library/Stricmp instead of the SAS/C specific
  stricmp() function.

- Ported to the PowerPC.

Edit 51.1 (10.5.2004)

- Now exits cleanly if started from Workbench.

Edit 51.2 (24.11.2004)

- Added experimental localization.

Edit 51.3 (9.6.2005)

- The PPC version no longer allocates MEMF_PUBLIC memory.

- Removed empty sections.

- The PPC version has only .text and .rodata sections so the
  "P"ure flag is set again to allow to make it resident.

- Now builds with -Wall -Werror.

- Now builds with gcc 4.0.0.

Edit 51.4 (4.7.2005) 

- Entering an unknown command called the error() function without
  the required pointer to the global data. Unfortunately its a varargs
  function, the first parameter passed should be a pointer but was an
  integer with a value of 0, and gcc did NOT complain about this (it
  complains when passing NULL instead of 0 but it doesnt when passing 0
  instead of NULL). Thanks to Joakim Nordstrm for reporting the crash.

- The error() function received a variable argument list and called VPrintF()
  but was missing the VARARGS68K attribute and the va_startlinear() and
  va_getlinearva() calls, fixed.

- Adjusted to current include files

Edit 52.1 (9.12.2006)

- Bumped to V52; no functional changes.

Edit 53.1 (2.5.2011) 

- Minor cleanup, fixing the case of file names and making the resulting
  code compile properly. No functional changes.

Edit 53.2 (2.5.2011) 

- Figured out how to fix the "DTA" command and not make it trash the
  line buffer. Same thing for the "SA" and "SB" commands.

- Reading a line from the file no longer forgets to update the line
  length information in the buffer prefix.

- Changed the line buffer allocation to multiply by the buffer character
  size (= CHARSIZE) rather than conveniently shifting stuff around. This
  now looks like it might make better sense.

- Corrected the use of ZERO and DOSFALSE in the code. It now looks as
  if this actually makes sense.

- Discovered that BCPL doesn't have a modulus operator. The 'C' code
  does and should use it.

- Figured out that the buffer bounds checking performed by all the code
  was completely bogus, as it always required two extra bytes to store
  file names, search patterns, etc. and would have overrun the buffer
  even if the bounds checking hadn't detected any issues. The new
  code now uses buffers with two extra slots of storage. Yes, the
  two extra slots are for what amounts to NUL-terminated BCPL strings.

- Made sure that in all the places which bothered about having NUL-terminated
  strings there's actually a NUL put where it is needed.

- Added a bit of documentation explaining the odd data structures and their
  limitation. For example, a fully qualified file name cannot be longer than
  120 characters because that will cause big trouble with the length field
  of the BCPL strings Edit uses.

- This might be the first version of the Edit shell command in more than
  20 years which actually does what it's supposed to...

Edit 53.3 (2.5.2011)

- Reworked the function prototypes, adding more const qualifiers

- Removed some more of the Lattice 5.04 era type casts which are not
  actually necessary.

- Reinstated the BOOL datatypes, as these were used only locally and 
  did not have to be of BOOL32 type anyway. The use of BOOL32 
  suggested that there might have been more about these parameters 
  than was really the case.

- The command's documented WIDTH and PREVIOUS arguments now actually 
  work. They never did, and only the equivalent "OPT W" and "OPT P" 
  options were ever implemented.

Edit 53.4 (4.5.2011) 

- Fixed a bug that prevented string qualifiers from working at all.

- Created AutoInstall and mkrelease scripts

Edit 53.5 (8.5.2011)

- Ran the entire code through GNU indent in the hope of improving
  overall readability. No functional changes should have resulted
  from this.

- Replaced one odd VPrintf() with Printf(), as used by the 'G' 
  command.

- Added a couple of notes to explain why this Edit version looks like
  it does.

Edit 53.6 (4.12.2015) 

- Internal build refactoring. 

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

Changes for release 45.1 (21.4.2018)

This is a backport from the 53.6 release of edit (see above), so
all the fixes and changes made on the path from 37.3 to 53.6 are
included here, though adapted again for 68K. Only a couple of
minor changes have been made:

- Again uses the SAS/C magic to access objects with program lifetime
  through A4 easily, which reduces the overhead and keeps the code
  short.
- Removed a couple of Os4-isms, such as Delete() instead of 
  DeleteFile() and pr->pr_CliNum instead of pr->pr_TaskNum.
