Diff options
Diffstat (limited to 'source/ui-stats.h')
-rw-r--r--source/ui-stats.h25
1 file changed, 3 insertions, 22 deletions
diff --git a/source/ui-stats.h b/source/ui-stats.h
index 1cd0b9d..3479732 100644
--- a/source/ui-stats.h
+++ b/source/ui-stats.h
@@ -1,32 +1,13 @@
/*
* The statistics page, which counts commits per author over a window of
- * recent weeks, months, quarters or years. The windows are described here
- * rather than inside the page, because cgit.c resolves a repository's
- * max-stats setting against the same set.
+ * 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
-#include "cgit.h"
-
-struct cgit_period {
- const char code;
- const char *name;
-
- // How many periods a page shows side by side.
- int count;
-
- // Move a tm back to the first day of the period it falls in.
- void (*trunc)(struct tm *tm);
-
- // Step a truncated tm n whole periods, back when n is negative.
- void (*step)(struct tm *tm, int n);
-
- // Label the period a tm falls in. The buffer is reused, so a caller
- // that keeps a label copies it.
- char *(*pretty)(struct tm *tm);
-};
+struct cgit_period;
/*
* Look a period up by its one letter code or by its full name, storing the