/* * The statistics page, which counts commits per author over a window of * recent weeks, months, quarters or years, and the period lookups that cgit.c * resolves a max-stats setting with. */ #ifndef CGIT_UI_STATS_H #define CGIT_UI_STATS_H struct cgit_period; /* * Look a period up by its one letter code or by its full name, storing the * match through period when that is not NULL. The return is a one based index * into the table of periods, or 0 when nothing matches, and because that * table runs from the finest window to the coarsest, the index is what * max-stats is compared against. */ extern int cgit_find_stats_period(const char *expr, const struct cgit_period **period); /* * The name of the period at a one based index, or an empty string when the * index names no period. */ extern const char *cgit_find_stats_periodname(int idx); extern void cgit_show_stats(void); #endif // CGIT_UI_STATS_H