Lines Matching full:np
50 struct name *np; in nalloc() local
52 np = (struct name *)salloc(sizeof(*np)); in nalloc()
53 np->n_flink = NULL; in nalloc()
54 np->n_blink = NULL; in nalloc()
55 np->n_type = ntype; in nalloc()
56 np->n_name = savestr(str); in nalloc()
57 return (np); in nalloc()
66 struct name *np; in tailof() local
68 np = name; in tailof()
69 if (np == NULL) in tailof()
71 while (np->n_flink != NULL) in tailof()
72 np = np->n_flink; in tailof()
73 return (np); in tailof()
85 struct name *top, *np, *t; in extract() local
92 np = NULL; in extract()
99 np->n_flink = t; in extract()
100 t->n_blink = np; in extract()
101 np = t; in extract()
111 detract(struct name *np, int ntype) in detract() argument
118 if (np == NULL) in detract()
124 for (p = np; p != NULL; p = p->n_flink) { in detract()
136 for (p = np; p != NULL; p = p->n_flink) { in detract()
278 struct name *np, *top; in outof() local
284 np = names; in outof()
287 while (np != NULL) { in outof()
288 if (!isfileaddr(np->n_name) && np->n_name[0] != '|') { in outof()
289 np = np->n_flink; in outof()
292 ispipe = np->n_name[0] == '|'; in outof()
294 fname = np->n_name+1; in outof()
296 fname = expand(np->n_name); in outof()
409 np->n_type |= GDEL; in outof()
410 np = np->n_flink; in outof()
450 struct name *new, *np, *cp; in usermap() local
455 np = names; in usermap()
457 while (np != NULL) { in usermap()
458 if (np->n_name[0] == '\\') { in usermap()
459 cp = np->n_flink; in usermap()
460 new = put(new, np); in usermap()
461 np = cp; in usermap()
464 gh = findgroup(np->n_name); in usermap()
465 cp = np->n_flink; in usermap()
467 new = gexpand(new, gh, metoo, np->n_type); in usermap()
469 new = put(new, np); in usermap()
470 np = cp; in usermap()
486 struct name *np; in gexpand() local
506 np = nalloc(cp, ntype); in gexpand()
514 np->n_type |= GDEL; in gexpand()
516 nlist = put(nlist, np); in gexpand()
545 unpack(struct name *np) in unpack() argument
551 n = np; in unpack()
591 struct name *np, *t, *new; in elide() local
597 np = names; in elide()
598 np = np->n_flink; in elide()
599 if (np != NULL) in elide()
600 np->n_blink = NULL; in elide()
602 while (np != NULL) { in elide()
604 while (strcasecmp(t->n_name, np->n_name) < 0) { in elide()
615 if (strcasecmp(t->n_name, np->n_name) < 0) { in elide()
616 t->n_flink = np; in elide()
617 np->n_blink = t; in elide()
618 t = np; in elide()
619 np = np->n_flink; in elide()
631 t = np; in elide()
632 np = np->n_flink; in elide()
645 x = np; in elide()
646 np = np->n_flink; in elide()
658 np = new; in elide()
659 while (np != NULL) { in elide()
660 t = np; in elide()
662 strcasecmp(np->n_name, t->n_flink->n_name) == 0) in elide()
664 if (t == np || t == NULL) { in elide()
665 np = np->n_flink; in elide()
671 * as np. Make np point beyond t. in elide()
674 np->n_flink = t->n_flink; in elide()
676 t->n_flink->n_blink = np; in elide()
677 np = np->n_flink; in elide()
701 count(struct name *np) in count() argument
705 for (c = 0; np != NULL; np = np->n_flink) in count()
706 if ((np->n_type & GDEL) == 0) in count()
715 delname(struct name *np, char name[]) in delname() argument
719 for (p = np; p != NULL; p = p->n_flink) in delname()
724 np = p->n_flink; in delname()
735 return (np); in delname()
747 struct name *np;
749 np = name;
750 while (np != NULL) {
751 fprintf(stderr, "%s(%d) ", np->n_name, np->n_type);
752 np = np->n_flink;