enum PlotType { PLOT_LINES, }; struct PlotDef { const char *name; const char *table; enum PlotType plot_type; const char **cols; }; struct PlotDef g_general_plots_def[] = { { .name = "cycl", .table = "general", .plot_type = PLOT_LINES, .cols = (const char *[]){ #define FOR_CORE(i) "cycl_" #i, FOR_CORES #undef FOR_CORE }}, { .name = "mall", .table = "general", .plot_type = PLOT_LINES, .cols = (const char *[]){ #define FOR_CORE(i) "mall_" #i, FOR_CORES #undef FOR_CORE }}, { .name = "pnum", .table = "general", .plot_type = PLOT_LINES, .cols = (const char *[]){ #define FOR_CORE(i) "pnum_" #i, FOR_CORES #undef FOR_CORE }}, { .name = "ppop", .table = "general", .plot_type = PLOT_LINES, .cols = (const char *[]){ #define FOR_CORE(i) "pfst_" #i, "plst_" #i, FOR_CORES #undef FOR_CORE }}, }; size_t g_general_plots_count = sizeof(g_general_plots_def) / sizeof(struct PlotDef);