ucspi-ssl
0.99e
TLS encryption for IPv6 communication
ucspi-ssl-0.99e
src
fmt_xlong.c
Go to the documentation of this file.
1
#include "
fmt.h
"
2
#include "
hexconversion.h
"
3
4
unsigned
int
fmt_xlong
(
register
char
*s,
register
unsigned
long
u)
5
{
6
register
unsigned
int
len;
register
unsigned
long
q;
7
len = 1; q = u;
8
while
(q > 15) { ++len; q /= 16; }
9
if
(s) {
10
s += len;
11
do
{ *--s =
tohex
(u % 16); u /= 16; }
while
(u);
/* handles u == 0 */
12
}
13
return
len;
14
}
fmt.h
tohex
char tohex(char num)
Definition:
hexconversion.c:23
hexconversion.h
fmt_xlong
unsigned int fmt_xlong(register char *s, register unsigned long u)
Definition:
fmt_xlong.c:4
Generated on Wed Jul 11 2018 22:50:46 for ucspi-ssl by
1.8.13