+int oid_dotstring_to_oid(const char *name, Odr_oid *oid)
+{
+ int i = 0;
+ int val = 0;
+ while (yaz_isdigit (*name))
+ {
+ val = val*10 + (*name - '0');
+ name++;
+ if (*name == '.')
+ {
+ if (i < OID_SIZE-1)
+ oid[i++] = val;
+ val = 0;
+ name++;
+ }
+ }
+ if (i == 0)
+ return -1;
+ oid[i] = val;
+ oid[i+1] = -1;
+ return 0;
+}
+