mirror of
https://github.com/michaelrsweet/mxml.git
synced 2024-11-13 07:15:30 +00:00
Fix mxmlWalkNext() and mxmlWalkPrev() when node == top (STR #53)
This commit is contained in:
parent
083940536b
commit
b0e38fbcbf
9
CHANGES
9
CHANGES
@ -1,6 +1,13 @@
|
||||
CHANGES - 2007-04-22
|
||||
CHANGES - 2007-09-09
|
||||
--------------------
|
||||
|
||||
CHANGES IN Mini-XML 2.3.1
|
||||
|
||||
- mxmlWalkNext() and mxmlWalkPrev() did not work correctly
|
||||
when called with a node with no children as the top node
|
||||
(STR #53)
|
||||
|
||||
|
||||
CHANGES IN Mini-XML 2.3
|
||||
|
||||
- Added two exceptions to the LGPL to support static
|
||||
|
@ -23,7 +23,7 @@ htmldoc --verbose --batch mxml.book --no-title -f mxml.html
|
||||
|
||||
rm -rf mxml.d
|
||||
mkdir mxml.d
|
||||
htmldoc --verbose --batch mxml.book --no-title -t htmlsep -d mxml.d
|
||||
htmldoc --verbose --batch mxml.book --no-title -t html -d mxml.d
|
||||
|
||||
#
|
||||
# End of "$Id$".
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Search/navigation functions for Mini-XML, a small XML-like file
|
||||
* parsing library.
|
||||
*
|
||||
* Copyright 2003-2005 by Michael Sweet.
|
||||
* Copyright 2003-2007 by Michael Sweet.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
@ -135,6 +135,8 @@ mxmlWalkNext(mxml_node_t *node, /* I - Current node */
|
||||
return (NULL);
|
||||
else if (node->child && descend)
|
||||
return (node->child);
|
||||
else if (node == top)
|
||||
return (NULL);
|
||||
else if (node->next)
|
||||
return (node->next);
|
||||
else if (node->parent && node->parent != top)
|
||||
@ -167,7 +169,7 @@ mxmlWalkPrev(mxml_node_t *node, /* I - Current node */
|
||||
mxml_node_t *top, /* I - Top node */
|
||||
int descend) /* I - Descend into tree - MXML_DESCEND, MXML_NO_DESCEND, or MXML_DESCEND_FIRST */
|
||||
{
|
||||
if (!node)
|
||||
if (!node || node == top)
|
||||
return (NULL);
|
||||
else if (node->prev)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user