ucspi-ssl
0.99e
TLS encryption for IPv6 communication
ucspi-ssl-0.99e
src
fmt_ulong.c
Go to the documentation of this file.
1
/* Public domain. */
2
3
#include "
fmt.h
"
4
5
unsigned
int
fmt_ulong
(
register
char
*s,
register
unsigned
long
u)
6
{
7
register
unsigned
int
len;
register
unsigned
long
q;
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
}
fmt.h
fmt_ulong
unsigned int fmt_ulong(register char *s, register unsigned long u)
Definition:
fmt_ulong.c:5
Generated on Wed Jul 11 2018 22:50:46 for ucspi-ssl by
1.8.13