#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
+#include <stdio.h>
#include <unistd.h>
#include <string.h>
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
switch (status) {
case __BT_FUNC_STATUS_OVERFLOW_ERROR:
return "OVERFLOW";
- case __BT_FUNC_STATUS_INVALID_OBJECT:
- return "INVALID_OBJECT";
+ case __BT_FUNC_STATUS_UNKNOWN_OBJECT:
+ return "UNKNOWN_OBJECT";
case __BT_FUNC_STATUS_MEMORY_ERROR:
return "MEMORY_ERROR";
case __BT_FUNC_STATUS_ERROR: