* Done with a window - destroy it. Release the memory only if * it wasn't allocated when we got it! */
| 290 | * it wasn't allocated when we got it! |
| 291 | */ |
| 292 | short |
| 293 | destroy_tty(WindowPtr window) |
| 294 | { |
| 295 | short s_err; |
| 296 | RECORD_EXISTS(record); |
| 297 | |
| 298 | s_err = free_bits(record); |
| 299 | if (!s_err) { |
| 300 | #if !TARGET_API_MAC_CARBON |
| 301 | if (record->was_allocated) { |
| 302 | CloseWindow(window); |
| 303 | } else { |
| 304 | #endif |
| 305 | DisposeWindow(window); |
| 306 | #if !TARGET_API_MAC_CARBON |
| 307 | } |
| 308 | #endif |
| 309 | s_err = dispose_ptr(record); |
| 310 | } |
| 311 | |
| 312 | return s_err; |
| 313 | } |
| 314 | |
| 315 | static void |
| 316 | do_set_port_font(tty_record *record) |
no test coverage detected