Commit Graph

104 Commits

Author SHA1 Message Date
Dietrich Epp 76362fb2c1 Save aliases for local and remote directories
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.
2022-11-16 18:32:52 -05:00
Dietrich Epp 01a3863697 Fix incorrect alignment macro 2022-11-16 18:30:59 -05:00
Dietrich Epp d5bfaa510a Clean up Mac OS GUI code
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.
2022-11-16 18:19:05 -05:00
Dietrich Epp 8e04863cda Fix data paths in generated convert/convert.r
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";
2022-11-13 16:19:41 -05:00
Dietrich Epp 0ba00114d6 Add simple string buffer library 2022-07-16 17:04:27 -04:00
Dietrich Epp ec3c80360f Use more modern C 2022-07-16 16:58:50 -04:00
Dietrich Epp 61e4168fbc Move error codes to separate header file 2022-07-16 16:58:50 -04:00
Dietrich Epp 3f6acc9f42 Use more modern C
While C99 is not supported by old Mac OS compilers, line comments are
supported. Keeping strictly to old C90 style code is annoying without
benefit.
2022-04-21 13:57:17 -04:00
Dietrich Epp 054a4134e6 Fix compiler warnings on Xcode 11 2022-04-14 13:39:42 -04:00
Dietrich Epp 6844e5a271 Update to Xcode 11.3.1 2022-04-14 13:39:42 -04:00
Dietrich Epp 337fd52125 Ignore Xcode user files 2022-04-14 13:39:42 -04:00
Dietrich Epp 2b5f5a2425 Docs: Document archive formats 2022-04-14 12:50:13 -04:00
Dietrich Epp d81cce155d Expand technical documentation
Adds section on safe saving.
2022-04-11 17:16:48 -04:00
Dietrich Epp 3bf095fb49 Make source file headers consistent
- Standardize copyright and license notice
- Standardize header guards
2022-04-10 04:22:58 -04:00
Dietrich Epp ad220442d7 Use -std=c11 when compiling with Bazel
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.
2022-04-10 04:14:14 -04:00
Dietrich Epp 4d4ee214b3 Create classic Mac OS GUI program
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.
2022-04-10 04:09:17 -04:00
Dietrich Epp dd96385d7c Style: Use trailing commas for enums
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.
2022-04-10 03:51:59 -04:00
Dietrich Epp 75f1908690 Add CRC-32 function 2022-04-10 03:37:14 -04:00
Dietrich Epp 2f644a8674 Fix broken Markdown link 2022-04-07 23:45:11 -04:00
Dietrich Epp 0ca2cd7e6a Fix Jekyll baseurl and url 2022-04-07 23:33:24 -04:00
Dietrich Epp 45b93f5300 Update Jekyll config for GitHub Pages 2022-04-07 23:26:37 -04:00
Dietrich Epp c7147b2737 Add script for building GitHub pages to branch 2022-04-07 23:24:34 -04:00
Dietrich Epp e5e7749d2e Collect notes into technical documentation
Creates a Jekyll site containing both personal notes about how
filesystems work on Mac OS, as well as some more general explanations.
2022-04-07 19:40:21 -04:00
Dietrich Epp 3d7537f7f6 Use Mozilla Public License, version 2.0 2022-04-04 13:59:26 -04:00
Dietrich Epp 68665d1fff Update documentation comments in extract.py 2022-04-04 13:54:37 -04:00
Dietrich Epp 36ab91617c VS Code: Use spaces for indenting Python 2022-04-04 13:53:01 -04:00
Dietrich Epp 39ebe32975 Extract hexadecimal constants from enums 2022-04-01 12:17:43 -04:00
Dietrich Epp 4b20b30330 Take Mac OS text encoding constants from headers
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
2022-04-01 12:05:15 -04:00
Dietrich Epp 3dcda5579e Add remaining tests to Xcode project 2022-03-31 15:10:05 -04:00
Dietrich Epp 7ee3dd3d99 Remove duplicate typedef 2022-03-31 15:09:55 -04:00
Dietrich Epp 940614c032 Update Xcode project
Tests pass on Mac OS X 10.4 PPC.

- Added new source files

- The target is now convert_test instead of syncfiles, because that's
  what it is

- Header search paths moved to project settings instead of target
  settings
2022-03-31 15:04:56 -04:00
Dietrich Epp 70abe95ff1 Create a tree structure for storing file metadata
This adds a a "simple" red-black tree that can store a record of each
file both on the local and remote side.
2022-03-30 05:23:37 -04:00
Dietrich Epp 56c8229dd5 Annotate test size 2022-03-30 05:18:21 -04:00
Dietrich Epp c4bf86786e Reorganize
- Extracted functions to //lib:test for writing tests

- Extracted functions to lib/util.h if they are useful outside tests
2022-03-30 03:46:19 -04:00
Dietrich Epp d980169ec6 Add byte order conversion utilities 2022-03-29 15:34:27 -04:00
Dietrich Epp 16f3764790 Update README to reflect new project direction 2022-03-25 15:42:02 -04:00
Dietrich Epp 8e2efa707e Refactor allocation API
This way we don't need to expose MemError() to platform-independent
code.
2022-03-25 13:33:24 -04:00
Dietrich Epp 617bf831d8 Extract common code into //lib package 2022-03-25 01:45:55 -04:00
Dietrich Epp 66d46452ab Remove usage of Carbon from command-line tool
The use of Carbon turns out to be less useful than originally thought,
so it makes sense to remove it.
2022-03-24 23:44:37 -04:00
Dietrich Epp ee685ec9ea Update Xcode project
Test passes on Mac OS X 10.4 again.
2022-03-24 23:44:37 -04:00
Dietrich Epp ecc7b30844 VS Code: refine indentation settings 2022-03-24 23:44:37 -04:00
Dietrich Epp 5ad207f785 Embed character map tables in executable
This simplifies the conversion test, since we don't need to be careful
about which data we run the conversion test in. It will also simplify
the command-line conversion tool and its distribution. The classic Mac
OS version of this program will continue to embed conversion tables in
the resource fork.
2022-03-24 23:44:37 -04:00
Dietrich Epp 6267606293 Run test on Mac OS X
Add an Xcode 2.5 project, and define USE_CARBON for Mac OS X testing.
Tested on Mac OS X 10.4.
2022-03-24 12:26:38 -04:00
Dietrich Epp 651a2fb674 Add .gitignore for generated data 2022-03-24 12:03:20 -04:00
Dietrich Epp d6cb7935fe Define include path in one place 2022-03-23 18:04:39 -04:00
Dietrich Epp bc46e1e982 Rename src directory to convert 2022-03-23 17:51:55 -04:00
Dietrich Epp 491950e57d Allow data generator to be run directly from Bazel
When run from Bazel without additional arguments, it will write data
files directly to the source directory.
2022-03-23 12:00:18 -04:00
Dietrich Epp 7e7a6a9da2 Test line break conversions 2022-03-23 03:00:52 -04:00
Dietrich Epp 798d5eca5c Remove unused Bazel setting 2022-03-23 02:08:01 -04:00
Dietrich Epp c96bb9cd0a Implement extended ASCII converter engine
This adds support for the simplest 8-bit character encodings, which are
compatible with ASCII.
2022-03-23 01:26:25 -04:00