Home | History | Annotate | Download | only in util

Lines Matching refs:hp

199   HDF *hp = hdf;
216 r = _walk_hdf (hdf->top, hdf->value, &hp);
218 if (hp)
220 parent = hp;
221 hp = hp->child;
227 hp = hdf->child;
229 if (hp == NULL)
244 hp = ne_hash_lookup(parent->hash, &hash_key);
248 while (hp != NULL)
250 if (hp->name && (x == hp->name_len) && !strncmp(hp->name, n, x))
256 hp = hp->next;
260 if (hp == NULL)
266 if (hp->link)
268 r = _walk_hdf (hp->top, hp->value, &hp);
272 parent = hp;
273 hp = hp->child;
277 parent = hp;
278 hp = hp->child;
284 if (hp->link)
286 return _walk_hdf (hp->top, hp->value, node);
289 *node = hp;
577 HDF *hn, *hp, *hs;
666 hp = hn->last_hp;
669 if ((hs == NULL && hp == hn->child) || (hs && hs->next == hp))
671 if (hp && hp->name && (x == hp->name_len) && !strncmp (hp->name, n, x))
677 hp = hn->child;
685 hp = ne_hash_lookup(hn->hash, &hash_key);
690 while (hp != NULL)
692 if (hp->name && (x == hp->name_len) && !strncmp(hp->name, n, x))
696 hs = hp;
697 hp = hp->next;
703 if (hp) {
704 hn->last_hp = hp;
710 if (hp == NULL)
718 err = _alloc_hdf (&hp, n, x, NULL, 0, 0, hdf->top);
722 err = _alloc_hdf (&hp, n, x, value, dup, wf, hdf->top);
723 if (link) hp->link = 1;
724 else hp->link = 0;
725 hp->attr = attr;
730 hn->child = hp;
732 hs->next = hp;
733 hn->last_child = hp;
744 err = ne_hash_insert(hn->hash, hp, hp);
753 if (hp->attr == NULL)
755 hp->attr = attr;
759 _merge_attr(hp->attr, attr);
761 if (hp->value != value)
763 if (hp->alloc_value)
765 free(hp->value);
766 hp->value = NULL;
770 hp->alloc_value = 0;
771 hp->value = NULL;
775 hp->alloc_value = 1;
776 hp->value = strdup(value);
777 if (hp->value == NULL)
783 hp->alloc_value = wf;
784 hp->value = (char *)value;
787 if (link) hp->link = 1;
788 else hp->link = 0;
790 else if (hp->link)
792 char *new_name = (char *) malloc(strlen(hp->value) + strlen(s) + 1);
797 strcpy(new_name, hp->value);
815 hn = hp;
817 if (set_node != NULL) *set_node = hp;
945 HDF *hp = hdf;
953 hp = hdf->child;
954 if (hp == NULL)
968 while (hp != NULL)
970 if (hp->name && (x == hp->name_len) && !strncmp(hp->name, n, x))
976 ln = hp;
977 hp = hp->next;
980 if (hp == NULL)
986 lp = hp;
988 hp = hp->child;
996 ne_hash_remove(lp->hash, hp);
1000 ln->next = hp->next;
1003 if (hp == lp->last_child)
1005 hp->next = NULL;
1009 lp->child = hp->next;
1010 hp->next = NULL;
1012 _dealloc_hdf (&hp);