Commit | Line | Data |
---|---|---|
e015f748 CE |
1 | #ifndef _PRESERVE_H |
2 | #define _PRESERVE_H | |
3 | ||
4 | #define mth_idx(m,y) (m+((y-1970)*12)) | |
5 | ||
6 | extern void get_history(); /* load history file */ | |
7 | extern void put_history(); /* save history file */ | |
8 | extern void populate_history(int, int); /* populate history w/dates */ | |
9 | extern void update_history(); /* update w/current totals */ | |
10 | extern int save_state(); /* save run state */ | |
11 | extern int restore_state(); /* restore run state */ | |
12 | ||
13 | /* history record struct */ | |
14 | struct 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 | ||
26 | extern struct hist_rec hist[HISTSIZE]; /* declare our hist array */ | |
27 | ||
28 | #endif /* _PRESERVE_H */ |