about summary refs log tree commit diff
path: root/ui-stats.h
blob: 4f13dba5500f698f34578653cf5a2035dfa8c8ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#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, struct cgit_period **period);

extern void cgit_show_stats(struct cgit_context *ctx);

#endif /* UI_STATS_H */
4.1&id=58d04f6523b0029281d65f841859fa42d0c744ff&follow=1'>cache_lock: do xstrdup/free on lockfileLars Hjemli 2006-12-11Don't truncate valid cachefilesLars Hjemli 2006-12-11Move global variables + callback functions into shared.cLars Hjemli 2006-12-11Move functions for generic object output into ui-view.cLars Hjemli 2006-12-11Move log-functions into ui-log.cLars Hjemli 2006-12-11Move repo summary functions into ui-summary.cLars Hjemli 2006-12-11Move functions for repolist output into ui-repolist.cLars Hjemli 2006-12-11Move common output-functions into ui-shared.cLars Hjemli 2006-12-11Rename config.c to parsing.c + move cgit_parse_query from cgit.c to parsing.cLars Hjemli 2006-12-11Avoid infinite loops in caching layerLars Hjemli 2006-12-11Let 'make install' clear all cachefilesLars Hjemli 2006-12-11Fix cache algorithm loopholeLars Hjemli 2006-12-10Add version identifier in generated filesLars Hjemli 2006-12-10Add license file and copyright noticesLars Hjemli 2006-12-10Add caching infrastructureLars Hjemli