path: root/src/basic/
diff options
authorLennart Poettering <>2018-04-11 20:03:39 +0200
committerSven Eden <>2018-08-24 16:47:08 +0200
commitb616ac0d2b6b6e27e41646f8e6c9d62a1567141c (patch)
tree0652a00d95eb74da6787b399a044f05276637a8a /src/basic/
parentff3669adbfbfff7f8a7c95cd60f27e7ac5142ee7 (diff)
basic: add minimalistic table formatter
We have plenty of code in our codebase that outputs tables to the console, and all is homegrown and awful. Let's replace it with a generic implementation that can do automatically what the old implementations did manually. Features: 1. Ellipsation (for fields overly long) and alignment (for fields overly short) 2. Sorting of rows 3. automatically copies formatting from the same cell in the row above 4. Heavy use of varargs to make putting together tables easy 5. can expand and compress tables, with weights 6. Has a minimal understanding of unicode wide characters in order to match unicode strings to character cell terminals. 7. Columns can be reordered and individually turned off. 8. pretty printing for various data types And more.
Diffstat (limited to 'src/basic/')
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/ b/src/basic/
index c3f05e7ae..5eeeb0186 100644
--- a/src/basic/
+++ b/src/basic/
@@ -78,6 +78,8 @@
# fileio-label.h
# fileio.c
# fileio.h
+# format-table.c
+# format-table.h
# format-util.h
# fs-util.c
# fs-util.h