X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=src%2Fplugins%2Ftext%2Fdetails%2Fwrite.c;h=1eab46b24e09977f8a76eedc575d06464c2768ef;hp=394c63fd491da3fb67ff2adf5ef492befad2ca50;hb=fe4df857056b4a03898f1031f136359ce733b0f5;hpb=4bf5c85fc4fe021489669155ae5de25e86397575 diff --git a/src/plugins/text/details/write.c b/src/plugins/text/details/write.c index 394c63fd..1eab46b2 100644 --- a/src/plugins/text/details/write.c +++ b/src/plugins/text/details/write.c @@ -931,8 +931,11 @@ void write_field_class(struct details_write_ctx *ctx, const bt_field_class *fc) case BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION: type = "Signed enumeration"; break; - case BT_FIELD_CLASS_TYPE_REAL: - type = "Real"; + case BT_FIELD_CLASS_TYPE_SINGLE_PRECISION_REAL: + type = "Single-precision real"; + break; + case BT_FIELD_CLASS_TYPE_DOUBLE_PRECISION_REAL: + type = "Double-precision real"; break; case BT_FIELD_CLASS_TYPE_STRING: type = "String"; @@ -986,14 +989,6 @@ void write_field_class(struct details_write_ctx *ctx, const bt_field_class *fc) plural(mapping_count)); break; } - case BT_FIELD_CLASS_TYPE_REAL: - if (bt_field_class_real_is_single_precision(fc)) { - g_string_append(ctx->str, " (Single precision)"); - } else { - g_string_append(ctx->str, " (Double precision)"); - } - - break; case BT_FIELD_CLASS_TYPE_STRUCTURE: { uint64_t member_count = @@ -1854,9 +1849,13 @@ void write_field(struct details_write_ctx *ctx, const bt_field *field, break; } - case BT_FIELD_CLASS_TYPE_REAL: + case BT_FIELD_CLASS_TYPE_SINGLE_PRECISION_REAL: + write_sp(ctx); + write_float_prop_value(ctx, bt_field_real_single_precision_get_value(field)); + break; + case BT_FIELD_CLASS_TYPE_DOUBLE_PRECISION_REAL: write_sp(ctx); - write_float_prop_value(ctx, bt_field_real_get_value(field)); + write_float_prop_value(ctx, bt_field_real_double_precision_get_value(field)); break; case BT_FIELD_CLASS_TYPE_STRING: write_sp(ctx);