#include <stdlib.h>
#include <unistd.h>
-#include <babeltrace2/trace-ir/event-class-const.h>
-#include <babeltrace2/trace-ir/field-class-const.h>
-#include <babeltrace2/trace-ir/field-path-const.h>
-#include <babeltrace2/logging.h>
-#include <babeltrace2/value.h>
+#include <babeltrace2/babeltrace.h>
-#define __BT_FUNC_STATUS_ENABLE
+#define __BT_IN_BABELTRACE_H
#include <babeltrace2/func-status.h>
-#undef __BT_FUNC_STATUS_ENABLE
#include "common/assert.h"
#include "common/macros.h"
GString *bt_common_fold(const char *str, unsigned int total_length,
unsigned int indent);
+/*
+ * Writes the terminal's width to `*width`, its height to `*height`,
+ * and returns 0 on success, or returns -1 on error.
+ */
+BT_HIDDEN
+int bt_common_get_term_size(unsigned int *width, unsigned int *height);
+
/*
* Wraps read() function to handle EINTR and partial reads.
* On success, it returns `count` received as parameter. On error, it returns a
return "BT_LOGGING_LEVEL_DEBUG";
case BT_LOGGING_LEVEL_INFO:
return "BT_LOGGING_LEVEL_INFO";
- case BT_LOGGING_LEVEL_WARN:
- return "BT_LOGGING_LEVEL_WARN";
+ case BT_LOGGING_LEVEL_WARNING:
+ return "BT_LOGGING_LEVEL_WARNING";
case BT_LOGGING_LEVEL_ERROR:
return "BT_LOGGING_LEVEL_ERROR";
case BT_LOGGING_LEVEL_FATAL:
return ret;
}
-#include <babeltrace2/undef-func-status.h>
-
#endif /* BABELTRACE_COMMON_INTERNAL_H */