projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Combine duplicated API/pretty-print timestamp code
[babeltrace.git]
/
formats
/
ctf
/
metadata
/
ctf-visitor-xml.c
diff --git
a/formats/ctf/metadata/ctf-visitor-xml.c
b/formats/ctf/metadata/ctf-visitor-xml.c
index 66b375615f925915fcaf25e74f58bead0fe4ac74..428a89560e9baa1bf0aa25ff881462609c8af851 100644
(file)
--- a/
formats/ctf/metadata/ctf-visitor-xml.c
+++ b/
formats/ctf/metadata/ctf-visitor-xml.c
@@
-124,7
+124,7
@@
int ctf_visitor_print_type_specifier_list(FILE *fd, int depth, struct ctf_node *
print_tabs(fd, depth);
fprintf(fd, "<type_specifier_list>\n");
print_tabs(fd, depth);
fprintf(fd, "<type_specifier_list>\n");
-
cds
_list_for_each_entry(iter, &node->u.type_specifier_list.head, siblings) {
+
bt
_list_for_each_entry(iter, &node->u.type_specifier_list.head, siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
@@
-280,10
+280,10
@@
int ctf_visitor_print_type_declarator(FILE *fd, int depth, struct ctf_node *node
fprintf(fd, "<type_declarator>\n");
depth++;
fprintf(fd, "<type_declarator>\n");
depth++;
- if (!
cds
_list_empty(&node->u.type_declarator.pointers)) {
+ if (!
bt
_list_empty(&node->u.type_declarator.pointers)) {
print_tabs(fd, depth);
fprintf(fd, "<pointers>\n");
print_tabs(fd, depth);
fprintf(fd, "<pointers>\n");
-
cds
_list_for_each_entry(iter, &node->u.type_declarator.pointers,
+
bt
_list_for_each_entry(iter, &node->u.type_declarator.pointers,
siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
@@
-318,10
+318,10
@@
int ctf_visitor_print_type_declarator(FILE *fd, int depth, struct ctf_node *node
fprintf(fd, "<length>\n");
print_tabs(fd, depth);
fprintf(fd, "</length>\n");
fprintf(fd, "<length>\n");
print_tabs(fd, depth);
fprintf(fd, "</length>\n");
- } else if (!
cds
_list_empty(&node->u.type_declarator.u.nested.length)) {
+ } else if (!
bt
_list_empty(&node->u.type_declarator.u.nested.length)) {
print_tabs(fd, depth);
fprintf(fd, "<length>\n");
print_tabs(fd, depth);
fprintf(fd, "<length>\n");
-
cds
_list_for_each_entry(iter, &node->u.type_declarator.u.nested.length,
+
bt
_list_for_each_entry(iter, &node->u.type_declarator.u.nested.length,
siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
@@
-363,23
+363,23
@@
int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
case NODE_ROOT:
print_tabs(fd, depth);
fprintf(fd, "<root>\n");
case NODE_ROOT:
print_tabs(fd, depth);
fprintf(fd, "<root>\n");
-
cds
_list_for_each_entry(iter, &node->u.root.declaration_list,
+
bt
_list_for_each_entry(iter, &node->u.root.declaration_list,
siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
}
siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
}
-
cds
_list_for_each_entry(iter, &node->u.root.trace, siblings) {
+
bt
_list_for_each_entry(iter, &node->u.root.trace, siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
}
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
}
-
cds
_list_for_each_entry(iter, &node->u.root.stream, siblings) {
+
bt
_list_for_each_entry(iter, &node->u.root.stream, siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
}
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
}
-
cds
_list_for_each_entry(iter, &node->u.root.event, siblings) {
+
bt
_list_for_each_entry(iter, &node->u.root.event, siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
@@
-391,7
+391,7
@@
int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
case NODE_EVENT:
print_tabs(fd, depth);
fprintf(fd, "<event>\n");
case NODE_EVENT:
print_tabs(fd, depth);
fprintf(fd, "<event>\n");
-
cds
_list_for_each_entry(iter, &node->u.event.declaration_list, siblings) {
+
bt
_list_for_each_entry(iter, &node->u.event.declaration_list, siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
@@
-402,7
+402,7
@@
int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
case NODE_STREAM:
print_tabs(fd, depth);
fprintf(fd, "<stream>\n");
case NODE_STREAM:
print_tabs(fd, depth);
fprintf(fd, "<stream>\n");
-
cds
_list_for_each_entry(iter, &node->u.stream.declaration_list, siblings) {
+
bt
_list_for_each_entry(iter, &node->u.stream.declaration_list, siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
@@
-413,7
+413,7
@@
int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
case NODE_ENV:
print_tabs(fd, depth);
fprintf(fd, "<env>\n");
case NODE_ENV:
print_tabs(fd, depth);
fprintf(fd, "<env>\n");
-
cds
_list_for_each_entry(iter, &node->u.env.declaration_list, siblings) {
+
bt
_list_for_each_entry(iter, &node->u.env.declaration_list, siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
@@
-424,7
+424,7
@@
int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
case NODE_TRACE:
print_tabs(fd, depth);
fprintf(fd, "<trace>\n");
case NODE_TRACE:
print_tabs(fd, depth);
fprintf(fd, "<trace>\n");
-
cds
_list_for_each_entry(iter, &node->u.trace.declaration_list, siblings) {
+
bt
_list_for_each_entry(iter, &node->u.trace.declaration_list, siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
@@
-435,7
+435,7
@@
int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
case NODE_CLOCK:
print_tabs(fd, depth);
fprintf(fd, "<clock>\n");
case NODE_CLOCK:
print_tabs(fd, depth);
fprintf(fd, "<clock>\n");
-
cds
_list_for_each_entry(iter, &node->u.clock.declaration_list, siblings) {
+
bt
_list_for_each_entry(iter, &node->u.clock.declaration_list, siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
@@
-451,7
+451,7
@@
int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
depth++;
print_tabs(fd, depth);
fprintf(fd, "<left>\n");
depth++;
print_tabs(fd, depth);
fprintf(fd, "<left>\n");
-
cds
_list_for_each_entry(iter, &node->u.ctf_expression.left, siblings) {
+
bt
_list_for_each_entry(iter, &node->u.ctf_expression.left, siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
@@
-462,7
+462,7
@@
int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
print_tabs(fd, depth);
fprintf(fd, "<right>\n");
print_tabs(fd, depth);
fprintf(fd, "<right>\n");
-
cds
_list_for_each_entry(iter, &node->u.ctf_expression.right, siblings) {
+
bt
_list_for_each_entry(iter, &node->u.ctf_expression.right, siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
@@
-486,7
+486,7
@@
int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
print_tabs(fd, depth);
fprintf(fd, "<type_declarator_list>\n");
print_tabs(fd, depth);
fprintf(fd, "<type_declarator_list>\n");
-
cds
_list_for_each_entry(iter, &node->u._typedef.type_declarators, siblings) {
+
bt
_list_for_each_entry(iter, &node->u._typedef.type_declarators, siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
@@
-508,7
+508,7
@@
int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
print_tabs(fd, depth);
fprintf(fd, "<type_declarator_list>\n");
print_tabs(fd, depth);
fprintf(fd, "<type_declarator_list>\n");
-
cds
_list_for_each_entry(iter, &node->u.typealias_target.type_declarators, siblings) {
+
bt
_list_for_each_entry(iter, &node->u.typealias_target.type_declarators, siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
@@
-531,7
+531,7
@@
int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
print_tabs(fd, depth);
fprintf(fd, "<type_declarator_list>\n");
print_tabs(fd, depth);
fprintf(fd, "<type_declarator_list>\n");
-
cds
_list_for_each_entry(iter, &node->u.typealias_alias.type_declarators, siblings) {
+
bt
_list_for_each_entry(iter, &node->u.typealias_alias.type_declarators, siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
@@
-583,7
+583,7
@@
int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
case NODE_FLOATING_POINT:
print_tabs(fd, depth);
fprintf(fd, "<floating_point>\n");
case NODE_FLOATING_POINT:
print_tabs(fd, depth);
fprintf(fd, "<floating_point>\n");
-
cds
_list_for_each_entry(iter, &node->u.floating_point.expressions, siblings) {
+
bt
_list_for_each_entry(iter, &node->u.floating_point.expressions, siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
@@
-594,7
+594,7
@@
int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
case NODE_INTEGER:
print_tabs(fd, depth);
fprintf(fd, "<integer>\n");
case NODE_INTEGER:
print_tabs(fd, depth);
fprintf(fd, "<integer>\n");
-
cds
_list_for_each_entry(iter, &node->u.integer.expressions, siblings) {
+
bt
_list_for_each_entry(iter, &node->u.integer.expressions, siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
@@
-605,7
+605,7
@@
int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
case NODE_STRING:
print_tabs(fd, depth);
fprintf(fd, "<string>\n");
case NODE_STRING:
print_tabs(fd, depth);
fprintf(fd, "<string>\n");
-
cds
_list_for_each_entry(iter, &node->u.string.expressions, siblings) {
+
bt
_list_for_each_entry(iter, &node->u.string.expressions, siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
@@
-619,7
+619,7
@@
int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
if (node->u.enumerator.id)
fprintf(fd, " id=\"%s\"", node->u.enumerator.id);
fprintf(fd, ">\n");
if (node->u.enumerator.id)
fprintf(fd, " id=\"%s\"", node->u.enumerator.id);
fprintf(fd, ">\n");
-
cds
_list_for_each_entry(iter, &node->u.enumerator.values, siblings) {
+
bt
_list_for_each_entry(iter, &node->u.enumerator.values, siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
@@
-648,7
+648,7
@@
int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
print_tabs(fd, depth);
fprintf(fd, "<enumerator_list>\n");
print_tabs(fd, depth);
fprintf(fd, "<enumerator_list>\n");
-
cds
_list_for_each_entry(iter, &node->u._enum.enumerator_list, siblings) {
+
bt
_list_for_each_entry(iter, &node->u._enum.enumerator_list, siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
@@
-668,7
+668,7
@@
int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
print_tabs(fd, depth);
fprintf(fd, "<type_declarator_list>\n");
print_tabs(fd, depth);
fprintf(fd, "<type_declarator_list>\n");
-
cds
_list_for_each_entry(iter, &node->u.struct_or_variant_declaration.type_declarators, siblings) {
+
bt
_list_for_each_entry(iter, &node->u.struct_or_variant_declaration.type_declarators, siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
@@
-684,7
+684,7
@@
int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
if (node->u.variant.choice)
fprintf(fd, " choice=\"%s\"", node->u.variant.choice);
fprintf(fd, ">\n");
if (node->u.variant.choice)
fprintf(fd, " choice=\"%s\"", node->u.variant.choice);
fprintf(fd, ">\n");
-
cds
_list_for_each_entry(iter, &node->u.variant.declaration_list, siblings) {
+
bt
_list_for_each_entry(iter, &node->u.variant.declaration_list, siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
@@
-699,17
+699,17
@@
int ctf_visitor_print_xml(FILE *fd, int depth, struct ctf_node *node)
node->u._struct.name);
else
fprintf(fd, "<struct>\n");
node->u._struct.name);
else
fprintf(fd, "<struct>\n");
-
cds
_list_for_each_entry(iter, &node->u._struct.declaration_list, siblings) {
+
bt
_list_for_each_entry(iter, &node->u._struct.declaration_list, siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
}
print_tabs(fd, depth);
fprintf(fd, "</struct>\n");
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
}
print_tabs(fd, depth);
fprintf(fd, "</struct>\n");
- if (!
cds
_list_empty(&node->u._struct.min_align)) {
+ if (!
bt
_list_empty(&node->u._struct.min_align)) {
print_tabs(fd, depth);
fprintf(fd, "<align>\n");
print_tabs(fd, depth);
fprintf(fd, "<align>\n");
-
cds
_list_for_each_entry(iter, &node->u._struct.min_align, siblings) {
+
bt
_list_for_each_entry(iter, &node->u._struct.min_align, siblings) {
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
ret = ctf_visitor_print_xml(fd, depth + 1, iter);
if (ret)
return ret;
This page took
0.041324 seconds
and
4
git commands to generate.