Lines Matching refs:cur
112 NODE *centry, *last, *pathparent, *cur; in spec() local
184 cur = root; in spec()
190 while (cur && in spec()
191 strcmp(cur->name, p) != 0) { in spec()
192 cur = cur->next; in spec()
195 if (cur == NULL || cur->type != F_DIR) { in spec()
200 pathparent = cur; in spec()
201 cur = cur->child; in spec()
270 NODE *cur, *next; in free_nodes() local
276 for (cur = root; cur != NULL; cur = next) { in free_nodes()
277 next = cur->next; in free_nodes()
278 free_nodes(cur->child); in free_nodes()
279 REPLACEPTR(cur->slink, NULL); in free_nodes()
280 REPLACEPTR(cur->md5digest, NULL); in free_nodes()
281 REPLACEPTR(cur->rmd160digest, NULL); in free_nodes()
282 REPLACEPTR(cur->sha1digest, NULL); in free_nodes()
283 REPLACEPTR(cur->sha256digest, NULL); in free_nodes()
284 REPLACEPTR(cur->sha384digest, NULL); in free_nodes()
285 REPLACEPTR(cur->sha512digest, NULL); in free_nodes()
286 REPLACEPTR(cur->tags, NULL); in free_nodes()
287 REPLACEPTR(cur, NULL); in free_nodes()
321 NODE *cur; in dump_nodes() local
327 for (cur = root; cur != NULL; cur = cur->next) { in dump_nodes()
328 if (cur->type != F_DIR && !matchtags(cur)) in dump_nodes()
332 dir, *dir ? "/" : "", cur->name) in dump_nodes()
339 #define MATCHFLAG(f) ((keys & (f)) && (cur->flags & (f))) in dump_nodes()
342 nodetype(cur->type)); in dump_nodes()
345 (name = user_from_uid(cur->st_uid, 1)) != NULL) in dump_nodes()
349 cur->st_uid); in dump_nodes()
353 (name = group_from_gid(cur->st_gid, 1)) != NULL) in dump_nodes()
357 cur->st_gid); in dump_nodes()
360 appendfield(fp, pathlast, "mode=%#o", cur->st_mode); in dump_nodes()
362 (cur->type == F_BLOCK || cur->type == F_CHAR)) in dump_nodes()
364 (uintmax_t)cur->st_rdev); in dump_nodes()
367 (uintmax_t)cur->st_nlink); in dump_nodes()
370 vispath(cur->slink)); in dump_nodes()
373 (uintmax_t)cur->st_size); in dump_nodes()
376 (intmax_t)cur->st_mtimespec.tv_sec, in dump_nodes()
377 cur->st_mtimespec.tv_nsec); in dump_nodes()
379 appendfield(fp, pathlast, "cksum=%lu", cur->cksum); in dump_nodes()
382 cur->md5digest); in dump_nodes()
385 cur->rmd160digest); in dump_nodes()
388 cur->sha1digest); in dump_nodes()
391 cur->sha256digest); in dump_nodes()
394 cur->sha384digest); in dump_nodes()
397 cur->sha512digest); in dump_nodes()
399 str = flags_to_string(cur->st_flags, "none"); in dump_nodes()
409 p = cur->tags; in dump_nodes()
419 if (cur->child) in dump_nodes()
420 dump_nodes(fp, path, cur->child, pathlast); in dump_nodes()
486 replacenode(NODE *cur, NODE *new) in replacenode() argument
489 #define REPLACE(x) cur->x = new->x in replacenode()
490 #define REPLACESTR(x) REPLACEPTR(cur->x,new->x) in replacenode()
492 if (cur->type != new->type) { in replacenode()
499 free_nodes(cur->child); in replacenode()
500 cur->child = NULL; in replacenode()
505 cur->name, nodetype(cur->type), in replacenode()
513 if (cur->slink != NULL) { in replacenode()
514 if ((cur->slink = strdup(new->slink)) == NULL) in replacenode()
516 if (strunvis(cur->slink, new->slink) == -1) in replacenode()
726 NODE *cur; /* for stepping through the list */ in addchild() local
734 cur = pathparent->child; in addchild()
735 if (cur == NULL) { in addchild()
750 for (; cur != NULL; last = cur, cur = cur->next) { in addchild()
751 if (strcmp(centry->name, cur->name) == 0) { in addchild()
752 samename = cur; in addchild()
755 cmp = nodecmp(centry, cur); in addchild()
757 replacepos = cur; in addchild()
759 insertpos = cur; in addchild()