lib: split real FC/field into single and double prec FC/field
[babeltrace.git] / src / common / common.h
index 4a2362e34e14be0477d07f47c64c535100ce1e38..41815454e61b0b6e141746a5cfa1ba57715a0f87 100644 (file)
@@ -31,6 +31,7 @@
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdlib.h>
+#include <stdio.h>
 #include <unistd.h>
 #include <string.h>
 
@@ -351,6 +352,15 @@ GString *bt_common_fold(const char *str, unsigned int total_length,
 BT_HIDDEN
 int bt_common_get_term_size(unsigned int *width, unsigned int *height);
 
+/*
+ * Appends the textual content of `fp` to `str`, starting from its
+ * current position to the end of the file.
+ *
+ * This function does NOT rewind `fp` once it's done or on error.
+ */
+BT_HIDDEN
+int bt_common_append_file_content_to_g_string(GString *str, FILE *fp);
+
 /*
  * Wraps read() function to handle EINTR and partial reads.
  * On success, it returns `count` received as parameter. On error, it returns a
@@ -411,8 +421,10 @@ const char *bt_common_field_class_type_string(enum bt_field_class_type class_typ
                return "UNSIGNED_INTEGER";
        case BT_FIELD_CLASS_TYPE_SIGNED_INTEGER:
                return "SIGNED_INTEGER";
-       case BT_FIELD_CLASS_TYPE_REAL:
-               return "REAL";
+       case BT_FIELD_CLASS_TYPE_SINGLE_PRECISION_REAL:
+               return "SINGLE_PRECISION_REAL";
+       case BT_FIELD_CLASS_TYPE_DOUBLE_PRECISION_REAL:
+               return "DOUBLE_PRECISION_REAL";
        case BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION:
                return "UNSIGNED_ENUMERATION";
        case BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION:
This page took 0.024864 seconds and 4 git commands to generate.