Word Unperfect
public
Read
Owner: themaster
Branch: main
Commits: 0
Git CLI clone URL
git clone https://www.xt-emporium.com/git/word-unperfect.git
Fullscreen desktop URL
Code
Commits
History
Branches
Bug Reports
Discussions
Compare
Settings
word-unperfect
/
rev
/
wp_format_gate.h
File editor
#ifndef WP_FORMAT_GATE_H #define WP_FORMAT_GATE_H #include "wp_layout_shared.h" #include <stdbool.h> #include <stddef.h> #include <stdint.h> /* Host-safe ports of the recovered format-gate / glyph-slot helpers around * 1000:7aa4 through 1000:7cff. The original routines treat a BX/SI near * pointer as a five-byte slot, poll overlay hardware, patch video/glyph tables, * and adjust layout_refcount_44c6. This module preserves the byte/word/refcount * semantics and reports overlay/hardware paths as booleans/counters. */ typedef struct WpFormatGateSlot { uint8_t selector; /* recovered high byte used by layout_init_fmt_gate_and_refcount */ uint8_t lead_byte; /* slot byte at +0 / *SI in the decompiled code */ uint16_t run_count; /* slot word at +1 */ int8_t age; /* signed slot byte at +3 */ uint8_t flags; /* host-visible byte used by layout_word_pair_init */ uint8_t payload_tag; /* safe stand-in for the in_BX+5 glyph payload pointer */ } WpFormatGateSlot; typedef struct WpFormatGateResult { WpFormatGateSlot old_slot; WpFormatGateSlot new_slot; uint8_t old_parser_runtime_flags; uint8_t new_parser_runtime_flags; uint8_t old_secondary_stream_flags; uint8_t new_secondary_stream_flags; uint8_t old_runtime_flags; uint8_t new_runtime_flags; int old_layout_refcount; int new_layout_refcount; uint8_t old_fmt_gate; uint8_t new_fmt_gate; uint8_t selector; uint8_t token; uint8_t glyph_request_tag; size_t init_calls; size_t slot_zeroes; size_t gate_reuses; size_t glyph_rule_calls; size_t glyph_load_setups; size_t video_patches; size_t overlay_polls; size_t aux_clears; size_t word_pair_inits; size_t display_routes; size_t refcount_increments; size_t counter_resets; size_t failfast_hints; size_t high_scratch_gates; size_t run_count_increments; size_t word_pair_flag_sets; size_t set_refcount_f8; size_t repeat_batches; size_t repeat_iterations_requested; size_t repeat_iterations_simulated; bool parser_busy_skip; bool coalesced_repeat; bool glyph_counter_wrapped; bool gate_char_refcount_path; } WpFormatGateResult; void wp_format_gate_slot_clear(WpFormatGateSlot *slot); void wp_format_gate_result_clear(WpFormatGateResult *result); void wp_format_gate_result_merge(WpFormatGateResult *dst, const WpFormatGateResult *src); bool wp_format_gate_init_slot(WpLayoutGlobals *wl, WpFormatGateSlot *slot, uint8_t selector, WpFormatGateResult *out_result); bool wp_format_gate_apply_glyph_rules(WpLayoutGlobals *wl, WpFormatGateSlot *slot, WpFormatGateResult *out_result); bool wp_format_gate_increment_refcount_if_fmt_gate(WpLayoutGlobals *wl, WpFormatGateSlot *slot, WpFormatGateResult *out_result); bool wp_format_gate_aux_buffer_clear(WpLayoutGlobals *wl, WpFormatGateSlot *slot, WpFormatGateResult *out_result); bool wp_format_gate_word_pair_init(WpLayoutGlobals *wl, WpFormatGateSlot *slot, WpFormatGateResult *out_result); bool wp_format_gate_display_string_or_status(WpLayoutGlobals *wl, WpFormatGateSlot *slot, uint8_t token, WpFormatGateResult *out_result); bool wp_format_gate_repeat_batch(WpLayoutGlobals *wl, WpFormatGateSlot *slot, size_t iterations, size_t simulation_limit, WpFormatGateResult *out_result); #endif
Commit message
This repository is read-only for this account.
Repository snapshot
Current branch
main
Visibility
public
Your access
Read
Remote
None
File activity
View file history