nodeset_t *nodeset_create_string (const char *s) { nodeset_t *n = nodeset_create (); if (!nodeset_add_string (n, s)) { nodeset_destroy (n); return NULL; } return n; }
/* Use nsv[0] to build intersection. * (The returned nodeset is from nsv - didn't bother to copy) */ static nodeset_t *nsv_union (int nsc, nodeset_t **nsv) { int i; if (nsc < 1) return NULL; for (i = 1; i < nsc; i++) { if (!nodeset_add_string (nsv[0], nodeset_string (nsv[i]))) return NULL; } return nsv[0]; }