Don't rebase ib->currroot if it was NULL.
[sgt/agedu] / html.h
CommitLineData
70322ae3 1/*
2 * html.h: HTML output format for agedu.
3 */
4
f2e52893 5struct 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;
24};
25
70322ae3 26/*
27 * Generate an HTML document containing the results of a query
28 * against the pathname at a given index. Returns a dynamically
29 * allocated piece of memory containing the entire HTML document,
30 * as an ordinary C zero-terminated string.
70322ae3 31 */
f2e52893 32char *html_query(const void *t, unsigned long index,
33 const struct html_config *cfg);