Currently, only the 'open application' event is actually handled, but
handlers for the required core events are installed. The open
application event causes the program to create a new document when
opened.
The strutil code has mostly been replaced by the new `PStrBuilder` type,
and the remaining function from strutil was really just a checked memcpy
in one place which is now moved inline.
The `EXIT_ASSERT` macro is obsolete and has been removed.
Previously, various error handling functions were defined, but not all
of them were even used. The new error handling functions handle the most
common cases:
- Assertions. These can be handled with `ASSERT()`, which gives the
error location for debugging.
- Errors we don't know how to handle, like GetNewWindow returning NULL.
These can be handled with `EXIT_INTERNAL()`, which gives the error
location for debugging.
- Out of memory conditions. These can be handled with `ShowMemError()`.
- System errors in response to user operations. These can be handled
with `ShowError()`.
Previously, the local and remote directories would not get saved with a
project. This makes it so that alias data is populated for the local and
remote directories.
Include paths are updated to include the directory. It seems that
CodeWarrior will search for include files recursively, which means that
"error.h" may resolve to the wrong file (there are two). I am unsure of
the rules CodeWarrior uses to find header files.
Support for older versions of Universal Interfaces has been added.
The project code has been reworked after thoroughly reviewing Inside
Macintosh: Files. It is not complete, but it compiles, and the behavior
of the Save / Save As commands have been thought out more carefully.
Previously, the Rez file would have entries like this:
read 'cmap' (128, "Roman") "roman";
That has been fixed to show this:
read 'cmap' (128, "Roman") "charmap_roman.dat";
The -std=c89 option is too pedantic, and the old CodeWarrior compiler
accepts various extensions (like line comments) anyway. Rather than
using -std=c89 to ensure the code is compatible with old compilers, we
will actually test on the old compilers.
The GUI program's project is not checked in. It was compiled and tested
with CodeWarrior Pro 4.
The GUI program allows users to create new synchronization projects,
select folders to synchronize, and save and open projects. The code is
probably broken and buggy, and probably dereferences NULL pointers here
and there, but the basic shell is there.
The trailing comma is supported in MPW and GCC. It fixes the formatting
issue with clang-format and makes cleaner diffs, so trailing commas have
been added to enums and clang-format has been run over the sources.
Among other uses, these constants are used on HFS+ volumes to choose
which encoding to use when converting Unicode filenames back to an 8-bit
string for old Mac OS APIs.
This is documented in TN 1150 under "Text Encodings".
https://developer.apple.com/library/archive/technotes/tn/tn1150.html