Dietrich Epp
f49e81388c
Generate charmap string resources
...
The string resources contain names of scripts, regions, and character
maps.
2022-03-15 15:34:39 -04:00
Dietrich Epp
ca074ce387
Write conversion from script and region to charmap
...
The generation tool creates a GetCharmap function in C which takes the
script and region as input and returns the charmap index.
2022-03-15 14:31:12 -04:00
Dietrich Epp
e901b5baaa
Parse script and region constants as numbers
...
This simplifies code generation, since we don't have to worry about what
happens if two symbolic constants have the same value.
2022-03-15 13:51:23 -04:00
Dietrich Epp
022d11fa14
Parse character map information
...
This adds associations between scripts, regions, and character maps, and
parses them from a Go utility.
2022-03-15 13:38:45 -04:00
Dietrich Epp
7bc44f4a5a
Add script and region constants
...
These are extracted from the Universal Interfaces Script.h file.
2022-03-15 12:07:16 -04:00
Dietrich Epp
8713cb96aa
Remove duplicate README
...
This prevented the source code from being checked out on
case-insensitive file systems.
2022-03-14 21:54:16 -04:00
Dietrich Epp
faa2460468
Add charmap parser
2021-12-14 23:48:47 -05:00
Dietrich Epp
d2401b963a
Add Apple Unicode mapping data
...
Mirrored from ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/APPLE
2021-12-14 15:50:04 -05:00
Dietrich Epp
db4187b65b
Refactor table generator, handle line breaks
...
Extract table generation to its own file, table.go, and refactor the
interface. This exposed an inconsistency in the way that line breaks
were handled: both CR and LF on the Mac side were mapped to LF on the
UTF-8 side, but when the conversion table was inverted, the reverse
mappings would conflict. Previously, there was no explicit handling for
it, and whichever Mac charecter had a higher byte value would take
precedence. Conflicts are now detected and return an error, so line
breaks must be mapped explicitly. The new code maps CR, LF, and CRLF to
CR when converting UTF-8 to Mac.
2021-12-14 13:12:52 -05:00
Dietrich Epp
d77ccf009e
Extract packbits into separate repository
2021-12-14 12:23:14 -05:00
Dietrich Epp
f39ab85222
Ignore conversion table generator binary
2021-12-14 11:01:37 -05:00
Dietrich Epp
2768a0c856
Add plain text and XML files to filter list
...
GitOrigin-RevId: 2c5ded355b43463d20e6e9e65c32a6c566df82a7
2021-03-26 03:47:55 -04:00
Dietrich Epp
4d82709bd4
Implement resource file handling
...
This was previously implemented, but lost. The previous implementation
was probably destroyed when testing this tool.
GitOrigin-RevId: e1a41fc5290e57510c252c8404db86afa1913eba
2021-03-26 03:47:55 -04:00
Dietrich Epp
6b7a783916
Move extension patterns from code to data
...
GitOrigin-RevId: 2ea4f224f7f00bf7be5f73dd77c4ebe3d69f53ae
2021-03-26 03:47:55 -04:00
Dietrich Epp
79bca732c8
Convert resource files
...
GitOrigin-RevId: ee47a60e097c818def27f799dfd97c1396be2a68
2021-03-24 04:20:46 -04:00
Dietrich Epp
03ae6a672d
Refactor: Pass conversion mode to file converter
...
This is preparation for the resource fork converter.
GitOrigin-RevId: b50299047964e2d6d4a8b6ce3178639ac23f8d50
2021-03-24 04:20:46 -04:00
Dietrich Epp
910039b77a
Convert files incrementally
...
The previous implementation read the entire file into memory and then
processed it. This version uses reasonably-sized buffers and can handle
files of any size.
Since this new conversion code is a bit more complicated, a test suite
has been added which can be run on ordinary Unix systems.
GitOrigin-RevId: acc7be277103fad1da2d0ca16d1a84be11802fbf
2021-03-24 04:20:45 -04:00
Dietrich Epp
25055b63dc
Spin cursor during tool execution
...
GitOrigin-RevId: 3e081374ffbad7e8b5359892733c4b0463fc6a43
2021-03-24 04:20:45 -04:00
Dietrich Epp
d74cfbf9b1
Don't print progress when -quiet is specified
...
GitOrigin-RevId: de4cedd537717df4b68e18c2027f3ecad218cbbc
2021-03-19 14:27:28 -04:00
Dietrich Epp
a85d31c36a
Fix Unix to Mac line ending conversion
...
GitOrigin-RevId: fac10ee30d9bcbb6f902c46509d64efb249b6cd4
2021-03-19 14:27:27 -04:00
Dietrich Epp
f591e3ac64
Add MIT license
...
GitOrigin-RevId: c69146b5d3e315380a24b9f168cc50cdcfa25149
2021-03-17 21:11:13 -04:00
Dietrich Epp
a6ad0d0a96
Copy C++ files with SyncFiles
...
GitOrigin-RevId: e1b21d525476815ba8b10780eb2e69b57264a212
2021-03-17 21:05:19 -04:00
Dietrich Epp
c058e68d93
Add README for table generator
...
GitOrigin-RevId: 8062aa48890eb74a92b3322fdf306df9e5ecdee2
2021-03-17 21:05:19 -04:00
Dietrich Epp
912c13f193
Add README for SyncFiles
...
GitOrigin-RevId: fc9eef02792debc4929a47830ac534d4c1c4515d
2021-03-17 21:05:19 -04:00
Dietrich Epp
34eb2cdacd
Update makefile dependencies
...
GitOrigin-RevId: 89390979c37c63d5a0d973a2521cf53b8fa8f76c
2021-03-17 21:05:19 -04:00
Dietrich Epp
d0cbe697d9
Fix UTF-8 to Macintosh charset conversion
...
GitOrigin-RevId: f0d7fbd465cb5955be3bbde135801e1fd9701e33
2021-03-17 21:05:19 -04:00
Dietrich Epp
1315f49c1e
Add flags for debugging charset conversion tables
...
GitOrigin-RevId: d993358c037d8edd00d5819cac852c7822a89d3f
2021-03-17 21:05:18 -04:00
Dietrich Epp
da5a06e76e
Use temporary directory on correct volume
...
GitOrigin-RevId: eecf5d8df6a24aa2afa6fc115950b86235d06fb7
2021-03-17 21:05:18 -04:00
Dietrich Epp
28e378fffb
Fix incorrect types for vRefNum and parID
...
GitOrigin-RevId: 04b016cb9a491a9c6ffc5f1e4df0bdc49f349ecb
2021-03-17 21:05:18 -04:00
Dietrich Epp
a13293fc92
Only move and rename as necessary
...
GitOrigin-RevId: e3af6ccfdfa3fdb840b745afd225f270ea6c4070
2021-03-17 21:05:18 -04:00
Dietrich Epp
ff6149d125
Handle case where temporary file exists
...
GitOrigin-RevId: 029ce369a00c5f18bc50174eb4fde677b4984f1b
2021-03-17 21:05:17 -04:00
Dietrich Epp
4e0d9b16c7
Refactor SyncFiles
...
- Split into multiple source files
- Create new file action enum
- Push or pull must be explicit
GitOrigin-RevId: c6ccd85f1452a1333a1deb3495792451a0b8f860
2021-03-17 21:05:17 -04:00
Dietrich Epp
a207eb6bd2
Begin SyncFiles pull implementation
...
GitOrigin-RevId: 6cb8d8cec6ca7d0edb055e139f6e8b05512aa4ec
2021-03-17 21:01:04 -04:00
Dietrich Epp
9945fc0383
Add generator for UTF-8 to Macintosh tables
...
GitOrigin-RevId: 96f2909330b94c895688bfa2f5b50c3e4408fe54
2021-03-17 21:01:04 -04:00
Dietrich Epp
fbe60364fe
Fix volume for temporary files
...
GitOrigin-RevId: cde5591cac6bb2060fb277c9400989252120e8a1
2021-03-17 21:01:03 -04:00
Dietrich Epp
94e38f1274
Expand verbose logging messages
...
GitOrigin-RevId: 893875a88e0e8f0b15f05f9ea12fefbbb3fa65c6
2021-03-17 21:01:03 -04:00
Dietrich Epp
da194b749b
Add -verbose flag to SyncFiles
...
GitOrigin-RevId: b9f0310b4a55d45fa4b0b305d3934b1bc5f8ac48
2021-03-17 21:01:03 -04:00
Dietrich Epp
b1a85945d7
Copy files to destination directory
...
GitOrigin-RevId: 34f4a68c4aa26def783f1192a26768b4393ed087
2021-03-17 21:01:03 -04:00
Dietrich Epp
1264148f6d
Add error handling helper functions
...
GitOrigin-RevId: 9cfe2133b3494b0a676e5d1ee4fac11562eb18d0
2021-03-17 21:01:02 -04:00
Dietrich Epp
00d3419f62
Join source and dest files
...
GitOrigin-RevId: cc2aaa3abdbdcb45ed189ed4ea7d3e37f7641408
2021-03-17 21:01:02 -04:00
Dietrich Epp
9e75a993fc
List files in source and dest directories
...
GitOrigin-RevId: 3c8cc5ea073234501452fe2cfb9c0c133f7d83a8
2021-03-17 21:01:02 -04:00
Dietrich Epp
cce3f39184
Clang format
...
GitOrigin-RevId: 90772439cd008f07b4ead07f68dacf9594eb9d0e
2021-03-17 21:01:02 -04:00
Dietrich Epp
bd293bb3dd
List files in directory from sync tool
...
GitOrigin-RevId: 738baa6a94ac864f121167798e4ea93f95d1c420
2021-03-17 21:01:02 -04:00
Dietrich Epp
fa2f0d12a0
Add Mac OS sync tool
...
GitOrigin-RevId: 2f0f21e037dd7c00fffd0827e80438a5de1968d7
2021-03-17 21:01:01 -04:00