projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 5.9.0
[yaz-moved-to-github.git]
/
src
/
atoin.c
diff --git
a/src/atoin.c
b/src/atoin.c
index
d22f84f
..
4ee0313
100644
(file)
--- a/
src/atoin.c
+++ b/
src/atoin.c
@@
-1,9
+1,9
@@
/* This file is part of the YAZ toolkit.
/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2010 Index Data
+ * Copyright (C) Index Data
* See the file LICENSE for details.
*/
* See the file LICENSE for details.
*/
-/**
+/**
* \file atoin.c
* \brief Implements atoi_n function.
*/
* \file atoin.c
* \brief Implements atoi_n function.
*/
@@
-13,8
+13,8
@@
#endif
#include <string.h>
#endif
#include <string.h>
-#include <ctype.h>
#include <yaz/marcdisp.h>
#include <yaz/marcdisp.h>
+#include <yaz/yaz-iconv.h>
int atoi_n(const char *buf, int len)
{
int atoi_n(const char *buf, int len)
{
@@
-22,7
+22,7
@@
int atoi_n(const char *buf, int len)
while (--len >= 0)
{
while (--len >= 0)
{
- if (isdigit(*(const unsigned char *) buf))
+ if (yaz_isdigit(*buf))
val = val*10 + (*buf - '0');
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++)
{
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;
return 0;
*val = atoi_n(buf, size);
return 1;