Meins
public c v1 · immutable#define MAX_STATS_ENTRIES 200#define STATS_ENTRIES_CNT 0extern struct s_call_stats *menu_call_stats[MAX_STATS_ENTRIES];#if STATS_ENTRIES_CNT >= MAX_STATS_ENTRIES #error Too many menu items, max. MAX_STATS_ENTRIES allowed#endif#define STATS_STRUCT(name) \ static struct s_call_stats name##_##call_stats = \ {#name, 0}; \ menu_call_stats[STATS_ENTRIES_CNT] = &s_call_stats name##_##call_stats; \ #define STATS_ENTRIES_CNT (STATS_ENTRIES_CNT+1)