projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0a39dcf
)
XML updates for print tree
author
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 11 Jul 2002 10:40:50 +0000
(10:40 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 11 Jul 2002 10:40:50 +0000
(10:40 +0000)
retrieval/d1_prtree.c
patch
|
blob
|
history
diff --git
a/retrieval/d1_prtree.c
b/retrieval/d1_prtree.c
index
6f04412
..
0a11ea3
100644
(file)
--- a/
retrieval/d1_prtree.c
+++ b/
retrieval/d1_prtree.c
@@
-3,7
+3,7
@@
* See the file LICENSE for details.
* Sebastian Hammer, Adam Dickmeiss
*
* 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 <yaz/log.h>
*/
#include <yaz/log.h>
@@
-16,7
+16,7
@@
static void pr_string (FILE *out, const char *str, int len)
{
int c = str[i];
if (c < 32 || c >126)
{
int c = str[i];
if (c < 32 || c >126)
- fprintf (out, "\\x%02x", c);
+ fprintf (out, "\\x%02x", c & 255);
else
fputc (c, out);
}
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:
}
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:
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;
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
case DATA1N_variant:
fprintf (out, "variant\n");
#if 0