Lines Matching defs:cur

112 	NODE *centry, *last, *pathparent, *cur;
184 cur = root;
190 while (cur &&
191 strcmp(cur->name, p) != 0) {
192 cur = cur->next;
195 if (cur == NULL || cur->type != F_DIR) {
200 pathparent = cur;
201 cur = cur->child;
274 NODE *cur, *next;
280 for (cur = root; cur != NULL; cur = next) {
281 next = cur->next;
282 free_nodes(cur->child);
283 REPLACEPTR(cur->slink, NULL);
284 REPLACEPTR(cur->md5digest, NULL);
285 REPLACEPTR(cur->rmd160digest, NULL);
286 REPLACEPTR(cur->sha1digest, NULL);
287 REPLACEPTR(cur->sha256digest, NULL);
288 REPLACEPTR(cur->sha384digest, NULL);
289 REPLACEPTR(cur->sha512digest, NULL);
290 REPLACEPTR(cur->tags, NULL);
291 REPLACEPTR(cur, NULL);
318 * dump the NODEs from `cur', based in the directory `dir'.
325 NODE *cur;
331 for (cur = root; cur != NULL; cur = cur->next) {
332 if (cur->type != F_DIR && !matchtags(cur))
336 dir, *dir ? "/" : "", cur->name)
343 #define MATCHFLAG(f) ((keys & (f)) && (cur->flags & (f)))
346 nodetype(cur->type));
349 (name = user_from_uid(cur->st_uid, 1)) != NULL)
353 cur->st_uid);
357 (name = group_from_gid(cur->st_gid, 1)) != NULL)
361 cur->st_gid);
364 appendfield(fp, pathlast, "mode=%#o", cur->st_mode);
366 (cur->type == F_BLOCK || cur->type == F_CHAR))
368 (uintmax_t)cur->st_rdev);
371 (uintmax_t)cur->st_nlink);
374 vispath(cur->slink));
377 (uintmax_t)cur->st_size);
380 (intmax_t)cur->st_mtimespec.tv_sec,
381 cur->st_mtimespec.tv_nsec);
383 appendfield(fp, pathlast, "cksum=%lu", cur->cksum);
386 cur->md5digest);
389 cur->rmd160digest);
392 cur->sha1digest);
395 cur->sha256digest);
398 cur->sha384digest);
401 cur->sha512digest);
403 str = flags_to_string(cur->st_flags, "none");
413 p = cur->tags;
423 if (cur->child)
424 dump_nodes(fp, path, cur->child, pathlast);
490 replacenode(NODE *cur, NODE *new)
493 #define REPLACE(x) cur->x = new->x
494 #define REPLACESTR(x) REPLACEPTR(cur->x,new->x)
496 if (cur->type != new->type) {
503 free_nodes(cur->child);
504 cur->child = NULL;
509 cur->name, nodetype(cur->type),
517 if (cur->slink != NULL) {
518 if ((cur->slink = strdup(new->slink)) == NULL)
520 if (strunvis(cur->slink, new->slink) == -1)
731 NODE *cur; /* for stepping through the list */
739 cur = pathparent->child;
740 if (cur == NULL) {
755 for (; cur != NULL; last = cur, cur = cur->next) {
756 if (strcmp(centry->name, cur->name) == 0) {
757 samename = cur;
760 cmp = nodecmp(centry, cur);
762 replacepos = cur;
764 insertpos = cur;