Imported Debian patch 2.23.05-1
[hcoop/zz_old/debian/webalizer.git] / preserve.h
CommitLineData
e015f748
CE
1#ifndef _PRESERVE_H
2#define _PRESERVE_H
3
4#define mth_idx(m,y) (m+((y-1970)*12))
5
6extern void get_history(); /* load history file */
7extern void put_history(); /* save history file */
8extern void populate_history(int, int); /* populate history w/dates */
9extern void update_history(); /* update w/current totals */
10extern int save_state(); /* save run state */
11extern int restore_state(); /* restore run state */
12
13/* history record struct */
14struct hist_rec { int year; /* year */
15 int month; /* month */
16 int fday; /* first day w/data */
17 int lday; /* last day w/data */
18 u_int64_t hit; /* hits for month */
19 u_int64_t files; /* files for month */
20 u_int64_t site; /* sites for month */
21 u_int64_t page; /* pages for month */
22 u_int64_t visit; /* visits for month */
23 double xfer; /* xfer amt for month */
24 };
25
26extern struct hist_rec hist[HISTSIZE]; /* declare our hist array */
27
28#endif /* _PRESERVE_H */