From 3422548c2ce84dce9283e9649588f82cc0cb5774 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 11 Jul 2002 10:40:50 +0000 Subject: [PATCH] XML updates for print tree --- retrieval/d1_prtree.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/retrieval/d1_prtree.c b/retrieval/d1_prtree.c index 6f04412..0a11ea3 100644 --- a/retrieval/d1_prtree.c +++ b/retrieval/d1_prtree.c @@ -3,7 +3,7 @@ * See the file LICENSE for details. * Sebastian Hammer, Adam Dickmeiss * - * $Id: d1_prtree.c,v 1.8 2002-05-13 14:13:37 adam Exp $ + * $Id: d1_prtree.c,v 1.9 2002-07-11 10:40:50 adam Exp $ */ #include @@ -16,7 +16,7 @@ static void pr_string (FILE *out, const char *str, int len) { int c = str[i]; if (c < 32 || c >126) - fprintf (out, "\\x%02x", c); + fprintf (out, "\\x%02x", c & 255); else fputc (c, out); } @@ -42,7 +42,11 @@ static void pr_tree (data1_handle dh, data1_node *n, FILE *out, int level) } break; case DATA1N_data: - fprintf (out, "data type="); + case DATA1N_comment: + if (n->which == DATA1N_data) + fprintf (out, "data type="); + else + fprintf (out, "comment type="); switch (n->u.data.what) { case DATA1I_inctxt: @@ -71,6 +75,17 @@ static void pr_tree (data1_handle dh, data1_node *n, FILE *out, int level) break; } break; + case DATA1N_preprocess: + fprintf (out, "preprocess target=%s\n", n->u.preprocess.target); + if (n->u.preprocess.attributes) + { + data1_xattr *xattr = n->u.preprocess.attributes; + fprintf (out, "%*s attr", level, ""); + for (; xattr; xattr = xattr->next) + fprintf (out, " %s=%s ", xattr->name, xattr->value); + fprintf (out, "\n"); + } + break; case DATA1N_variant: fprintf (out, "variant\n"); #if 0 -- 1.7.10.4