2 * Copyright (C) 1995-2005, Index Data ApS
3 * See the file LICENSE for details.
5 * $Id: atoin.c,v 1.7 2005-06-25 15:46:03 adam Exp $
10 * \brief Implements atoi_n function.
19 #include <yaz/marcdisp.h>
22 * atoi_n: like atoi but reads at most len characters.
24 int atoi_n (const char *buf, int len)
30 if (isdigit (*(const unsigned char *) buf))
31 val = val*10 + (*buf - '0');
40 * indent-tabs-mode: nil
42 * vim: shiftwidth=4 tabstop=8 expandtab