//---------------------------------------------------------------------------------------------------------------------- // main //---------------------------------------------------------------------------------------------------------------------- int main(int argc, char *argv[]) { #if VOGL_FUNCTION_TRACING fflush(stdout); fflush(stderr); setvbuf(stdout, NULL, _IONBF, 0); setvbuf(stderr, NULL, _IONBF, 0); #endif VOGL_FUNC_TRACER // Initialize vogl_core. vogl_core_init(); XSetErrorHandler(xerror_handler); if (!voglbench_init(argc, argv)) { voglbench_deinit(); return EXIT_FAILURE; } if (g_command_line_params().get_count("") < 2) { vogl_error_printf("No trace file specified!\n"); tool_print_help(); voglbench_deinit(); return EXIT_FAILURE; } if (g_command_line_params().get_value_as_bool("pause")) { vogl_message_printf("Press key to continue\n"); vogl_sleep(1000); getchar(); } bool success = tool_replay_mode(); vogl_printf("%u warning(s), %u error(s)\n", console::get_total_messages(cWarningConsoleMessage), console::get_total_messages(cErrorConsoleMessage)); voglbench_deinit(); return success ? EXIT_SUCCESS : EXIT_FAILURE; }
//---------------------------------------------------------------------------------------------------------------------- // main //---------------------------------------------------------------------------------------------------------------------- int main(int argc, char *argv[]) { #if VOGL_FUNCTION_TRACING fflush(stdout); fflush(stderr); setvbuf(stdout, NULL, _IONBF, 0); setvbuf(stderr, NULL, _IONBF, 0); #endif VOGL_FUNC_TRACER // Initialize vogl_core. vogl_core_init(); if (!voglsyms_init(argc, argv)) { voglsyms_deinit(); return EXIT_FAILURE; } if (g_command_line_params().get_count("") < 2) { vogl_error_printf("No trace file specified!\n"); tool_print_help(); voglsyms_deinit(); return EXIT_FAILURE; } if (g_command_line_params().get_value_as_bool("pause")) { vogl_message_printf("Press key to continue\n"); vogl_sleep(1000); getchar(); } bool success = voglsym_main_loop(argv); voglsyms_deinit(); return success ? EXIT_SUCCESS : EXIT_FAILURE; }
int main(int argc, char *argv[]) { // Initialize vogl_core. vogl_core_init(); QApplication a(argc, argv); vogl_common_lib_early_init(); vogl_common_lib_global_init(); VoglEditor w; w.show(); if (argc == 2) { w.pre_open_trace_file(argv[1]); } return a.exec(); }