fprintf(pos->fp, " ");
if (pos->print_names)
fprintf(pos->fp, "%s = ",
- g_quark_to_string(definition->name));
+ rem_(g_quark_to_string(definition->name)));
}
if (elem->id == CTF_TYPE_INTEGER) {
fprintf(pos->fp, " ");
if (pos->print_names)
fprintf(pos->fp, "%s = ",
- g_quark_to_string(definition->name));
+ rem_(g_quark_to_string(definition->name)));
field_nr_saved = pos->field_nr;
pos->field_nr = 0;
fprintf(pos->fp, " ");
if (pos->print_names)
fprintf(pos->fp, "%s = ",
- g_quark_to_string(definition->name));
+ rem_(g_quark_to_string(definition->name)));
fprintf(pos->fp, "%Lg\n", float_definition->value);
return 0;
fprintf(pos->fp, " ");
if (pos->print_names)
fprintf(pos->fp, "%s = ",
- g_quark_to_string(definition->name));
+ rem_(g_quark_to_string(definition->name)));
if (pos->string
&& (integer_declaration->encoding == CTF_STRING_ASCII
fprintf(pos->fp, " ");
if (pos->print_names)
fprintf(pos->fp, "%s = ",
- g_quark_to_string(definition->name));
+ rem_(g_quark_to_string(definition->name)));
}
if (elem->id == CTF_TYPE_INTEGER) {
fprintf(pos->fp, " ");
if (pos->print_names)
fprintf(pos->fp, "%s = ",
- g_quark_to_string(definition->name));
+ rem_(g_quark_to_string(definition->name)));
fprintf(pos->fp, "\"%s\"", string_definition->value);
return 0;
fprintf(pos->fp, " ");
if (pos->print_names && definition->name != 0)
fprintf(pos->fp, "%s = ",
- g_quark_to_string(definition->name));
+ rem_(g_quark_to_string(definition->name)));
if (pos->print_names || len > 1)
fprintf(pos->fp, "{");
}
fprintf(pos->fp, " ");
if (pos->print_names)
fprintf(pos->fp, "%s = ",
- g_quark_to_string(definition->name));
+ rem_(g_quark_to_string(definition->name)));
fprintf(pos->fp, "{");
}
pos->depth++;
*/
int print_field(struct definition *definition);
+static inline
+const char *rem_(const char *str)
+{
+ if (str[0] == '_')
+ return &str[1];
+ else
+ return str;
+}
+
#endif /* _BABELTRACE_CTF_TEXT_TYPES_H */