70322ae3 |
1 | /* |
2 | * html.h: HTML output format for agedu. |
3 | */ |
4 | |
f2e52893 |
5 | struct html_config { |
6 | /* |
7 | * If "format" is non-NULL, it is treated as an sprintf format |
8 | * string which must contain exactly one %lu and no other |
9 | * formatting directives (other than %%, which doesn't count); |
10 | * this will be used to construct URLs to use in hrefs |
11 | * pointing to queries of other related (parent and child) |
12 | * pathnames. |
13 | */ |
14 | const char *format; |
15 | |
16 | /* |
17 | * Time stamps to assign to the extreme ends of the colour |
18 | * scale. If "autoage" is true, they are ignored and the time |
19 | * stamps are derived from the limits of the age data stored |
20 | * in the index. |
21 | */ |
22 | int autoage; |
23 | time_t oldest, newest; |
16139d21 |
24 | |
25 | /* |
26 | * Specify whether to show individual files as well as |
27 | * directories in the report. |
28 | */ |
29 | int showfiles; |
f2e52893 |
30 | }; |
31 | |
70322ae3 |
32 | /* |
33 | * Generate an HTML document containing the results of a query |
34 | * against the pathname at a given index. Returns a dynamically |
35 | * allocated piece of memory containing the entire HTML document, |
36 | * as an ordinary C zero-terminated string. |
70322ae3 |
37 | */ |
f2e52893 |
38 | char *html_query(const void *t, unsigned long index, |
39 | const struct html_config *cfg); |