X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fatoin.c;h=29692a45baa01fd062ffcbb6a2dd4919f3111ca8;hb=0faba8eaa6796ce9a1101e36d00d9b0d9f5ce3b2;hp=d22f84fabb012942af60a74aea0929743ba1e102;hpb=2ca7419e15fc506b3ec2dcff3b288861a328793d;p=yaz-moved-to-github.git diff --git a/src/atoin.c b/src/atoin.c index d22f84f..29692a4 100644 --- a/src/atoin.c +++ b/src/atoin.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2010 Index Data + * Copyright (C) 1995-2011 Index Data * See the file LICENSE for details. */ @@ -13,8 +13,8 @@ #endif #include -#include #include +#include int atoi_n(const char *buf, int len) { @@ -22,7 +22,7 @@ int atoi_n(const char *buf, int len) while (--len >= 0) { - if (isdigit(*(const unsigned char *) buf)) + if (yaz_isdigit(*buf)) val = val*10 + (*buf - '0'); buf++; } @@ -33,7 +33,7 @@ int atoi_n_check(const char *buf, int size, int *val) { int i; for (i = 0; i < size; i++) - if (!isdigit(i[(const unsigned char *) buf])) + if (!yaz_isdigit(buf[i])) return 0; *val = atoi_n(buf, size); return 1;