QMail components
QMail reference
Platform
Source snapshot: 9b4f8a3 (2026-09-23); retained QMail clone, including M7.
Working = implemented in this snapshot, not a new runtime/test certification.
Partial = an identified implementation/exposure gap; obsolete = retained compatibility only.
Entry points and static functions are selected navigation anchors; full lexical index: function-index.txt.
Used by / Tests list selected source references (including callback registration), not a proven dynamic call graph.
Tests were inspected, not executed; use tools/test.ps1 with isolated scratch data.
Old paths come from docs/path-map.txt; absent mappings denote additions after the move.
Paths service and long paths
Purpose Publish immutable process roots, derive installed paths and adapt UTF-8 paths to native/extended Windows file operations.
Files src/platform/paths.c
src/platform/win/qmail.manifest
Old paths No changed-path mapping for these files.
Public header include/qmail/paths.h
Entry points src/platform/paths.c:76 :: qmail_paths_publish_roots()
src/platform/paths.c:161 :: qmail_paths_client_data()
src/platform/paths.c:214 :: qmail_paths_to_native()
src/platform/paths.c:305 :: qmail_paths_fopen()
src/platform/paths.c:452 :: qmail_paths_fopen()
src/platform/paths.c:303 :: qmail_paths_sqlite_vfs()
src/platform/paths.c:523 :: qmail_paths_sqlite_vfs()
src/platform/paths.c:66 :: qmail_paths_set_data_dir()
Important static functions src/platform/paths.c:27 :: init_lock()
src/platform/paths.c:33 :: lock()
Owns Installed layout names, root lifetime, long-path wrappers and SQLite VFS selection.
Used by src/app/main.c
src/app/startup.c
src/coin/filesystem.c
src/coin/filesystem_directories.inc
src/coin/sha256_util.c
src/mail/qmail_receive_object_reconstruct.c
src/mail/qmail_receive_object_transfer.c
src/mail/qmail_send_object_transfer.c
Side effects Paths setters mutate synchronized process roots; file wrappers/migration write filesystem state; font locator reads installed fonts/registry.
Tests tests/integ/hosting_adapter_test.c
tests/unit/long_path_test.c
tests/unit/long_path_transfer_test.c
tests/unit/migration_test.c
tests/unit/paths_test.c
tests/update/component_test.c
tests/update/install_launch_test.c
tests/update/manifest_check.c
Platforms Windows; POSIX branches/dependencies where present. Linux/macOS runtime unverified in M13.
Status working
Startup migration
Purpose Migrate program/settings layout into Client_Data while retaining existing data.
Files src/platform/migration.c
Old paths No changed-path mapping for these files.
Public header include/qmail/migration.h
Entry points src/platform/migration.c:629 :: qmail_migration_run()
src/platform/migration.c:148 :: qmail_migration_step_done()
Important static functions src/platform/migration.c:87 :: journal_read()
src/platform/migration.c:106 :: journal_write()
Owns Startup migration markers and helper migration policy.
Used by src/app/startup.c
Side effects Paths setters mutate synchronized process roots; file wrappers/migration write filesystem state; font locator reads installed fonts/registry.
Tests tests/unit/migration_test.c
Platforms Windows; POSIX branches/dependencies where present. Linux/macOS runtime unverified in M13.
Status working
Font roles and OS locator
Purpose Resolve regular/medium/semibold/mono OS font files and ordered script fallbacks without embedding fonts.
Files src/platform/font_locator.c
src/platform/font_locator_win.c
src/platform/font_locator_posix.c
Old paths No changed-path mapping for these files.
Public header include/qmail/font_locator.h
Entry points src/platform/font_locator.c:94 :: qm_font_locate()
src/platform/font_locator.c:118 :: qm_font_locate_all()
src/platform/font_locator.c:140 :: qm_font_fallbacks()
src/platform/font_locator.c:201 :: qm_font_fallback_for_codepoint()
src/platform/font_locator.c:42 :: qm_font_locate_report()
Important static functions src/platform/font_locator.c:67 :: role_name()
src/platform/font_locator.c:78 :: resolve_logged()
src/platform/font_locator_win.c:85 :: wide_to_utf8()
src/platform/font_locator_win.c:91 :: utf8_to_wide()
Owns Role-to-file policy, Windows font registry resolution and fallback order.
Used by src/gui/host/host_ops.c
Side effects Reads installed font files/Windows registry and caches diagnostic state; does not copy or embed fonts.
Tests tests/unit/font_locator_test.c
tests/gui/render/test_font_fallback.c
Platforms Windows; POSIX branches/dependencies where present. Linux/macOS runtime unverified in M13.
Status partial; Windows locator implemented. macOS CoreText and Linux fontconfig resolution remain TODO; POSIX uses fixed candidate lists.
Platform shims
Purpose Provide threading, time, memory and filesystem primitives for retained coin/transport code.
Files src/platform/platform.c
Old paths vendor/core/src/platform.c -> src/platform/platform.c
Public header include/core/platform.h
Entry points src/platform/platform.c:33 :: platform_init()
Important static functions src/platform/platform.c:111 :: win_thread_proc()
Owns Core per-OS primitives.
Used by src/app/desktop_api.c
src/app/desktop_api_more.c
src/coin/coin_crypto.c
src/coin/coin_file.c
src/coin/drd_local_store.c
src/coin/drd_sync.c
src/coin/encryption_key.c
src/coin/executor.c
Side effects Paths setters mutate synchronized process roots; file wrappers/migration write filesystem state; font locator reads installed fonts/registry.
Tests tests/integ/hosting_adapter_test.c
tests/live/large_send_live_probe.c
tests/live/sync_notify_live_probe.c
tests/unit/desktop_api_test.c
tests/unit/long_path_test.c
tests/unit/long_path_transfer_test.c
tests/unit/sdk_directory_test.c
tests/unit/server_adapter_test.c
Platforms Windows; POSIX branches/dependencies where present. Linux/macOS runtime unverified in M13.
Status working; Windows and POSIX implementations are present; no platform build was run in M13.