diff options
author | Vincent Ambo <Vincent Ambo> | 2020-01-11T23·30+0000 |
---|---|---|
committer | Vincent Ambo <Vincent Ambo> | 2020-01-11T23·31+0000 |
commit | 5a069d588820da31134d435268bca1cd1532783a (patch) | |
tree | dcfee961700d80d0a30848818a2f07934af264a2 /third_party/cgit/ui-stats.h | |
parent | 829de752da8039c7e3dab99db06d4e2112ca6ef4 (diff) | |
parent | 723dc8fbcb1a4609c264758eae420ee2811a2b55 (diff) |
merge(third_party/cgit): Import at master of 2020-01-11 r/371
Imported commit '723dc8fbcb1a4609c264758eae420ee2811a2b55' as 'third_party/cgit'.
Diffstat (limited to 'third_party/cgit/ui-stats.h')
-rw-r--r-- | third_party/cgit/ui-stats.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/third_party/cgit/ui-stats.h b/third_party/cgit/ui-stats.h new file mode 100644 index 000000000000..0e61b03da3b3 --- /dev/null +++ b/third_party/cgit/ui-stats.h @@ -0,0 +1,28 @@ +#ifndef UI_STATS_H +#define UI_STATS_H + +#include "cgit.h" + +struct cgit_period { + const char code; + const char *name; + int max_periods; + int count; + + /* Convert a tm value to the first day in the period */ + void (*trunc)(struct tm *tm); + + /* Update tm value to start of next/previous period */ + void (*dec)(struct tm *tm); + void (*inc)(struct tm *tm); + + /* Pretty-print a tm value */ + char *(*pretty)(struct tm *tm); +}; + +extern int cgit_find_stats_period(const char *expr, const struct cgit_period **period); +extern const char *cgit_find_stats_periodname(int idx); + +extern void cgit_show_stats(void); + +#endif /* UI_STATS_H */ |