projects
/
yaz-moved-to-github.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Reworked odr_set_stream a bit, so that write handler now takes a
[yaz-moved-to-github.git]
/
src
/
atoin.c
1
/*
2
* Copyright (c) 1997-2003, Index Data
3
* See the file LICENSE for details.
4
*
5
* $Id: atoin.c,v 1.1 2003-10-27 12:21:30 adam Exp $
6
*/
7
8
#if HAVE_CONFIG_H
9
#include <config.h>
10
#endif
11
12
#include <string.h>
13
#include <ctype.h>
14
#include <yaz/yaz-util.h>
15
16
int atoi_n (const char *buf, int len)
17
{
18
int val = 0;
19
20
while (--len >= 0)
21
{
22
if (isdigit (*buf))
23
val = val*10 + (*buf - '0');
24
buf++;
25
}
26
return val;
27
}
28