Home | History | Annotate | Download | only in mtree

Lines Matching refs:NODE

100 static	void	replacenode(NODE *, NODE *);
101 static void set(char *, NODE *);
102 static void unset(char *, NODE *);
103 static void addchild(NODE *, NODE *);
104 static int nodecmp(const NODE *, const NODE *);
109 NODE *
112 NODE *centry, *last, *pathparent, *cur;
114 NODE ginfo, *root;
168 noparent: mtree_err("no parent node");
207 if ((centry = calloc(1, sizeof(NODE) + strlen(p))) == NULL)
222 * Allow a bare "." root node by forcing it to
229 "root node must be the directory `.',"
233 "root node must type %#x != %#x",
272 free_nodes(NODE *root)
274 NODE *cur, *next;
323 dump_nodes(FILE *fp, const char *dir, NODE *root, int pathlast)
325 NODE *cur;
490 replacenode(NODE *cur, NODE *new)
544 set(char *t, NODE *ip)
706 unset(char *t, NODE *ip)
719 * Add the centry node as a child of the pathparent node. If
725 addchild(NODE *pathparent, NODE *centry)
727 NODE *samename; /* node with the same name as centry */
728 NODE *replacepos; /* if non-NULL, centry should replace this node */
729 NODE *insertpos; /* if non-NULL, centry should be inserted
730 * after this node */
731 NODE *cur; /* for stepping through the list */
732 NODE *last; /* the last node in the list */
741 /* centry is pathparent's first and only child node so far */
748 * centry node to the list.
750 * We first scan through the list looking for an existing node
752 * for the correct position to replace or insert the new node
770 /* replace node with same name */
773 /* add new node at end of list */
780 * We found a node with the same name above. Call
782 * or replace the information in the samename node and
783 * free the information in the centry node.
787 /* The just-replaced node was in the correct position */
792 * We thought the new node should be just before
793 * or just after the replaced node, but that would
794 * be equivalent to just retaining the replaced node.
800 * The just-replaced node is in the wrong position in
802 * criteria other than the node name.
804 * Make centry point to the just-replaced node. Unlink
805 * the just-replaced node from the list, and allow it to
849 nodecmp(const NODE *a, const NODE *b)