␉for (prop = node->properties; prop; prop = prop->next)␊ |
␉{␊ |
␉␉//DPRINTF("Prop '%s'\n", prop->name);␊ |
␉␉if (strcmp(prop->name, "name") == 0)␊ |
␉␉if (strncmp(prop->name, "name", sizeof("name")) == 0)␊ |
␉␉{␊ |
␉␉␉return prop->value;␊ |
␉␉}␊ |
|
␉for (prop = node->properties; prop; prop = prop->next)␊ |
␉{␊ |
␉␉char c = *((char *)prop->value);␊ |
␉␉if (prop->length < 64 && (strcmp(prop->name, "name") == 0 || (c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_'))␊ |
␉␉if (prop->length < 64 && (strncmp(prop->name, "name", sizeof("name") ) == 0 || (c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_'))␊ |
␉␉{␊ |
␉␉␉printf("%s Property '%s' [%d] = '%s'\n", spaces, prop->name, prop->length, prop->value);␊ |
␉␉}␊ |