repo.or.cz
/
syslinux-debian
/
hramrach.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Adding upstream version 4.00~pre54+dfsg.
[syslinux-debian/hramrach.git]
/
sample
/
atou.c
blob
73b0bb794e47712f160a865c92f612f63e48bc99
1
static
inline
int
isdigit
(
int
ch
)
2
{
3
return
(
ch
>=
'0'
) && (
ch
<=
'9'
);
4
}
5
6
unsigned int
atou
(
const char
*
s
)
7
{
8
unsigned int
i
=
0
;
9
while
(
isdigit
(*
s
))
10
i
=
i
*
10
+ (*
s
++ -
'0'
);
11
return
i
;
12
}