summaryrefslogtreecommitdiff
path: root/src/libstddjb/uint640_fmt.c
blob: 71530558c4b07dd3864ff59e048824b3532db332 (plain)
1
2
3
4
5
6
7
8
9
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) ;
}