X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fatoin.c;h=39af45f6740011cb8ea3212078a6c3b6ff89bafc;hp=50a8381f8a806bb860a324ea71947bed75c67419;hb=4f3bcae93d51a26709c12b51261c3d95af610cb2;hpb=1fbd038d97d6e1bfe97270ecc17cca123bcc435c 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;