projects
/
unix-history
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Bell 32V development
[unix-history]
/
usr
/
src
/
libc
/
gen
/
atos.c
short
atoi
(
ap
)
char
*
ap
;
{
register
short
n
,
c
;
register
char
*
p
;
int
f
;
p
=
ap
;
n
=
0
;
f
=
0
;
loop
:
while
(*
p
==
' '
|| *
p
==
' '
)
p
++;
if
(*
p
==
'-'
) {
f
++;
p
++;
goto
loop
;
}
while
(*
p
>=
'0'
&& *
p
<=
'9'
)
n
=
n
*
10
+ *
p
++ -
'0'
;
if
(
f
)
n
= -
n
;
return
(
n
);
}