Merge branch 'master' into sru_2_0
[yaz-moved-to-github.git] / src / oid_util.c
index 58c3a35..14ce8f8 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2011 Index Data
+ * Copyright (C) 1995-2013 Index Data
  * See the file LICENSE for details.
  */
 
@@ -14,8 +14,8 @@
 
 #include <stdlib.h>
 #include <string.h>
-#include <ctype.h>
 
+#include <yaz/yaz-iconv.h>
 #include <yaz/snprintf.h>
 #include <yaz/oid_util.h>
 
@@ -62,7 +62,7 @@ char *oid_oid_to_dotstring(const Odr_oid *oid, char *oidbuf)
     int i;
 
     oidbuf[0] = '\0';
-    for (i = 0; oid[i] != -1 && i < OID_SIZE; i++) 
+    for (i = 0; oid[i] != -1 && i < OID_SIZE; i++)
     {
         yaz_snprintf(tmpbuf, sizeof(tmpbuf)-1, "%d", oid[i]);
         if (i > 0)
@@ -76,7 +76,7 @@ int oid_dotstring_to_oid(const char *name, Odr_oid *oid)
 {
     int i = 0;
     int val = 0;
-    while (isdigit (*(unsigned char *) name))
+    while (yaz_isdigit (*name))
     {
         val = val*10 + (*name - '0');
         name++;