Lines Matching refs:np

99 addino(ino_t inum, struct entry *np)
106 np->e_ino = inum;
107 np->e_next = *epp;
108 *epp = np;
110 for (np = np->e_next; np != NULL; np = np->e_next)
111 if (np->e_ino == inum)
112 badentry(np, "duplicate inum");
145 char *np, *cp;
150 for (np = buf; *cp != '/' && *cp != '\0' &&
151 np < &buf[sizeof(buf)]; )
152 *np++ = *cp++;
153 if (np == &buf[sizeof(buf)])
155 *np = '\0';
222 struct entry *np, *ep;
225 np = freelist;
226 freelist = np->e_next;
227 memset(np, 0, (long)sizeof(struct entry));
229 np = (struct entry *)calloc(1, sizeof(struct entry));
230 if (np == NULL)
233 np->e_type = type & ~LINK;
238 np->e_name = savename(name);
239 np->e_namlen = strlen(name);
240 np->e_parent = np;
241 addino(ROOTINO, np);
242 return (np);
244 np->e_name = savename(strrchr(name, '/') + 1);
245 np->e_namlen = strlen(np->e_name);
246 np->e_parent = ep;
247 np->e_sibling = ep->e_entries;
248 ep->e_entries = np;
253 np->e_ino = inum;
254 np->e_links = ep->e_links;
255 ep->e_links = np;
259 addino(inum, np);
261 return (np);
270 struct entry *np;
282 np = lookupino(ep->e_ino);
283 if (np == NULL)
285 if (np == ep) {
291 for (; np != NULL; np = np->e_links) {
292 if (np->e_links == ep) {
293 np->e_links = ep->e_links;
297 if (np == NULL)
313 struct entry *np;
316 np = lookupparent(newname);
317 if (np == NULL)
319 if (np != ep->e_parent) {
321 ep->e_parent = np;
322 ep->e_sibling = np->e_entries;
323 np->e_entries = ep;
341 struct entry *np;
343 np = ep->e_parent;
344 if (np->e_entries == ep) {
345 np->e_entries = ep->e_sibling;
347 for (np = np->e_entries; np != NULL; np = np->e_sibling) {
348 if (np->e_sibling == ep) {
349 np->e_sibling = ep->e_sibling;
353 if (np == NULL)
386 struct strhdr *np;
393 np = strtblhdr[len / STRTBLINCR].next;
394 if (np != NULL) {
395 strtblhdr[len / STRTBLINCR].next = np->next;
396 cp = (char *)np;
413 struct strhdr *tp, *np;
416 np = (struct strhdr *)name;
417 np->next = tp->next;
418 tp->next = np;