Home
last modified time | relevance | path

Searched refs:np (Results 1 – 25 of 143) sorted by relevance

123456

/mirbsd/src/usr.bin/mail/
Dnames.c59 struct name *np; in nalloc() local
61 np = (struct name *)salloc(sizeof(*np)); in nalloc()
62 np->n_flink = NULL; in nalloc()
63 np->n_blink = NULL; in nalloc()
64 np->n_type = ntype; in nalloc()
65 np->n_name = savestr(str); in nalloc()
66 return(np); in nalloc()
75 struct name *np; in tailof() local
77 np = name; in tailof()
78 if (np == NULL) in tailof()
[all …]
Dv7.local.c92 char *np; in username() local
95 if ((np = getenv("USER")) != NULL) in username()
96 return(np); in username()
97 if ((np = getenv("LOGNAME")) != NULL) in username()
98 return(np); in username()
99 if ((np = getname(uid = getuid())) != NULL) in username()
100 return(np); in username()
101 if ((np = getlogin()) != NULL) in username()
102 return(np); in username()
Dsend.c431 struct name *np; in fixhead() local
436 for (np = tolist; np != NULL; np = np->n_flink) in fixhead()
437 if ((np->n_type & GMASK) == GTO) in fixhead()
439 cat(hp->h_to, nalloc(np->n_name, np->n_type)); in fixhead()
440 else if ((np->n_type & GMASK) == GCC) in fixhead()
442 cat(hp->h_cc, nalloc(np->n_name, np->n_type)); in fixhead()
443 else if ((np->n_type & GMASK) == GBCC) in fixhead()
445 cat(hp->h_bcc, nalloc(np->n_name, np->n_type)); in fixhead()
525 fmt(char *str, struct name *np, FILE *fo, int comma) in fmt() argument
533 for (; np != NULL; np = np->n_flink) { in fmt()
[all …]
Dcmd3.c204 struct name *np; local
217 np = extract(replyto, GTO);
219 np = extract(cp, GTO);
221 np = NULL;
222 np = elide(np);
227 np = delname(np, myname);
230 np = delname(np, *ap);
231 if (np != NULL && replyto == NULL)
232 np = cat(np, extract(rcv, GTO));
233 else if (np == NULL) {
[all …]
/mirbsd/src/sys/dev/pci/
Dncr.c339 bus_space_read_1 (np->sc_st, np->sc_sh, (o))
341 bus_space_read_2 (np->sc_st, np->sc_sh, offsetof(struct ncr_reg, r))
345 bus_space_read_4 (np->sc_st, np->sc_sh, (o))
348 bus_space_write_1 (np->sc_st, np->sc_sh, offsetof(struct ncr_reg, r), (val))
350 bus_space_write_2 (np->sc_st, np->sc_sh, offsetof(struct ncr_reg, r), (val))
354 bus_space_write_4 (np->sc_st, np->sc_sh, (o), (val))
358 bus_space_read_4 (np->ram_tag, np->ram_handle, off))
365 bus_space_write_4 (np->ram_tag, np->ram_handle, off, SCR_BO(val)); \
369 READSCRIPT_OFF(np->script, offsetof(struct script, r))
372 WRITESCRIPT_OFF(np->script, offsetof(struct script, r), val)
[all …]
/mirbsd/src/sbin/restore/
Dsymtab.c100 addino(ino_t inum, struct entry *np) in addino() argument
107 np->e_ino = inum; in addino()
108 np->e_next = *epp; in addino()
109 *epp = np; in addino()
111 for (np = np->e_next; np != NULL; np = np->e_next) in addino()
112 if (np->e_ino == inum) in addino()
113 badentry(np, "duplicate inum"); in addino()
146 char *np, *cp; in lookupname() local
151 for (np = buf; in lookupname()
152 *cp != '/' && *cp != '\0' && np < &buf[sizeof(buf)]; ) in lookupname()
[all …]
Drestore.c190 struct entry *ep, *np, *ip; in nodeupdates() local
213 np = lookupname(name); in nodeupdates()
214 if (np != NULL) { in nodeupdates()
216 ip = lookupino(np->e_ino); in nodeupdates()
219 if (ip != np) in nodeupdates()
230 if (ep == np) { in nodeupdates()
249 if (((key & (INOFND|NAMEFND)) == (INOFND|NAMEFND)) && ip != np) { in nodeupdates()
251 removeleaf(np); in nodeupdates()
252 freeentry(np); in nodeupdates()
255 myname(np)); in nodeupdates()
[all …]
Dinteractive.c102 struct entry *np; in runcmdshell() local
165 np = lookupname(name); in runcmdshell()
166 if (np == NULL || (np->e_flags & NEW) == 0) { in runcmdshell()
170 treescan(name, np->e_ino, deletefile); in runcmdshell()
463 char *cp, *np; in canon() local
475 for (cp = np = canonname; *np != '\0'; cp++) { in canon()
476 *cp = *np++; in canon()
477 while (*cp == '/' && *np == '/') in canon()
478 np++; in canon()
486 for (np = canonname; *np != '\0'; ) { in canon()
[all …]
Dutilities.c110 struct entry *np; in gentempname() local
113 for (np = lookupino(ep->e_ino); in gentempname()
114 np != NULL && np != ep; np = np->e_links) in gentempname()
116 if (np == NULL) in gentempname()
139 newnode(struct entry *np) in newnode() argument
143 if (np->e_type != NODE) in newnode()
144 badentry(np, "newnode: not a node"); in newnode()
145 cp = myname(np); in newnode()
147 np->e_flags |= EXISTED; in newnode()
/mirbsd/src/sys/nfs/
Dnfs_node.c98 struct nfsnode *np; local
107 for (np = LIST_FIRST(nhpp); np != NULL; np = LIST_NEXT(np, n_hash)) {
108 if (mntp != NFSTOV(np)->v_mount || np->n_fhsize != fhsize ||
109 bcmp((caddr_t)fhp, (caddr_t)np->n_fhp, fhsize))
111 vp = NFSTOV(np);
114 *npp = np;
126 np = pool_get(&nfs_node_pool, PR_WAITOK);
127 bzero((caddr_t)np, sizeof *np);
128 vp->v_data = np;
129 np->n_vnode = vp;
[all …]
Dnfs_bio.c74 struct nfsnode *np = VTONFS(vp); local
112 if (np->n_flag & NMODIFIED) {
113 np->n_attrstamp = 0;
117 np->n_mtime = vattr.va_mtime.tv_sec;
122 if (np->n_mtime != vattr.va_mtime.tv_sec) {
126 np->n_mtime = vattr.va_mtime.tv_sec;
133 if (np->n_rcred)
134 crfree(np->n_rcred);
135 np->n_rcred = cred;
156 (lbn + 1 + nra) * biosize < np->n_size; nra++) {
[all …]
Dnfs_subs.c83 int nfs_attrtimeo(struct nfsnode *np);
1126 struct nfsnode *np; local
1172 np = VTONFS(vp);
1203 np->n_vnode = nvp;
1207 np->n_mtime = mtime.tv_sec;
1209 vap = &np->n_vattr;
1246 if (vap->va_size != np->n_size) {
1248 if (np->n_flag & NMODIFIED) {
1249 if (vap->va_size < np->n_size)
1250 vap->va_size = np->n_size;
[all …]
Dnfs_vnops.c319 struct nfsnode *np = VTONFS(vp); local
336 if (np->n_rcred) {
337 crfree(np->n_rcred);
339 np->n_rcred = ap->a_cred;
340 crhold(np->n_rcred);
343 if (np->n_wcred) {
344 crfree(np->n_wcred);
346 np->n_wcred = ap->a_cred;
347 crhold(np->n_wcred);
350 if (np->n_flag & NMODIFIED) {
[all …]
/mirbsd/src/gnu/usr.bin/cvs/lib/
Dprintf-parse.c136 const CHAR_T *np; in PRINTF_PARSE() local
138 for (np = cp; *np >= '0' && *np <= '9'; np++) in PRINTF_PARSE()
140 if (*np == '$') in PRINTF_PARSE()
144 for (np = cp; *np >= '0' && *np <= '9'; np++) in PRINTF_PARSE()
145 n = xsum (xtimes (n, 10), *np - '0'); in PRINTF_PARSE()
153 cp = np + 1; in PRINTF_PARSE()
206 const CHAR_T *np; in PRINTF_PARSE() local
208 for (np = cp; *np >= '0' && *np <= '9'; np++) in PRINTF_PARSE()
210 if (*np == '$') in PRINTF_PARSE()
214 for (np = cp; *np >= '0' && *np <= '9'; np++) in PRINTF_PARSE()
[all …]
Dsetenv.c217 char *np; in __add_to_environ() local
221 np = (char *) combined; in __add_to_environ()
243 np = KNOWN_VALUE (new_value); in __add_to_environ()
244 if (np == NULL) in __add_to_environ()
247 np = malloc (namelen + 1 + vallen); in __add_to_environ()
248 if (np == NULL) in __add_to_environ()
259 memcpy (np, new_value, namelen + 1 + vallen); in __add_to_environ()
261 memcpy (np, name, namelen); in __add_to_environ()
262 np[namelen] = '='; in __add_to_environ()
263 memcpy (&np[namelen + 1], value, vallen); in __add_to_environ()
[all …]
/mirbsd/src/usr.sbin/route6d/
Droute6d.c712 static struct netinfo6 *np; variable
728 np = ripbuf->rip6_nets; in ripflush()
729 for (i = 0; i < nrt; i++, np++) { in ripflush()
730 if (np->rip6_metric == NEXTHOP_METRIC) { in ripflush()
731 if (IN6_IS_ADDR_UNSPECIFIED(&np->rip6_dest)) in ripflush()
735 inet6_n2p(&np->rip6_dest)); in ripflush()
739 inet6_n2p(&np->rip6_dest), in ripflush()
740 np->rip6_plen, np->rip6_metric); in ripflush()
742 if (np->rip6_tag) { in ripflush()
744 ntohs(np->rip6_tag) & 0xffff); in ripflush()
[all …]
/mirbsd/src/usr.bin/ctags/
Dtree.c60 NODE *np; in pfnote() local
65 if (!(np = (NODE *)malloc(sizeof(NODE)))) { in pfnote()
70 if (!(head = np = (NODE *)malloc(sizeof(NODE)))) in pfnote()
84 if (!(np->entry = strdup(name))) in pfnote()
86 np->file = curfile; in pfnote()
87 np->lno = ln; in pfnote()
88 np->left = np->right = 0; in pfnote()
89 if (!(np->pat = strdup(lbuf))) in pfnote()
92 head = np; in pfnote()
94 add_node(np, head); in pfnote()
/mirbsd/src/usr.sbin/rip6query/
Drip6query.c75 struct netinfo6 *np; in main() local
146 np = ripbuf->rip6_nets; in main()
147 bzero(&np->rip6_dest, sizeof(struct in6_addr)); in main()
148 np->rip6_tag = 0; in main()
149 np->rip6_plen = 0; in main()
150 np->rip6_metric = HOPCNT_INFINITY6; in main()
170 np = ripbuf->rip6_nets; in main()
171 for (i = 0; i < n; i++, np++) { in main()
172 printf("\t%s/%d [%d]", inet6_n2a(&np->rip6_dest), in main()
173 np->rip6_plen, np->rip6_metric); in main()
[all …]
/mirbsd/src/libexec/cpp/
Dcpp.c320 register char *np,*op; register int ninbuf; local
321 dump(); np=pbuf-(p-inp); op=inp;
322 if (bob(np+1)) {pperror("token too long"); np=pbeg; p=inp+BUFSIZ;}
323 macdam += np-inp; outp=inp=np;
324 while (op<p) *np++= *op++;
325 p=np;
328 op=instack[--mactop]; np=pbuf;
329 do {while (*np++= *op++);} while (op<endbuf[mactop]); pend=np-1;
346 np=p; *np++='\n'; /* shut off unterminated quoted string */
347 while (--n>=0) *np++=')'; /* supply missing parens */
[all …]
/mirbsd/src/usr.sbin/rwhod/
Drwhod.c342 struct neighbor *np; in timer() local
419 for (np = neighbors; np != NULL; np = np->n_next) in timer()
420 (void)Sendto(s, &mywd, cc, 0, np->n_addr, np->n_addrlen); in timer()
477 struct neighbor *np; in configure() local
524 for (np = neighbors; np != NULL; np = np->n_next) in configure()
525 if (memcmp(sdl->sdl_data, np->n_name, in configure()
527 IPADDR_SA(np->n_addr) == IPADDR_SA(dstaddr)) in configure()
529 if (np != NULL) in configure()
531 len = sizeof(*np) + dstaddr->sa_len + sdl->sdl_nlen + 1; in configure()
532 np = (struct neighbor *)malloc(len); in configure()
[all …]
/mirbsd/src/lib/libc/stdlib/
Dgetenv.c50 const char *np; in __findenv() local
55 for (np = name; *np && *np != '='; ++np) in __findenv()
57 len = np - name; in __findenv()
59 for (np = name, i = len; i && *cp; i--) in __findenv()
60 if (*cp++ != *np++) in __findenv()
/mirbsd/src/usr.bin/sudo/
Dcheck.c183 char *p, *np, *new_prompt, *endp; local
224 for (p = old_prompt, np = new_prompt; *p; p++) {
229 n = strlcpy(np, user_shost, np - endp);
230 if (n >= np - endp)
232 np += n;
236 n = strlcpy(np, user_host, np - endp);
237 if (n >= np - endp)
239 np += n;
243 n = strlcpy(np, user_name, np - endp);
244 if (n >= np - endp)
[all …]
/mirbsd/src/libexec/getty/
Dsubr.c62 struct gettynums *np; in gettable() local
74 for (np = gettynums; np->field; np++) { in gettable()
75 if (cgetnum(buf, np->field, &n) == -1) in gettable()
76 np->set = 0; in gettable()
78 np->set = 1; in gettable()
79 np->value = n; in gettable()
94 for (np = gettynums; np->field; np++) in gettable()
95 printf("cgetnum: %s=%d\n", np->field, np->value); in gettable()
107 struct gettynums *np; in gendefaults() local
113 for (np = gettynums; np->field; np++) in gendefaults()
[all …]
Dmain.c346 char *np; in getname() local
364 np = name; in getname()
411 if (np > name) { in getname()
412 np--; in getname()
425 else if (np > name) in getname()
428 np = name; in getname()
431 if (np >= name + sizeof name - 1) { in getname()
433 np--; in getname()
444 *np++ = c; in getname()
452 *np = 0; in getname()
[all …]
/mirbsd/src/sys/dev/raidframe/
Drf_pqdegdags.c202 int np = node->numParams; in rf_PQDoubleRecoveryFunc() local
204 (RF_AccessStripeMap_t *) node->params[np - 1].p; in rf_PQDoubleRecoveryFunc()
205 RF_Raid_t *raidPtr = (RF_Raid_t *) node->params[np - 2].p; in rf_PQDoubleRecoveryFunc()
224 ppda = node->params[np - 6].p; in rf_PQDoubleRecoveryFunc()
225 ppda2 = node->params[np - 5].p; in rf_PQDoubleRecoveryFunc()
226 qpda = node->params[np - 4].p; in rf_PQDoubleRecoveryFunc()
227 qpda2 = node->params[np - 3].p; in rf_PQDoubleRecoveryFunc()
228 d = (np - 6); in rf_PQDoubleRecoveryFunc()
231 ppda = node->params[np - 4].p; in rf_PQDoubleRecoveryFunc()
232 qpda = node->params[np - 3].p; in rf_PQDoubleRecoveryFunc()
[all …]

123456