mirror of
https://github.com/michaelrsweet/mxml.git
synced 2024-11-08 13:39:58 +00:00
Add debug stuff.
This commit is contained in:
parent
1e123721cb
commit
87410f7b09
@ -2,7 +2,7 @@
|
||||
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
|
||||
<head>
|
||||
<title>Documentation</title>
|
||||
<meta name='creator' content='Mini-XML v2.2.2'/>
|
||||
<meta name='creator' content='Mini-XML v2.2.3'/>
|
||||
<style><!--
|
||||
h1, h2, h3, p { font-family: sans-serif; text-align: justify; }
|
||||
tt, pre a:link, pre a:visited, tt a:link, tt a:visited { font-weight: bold; color: #7f0000; }
|
||||
|
15
mxml-attr.c
15
mxml-attr.c
@ -63,13 +63,28 @@ mxmlElementGetAttr(mxml_node_t *node, /* I - Element node */
|
||||
for (i = node->value.element.num_attrs, attr = node->value.element.attrs;
|
||||
i > 0;
|
||||
i --, attr ++)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf(" %s=\"%s\"\n", attr->name, attr->value);
|
||||
#endif /* DEBUG */
|
||||
|
||||
if (!strcmp(attr->name, name))
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf(" Returning \"%s\"!\n", attr->value);
|
||||
#endif /* DEBUG */
|
||||
return (attr->value);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Didn't find attribute, so return NULL...
|
||||
*/
|
||||
|
||||
#ifdef DEBUG
|
||||
puts(" Returning NULL!\n");
|
||||
#endif /* DEBUG */
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user