projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: split real FC/field into single and double prec FC/field
[babeltrace.git]
/
src
/
plugins
/
text
/
pretty
/
print.c
diff --git
a/src/plugins/text/pretty/print.c
b/src/plugins/text/pretty/print.c
index d015cdd2feec870dbc8094baa4aa339ca413bc02..b89045d8c0d650e9ebf920c0b30bcec8299edf55 100644
(file)
--- a/
src/plugins/text/pretty/print.c
+++ b/
src/plugins/text/pretty/print.c
@@
-1016,11
+1016,17
@@
int print_field(struct pretty_component *pretty,
case BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER:
case BT_FIELD_CLASS_TYPE_SIGNED_INTEGER:
return print_integer(pretty, field);
case BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER:
case BT_FIELD_CLASS_TYPE_SIGNED_INTEGER:
return print_integer(pretty, field);
- case BT_FIELD_CLASS_TYPE_REAL:
+ case BT_FIELD_CLASS_TYPE_SINGLE_PRECISION_REAL:
+ case BT_FIELD_CLASS_TYPE_DOUBLE_PRECISION_REAL:
{
double v;
{
double v;
- v = bt_field_real_get_value(field);
+ if (class_id == BT_FIELD_CLASS_TYPE_SINGLE_PRECISION_REAL) {
+ v = (float) bt_field_real_single_precision_get_value(field);
+ } else {
+ v = bt_field_real_double_precision_get_value(field);
+ }
+
if (pretty->use_colors) {
bt_common_g_string_append(pretty->string, COLOR_NUMBER_VALUE);
}
if (pretty->use_colors) {
bt_common_g_string_append(pretty->string, COLOR_NUMBER_VALUE);
}
This page took
0.026502 seconds
and
4
git commands to generate.