/illumos-gate/usr/src/cmd/ipf/lib/ |
H A D | printnat.c | 23 void printnat(np, opts) in printnat() argument 24 ipnat_t *np; in printnat() 32 pr = getprotobynumber(np->in_p); 34 switch (np->in_redir) 50 np->in_redir); 54 printf(" %s", np->in_ifnames[0]); 55 if ((np->in_ifnames[1][0] != '\0') && 56 (strncmp(np->in_ifnames[0], np->in_ifnames[1], LIFNAMSIZ) != 0)) { 57 printf(",%s ", np->in_ifnames[1]); 61 if (np->in_flags & IPN_FILTER) { [all …]
|
/illumos-gate/usr/src/cmd/awk_xpg4/ |
H A D | awk3.c | 36 static NODE *arithmetic(NODE *np); 37 static NODE *comparison(NODE *np); 38 static int type_of(NODE *np); 41 static NODE *userfunc(NODE *np); 43 static NODE *exprconcat(NODE *np, int len); 44 static int s_if(NODE *np); 45 static int s_while(NODE *np); 46 static int s_for(NODE *np); 47 static int s_forin(NODE *np); 50 static int action(NODE *np); [all …]
|
H A D | awk4.c | 38 static uint nargs(NODE *np); 39 static NODE *dosub(NODE *np, int glob); 40 static NODE *docasetr(NODE *np, int upper); 54 f_exp(NODE *np) in f_exp() argument 58 if ((na = nargs(np)) > 1) in f_exp() 60 return (realnode(exp(exprreal(na==0 ? field0 : getlist(&np))))); in f_exp() 69 f_int(NODE *np) in f_int() argument 73 if ((na = nargs(np)) > 1) in f_int() 75 return (intnode(exprint(na==0 ? field0 : getlist(&np)))); in f_int() 84 f_log(NODE *np) in f_log() argument [all …]
|
/illumos-gate/usr/src/uts/common/os/ |
H A D | ddi_nodeid.c | 89 np_free(struct available *np) in np_free() argument 91 kmem_free(np, sizeof (struct available)); in np_free() 98 np_unlink(struct available *np) in np_unlink() argument 100 if (np->prev) in np_unlink() 101 np->prev->next = np->next; in np_unlink() 103 nhead = np->next; in np_unlink() 105 if (np->next) in np_unlink() 106 np->next->prev = np->prev; in np_unlink() 113 np_insert(struct available *fp, struct available *np) in np_insert() argument 115 fp->prev = np->prev; in np_insert() [all …]
|
H A D | instance.c | 62 static void in_dealloc_node(in_node_t *np); 64 static void in_enlist(in_node_t *ap, in_node_t *np); 67 static in_drv_t *in_drvwalk(in_node_t *np, char *binding_name); 69 static void in_endrv(in_node_t *np, in_drv_t *dp); 70 static void in_dq_drv(in_drv_t *np); 544 in_node_t *ap, *np; in e_ddi_assign_instance() local 574 np = in_devwalk(dip, &ap, NULL); in e_ddi_assign_instance() 575 if (np == NULL) { in e_ddi_assign_instance() 577 np = in_devwalk(dip, &ap, NULL); in e_ddi_assign_instance() 580 np = in_alloc_node(name, ddi_get_name_addr(dip)); in e_ddi_assign_instance() [all …]
|
/illumos-gate/usr/src/uts/common/fs/smbclnt/smbfs/ |
H A D | smbfs_subr2.c | 161 sn_inactive(smbnode_t *np) in sn_inactive() argument 175 mutex_enter(&np->r_statelock); in sn_inactive() 177 ovsa = np->r_secattr; in sn_inactive() 178 np->r_secattr = smbfs_vsa0; in sn_inactive() 179 np->r_sectime = 0; in sn_inactive() 181 oldcr = np->r_cred; in sn_inactive() 182 np->r_cred = NULL; in sn_inactive() 184 orpath = np->n_rpath; in sn_inactive() 185 orplen = np->n_rplen; in sn_inactive() 186 np->n_rpath = NULL; in sn_inactive() [all …]
|
H A D | smbfs_vnops.c | 166 static int smbfs_writenp(smbnode_t *np, caddr_t base, int tcount, 202 smbnode_t *np; in smbfs_open() local 215 np = VTOSMB(vp); in smbfs_open() 234 if (smbfs_rw_enter_sig(&np->r_lkserlock, RW_WRITER, SMBINTR(vp))) in smbfs_open() 244 if (np->n_ovtype == VNON) { in smbfs_open() 245 ASSERT(np->n_dirrefs == 0); in smbfs_open() 246 ASSERT(np->n_fidrefs == 0); in smbfs_open() 247 } else if (np->n_ovtype != vp->v_type) { in smbfs_open() 249 np->n_ovtype, vp->v_type); in smbfs_open() 258 if (np->n_dirseq == NULL) { in smbfs_open() [all …]
|
/illumos-gate/usr/src/cmd/fm/eversholt/common/ |
H A D | check.c | 44 static int check_reportlist(enum nodetype t, const char *s, struct node *np); 45 static int check_num(enum nodetype t, const char *s, struct node *np); 46 static int check_quote(enum nodetype t, const char *s, struct node *np); 47 static int check_action(enum nodetype t, const char *s, struct node *np); 48 static int check_num_func(enum nodetype t, const char *s, struct node *np); 49 static int check_fru_asru(enum nodetype t, const char *s, struct node *np); 50 static int check_engine(enum nodetype t, const char *s, struct node *np); 51 static int check_count(enum nodetype t, const char *s, struct node *np); 52 static int check_timeval(enum nodetype t, const char *s, struct node *np); 53 static int check_id(enum nodetype t, const char *s, struct node *np); [all …]
|
H A D | ptree.c | 68 is_stmt(struct node *np) in is_stmt() argument 70 switch (np->t) { in is_stmt() 94 ptree(int flags, struct node *np, int no_iterators, int fileline) in ptree() argument 96 if (np == NULL) in ptree() 99 switch (np->t) { in ptree() 103 out(flags|O_NONL, "%s", np->u.name.s); in ptree() 105 if (np->u.name.cp != NULL) { in ptree() 107 cp2num(np->u.name.cp, &num); in ptree() 109 } else if (np->u.name.it == IT_HORIZONTAL) { in ptree() 110 if (np->u.name.child == NULL || in ptree() [all …]
|
/illumos-gate/usr/src/cmd/svc/configd/ |
H A D | rc_node.c | 604 static void rc_node_no_client_refs(rc_node_t *np); 644 rc_node_match(rc_node_t *np, rc_node_lookup_t *l) in rc_node_match() argument 646 rc_node_lookup_t *r = &np->rn_id; in rc_node_match() 679 rc_node_hold_ephemeral_locked(rc_node_t *np) in rc_node_hold_ephemeral_locked() argument 681 assert(MUTEX_HELD(&np->rn_lock)); in rc_node_hold_ephemeral_locked() 683 ++np->rn_erefs; in rc_node_hold_ephemeral_locked() 697 rc_node_hold_other(rc_node_t *np) in rc_node_hold_other() argument 699 if (atomic_add_32_nv(&np->rn_other_refs, 1) == 1) { in rc_node_hold_other() 700 atomic_add_32(&np->rn_other_refs_held, 1); in rc_node_hold_other() 701 assert(np->rn_other_refs_held > 0); in rc_node_hold_other() [all …]
|
/illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/sh/ |
H A D | name.c | 47 offsetof(struct Namref,np),sizeof(struct Namval_t*),sizeof(struct Namref) 101 Namval_t *np; member 148 void sh_envput(Env_t* ep,Namval_t *np) in sh_envput() argument 151 Namarr_t *ap = nv_arrayptr(np); in sh_envput() 156 nv_putsub(np,"0",0L); in sh_envput() 157 else if(!(val=nv_getsub(np)) || strcmp(val,"0")) in sh_envput() 160 if(!(val = nv_getval(np))) in sh_envput() 162 stakputs(nv_name(np)); in sh_envput() 214 Namval_t *nv_addnode(Namval_t* np, int remove) in nv_addnode() argument 220 if(sp->numnodes==0 && !nv_isnull(np) && shp->last_table) in nv_addnode() [all …]
|
H A D | nvdisc.c | 43 char *nv_getv(Namval_t *np, register Namfun_t *nfp) in nv_getv() argument 54 if(!nv_isattr(np,NV_NODISC) || fp==(Namfun_t*)nv_arrayptr(np)) in nv_getv() 58 cp = (*fp->disc->getval)(np,fp); in nv_getv() 61 sfprintf(sh.strbuf,"%.*Lg",12,(*fp->disc->getnum)(np,fp)); in nv_getv() 67 cp = nv_getval(np); in nv_getv() 75 Sfdouble_t nv_getn(Namval_t *np, register Namfun_t *nfp) in nv_getn() argument 88 if(!fp->disc->getnum && nv_isattr(np,NV_INTEGER)) in nv_getn() 90 if(!nv_isattr(np,NV_NODISC) || fp==(Namfun_t*)nv_arrayptr(np)) in nv_getn() 94 d = (*fp->disc->getnum)(np,fp); in nv_getn() 95 else if(nv_isattr(np,NV_INTEGER)) in nv_getn() [all …]
|
H A D | array.c | 80 static Namarr_t *array_scope(Namval_t *np, Namarr_t *ap, int flags) in array_scope() argument 121 static int array_unscope(Namval_t *np,Namarr_t *ap) in array_unscope() argument 127 (*ap->fun)(np, NIL(char*), NV_AFREE); in array_unscope() 128 if((fp = nv_disc(np,(Namfun_t*)ap,NV_POP)) && !(fp->nofree&1)) in array_unscope() 130 nv_delete(np,(Dt_t*)0,0); in array_unscope() 139 static int array_covered(Namval_t *np, struct index_array *ap) in array_covered() argument 154 static void array_setptr(register Namval_t *np, struct index_array *old, struct index_array *new) in array_setptr() argument 156 register Namfun_t **fp = &np->nvfun; in array_setptr() 185 int array_maxindex(Namval_t *np) in array_maxindex() argument 187 register struct index_array *ap = (struct index_array*)nv_arrayptr(np); in array_maxindex() [all …]
|
H A D | nvtree.c | 53 static int read_tree(Namval_t* np, Sfio_t *iop, int n, Namfun_t *dp) in read_tree() argument 62 sfprintf(sh.strbuf,"%s=%c",nv_name(np),0); in read_tree() 70 static Namval_t *create_tree(Namval_t *np,const char *name,int flag,Namfun_t *dp) in create_tree() argument 78 if(np=(*fp->disc->createf)(np,name,flag,fp)) in create_tree() 80 return(np); in create_tree() 83 return((flag&NV_NOADD)?0:np); in create_tree() 86 static Namfun_t *clone_tree(Namval_t *np, Namval_t *mp, int flags, Namfun_t *fp){ in clone_tree() argument 88 if ((flags&NV_MOVE) && nv_type(np)) in clone_tree() 93 walk_tree(np,mp,flags); in clone_tree() 132 static Namfun_t *nextdisc(Namval_t *np) in nextdisc() argument [all …]
|
H A D | arith.c | 60 static Namval_t *scope(register Namval_t *np,register struct lval *lvalue,int assign) in scope() argument 63 register char *sub=0, *cp=(char*)np; in scope() 82 …if((!(np = nv_open(cp,shp->var_tree,assign|NV_VARNAME|NV_NOADD|NV_NOFAIL)) || nv_isnull(np)) && sh… in scope() 90 if(!np && assign) in scope() 91 np = nv_open(cp,shp->var_tree,assign|NV_VARNAME); in scope() 93 if(!np) in scope() 100 cp = (char*)np; in scope() 102 else if(assign==NV_ASSIGN && nv_isnull(np) && !nv_isattr(np, ~(NV_MINIMAL|NV_NOFREE))) in scope() 105 np = mp; in scope() 106 while(nv_isref(np)) in scope() [all …]
|
/illumos-gate/usr/src/cmd/mailx/ |
H A D | names.c | 70 register struct name *np; in nalloc() local 72 np = (struct name *)salloc(sizeof (*np)); in nalloc() 73 np->n_flink = NIL; in nalloc() 74 np->n_blink = NIL; in nalloc() 75 np->n_type = -1; in nalloc() 76 np->n_full = savestr(str); in nalloc() 77 np->n_name = skin(np->n_full); in nalloc() 78 return (np); in nalloc() 88 register struct name *np; in tailof() local 90 np = name; in tailof() [all …]
|
/illumos-gate/usr/src/contrib/ast/src/lib/libcmd/ |
H A D | expr.c | 141 #define numeric(np) ((np)->type&T_NUM) argument 185 static int getnode(State_t* state, Node_t *np) in getnode() argument 207 np->num = (ep = strpbrk(cp, ep)) ? (ep - cp + 1) : 0; in getnode() 208 np->type = T_NUM; in getnode() 217 np->num = strlen(cp); in getnode() 218 np->type = T_NUM; in getnode() 225 if (!(np->str = *state->arglist++)) in getnode() 227 np->type = T_STR; in getnode() 260 np->type = T_STR; in getnode() 261 np->str = sp; in getnode() [all …]
|
/illumos-gate/usr/src/tools/ndrgen/ |
H A D | ndr_print.c | 47 print_node(ndr_node_t *np) in print_node() argument 51 if (!np) { in print_node() 56 switch (np->label) { in print_node() 86 (void) printf("<<lab=%d>>", np->label); in print_node() 90 switch (np->label) { in print_node() 95 if (np->n_c_advice) { in print_node() 96 print_advice_list(np->n_c_advice); in print_node() 100 print_node(np->n_c_typename); in print_node() 102 print_node_list(np->n_c_members); in print_node() 120 if ((np->n_a_arg == NULL) || (np->n_a_arg->n_int == 0)) in print_node() [all …]
|
/illumos-gate/usr/src/lib/scsi/libses/common/ |
H A D | ses_node.c | 36 ses_node_t *np; in ses_find_enclosure() local 38 for (np = sp->ss_root->sn_first_child; np != NULL; in ses_find_enclosure() 39 np = np->sn_next_sibling) { in ses_find_enclosure() 40 ASSERT(np->sn_type == SES_NODE_ENCLOSURE); in ses_find_enclosure() 41 if (np->sn_enc_num == number) in ses_find_enclosure() 42 return ((ses_node_t *)np); in ses_find_enclosure() 59 ses_node_teardown(ses_node_t *np) in ses_node_teardown() argument 63 if (np == NULL) in ses_node_teardown() 66 for (; np != NULL; np = rp) { in ses_node_teardown() 67 ses_node_teardown(np->sn_first_child); in ses_node_teardown() [all …]
|
/illumos-gate/usr/src/lib/libnisdb/ |
H A D | db_index_entry.cc | 128 db_index_entry_p np, next_np, *hp; in relocate() local 130 for (np = this; np != NULL; np = next_np) { in relocate() 131 next_np = np->next; in relocate() 132 hp = &new_tab[np->hashval % hashsize]; in relocate() 133 np->next = *hp; in relocate() 134 *hp = np; in relocate() 143 db_index_entry_p np; in getnext() local 145 for (np = this; np != NULL; np = np->next) { in getnext() 146 if ((np->hashval == hval) && in getnext() 147 (np->key->equal(i, casein)) && l == location) { in getnext() [all …]
|
/illumos-gate/usr/src/cmd/fm/modules/common/eversholt/ |
H A D | eval.c | 51 static struct node *eval_dup(struct node *np, struct lut *ex, 54 enum datatype dtype, struct node *np); 55 static struct node *eval_fru(struct node *np); 56 static struct node *eval_asru(struct node *np); 120 struct node *np, struct lut **globals, in eval_getname() argument 127 if (np->t == T_NAME) in eval_getname() 128 nodep = np; in eval_getname() 129 else if (np->t == T_FUNC && np->u.func.s == L_fru) in eval_getname() 130 nodep = eval_fru(np->u.func.arglist); in eval_getname() 131 else if (np->t == T_FUNC && np->u.func.s == L_asru) in eval_getname() [all …]
|
/illumos-gate/usr/src/contrib/ast/src/cmd/ksh93/bltins/ |
H A D | typeset.c | 183 Namval_t *np = nv_search((char*)PATHNOD,tdata.sh->var_tree,HASH_BUCKET); in b_alias() local 184 nv_putval(np,nv_getval(np),NV_RDONLY); in b_alias() 461 static void print_value(Sfio_t *iop, Namval_t *np, struct tdata *tp) in print_value() argument 465 if(nv_isnull(np)) in print_value() 467 if(!np->nvflag) in print_value() 471 else if(nv_istable(np)) in print_value() 478 cp = name = nv_name(np); in print_value() 490 tp->sh->prefix = nv_name(np)+1; in print_value() 493 tp->sh->namespace = np; in print_value() 496 print_scan(iop,NV_NOSCOPE,nv_dict(np),aflag=='+',tp); in print_value() [all …]
|
/illumos-gate/usr/src/uts/common/inet/ipf/ |
H A D | ip_nat6.c | 141 ipnat_t **np; local 151 np = ifs->ifs_rdr_rules + hv; 152 while (*np != NULL) 153 np = &(*np)->in_rnext; 155 n->in_prnext = np; 157 *np = n; 174 ipnat_t **np; local 184 np = ifs->ifs_nat_rules + hv; 185 while (*np != NULL) 186 np = &(*np)->in_mnext; [all …]
|
/illumos-gate/usr/src/lib/libuutil/common/ |
H A D | uu_list.c | 136 uu_list_node_impl_t *np = (uu_list_node_impl_t *)np_arg; in uu_list_node_init() local 139 uintptr_t offset = (uintptr_t)np - (uintptr_t)base; in uu_list_node_init() 140 if (offset + sizeof (*np) > pp->ulp_objsize) { in uu_list_node_init() 143 base, (void *)np, (void *)pp, pp->ulp_name, in uu_list_node_init() 149 base, (void *)np, (void *)pp, pp->ulp_name, in uu_list_node_init() 153 np->uln_next = POOL_TO_MARKER(pp); in uu_list_node_init() 154 np->uln_prev = NULL; in uu_list_node_init() 160 uu_list_node_impl_t *np = (uu_list_node_impl_t *)np_arg; in uu_list_node_fini() local 163 if (np->uln_next == NULL && in uu_list_node_fini() 164 np->uln_prev == NULL) { in uu_list_node_fini() [all …]
|
/illumos-gate/usr/src/cmd/backup/restore/ |
H A D | symtab.c | 74 addino(ino_t inum, struct entry *np) in addino() argument 87 np->e_ino = inum; in addino() 88 np->e_next = *epp; in addino() 89 *epp = np; in addino() 91 for (np = np->e_next; np != NIL; np = np->e_next) in addino() 92 if (np->e_ino == inum) in addino() 93 badentry(np, gettext("duplicate inum")); in addino() 137 char *np, *cp; in lookupname() local 148 np = buf; in lookupname() 150 *np++ = *cp++; in lookupname() [all …]
|