MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlXPtrLocationSetMerge

Function xmlXPtrLocationSetMerge

ThirdParty/libxml2/vtklibxml2/xpointer.c:660–676  ·  view source on GitHub ↗

* xmlXPtrLocationSetMerge: * @val1: the first LocationSet * @val2: the second LocationSet * * Merges two rangesets, all ranges from @val2 are added to @val1 * * Returns val1 once extended or NULL in case of error. */

Source from the content-addressed store, hash-verified

658 * Returns val1 once extended or NULL in case of error.
659 */
660xmlLocationSetPtr
661xmlXPtrLocationSetMerge(xmlLocationSetPtr val1, xmlLocationSetPtr val2) {
662 int i;
663
664 if (val1 == NULL) return(NULL);
665 if (val2 == NULL) return(val1);
666
667 /*
668 * !!!!! this can be optimized a lot, knowing that both
669 * val1 and val2 already have unicity of their values.
670 */
671
672 for (i = 0;i < val2->locNr;i++)
673 xmlXPtrLocationSetAdd(val1, val2->locTab[i]);
674
675 return(val1);
676}
677
678/**
679 * xmlXPtrLocationSetDel:

Callers

nothing calls this directly

Calls 1

xmlXPtrLocationSetAddFunction · 0.70

Tested by

no test coverage detected