static void image_exit(running_machine *machine) { int i, j, indx; /* unload all devices */ image_unload_all(FALSE); image_unload_all(TRUE); indx = 0; if (Machine->devices) { for (i = 0; Machine->devices[i].type < IO_COUNT; i++) { for (j = 0; j < Machine->devices[i].count; j++) { /* call the exit handler if appropriate */ if (Machine->devices[i].exit) Machine->devices[i].exit(&images[indx + j]); tagpool_exit(&images[indx + j].tagpool); } indx += Machine->devices[i].count; } } }
static void floppy_close_internal(floppy_image *floppy, int close_file) { assert(floppy); floppy_track_unload(floppy); if (close_file) io_generic_close(&floppy->io); if (floppy->loaded_track_data) free(floppy->loaded_track_data); tagpool_exit(&floppy->tags); free(floppy); }
void image_exit(void) { int i, j, indx; indx = 0; if (Machine->devices) { for (i = 0; Machine->devices[i].type < IO_COUNT; i++) { for (j = 0; j < Machine->devices[i].count; j++) { /* call the exit handler if appropriate */ if (Machine->devices[i].exit) Machine->devices[i].exit(&images[indx + j]); tagpool_exit(&images[indx + j].tagpool); } indx += Machine->devices[i].count; } } }