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