X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fatoin.c;h=39af45f6740011cb8ea3212078a6c3b6ff89bafc;hb=8fba4cf2cac1cc543aa4c1063c78b449ebac44a7;hp=50a8381f8a806bb860a324ea71947bed75c67419;hpb=43a9d38d20c1b1bcd1a03b2445a501d27526bd35;p=yaz-moved-to-github.git diff --git a/src/atoin.c b/src/atoin.c index 50a8381..39af45f 100644 --- a/src/atoin.c +++ b/src/atoin.c @@ -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)) return 0; *val = atoi_n(buf, size); return 1;