projects
/
mmh
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Changed msg_style and msg_delim to be file static to m_getfld.c
[mmh]
/
sbr
/
atooi.c
1
2
/*
3
* atooi.c -- octal version of atoi()
4
*
5
* This code is Copyright (c) 2002, by the authors of nmh. See the
6
* COPYRIGHT file in the root directory of the nmh distribution for
7
* complete copyright information.
8
*/
9
10
#include <h/mh.h>
11
12
13
int
14
atooi(char *cp)
15
{
16
register int i, base;
17
18
i = 0;
19
base = 8;
20
while (*cp >= '0' && *cp <= '7') {
21
i *= base;
22
i += *cp++ - '0';
23
}
24
25
return i;
26
}