MCPcopy Create free account
hub / github.com/NetHack/NetHack / force_tty_coordinate_system_recalc

Function force_tty_coordinate_system_recalc

outdated/sys/mac/mactty.c:517–543  ·  view source on GitHub ↗

* Recalculate the window based on new size, font, extent values, * and re-allocate the bitmap. */

Source from the content-addressed store, hash-verified

515 * and re-allocate the bitmap.
516 */
517short
518force_tty_coordinate_system_recalc(WindowPtr window)
519{
520 short s_err;
521 RECORD_EXISTS(record);
522
523 s_err = free_bits(record);
524 if (s_err) {
525 return s_err;
526 }
527 calc_font_sizes(record);
528
529 s_err = alloc_bits(record);
530 if (s_err) {
531 /*
532 * Catastrophe! We could not allocate memory for the bitmap! Things
533 * may go very
534 * much downhill from here!
535 */
536 dprintf("alloc_bits returned null in "
537 "force_tty_coordinate_system_recalc!");
538 return s_err;
539 }
540 select_offscreen_port(record);
541 do_set_port_font(record);
542 return clear_tty(window);
543}
544
545#if 0
546/*

Callers 1

init_tty_numberFunction · 0.85

Calls 7

free_bitsFunction · 0.85
calc_font_sizesFunction · 0.85
alloc_bitsFunction · 0.85
dprintfFunction · 0.85
select_offscreen_portFunction · 0.85
do_set_port_fontFunction · 0.85
clear_ttyFunction · 0.85

Tested by

no test coverage detected