repos/stagit

fork of stagit, a static git page generator
Commits Files Refs README LICENSE
commit c3b2788c29dd328ea34a399f891abf566c2e56ec
parent 78ea8debfc82f0c0c0123ceb8d357db26a64f614
Author: Martin Kloeckner <mjkloeckner@gmail.com>
Date:   Fri,  4 Sep 2026 22:03:20 -0300

Show decimal byte count (KB) instead of binary byte count (KiB)

Diffstat:
Mstagit.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/stagit.c b/stagit.c
@@ -1078,7 +1078,8 @@ writeblobmd(FILE *fp, const git_blob *blob, const char *rawprefix)
 const char *
 formatsize(size_t size)
 {
-    static const char *units[] = { "B", "KiB", "MiB", "GiB", "TiB" };
+    static const char *units[] = { "B", "KB", "MB", "GB", "TB" };
+    // static const char *units[] = { "B", "KiB", "MiB", "GiB", "TiB" };
     static char buf[32];
     double sz = size;
     size_t i;