int main(int argc, char **argv) { rstatus_t status; static struct context ctx; mcp_set_default_options(&ctx); status = mcp_get_options(&ctx, argc, argv); if (status != MCP_OK) { mcp_show_usage(); exit(1); } if (show_version) { log_stderr("This is mcperf-%s" CRLF, MCP_VERSION_STRING); if (show_help) { mcp_show_usage(); } exit(0); } status = mcp_pre_run(&ctx); if (status != MCP_OK) { exit(1); } mcp_run(&ctx); return 0; }
int main(int argc, char* argv[]) { mcpanel* panel; struct PanelCb cb = { .user_data = NULL, .close_panel = ClosePanel, .system_connection = SystemConnection, .setup_recording = SetupRecording, .stop_recording = StopRecording, .toggle_recording = ToggleRecording }; mcp_init_lib(&argc, &argv); panel = mcp_create(NULL, &cb, NTAB, tabconf); if (!panel) { fprintf(stderr,"error at the creation of the panel\n"); return 1; } mcp_show(panel, 1); mcp_run(panel, 0); mcp_destroy(panel); return 0; }