static const char *relpaths[] = {
".",
"..",
"../.."
};
void html_open(struct str *buf, const char *title,
const unsigned int path_depth, const int want_graph_js)
{
const char *root;
assert(path_depth < (sizeof(relpaths)/sizeof(*relpaths)));
root = relpaths[path_depth];
str_appendf(buf,
"\n"
"\n"
"\n"
"%s (darkstat %s)\n"
"\n"
"\n"
"\n",
title, title_interfaces, root);
if (want_graph_js)
str_appendf(buf,
"\n"
, root);
str_appendf(buf,
"\n"
"\n"
"\n"
"\n"
"\n"
, root, root, title);
}
void html_close(struct str *buf)
{
str_append(buf,
"
\n"
"\n"
"\n");
}
/* vim:set ts=4 sw=4 tw=80 et: */