/* Build a indentation string for a given indentation level. XXX this should be really in util.c  */
static char* indent_string(u_int indent)
/* Build a indentation string for a given indentation level. XXX this should be really in util.c  */
static char* indent_string(u_int indent)
{
    static char buf[20];
    u_int idx;
    idx = 0;
    buf[idx] = '\0';
    if (sizeof(buf) < ((indent/8) + (indent %8) + 2)) {
	return buf;
    }
    buf[idx] = '\n';
    idx++;
    while (indent >= 8) {
	buf[idx] = '\t';
	idx++;
	indent -= 8;
    }
    while (indent > 0) {
	buf[idx] = ' ';
	idx++;
	indent--;
    }
    buf[idx] = '\0';
    return buf;
}