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

Function free_bits

outdated/sys/mac/mactty.c:184–207  ·  view source on GitHub ↗

* Get rid of offscreen bitmap */

Source from the content-addressed store, hash-verified

182 * Get rid of offscreen bitmap
183 */
184static short
185free_bits(tty_record *record)
186{
187 short s_err;
188
189 if (record->uses_gworld) {
190 s_err = deallocate_gworld(record);
191#if !TARGET_API_MAC_CARBON
192 } else {
193 s_err = dispose_ptr(record->its_bits.baseAddr);
194 if (!s_err) {
195 record->its_bits.baseAddr = (char *) 0;
196 if (record->offscreen_port) {
197 ClosePort(record->offscreen_port);
198 s_err = dispose_ptr(record->offscreen_port);
199 if (!s_err) {
200 record->offscreen_port = (GrafPtr) 0;
201 }
202 }
203 }
204#endif
205 }
206 return s_err;
207}
208
209/*
210 * Snatch a window from the resource fork. Create the record.

Callers 2

destroy_ttyFunction · 0.85

Calls 2

deallocate_gworldFunction · 0.85
dispose_ptrFunction · 0.85

Tested by

no test coverage detected