Revert r253247. This change should be improved based on a lesson learnt

from r233646 first.

Pointed out by:	jmallett
This commit is contained in:
Hiroki Sato 2013-07-12 04:22:46 +00:00
parent aae0d5e549
commit c70d61d51d

View File

@ -75,10 +75,10 @@ StartElement(void *userData, const char *name, const char **attr)
ref = NULL; ref = NULL;
for (i = 0; attr[i] != NULL; i += 2) { for (i = 0; attr[i] != NULL; i += 2) {
if (!strcmp(attr[i], "id")) { if (!strcmp(attr[i], "id")) {
id = (void *)strtoumax(attr[i + 1], NULL, 0); id = (void *)strtoul(attr[i + 1], NULL, 0);
mt->nident++; mt->nident++;
} else if (!strcmp(attr[i], "ref")) { } else if (!strcmp(attr[i], "ref")) {
ref = (void *)strtoumax(attr[i + 1], NULL, 0); ref = (void *)strtoul(attr[i + 1], NULL, 0);
} else } else
printf("%*.*s[%s = %s]\n", printf("%*.*s[%s = %s]\n",
mt->level + 1, mt->level + 1, "", mt->level + 1, mt->level + 1, "",