void cleanup() { remove_hook(); if (!isattached) killtask(); free_symbols(); close_all_elfhandles(); stabs_free_stabs(); hex_close_window(); breakpoints_close_window(); modules_close_window(); main_close_window(); arexx_close_port(); IExec->FreeSysObject(ASOT_PORT, AppPort); pipe_cleanup(); variables_cleanup(); console_cleanup(); stacktrace_cleanup(); source_cleanup(); disassembler_cleanup(); sourcelist_cleanup(); freemem_free_hook(main_freemem_hook); char sysstring[1024] = ""; sprintf(sysstring, "setenv DB101_LASTDIR SAVE \"%s\"", lastdir); IDOS->SystemTags(sysstring, TAG_END); }
int main(int argc, const char** argv) { main_win mwin; int err; err = main_init_window(&mwin); if(err == 0) { main_exec(&mwin); } main_close_window(&mwin); #if defined(_DEBUG) && defined(_MSC_FULL_VER) _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE); _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDOUT); _CrtCheckMemory(); _CrtDumpMemoryLeaks(); #endif return EXIT_SUCCESS; }
int main(int argc, char* argv[]) { main_win mwin; char rootdir[taa_PATH_SIZE]; int err; taa_path_get_dir(argv[0], rootdir, sizeof(rootdir)); err = main_init_window(&mwin); if(err == 0) { main_exec(&mwin, rootdir); } main_close_window(&mwin); #if defined(_DEBUG) && defined(_MSC_FULL_VER) _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE); _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDOUT); _CrtCheckMemory(); _CrtDumpMemoryLeaks(); #endif return EXIT_SUCCESS; }