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_span_metrics.c
File editor
#include "wp_span_metrics.h" #include "wp_layout_reconcile.h" #include "wp_parser_gate.h" #include "wp_layout_metrics.h" extern void route_far_jump_shell_segment_proxy(WpLayoutGlobals *wl); extern uint32_t __cdecl16near layout_add_compact_metric_delta(WpLayoutGlobals *wl, uint16_t delta_high, uint16_t delta_low); /* Function: layout_calc_span_width_and_carry @ 1000:10f6 */ int __cdecl16near layout_calc_span_width_and_carry(WpLayoutGlobals *wl) { int iVar1; set_mode_or_status_bits(wl); parser_merge_cursor_consume_loop_then_finalize_layout_state(wl, 0, 0); iVar1 = layout_get_active_span_total_width(wl); if (wl->variant_count != '\0') { /* WARNING: Subroutine does not return */ route_far_jump_shell_segment_proxy(wl); } return iVar1 + wl->carry_width; } static uint32_t __cdecl16near layout_scale_span_width_q8_internal(WpLayoutGlobals *wl, int dh_adj) { int iVar1; int iVar2; iVar2 = layout_get_active_span_total_width(wl); if (dh_adj == 0) { iVar1 = wl->span_width_adj_5043; } else { iVar1 = wl->span_width_adj_5041; } iVar2 = (int)((uint32_t)(uint16_t)(iVar2 + iVar1) * (uint32_t)wl->span_scale_q8_5039 >> 8); if (iVar2 < 1) { iVar2 = 1; } return (uint32_t)(uint16_t)iVar2; } /* Function: layout_scale_span_width_q8_with_dh_adj @ 1000:1124 */ uint32_t __cdecl16near layout_scale_span_width_q8_with_dh_adj(WpLayoutGlobals *wl) { return layout_scale_span_width_q8_internal(wl, 1); } /* Function: layout_scale_span_width_q8 @ 1000:1126 */ uint32_t __cdecl16near layout_scale_span_width_q8(WpLayoutGlobals *wl) { return layout_scale_span_width_q8_internal(wl, 0); } int __cdecl16near layout_get_active_span_total_width(WpLayoutGlobals *wl) { int iVar1; iVar1 = wl->explicit_span_total; if (iVar1 == 0) { if (wl->measured_span_a == 0) { iVar1 = wl->default_span_a + wl->default_span_b; } else { iVar1 = wl->measured_span_a + wl->measured_span_b; } } return iVar1; } int __cdecl16near layout_flush_measured_span_then_scale_width_q8(WpLayoutGlobals *wl) { int iVar1; uint16_t uVar2; uint16_t uVar3; LOCK(); uVar3 = wl->measured_span_b; wl->measured_span_b = 0; UNLOCK(); LOCK(); uVar2 = wl->measured_span_a; wl->measured_span_a = 0; UNLOCK(); iVar1 = (int)(uint16_t)layout_scale_span_width_q8_with_dh_adj(wl); wl->measured_span_b = uVar3; wl->measured_span_a = uVar2; if ((wl->variant_count != '\0') && ((wl->variant_runtime_flags & 2) == 0)) { /* WARNING: Subroutine does not return */ route_far_jump_shell_segment_proxy(wl); } return iVar1 + wl->carry_width + wl->pending_offset; } uint16_t __cdecl16near layout_reset_cursor_aliases_variant_table(WpLayoutGlobals *wl) { if (wl->measured_span_cursor != wl->cursor) { if (wl->measured_span_a < wl->default_span_a) { wl->measured_span_a = wl->default_span_a; if (wl->measured_span_dirty_flags != '\0') { wl->measured_span_dirty_flags = wl->measured_span_dirty_flags | 0x80; } if (wl->measured_span_total_flags != '\0') { wl->measured_span_total_flags = wl->measured_span_total_flags | 0x80; } } if ((wl->measured_span_b < wl->default_span_b) && (wl->measured_span_b = wl->default_span_b, wl->measured_span_total_flags != '\0')) { wl->measured_span_total_flags = wl->measured_span_total_flags | 0x80; } wl->measured_span_cursor = wl->cursor; wl->measured_span_flags = wl->measured_span_flags & 0xfe; } return 0; } /* Function: layout_record_wide_temp_lo_hi_route_stage_2 @ 1000:1237 */ uint32_t __cdecl16near layout_record_wide_temp_lo_hi_route_stage_2(WpLayoutGlobals *wl, uint16_t in_DX, uint16_t in_AX) { uint32_t uVar1; uVar1 = layout_add_compact_metric_delta(wl, in_DX, in_AX); wl->record_wide_temp_lo_4b26 = (uint16_t)uVar1; wl->record_wide_temp_hi_4b28 = (uint16_t)(uVar1 >> 16); wl->runtime_flags &= 0xf7; return uVar1; }
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