summaryrefslogtreecommitdiffabout
path: root/ui-stats.h
authorLars Hjemli <hjemli@gmail.com>2009-08-24 09:02:48 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2009-08-24 09:02:48 (UTC)
commitb47b7bd1d0fb872763214e674b53a562c7513fc0 (patch) (unidiff)
tree03466abfe90a858ee4f7b09877b095b6a7f50555 /ui-stats.h
parent5ca8df0a3d75ba1ca5af28872977f7714b66ff37 (diff)
downloadcgit-b47b7bd1d0fb872763214e674b53a562c7513fc0.zip
cgit-b47b7bd1d0fb872763214e674b53a562c7513fc0.tar.gz
cgit-b47b7bd1d0fb872763214e674b53a562c7513fc0.tar.bz2
Add and use cgit_find_stats_periodname() in print_repo()
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'ui-stats.h') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-stats.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui-stats.h b/ui-stats.h
index 4f13dba..f0761ba 100644
--- a/ui-stats.h
+++ b/ui-stats.h
@@ -1,27 +1,28 @@
1#ifndef UI_STATS_H 1#ifndef UI_STATS_H
2#define UI_STATS_H 2#define UI_STATS_H
3 3
4#include "cgit.h" 4#include "cgit.h"
5 5
6struct cgit_period { 6struct cgit_period {
7 const char code; 7 const char code;
8 const char *name; 8 const char *name;
9 int max_periods; 9 int max_periods;
10 int count; 10 int count;
11 11
12 /* Convert a tm value to the first day in the period */ 12 /* Convert a tm value to the first day in the period */
13 void (*trunc)(struct tm *tm); 13 void (*trunc)(struct tm *tm);
14 14
15 /* Update tm value to start of next/previous period */ 15 /* Update tm value to start of next/previous period */
16 void (*dec)(struct tm *tm); 16 void (*dec)(struct tm *tm);
17 void (*inc)(struct tm *tm); 17 void (*inc)(struct tm *tm);
18 18
19 /* Pretty-print a tm value */ 19 /* Pretty-print a tm value */
20 char *(*pretty)(struct tm *tm); 20 char *(*pretty)(struct tm *tm);
21}; 21};
22 22
23extern int cgit_find_stats_period(const char *expr, struct cgit_period **period); 23extern int cgit_find_stats_period(const char *expr, struct cgit_period **period);
24extern const char *cgit_find_stats_periodname(int idx);
24 25
25extern void cgit_show_stats(struct cgit_context *ctx); 26extern void cgit_show_stats(struct cgit_context *ctx);
26 27
27#endif /* UI_STATS_H */ 28#endif /* UI_STATS_H */