- if (!isdigit(*str))
- return 0;
- while ((p = strchr(p, '.')))
- num++, p++;
- ret = (int *)nmem_malloc(nmem, sizeof(*ret)*(num + 1));
- p = str;
- do
- ret[i++] = atoi(p);
- while ((p = strchr(p, '.')) && *++p);
- ret[i] = -1;
+ if (oid_dotstring_to_oid(str, oid))
+ return 0;
+ ret = (Odr_oid *)nmem_malloc(nmem, sizeof(*ret)*(oid_oidlen(oid) + 1));
+ oid_oidcpy(ret, oid);