diff options
Diffstat (limited to 'src/libstddjb/uint640_fmt.c')
-rw-r--r-- | src/libstddjb/uint640_fmt.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libstddjb/uint640_fmt.c b/src/libstddjb/uint640_fmt.c new file mode 100644 index 0000000..7153055 --- /dev/null +++ b/src/libstddjb/uint640_fmt.c @@ -0,0 +1,10 @@ +/* ISC license. */ + +#include <skalibs/uint64.h> + +unsigned int uint640_fmt_base (char *s, uint64 x, register unsigned int n, unsigned char base) +{ + register unsigned int len = uint64_fmt_base(0, x, base) ; + while (n-- > len) *s++ = '0' ; + return uint64_fmt_base(s, x, base) ; +} |