s/qmail  3.3.23
Next generation secure email transport
fmt_ulong.c
Go to the documentation of this file.
1 #include "fmt.h"
2 
3 unsigned int fmt_ulong(register char *s,register unsigned long u)
4 {
5  register unsigned int len;
6  register unsigned long q;
7 
8  len = 1; q = u;
9  while (q > 9) { ++len; q /= 10; }
10  if (s) {
11  s += len;
12  do { *--s = '0' + (u % 10); u /= 10; } while(u); /* handles u == 0 */
13  }
14  return len;
15 }
16 
unsigned int fmt_ulong(register char *s, register unsigned long u)
Definition: fmt_ulong.c:3
unsigned len
Definition: matchup.c:36
unsigned u
Definition: matchup.c:36