- sprintf(line, "%*s<%s>\n", col, "", tag);
- wrbuf_write(b, line, strlen(line));
+#if DATA1_USING_XATTR
+ data1_xattr *p;
+#endif
+ sprintf (line, "%*s<", col, "");
+ wrbuf_puts (b, line);
+ wrbuf_puts (b, tag);
+#if DATA1_USING_XATTR
+ for (p = c->u.tag.attributes; p; p = p->next)
+ {
+ wrbuf_putc (b, ' ');
+ wrbuf_puts (b, p->name);
+ wrbuf_putc (b, '=');
+ wrbuf_putc (b, '"');
+ wrbuf_puts (b, p->value);
+ wrbuf_putc (b, '"');
+ }
+#endif
+ wrbuf_puts(b, ">\n");