-
Notifications
You must be signed in to change notification settings - Fork 1
/
preserve.h
28 lines (23 loc) · 1.43 KB
/
preserve.h
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
28
#ifndef _PRESERVE_H
#define _PRESERVE_H
#define mth_idx(m,y) (m+((y-1970)*12))
extern void get_history(); /* load history file */
extern void put_history(); /* save history file */
extern void populate_history(int, int); /* populate history w/dates */
extern void update_history(); /* update w/current totals */
extern int save_state(); /* save run state */
extern int restore_state(); /* restore run state */
/* history record struct */
struct hist_rec { int year; /* year */
int month; /* month */
int fday; /* first day w/data */
int lday; /* last day w/data */
u_int64_t hit; /* hits for month */
u_int64_t files; /* files for month */
u_int64_t site; /* sites for month */
u_int64_t page; /* pages for month */
u_int64_t visit; /* visits for month */
double xfer; /* xfer amt for month */
};
extern struct hist_rec hist[HISTSIZE]; /* declare our hist array */
#endif /* _PRESERVE_H */