aboutsummaryrefslogtreecommitdiff
path: root/core/tui.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/tui.c')
-rw-r--r--core/tui.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/core/tui.c b/core/tui.c
index 6c27ff5..4fc2ce4 100644
--- a/core/tui.c
+++ b/core/tui.c
@@ -1,3 +1,6 @@
+#define PANE_WIDTH 27
+#define PANE_AND_MARGIN_WIDTH (PANE_WIDTH + 2)
+
enum {
PAIR_NORMAL = 0,
};
@@ -70,17 +73,26 @@ void tui_field(int line, int col, int color, int attr, const char *format, ...)
void tui_str_field(int l, const char *label, const char *value) {
assert(label);
+ assert(strlen(label) <= 4);
assert(value);
- tui_line(false, l, PAIR_NORMAL, A_NORMAL, "%s : %18s", label, value);
+ tui_line(false, l, PAIR_NORMAL, A_NORMAL, "%-4s : %18s", label, value);
}
void tui_ulx_field(int l, const char *label, uint64_t value) {
assert(label);
+ assert(strlen(label) <= 4);
tui_line(false, l, PAIR_NORMAL, A_NORMAL, "%-4s : %#18lx", label, value);
}
+void tui_uld_field(int l, const char *label, uint64_t value) {
+ assert(label);
+ assert(strlen(label) <= 4);
+ tui_line(false, l, PAIR_NORMAL, A_NORMAL, "%-4s : %#18ld", label, value);
+}
+
void tui_float_field(int l, const char *label, float value) {
assert(label);
+ assert(strlen(label) <= 4);
tui_line(false, l, PAIR_NORMAL, A_NORMAL, "%-4s : %18.1f", label, value);
}