aboutsummaryrefslogtreecommitdiff
path: root/src/lib.c
diff options
context:
space:
mode:
authorShav Kinderlehrer <[email protected]>2023-04-10 14:36:45 -0400
committerShav Kinderlehrer <[email protected]>2023-04-10 14:36:45 -0400
commit6a4a706fc909c13039b63136e881a9305fc7a395 (patch)
tree49505c2339031cf125ead3ba97a83ca93697ed48 /src/lib.c
parent1ded2f0f812b109d14b5f5421305c3d790040dac (diff)
downloadlat-6a4a706fc909c13039b63136e881a9305fc7a395.tar.gz
lat-6a4a706fc909c13039b63136e881a9305fc7a395.zip
Add multifile support
Diffstat (limited to 'src/lib.c')
-rw-r--r--src/lib.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib.c b/src/lib.c
index 0a98435..b7ee492 100644
--- a/src/lib.c
+++ b/src/lib.c
@@ -24,3 +24,14 @@ char *formatBytes(double *bytes) {
return SIZES[div];
}
+
+int intlen(unsigned i) {
+ int l = 1;
+
+ while (i > 9) {
+ l++;
+ i /= 10;
+ }
+
+ return l;
+}