b12f34fe32
The iterative approach in build_model failed to fill children arrays correctly. A preorder traversal is not required and turned out to be the culprit. Use an easier algorithm: Add nodes from scaffold tree starting at index 0 (root) to the target array whenever children are encountered. This ensures that children are adjacent to each other. This complies with the recursive version. Store only the scaffold index in numchildren field to prevent a direct processing of these children, which would require a recursive solution. This allows the algorithm to iterate through the target array from start to end without jumping back and forth, converting on the fly. Co-authored-by: Sebastian Pipping <sebastian@pipping.org> |
||
---|---|---|
.. | ||
.gitignore | ||
ascii.h | ||
asciitab.h | ||
expat_external.h | ||
expat.h | ||
iasciitab.h | ||
internal.h | ||
latin1tab.h | ||
libexpat.def | ||
libexpatw.def | ||
Makefile.am | ||
nametab.h | ||
siphash.h | ||
utf8tab.h | ||
winconfig.h | ||
xmlparse.c | ||
xmlrole.c | ||
xmlrole.h | ||
xmltok_impl.c | ||
xmltok_impl.h | ||
xmltok_ns.c | ||
xmltok.c | ||
xmltok.h |