diff options
author | Shav Kinderlehrer <[email protected]> | 2023-04-10 14:36:45 -0400 |
---|---|---|
committer | Shav Kinderlehrer <[email protected]> | 2023-04-10 14:36:45 -0400 |
commit | 6a4a706fc909c13039b63136e881a9305fc7a395 (patch) | |
tree | 49505c2339031cf125ead3ba97a83ca93697ed48 /src/lib.c | |
parent | 1ded2f0f812b109d14b5f5421305c3d790040dac (diff) | |
download | lat-6a4a706fc909c13039b63136e881a9305fc7a395.tar.gz lat-6a4a706fc909c13039b63136e881a9305fc7a395.zip |
Add multifile support
Diffstat (limited to 'src/lib.c')
-rw-r--r-- | src/lib.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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; +} |