I32 enr_CreateChart (const CHAR* data_path, enr_Chart** chart) { I32 app_stat = ENR_NOERR; I32 chart_stat = ENR_NOERR; if (g_app == NULL) { app_stat = AppCreate (data_path, &g_app); } *chart = ChartCreate(); (*chart)->app = g_app; g_app->chart_cnt++; chart_stat = ChartInit (*chart); return (app_stat != ENR_NOERR) ? app_stat : chart_stat; } #### I32 enr_GetThemeName (const enr_Chart* chart, I32 idx, CHAR** name) { enr_App* app = chart ? chart->app : NULL; JCLArray* themes = app ? &app->themes : NULL; ChartTheme** theme = themes ? (ChartTheme**) ArrayGet (themes, idx) : NULL; if (theme == NULL) { return ENR_ERR_BADARG; } *name = (*theme)->name; return ENR_NOERR; }