projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move ctf_file_stream away from ctf-ir
[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 7115126f980d6a6b0a8021e203fd4d1b4fa0228d..49fa992817906dfd66d93d14b33b1de3794f9a42 100644
(file)
--- a/
formats/ctf/metadata/ctf-visitor-xml.c
+++ b/
formats/ctf/metadata/ctf-visitor-xml.c
@@
-76,15
+76,15
@@
int ctf_visitor_print_unary_expression(FILE *fd, int depth, struct ctf_node *nod
break;
case UNARY_SIGNED_CONSTANT:
print_tabs(fd, depth);
break;
case UNARY_SIGNED_CONSTANT:
print_tabs(fd, depth);
- fprintf(fd, "<unary_expression value=");
+ fprintf(fd, "<unary_expression value=
\"
");
fprintf(fd, "%" PRId64, node->u.unary_expression.u.signed_constant);
fprintf(fd, "%" PRId64, node->u.unary_expression.u.signed_constant);
- fprintf(fd, " />\n");
+ fprintf(fd, "
\"
/>\n");
break;
case UNARY_UNSIGNED_CONSTANT:
print_tabs(fd, depth);
break;
case UNARY_UNSIGNED_CONSTANT:
print_tabs(fd, depth);
- fprintf(fd, "<unary_expression value=");
+ fprintf(fd, "<unary_expression value=
\"
");
fprintf(fd, "%" PRIu64, node->u.unary_expression.u.signed_constant);
fprintf(fd, "%" PRIu64, node->u.unary_expression.u.signed_constant);
- fprintf(fd, " />\n");
+ fprintf(fd, "
\"
/>\n");
break;
case UNARY_SBRAC:
print_tabs(fd, depth);
break;
case UNARY_SBRAC:
print_tabs(fd, depth);
@@
-137,6
+137,7
@@
int ctf_visitor_print_type_specifier_list(FILE *fd, int depth, struct ctf_node *
static
int ctf_visitor_print_type_specifier(FILE *fd, int depth, struct ctf_node *node)
{
static
int ctf_visitor_print_type_specifier(FILE *fd, int depth, struct ctf_node *node)
{
+ int ret;
print_tabs(fd, depth);
switch (node->u.type_specifier.type) {
print_tabs(fd, depth);
switch (node->u.type_specifier.type) {
@@
-154,7
+155,7
@@
int ctf_visitor_print_type_specifier(FILE *fd, int depth, struct ctf_node *node)
case TYPESPEC_IMAGINARY:
case TYPESPEC_CONST:
case TYPESPEC_ID_TYPE:
case TYPESPEC_IMAGINARY:
case TYPESPEC_CONST:
case TYPESPEC_ID_TYPE:
- fprintf(fd, "<type_specifier \"");
+ fprintf(fd, "<type_specifier
type=
\"");
break;
case TYPESPEC_FLOATING_POINT:
case TYPESPEC_INTEGER:
break;
case TYPESPEC_FLOATING_POINT:
case TYPESPEC_INTEGER:
@@
-221,7
+222,10
@@
int ctf_visitor_print_type_specifier(FILE *fd, int depth, struct ctf_node *node)
case TYPESPEC_STRUCT:
case TYPESPEC_VARIANT:
case TYPESPEC_ENUM:
case TYPESPEC_STRUCT:
case TYPESPEC_VARIANT:
case TYPESPEC_ENUM:
- return ctf_visitor_print_xml(fd, depth, node->u.type_specifier.node);
+ ret = ctf_visitor_print_xml(fd, depth, node->u.type_specifier.node);
+ if (ret)
+ return ret;
+ break;
case TYPESPEC_UNKNOWN:
default:
fprintf(stderr, "[error] %s: unknown type specifier %d\n", __func__,
case TYPESPEC_UNKNOWN:
default:
fprintf(stderr, "[error] %s: unknown type specifier %d\n", __func__,
@@
-252,9
+256,9
@@
int ctf_visitor_print_type_specifier(FILE *fd, int depth, struct ctf_node *node)
case TYPESPEC_STRUCT:
case TYPESPEC_VARIANT:
case TYPESPEC_ENUM:
case TYPESPEC_STRUCT:
case TYPESPEC_VARIANT:
case TYPESPEC_ENUM:
+ depth--;
print_tabs(fd, depth);
fprintf(fd, "</type_specifier>\n");
print_tabs(fd, depth);
fprintf(fd, "</type_specifier>\n");
- depth--;
break;
case TYPESPEC_UNKNOWN:
default:
break;
case TYPESPEC_UNKNOWN:
default:
@@
-293,7
+297,7
@@
int ctf_visitor_print_type_declarator(FILE *fd, int depth, struct ctf_node *node
case TYPEDEC_ID:
if (node->u.type_declarator.u.id) {
print_tabs(fd, depth);
case TYPEDEC_ID:
if (node->u.type_declarator.u.id) {
print_tabs(fd, depth);
- fprintf(fd, "<id \"");
+ fprintf(fd, "<id
name=
\"");
fprintf(fd, "%s", node->u.type_declarator.u.id);
fprintf(fd, "\" />\n");
}
fprintf(fd, "%s", node->u.type_declarator.u.id);
fprintf(fd, "\" />\n");
}
This page took
0.027457 seconds
and
4
git commands to generate.