Files
ddidderr 8b99e9607c feat(reconstruction): complete binary-backed C recovery
Replace the partial mechanics transcriptions with a separate, readable C11
reconstruction of the complete Win16 image while preserving the original raw
Ghidra export as immutable evidence. Cover all ordinary and overlapping entry
points, Borland runtime behavior, Win16 imports, segmented data, callbacks,
resources, indirect control flow, physics, rendering, persistence, and
startup/shutdown lifecycles.

Add deterministic extraction and audit tooling plus address-linked ledgers for
functions, imports, DGROUP ranges and objects, relocations, resources, and
callbacks. The final gate records zero raw, partial, restored, unknown,
blocked, or unclassified required units. Keep the semantic-fidelity boundary
explicit: the portable C is not claimed to reproduce a byte-identical Borland
NE build.

Add strict focused harnesses for every reconstructed C unit, exact resource
round-trip checks, and a 16-bit Borland Real48 reference probe. No Rust source
or Cargo metadata is changed in this phase.

Test Plan:
- `bash original/tools/test_reconstructed_c.sh` -- passed
- `bash original/tools/probe_real48_reference.sh` -- passed bit-for-bit
- `python3 original/tools/audit_reconstruction.py --require-complete` -- passed
- `git diff --cached --check` -- passed
- `git diff HEAD -- '*.rs' Cargo.toml Cargo.lock` -- empty
2026-08-23 16:41:17 +02:00

76 lines
3.2 KiB
C

#ifndef TDKPIN_APPLICATION_H
#define TDKPIN_APPLICATION_H
#include "tdkpin_borland_objects.h"
#include "tdkpin_object_windows.h"
extern Win16FarPtr g_object_windows_application; /* 1028:064e/0650 */
extern HINSTANCE16 g_win16_previous_instance; /* 1028:06fc */
extern HINSTANCE16 g_win16_instance; /* 1028:06fe */
extern uint16_t g_win16_show_command; /* 1028:0700 */
extern Win16FarPtr g_win16_message_box; /* 1028:0666/0668 */
extern const char object_windows_error_format[]; /* 1028:0698 */
extern const char object_windows_error_caption[]; /* 1028:06b3 */
Win16FarPtr object_windows_application_construct(
Win16FarPtr object,
uint16_t vmt,
Win16FarPtr name); /* 1018:1a61 */
void object_windows_application_destruct(
Win16FarPtr object, uint16_t vmt); /* 1018:1b08 */
bool object_windows_application_idle_default(
Win16FarPtr application); /* 1018:1b35 */
void object_windows_application_init_application_default(
Win16FarPtr application); /* 1018:1b4b */
void object_windows_application_set_active_dialog(
Win16FarPtr application,
Win16FarPtr dialog); /* 1018:1bdf */
void object_windows_application_message_loop(
Win16FarPtr application); /* 1018:1bfc */
void object_windows_application_run(
Win16FarPtr application); /* 1018:1bb0 */
void object_windows_application_initialize(
Win16FarPtr application); /* 1018:1b57 */
void object_windows_show(
Win16FarPtr object, INT16 command); /* 1018:0e9e */
bool object_windows_application_preprocess_message(
Win16FarPtr application, MSG16 *message); /* 1018:1c7f */
uint16_t object_windows_application_process_dialog_message(
Win16FarPtr application, MSG16 *message); /* 1018:1cd6 */
bool object_windows_application_process_accelerator(
Win16FarPtr application, MSG16 *message); /* 1018:1d22 */
bool object_windows_application_process_mdi_accelerator(
Win16FarPtr application, MSG16 *message); /* 1018:1d64 */
bool object_windows_application_can_close(
Win16FarPtr application); /* 1018:1f56 */
Win16FarPtr object_windows_window_get_mdi_client_default(
Win16FarPtr window); /* 1018:10e9 */
Win16FarPtr object_windows_application_validate_window(
Win16FarPtr application, Win16FarPtr window); /* 1018:1db1 */
Win16FarPtr object_windows_application_make_window(
Win16FarPtr application, Win16FarPtr window); /* 1018:1e39 */
int16_t object_windows_application_exec_dialog(
Win16FarPtr application, Win16FarPtr dialog); /* 1018:1eb0 */
void object_windows_application_error(
Win16FarPtr application, uint16_t error); /* 1018:1f14 */
/* Platform bridge for virtual ObjectWindows calls. */
bool win16_call_object_bool_method(
Win16FarPtr procedure, Win16FarPtr object);
bool win16_call_application_message_filter(
Win16FarPtr procedure, Win16FarPtr application, MSG16 *message);
Win16FarPtr win16_call_object_far_method(
Win16FarPtr procedure, Win16FarPtr object);
Win16FarPtr win16_call_application_window_method(
Win16FarPtr procedure,
Win16FarPtr application,
Win16FarPtr window);
int16_t win16_call_application_dialog_method(
Win16FarPtr procedure,
Win16FarPtr application,
Win16FarPtr dialog);
int16_t win16_call_object_int_method(
Win16FarPtr procedure, Win16FarPtr object);
#endif