void do_leave_program (void) { graphics_leave (); inputdevice_close (); #ifdef SCSIEMU scsidev_exit (); #endif DISK_free (); close_sound (); dump_counts (); #ifdef SERIAL_PORT serial_exit (); #endif /* #ifdef CD32 akiko_free (); #endif */ if (! no_gui) gui_exit (); #ifdef AUTOCONFIG expansion_cleanup (); #endif #ifdef FILESYS filesys_cleanup (); #endif #ifdef SAVESTATE savestate_free (); #endif memory_cleanup (); cfgfile_addcfgparam (0); }
/* * Exit emulator */ static void do_exit_machine (void) { graphics_leave (); inputdevice_close (); #ifdef SCSIEMU scsidev_exit (); #endif DISK_free (); audio_close (); dump_counts (); #ifdef SERIAL_PORT serial_exit (); #endif #ifdef CD32 akiko_free (); #endif gui_exit (); #ifdef AUTOCONFIG expansion_cleanup (); #endif #ifdef FILESYS filesys_cleanup (); hardfile_cleanup (); rtarea_cleanup (); #endif #ifdef SAVESTATE savestate_free (); #endif memory_cleanup (); cfgfile_addcfgparam (0); }
void do_leave_program (void) { sampler_free (); graphics_leave (); inputdevice_close (); DISK_free (); close_sound (); dump_counts (); #ifdef SERIAL_PORT serial_exit (); #endif #ifdef CDTV cdtv_free (); #endif #ifdef A2091 a2091_free (); a3000scsi_free (); #endif #ifdef NCR ncr710_free(); ncr_free(); #endif #ifdef NCR9X ncr9x_free(); #endif #ifdef CD32 akiko_free (); cd32_fmv_free(); #endif if (! no_gui) gui_exit (); #ifdef USE_SDL SDL_Quit (); #endif #ifdef AUTOCONFIG expansion_cleanup (); #endif #ifdef FILESYS filesys_cleanup (); #endif #ifdef BSDSOCKET bsdlib_reset (); #endif gayle_free (); device_func_reset (); #ifdef WITH_LUA uae_lua_free (); #endif savestate_free (); memory_cleanup (); free_shm (); cfgfile_addcfgparam (0); machdep_free (); }
void do_leave_program (void) { #ifdef SAMPLER sampler_free (); #endif graphics_leave (); inputdevice_close (); DISK_free (); close_sound (); dump_counts (); #ifdef SERIAL_PORT serial_exit (); #endif #ifdef CDTV cdtv_free (); #endif #ifdef A2091 a2091_free (); #endif #ifdef NCR ncr_free (); #endif #ifdef CD32 akiko_free (); #endif if (! no_gui) gui_exit (); #ifdef USE_SDL SDL_Quit (); #endif #ifdef AUTOCONFIG expansion_cleanup (); #endif #ifdef FILESYS filesys_cleanup (); #endif #ifdef BSDSOCKET bsdlib_reset (); #endif #ifdef SCSIEMU #ifdef GAYLE gayle_free (); #endif device_func_reset (); #endif savestate_free (); memory_cleanup (); #ifdef NATMEM_OFFSET free_shm (); #endif cfgfile_addcfgparam (0); machdep_free (); }
void do_leave_program (void) { graphics_leave (); inputdevice_close (); close_sound (); dump_counts (); serial_exit (); zfile_exit (); if (! no_gui) gui_exit (); #ifdef USE_SDL SDL_Quit (); #endif expansion_cleanup (); memory_cleanup (); }
int main(int argc, char *argv[], char *envp[]) { char *channel; debug_init(); srand((unsigned)time(NULL)); time(&start_time); time(&idle_time); time(&now); #ifdef WINNT fprintf(stdout, "%s %s\r\n", nap_version, internal_version); fprintf(stdout, "%s\r\n", main_version); #else fprintf(stdout, "%s %s\n", nap_version, internal_version); fprintf(stdout, "%s\n", main_version); #endif channel = parse_args(argv, argc, envp); FD_ZERO(&readables); FD_ZERO(&writables); if (term_init(NULL)) _exit(1); /* my_signal(SIGQUIT, SIG_IGN, 0);*/ my_signal(SIGHUP, irc_exit_old, 0); my_signal(SIGTERM, irc_exit_old, 0); my_signal(SIGPIPE, SIG_IGN, 0); my_signal(SIGINT, cntl_c, 0); my_signal(SIGALRM, nothing, 0); my_signal(SIGCHLD, child_reap, 0); my_signal(SIGCONT, term_cont, 0); my_signal(SIGWINCH, sig_refresh_screen, 0); my_signal(SIGUSR1, sigusr1, 0); if (!init_screen()) { create_new_screen(); new_window(main_screen); } init_keys(); init_keys2(); init_variables(); #ifdef WANT_THREAD init_share_mutexes(); #ifdef WANT_NSLOOKUP start_dns(); #endif #ifdef WANT_MP3PLAYER start_mp3(); #endif #ifdef GTK start_tgtk(); #endif #endif build_status(current_window, NULL, 0); update_input(UPDATE_ALL); #ifndef WINNT charset_ibmpc(); #endif load_scripts(); read_unfinished_list(); if (auto_connect) { int serv = 0; reload_save(NULL, NULL, NULL, NULL, 0); if (starting_server != -1) serv = starting_server; connect_to_server_by_refnum(serv, -1, create); current_window->server = serv; xterm_settitle(); } else { if (do_get_napigator) get_napigator(); display_server_list(); } set_input_prompt(current_window, get_string_var(INPUT_PROMPT_VAR), 0); for (;;) io("main"); #ifdef GUI1 gui_exit(); #else nappanic("get_line() returned"); #endif return (-((int)0xdead)); }
void do_leave_program (void) { sampler_free (); graphics_leave (); inputdevice_close (); DISK_free (); close_sound (); dump_counts (); #ifdef PARALLEL_PORT parallel_exit(); #endif #ifdef SERIAL_PORT serial_exit (); #endif #ifdef CDTV cdtv_free(); cdtvcr_free(); #endif #ifdef A2091 a2091_free (); gvp_free (); a3000scsi_free (); #endif soft_scsi_free(); #ifdef NCR ncr_free(); #endif #ifdef NCR9X ncr9x_free(); #endif #ifdef CD32 akiko_free (); cd32_fmv_free(); #endif if (! no_gui) gui_exit (); #ifdef USE_SDL SDL_Quit (); #endif #ifdef AUTOCONFIG expansion_cleanup (); #endif #ifdef WITH_PCI pci_free(); #endif #ifdef WITH_X86 x86_bridge_free(); #endif #ifdef FILESYS filesys_cleanup (); #endif #ifdef BSDSOCKET bsdlib_reset (); #endif gayle_free (); idecontroller_free(); device_func_reset (); #ifdef WITH_LUA uae_lua_free (); #endif #ifdef WITH_PPC uae_ppc_free(); #endif #ifdef WITH_TOCCATA sndboard_free(); #endif gfxboard_free(); #ifdef SAVESTATE savestate_free (); #endif memory_cleanup (); free_shm (); cfgfile_addcfgparam (0); machdep_free (); #ifdef DRIVESOUND driveclick_free(); #endif ethernet_enumerate_free(); }
/* irc_exit: cleans up and leaves */ void BX_irc_exit (int really_quit, char *reason, char *format, ...) { char buffer[BIG_BUFFER_SIZE]; logger(current_window, NULL, 0); if (get_int_var(MSGLOG_VAR)) log_toggle(0, NULL); if (format) { va_list arglist; va_start(arglist, format); vsprintf(buffer, format, arglist); va_end(arglist); } else sprintf(buffer, "%s -- just do it.",irc_version); if (really_quit) { put_it("%s", convert_output_format("$G Signon time : $0-", "%s", my_ctime(start_time))); put_it("%s", convert_output_format("$G Signoff time : $0-", "%s", my_ctime(now))); put_it("%s", convert_output_format("$G Total uptime : $0-", "%s", convert_time(now - start_time))); } do_hook(EXIT_LIST, "%s", reason ? reason : buffer); close_all_servers(reason ? reason : buffer); put_it("%s", buffer ? buffer : reason ? reason : empty_string); clean_up_processes(); if (!dumb_mode && term_initialized) { cursor_to_input(); /* Needed so that ircII doesn't gobble * the last line of the kill. */ term_cr(); term_clear_to_eol(); term_reset(); } destroy_call_stack(); #if defined(THREAD) && defined(WANT_NSLOOKUP) kill_dns(); #endif remove_pid(); if (really_quit) { #ifdef GUI gui_exit(); #else #if defined(WANT_DETACH) && !defined(GUI) kill_attached_if_needed(0); #endif fprintf(stdout, "\r"); fflush(stdout); exit(0); #endif } }
static int subr_ui_exit(lua_State* L) { UNUSED(L); gui_exit(); return 0; }