* Recalculate the window based on new size, font, extent values, * and re-allocate the bitmap. */
| 515 | * and re-allocate the bitmap. |
| 516 | */ |
| 517 | short |
| 518 | force_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 | /* |
no test coverage detected