Sign in
kernel
/
pub
/
scm
/
boot
/
syslinux
/
syslinux
/
refs/tags/hdt-0.3.5-pre2
/
.
/
sample
/
atou.c
blob: 73b0bb794e47712f160a865c92f612f63e48bc99 [
file
] [
log
] [
blame
]
static
inline
int
isdigit
(
int
ch
)
{
return
(
ch
>=
'0'
)
&&
(
ch
<=
'9'
);
}
unsigned
int
atou
(
const
char
*
s
)
{
unsigned
int
i
=
0
;
while
(
isdigit
(*
s
))
i
=
i
*
10
+
(*
s
++
-
'0'
);
return
i
;
}