Lines Matching refs:np

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()
224 sp->rp = np; in nv_addnode()
225 nv_delete(np,root,NV_NOFREE); in nv_addnode()
226 np = nv_search(sp->rp->nvname,root,NV_ADD); in nv_addnode()
228 if(sp->numnodes && memcmp(np->nvname,NV_CLASS,sizeof(NV_CLASS)-1)) in nv_addnode()
232 if(memcmp(np->nvname,name,i)) in nv_addnode()
233 return(np); in nv_addnode()
238 if(name && np->nvname[i]=='.' && np->nvname[i+1]=='_' && np->nvname[i+2]==0) in nv_addnode()
250 if(np == sp->nodes[i]) in nv_addnode()
258 return(np); in nv_addnode()
262 return(np); in nv_addnode()
268 sp->nodes[sp->numnodes++] = np; in nv_addnode()
269 return(np); in nv_addnode()
301 register Namval_t *np, *mp; in nv_setlist() local
365 np = nv_open(prefix,shp->last_root,flag); in nv_setlist()
367 if(np) in nv_setlist()
369 if(nv_isvtree(np) && !nv_isarray(np)) in nv_setlist()
375 nv_close(np); in nv_setlist()
378 np = nv_open(cp,shp->var_tree,flag|NV_ASSIGN); in nv_setlist()
379 …&& tp->com.comset && !nv_isvtree(np) && (((ap=nv_arrayptr(np)) && !ap->fun && !nv_opensub(np)) ||… in nv_setlist()
393 if(nv_isattr(np,NV_RDONLY) && np->nvfun && !(flags&NV_RDONLY)) in nv_setlist()
394 errormsg(SH_DICT,ERROR_exit(1),e_readonly, nv_name(np)); in nv_setlist()
395 if(nv_isattr(np,NV_NOFREE) && nv_isnull(np)) in nv_setlist()
396 nv_offattr(np,NV_NOFREE); in nv_setlist()
397 if(nv_istable(np)) in nv_setlist()
398 _nv_unset(np,0); in nv_setlist()
399 if(typ && !array && (!shp->prefix || nv_isnull(np) || nv_isarray(np))) in nv_setlist()
401 if(!(nv_isnull(np)) && !nv_isarray(np)) in nv_setlist()
402 _nv_unset(np,0); in nv_setlist()
403 nv_settype(np,typ,0); in nv_setlist()
405 if((flags&NV_STATIC) && !nv_isattr(np,NV_EXPORT) && !nv_isnull(np)) in nv_setlist()
411 ap=nv_arrayptr(np); in nv_setlist()
423 _nv_unset(np,NV_EXPORT); in nv_setlist()
426 nv_setarray(np,nv_associative); in nv_setlist()
430 nv_onattr(np,NV_ARRAY); in nv_setlist()
449 if(shp->mktype && shp->dot_depth==0 && np==((struct sh_type*)shp->mktype)->nodes[0]) in nv_setlist()
458 if(!nv_isarray(np) || ((ap=nv_arrayptr(np)) && !ap->fixed && (ap->nelem&ARRAY_MASK))) in nv_setlist()
460 if(!nv_isarray(np) || ((ap=nv_arrayptr(np)) && (ap->nelem&ARRAY_MASK))) in nv_setlist()
465 _nv_unset(np,NV_EXPORT); in nv_setlist()
468 nv_setvec(np,(arg->argflag&ARG_APPEND),argc,argv); in nv_setlist()
472 char *name = nv_name(np); in nv_setlist()
497 …if(!(arg->argflag&ARG_APPEND) && nv_isattr(np,NV_BINARY|NV_NOFREE|NV_RAW)!=(NV_BINARY|NV_NOFREE|NV… in nv_setlist()
498 _nv_unset(np,NV_EXPORT); in nv_setlist()
505 if(prefix || np) in nv_setlist()
506 cp = stakcopy(nv_name(np)); in nv_setlist()
510 if((arg->argflag&ARG_APPEND) && (!nv_isarray(np) || (nv_aindex(np)>=0))) in nv_setlist()
511 _nv_unset(np,0); in nv_setlist()
513 nv_setarray(np,nv_associative); in nv_setlist()
518 nv_setvtree(np); in nv_setlist()
519 nv_close(np); in nv_setlist()
528 cp = stakcopy(nv_name(np)); in nv_setlist()
529 nv_close(np); in nv_setlist()
533 np = nv_open(cp,shp->prefix_root?shp->prefix_root:shp->var_tree,flag); in nv_setlist()
537 if(nv_isarray(np)) in nv_setlist()
539 if((sub=nv_aimax(np)) < 0 && nv_arrayptr(np)) in nv_setlist()
540 errormsg(SH_DICT,ERROR_exit(1),e_badappend,nv_name(np)); in nv_setlist()
544 if(!nv_isnull(np) && np->nvalue.cp!=Empty && !nv_isvtree(np)) in nv_setlist()
547 …else if(((np->nvalue.cp && np->nvalue.cp!=Empty)||nv_isvtree(np)|| nv_arrayptr(np)) && !nv_type(np in nv_setlist()
549 _nv_unset(np,NV_EXPORT); in nv_setlist()
551 nv_setarray(np,nv_associative); in nv_setlist()
558 _nv_unset(np,NV_EXPORT); in nv_setlist()
559 if(!sh_isoption(SH_BASH) && !(array&NV_IARRAY) && !nv_isarray(np)) in nv_setlist()
560 nv_setarray(np,nv_associative); in nv_setlist()
565 sfprintf(stkstd,"%s[%d]",prefix?nv_name(np):cp,sub); in nv_setlist()
567 nv_putsub(np,(char*)0,ARRAY_ADD|ARRAY_FILL|sub); in nv_setlist()
570 shp->prefix = stakcopy(nv_name(np)); in nv_setlist()
578 sfprintf(stkstd,"%s%s",nv_name(L_ARGNOD->nvalue.nrp->np),shp->prefix+1); in nv_setlist()
584 nr.np = np; in nv_setlist()
600 if(nv_isarray(np) && (mp=nv_opensub(np))) in nv_setlist()
601 np = mp; in nv_setlist()
609 …if(!nv_isarray(np) && !typ && (tp->com.comarg || !tp->com.comset || tp->com.comset->argval[0]!='['… in nv_setlist()
611 nv_setvtree(np); in nv_setlist()
613 np->nvfun->dsize = 0; in nv_setlist()
624 np = nv_open(cp,shp->prefix_root?shp->prefix_root:shp->var_tree,flags); in nv_setlist()
625 if(!np->nvfun && (flags&NV_NOREF)) in nv_setlist()
628 nv_onattr(np,NV_PARAM); in nv_setlist()
630 nv_offattr(np,NV_PARAM); in nv_setlist()
635 char *name=nv_name(np); in nv_setlist()
638 if(nv_isarray(np)) in nv_setlist()
672 np = nv_mktype(shtp.nodes,shtp.numnodes); in nv_setlist()
679 if(nr.np == np) in nv_setlist()
761 register Namval_t *np=0, *nq=0; in nv_create() local
788 return(np); in nv_create()
821 np=0; in nv_create()
832 if(np = nv_search(name,shp->var_tree,0)) in nv_create()
841 if(!(nq = nv_search((char*)np,shp->var_base,HASH_BUCKET))) in nv_create()
843 nq = np; in nv_create()
851 nv_delete(np,(Dt_t*)0,NV_NOFREE); in nv_create()
852 np = 0; in nv_create()
867 if(np && shp->var_tree->walk==shp->var_tree) in nv_create()
869 _nv_unset(np,0); in nv_create()
870 nv_delete(np,shp->var_tree,0); in nv_create()
871 np = 0; in nv_create()
873 if(!np || shp->var_tree->walk!=root) in nv_create()
874 np = nv_search(name,root,HASH_NOSCOPE|NV_ADD); in nv_create()
878 if(!np && !noscope && *name!='.' && shp->namespace && root==shp->var_tree) in nv_create()
881 if(np || (np = nv_search(name,root,mode))) in nv_create()
883 isref = nv_isref(np); in nv_create()
887 if(nq==np) in nv_create()
894 if(nv_isnull(np) && c!='.' && ((np->nvfun=nv_cover(nq)) || nq==OPTINDNOD)) in nv_create()
896 np->nvname = nq->nvname; in nv_create()
899 nv_onattr(np,NV_EXPORT); in nv_create()
903 np->nvfun = nq->nvfun; in nv_create()
904 np->nvalue.lp = (&shp->st.optindex); in nv_create()
905 nv_onattr(np,NV_INTEGER|NV_NOFREE); in nv_create()
911 else if(add && nv_isnull(np) && c=='.' && cp[1]!='.') in nv_create()
912 nv_setvtree(np); in nv_create()
937 nv_unref(np); in nv_create()
938 return(np); in nv_create()
940 while(nv_isref(np) && np->nvalue.cp) in nv_create()
942 root = nv_reftree(np); in nv_create()
944 shp->last_table = nv_reftable(np); in nv_create()
945 sub = nv_refsub(np); in nv_create()
947 n = nv_refindex(np); in nv_create()
948 dim = nv_refdimen(np); in nv_create()
950 np = nv_refnode(np); in nv_create()
954 ap = nv_arrayptr(np); in nv_create()
956 nv_putsub(np,(char*)0,n); in nv_create()
961 nv_putsub(np,sub,0L); in nv_create()
966 if(nv_isref(np) && (c=='[' || c=='.' || !(flags&NV_ASSIGN))) in nv_create()
967 errormsg(SH_DICT,ERROR_exit(1),e_noref,nv_name(np)); in nv_create()
972 Namarr_t *ap = nv_arrayptr(np); in nv_create()
973 nq = nv_opensub(np); in nv_create()
979 np = nq; in nv_create()
981 return(np); in nv_create()
983 if(np==nq) in nv_create()
995 copy = strlen(cp=nv_name(np)); in nv_create()
1010 nv_endsubscript(np,null,NV_ADD); in nv_create()
1014 if(*cp==0 && nv_isnull(np) && !nv_isarray(np)) in nv_create()
1023 if(np) in nv_create()
1024 nv_onattr(np,nofree); in nv_create()
1025 return(np); in nv_create()
1034 if(!np) in nv_create()
1047 return(np); in nv_create()
1051 if((ap=nv_arrayptr(np)) && ap->fixed) in nv_create()
1054 if(c=='[' || (c=='.' && nv_isarray(np))) in nv_create()
1062 Namarr_t *ap = nv_arrayptr(np); in nv_create()
1067 n = mode|nv_isarray(np); in nv_create()
1072 return(np); in nv_create()
1083 cp = nv_endsubscript(np,sp,n|(flags&(NV_ASSIGN|NV_FARRAY))); in nv_create()
1092 nv_putsub(np,NIL(char*),ARRAY_SCAN); in nv_create()
1097 …if((c = *cp)=='.' || (c=='[' && nv_isarray(np)) || (n&ARRAY_FILL) || ((ap || (flags&NV_ASSIGN)) &&… in nv_create()
1101 sub = m?nv_getsub(np):0; in nv_create()
1144 else if(c==0 && mode && (n=nv_aindex(np))>0) in nv_create()
1145 nv_putsub(np,(char*)0,n); in nv_create()
1147 else if(n==0 && !fixed && (c==0 || (c=='[' && !nv_isarray(np)))) in nv_create()
1149 else if(n==0 && (c==0 || (c=='[' && !nv_isarray(np)))) in nv_create()
1162 if(nv_isarray(np) && (c=='[' || c=='.' || (flags&NV_ARRAY))) in nv_create()
1166 if(!(nq = nv_opensub(np))) in nv_create()
1168 Namarr_t *ap = nv_arrayptr(np); in nv_create()
1174 nv_putsub(np,sub,ARRAY_FILL); in nv_create()
1175 ap = nv_arrayptr(np); in nv_create()
1180 nq->nvenv = (char*)np; in nv_create()
1182 nq = nv_arraychild(np,nq,c); in nv_create()
1192 nv_onattr(np,nofree); in nv_create()
1194 np = nq; in nv_create()
1207 else if(nv_isarray(np) && (!fixed || cp[-1]!=']')) in nv_create()
1209 else if(nv_isarray(np)) in nv_create()
1213 return(np); in nv_create()
1214 nv_putsub(np,NIL(char*),ARRAY_UNDEF); in nv_create()
1216 nv_onattr(np,nofree); in nv_create()
1218 if(c=='.' && (fp=np->nvfun)) in nv_create()
1227 if((nq = (*fp->disc->createf)(np,cp+1,flags,fp)) == np) in nv_create()
1233 else if(np=nq) in nv_create()
1237 if(nv_isarray(np) && sp[-1]!=']') in nv_create()
1238 nv_putsub(np,NIL(char*),ARRAY_UNDEF); in nv_create()
1239 return(np); in nv_create()
1247 return(np); in nv_create()
1253 return(np); in nv_create()
1258 return(np); in nv_create()
1267 void nv_delete(Namval_t* np, Dt_t *root, int flags) in nv_delete() argument
1274 if(xp->np==np) in nv_delete()
1278 if(!np && !root && flags==0) in nv_delete()
1289 Namval_t **key = &np; in nv_delete()
1297 rp->np = &NullNode; in nv_delete()
1303 if(dtdelete(root,np)) in nv_delete()
1305 if(!(flags&NV_NOFREE) && ((flags&NV_FUNCTION) || !nv_subsaved(np))) in nv_delete()
1308 if(nv_isarray(np) && np->nvfun && in nv_delete()
1309 (ap=nv_arrayptr(np)) && array_assoc(ap)) { in nv_delete()
1310 while(nv_associative(np,0,NV_ANEXT)) in nv_delete()
1311 nv_associative(np, 0, NV_ADELETE); in nv_delete()
1312 nv_associative(np, 0, NV_AFREE); in nv_delete()
1313 free((void*)np->nvfun); in nv_delete()
1315 free((void*)np); in nv_delete()
1321 sfprintf(sfstderr,"%s not deleted\n",nv_name(np)); in nv_delete()
1348 register Namval_t *np=0; in nv_open() local
1386 np = nv_search(name,root,mode); in nv_open()
1387 if(np && !(flags&NV_REF)) in nv_open()
1389 while(nv_isref(np)) in nv_open()
1391 shp->last_table = nv_reftable(np); in nv_open()
1392 np = nv_refnode(np); in nv_open()
1395 return(np); in nv_open()
1412 np = nv_search(name, root, (flags&NV_NOADD)?0:NV_ADD); in nv_open()
1437 np = xp->np; in nv_open()
1439 if(nv_isarray(np) && !(flags&NV_MOVE)) in nv_open()
1440 nv_putsub(np,NIL(char*),ARRAY_UNDEF); in nv_open()
1448 np = nv_create(name, root, flags, &fun); in nv_open()
1451 if(np && nvcache.ok && cp[-1]!=']') in nv_open()
1475 xp->np = np; in nv_open()
1489 np = nv_search(name, funroot, c); in nv_open()
1508 if(np && shp->mktype) in nv_open()
1509 np = nv_addnode(np,0); in nv_open()
1511 if(c=='=' && np && (flags&NV_ASSIGN)) in nv_open()
1516 nv_putval(np, cp, NV_RDONLY); in nv_open()
1517 if(np==PWDNOD) in nv_open()
1518 nv_onattr(np,NV_TAGGED); in nv_open()
1529 if(!nv_isnull(np)) in nv_open()
1532 return(np); in nv_open()
1535 isref = nv_isref(np); in nv_open()
1537 if(sh_isoption(SH_XTRACE) && (ap=nv_arrayptr(np)) && !ap->fixed) in nv_open()
1539 if(sh_isoption(SH_XTRACE) && nv_isarray(np)) in nv_open()
1541 sub = nv_getsub(np); in nv_open()
1544 nv_offattr(np,NV_REF); in nv_open()
1547 if(!np->nvfun) in nv_open()
1548 _nv_unset(np,NV_EXPORT); in nv_open()
1552 if(ap=nv_arrayptr(np)) in nv_open()
1554 if(mp=nv_opensub(np)) in nv_open()
1555 np = mp; in nv_open()
1556 … nv_open(cp,shp->var_tree,NV_NOFAIL|NV_VARNAME|NV_NOARRAY|NV_NOASSIGN|NV_NOADD)) && nv_isvtree(np)) in nv_open()
1559 nv_putsub(np,(char*)0,ARRAY_ADD|nv_aindex(np)); in nv_open()
1560 np = nv_opensub(np); in nv_open()
1565 _nv_unset(np,NV_EXPORT); in nv_open()
1567 nv_putval(np, cp, c); in nv_open()
1570 if(nv_search((char*)np,shp->var_base,HASH_BUCKET)) in nv_open()
1572 nv_setref(np,(Dt_t*)0,NV_VARNAME); in nv_open()
1577 nv_onattr(np, flags&NV_ATTRIBUTES); in nv_open()
1591 return(np); in nv_open()
1610 void nv_putval(register Namval_t *np, const char *string, int flags) in nv_putval() argument
1623 if(!(flags&NV_RDONLY) && nv_isattr (np, NV_RDONLY)) in nv_putval()
1624 errormsg(SH_DICT,ERROR_exit(1),e_readonly, nv_name(np)); in nv_putval()
1630 np = sh_assignok(np,1); in nv_putval()
1631 if(np->nvfun && np->nvfun->disc && !(flags&NV_NODISC) && !nv_isref(np)) in nv_putval()
1637 nv_putv(np,sp,flags,np->nvfun); in nv_putval()
1638 if(sp && ((flags&NV_EXPORT) || nv_isattr(np,NV_EXPORT))) in nv_putval()
1639 sh_envput(shp->env,np); in nv_putval()
1648 if(np->nvalue.cp && np->nvalue.cp!=sp && !nv_isattr(np,NV_NOFREE)) in nv_putval()
1649 free((void*)np->nvalue.cp); in nv_putval()
1650 np->nvalue.cp = (char*)sp; in nv_putval()
1651 nv_setattr(np,(flags&~NV_RDONLY)|NV_NOFREE); in nv_putval()
1654 up= &np->nvalue; in nv_putval()
1655 if(nv_isattr(np,NV_INT16P) == NV_INT16) in nv_putval()
1657 if(!np->nvalue.up || !nv_isarray(np)) in nv_putval()
1660 up->up = &np->nvalue; in nv_putval()
1664 else if(np->nvalue.up && nv_isarray(np) && (ap=nv_arrayptr(np)) && !ap->fixed) in nv_putval()
1666 else if(np->nvalue.up && nv_isarray(np) && nv_arrayptr(np)) in nv_putval()
1668 up = np->nvalue.up; in nv_putval()
1671 if(nv_isattr(np,NV_EXPORT)) in nv_putval()
1672 nv_offattr(np,NV_IMPORT); in nv_putval()
1673 if(nv_isattr (np, NV_INTEGER)) in nv_putval()
1675 if(nv_isattr(np, NV_DOUBLE) == NV_DOUBLE) in nv_putval()
1677 if(nv_isattr(np, NV_LONG) && sizeof(double)<sizeof(Sfdouble_t)) in nv_putval()
1720 if(nv_isattr(np, NV_LONG) && sizeof(int32_t)<sizeof(Sflong_t)) in nv_putval()
1734 else if(nv_isattr(np,NV_UNSIGN)) in nv_putval()
1777 else if(nv_isattr(np,NV_UNSIGN)) in nv_putval()
1804 if(nv_size(np) <= 1) in nv_putval()
1805 nv_setsize(np,10); in nv_putval()
1806 if(nv_isattr (np, NV_SHORT)) in nv_putval()
1812 nv_onattr(np,NV_NOFREE); in nv_putval()
1857 if(nv_isattr(np, NV_HOST|NV_INTEGER)==NV_HOST && sp) in nv_putval()
1875 else if((nv_isattr(np, NV_RJUST|NV_ZFILL|NV_LJUST)) && sp) in nv_putval()
1878 if((nv_isattr(np,NV_ZFILL)) && (nv_isattr(np,NV_LJUST))) in nv_putval()
1880 size = nv_size(np); in nv_putval()
1883 size = ja_size((char*)sp,size,nv_isattr(np,NV_RJUST|NV_ZFILL)); in nv_putval()
1888 if(!nv_isattr(np, NV_NOFREE)) in nv_putval()
1893 if(nv_isattr(np,NV_BINARY) && !(flags&NV_RAW)) in nv_putval()
1895 if(nv_isattr(np,NV_LJUST|NV_RJUST) && nv_isattr(np,NV_LJUST|NV_RJUST)!=(NV_LJUST|NV_RJUST)) in nv_putval()
1904 if(nv_isattr(np,NV_BINARY)) in nv_putval()
1906 int oldsize = (flags&NV_APPEND)?nv_size(np):0; in nv_putval()
1912 nv_offattr(np,NV_NOFREE); in nv_putval()
1918 if(nv_isattr(np,NV_ZFILL)) in nv_putval()
1919 size = nv_size(np); in nv_putval()
1923 nv_offattr(np,NV_NOFREE); in nv_putval()
1931 if(!nv_isattr(np,NV_ZFILL) || nv_size(np)==0) in nv_putval()
1932 nv_setsize(np,dot); in nv_putval()
1933 else if(nv_isattr(np,NV_ZFILL) && (size>dot)) in nv_putval()
1940 if(size==0 && nv_isattr(np,NV_HOST)!=NV_HOST &&nv_isattr(np,NV_LJUST|NV_RJUST|NV_ZFILL)) in nv_putval()
1942 nv_setsize(np,size=dot); in nv_putval()
1947 else if(nv_isattr(np,NV_LJUST|NV_RJUST)==NV_LJUST && dot>size) in nv_putval()
1972 if(dot==0 && !nv_isattr(np,NV_LJUST|NV_RJUST)) in nv_putval()
1975 nv_onattr(np,NV_NOFREE); in nv_putval()
1987 nv_offattr(np,NV_NOFREE); in nv_putval()
2000 if(nv_isattr(np, NV_RJUST) && nv_isattr(np, NV_ZFILL)) in nv_putval()
2002 else if(nv_isattr(np, NV_LJUST|NV_RJUST)==NV_RJUST) in nv_putval()
2004 else if(nv_isattr(np, NV_LJUST|NV_RJUST)==NV_LJUST) in nv_putval()
2022 if(!was_local && ((flags&NV_EXPORT) || nv_isattr(np,NV_EXPORT))) in nv_putval()
2023 sh_envput(shp->env,np); in nv_putval()
2136 static char *staknam(register Namval_t *np, char *value) in staknam() argument
2139 q = stakalloc(strlen(nv_name(np))+(value?strlen(value):0)+2); in staknam()
2140 p=strcopy(q,nv_name(np)); in staknam()
2154 static void attstore(register Namval_t *np, void *data) in attstore() argument
2158 if(!(nv_isattr(np,NV_EXPORT))) in attstore()
2160 flag = nv_isattr(np,NV_RDONLY|NV_UTOL|NV_LTOU|NV_RJUST|NV_LJUST|NV_ZFILL|NV_INTEGER); in attstore()
2171 c += nv_size(np); in attstore()
2174 stakputs(nv_name(np)); in attstore()
2177 static void attstore(register Namval_t *np, void *data) in attstore() argument
2179 register int flag = np->nvflag; in attstore()
2187 data = (void*)nv_mapchar(np,0); in attstore()
2203 *ap->attval = ' ' + nv_size(np); in attstore()
2207 ap->attval = strcopy(++ap->attval,nv_name(np)); in attstore()
2212 static void pushnam(Namval_t *np, void *data) in pushnam() argument
2218 if(nv_isattr(np,NV_IMPORT) && np->nvenv) in pushnam()
2219 *ap->argnam++ = np->nvenv; in pushnam()
2220 else if(value=nv_getval(np)) in pushnam()
2221 *ap->argnam++ = staknam(np,value); in pushnam()
2222 if(nv_isattr(np,NV_RDONLY|NV_UTOL|NV_LTOU|NV_RJUST|NV_LJUST|NV_ZFILL|NV_INTEGER)) in pushnam()
2223 ap->attsize += (strlen(nv_name(np))+4); in pushnam()
2292 register Namval_t *np = (Namval_t*)arg; in scanfilter() local
2293 register int k=np->nvflag; in scanfilter()
2299 if(!is_abuiltin(np) && tp && tp->tp && nv_type(np)!=tp->tp) in scanfilter()
2302 if(sp->scanmask==NV_TABLE && nv_isvtree(np)) in scanfilter()
2311 if(memcmp(np->nvname,tp->mapname,n) || np->nvname[n]!='.' || strchr(&np->nvname[n+1],'.')) in scanfilter()
2314 …else if((sp->scanflags==NV_UTOL||sp->scanflags==NV_LTOU) && (cp=(char*)nv_mapchar(np,0)) && strcmp… in scanfilter()
2317 if(!np->nvalue.cp && !np->nvfun && !nv_isattr(np,~NV_DEFAULT)) in scanfilter()
2321 if(nv_isarray(np)) in scanfilter()
2322 nv_putsub(np,NIL(char*),0L); in scanfilter()
2323 (*sp->scanfn)(np,sp->scandata); in scanfilter()
2340 Namval_t *np; in nv_scan() local
2352 for(np=(Namval_t*)dtfirst(root);np; np=(Namval_t*)dtnext(root,np)) in nv_scan()
2353 hashfn(root, np, &sdata); in nv_scan()
2396 void sh_envnolocal (register Namval_t *np, void *data) in sh_envnolocal() argument
2400 if(np==VERSIONNOD && nv_isref(np)) in sh_envnolocal()
2402 if(np==L_ARGNOD) in sh_envnolocal()
2404 if(np == tp->sh->namespace) in sh_envnolocal()
2406 if(nv_isref(np)) in sh_envnolocal()
2407 nv_unref(np); in sh_envnolocal()
2408 if(nv_isattr(np,NV_EXPORT) && nv_isarray(np)) in sh_envnolocal()
2410 nv_putsub(np,NIL(char*),0); in sh_envnolocal()
2411 if(cp = nv_getval(np)) in sh_envnolocal()
2414 if(nv_isattr(np,NV_EXPORT|NV_NOFREE)) in sh_envnolocal()
2416 if(nv_isref(np) && np!=VERSIONNOD) in sh_envnolocal()
2418 nv_offattr(np,NV_NOFREE|NV_REF); in sh_envnolocal()
2419 free((void*)np->nvalue.nrp); in sh_envnolocal()
2420 np->nvalue.cp = 0; in sh_envnolocal()
2425 if(nv_isarray(np)) in sh_envnolocal()
2426 nv_putsub(np,NIL(char*),ARRAY_UNDEF); in sh_envnolocal()
2427 _nv_unset(np,NV_RDONLY); in sh_envnolocal()
2428 nv_setattr(np,0); in sh_envnolocal()
2431 nv_putval(np,cp,0); in sh_envnolocal()
2440 void nv_close(Namval_t *np) in nv_close() argument
2442 NOT_USED(np); in nv_close()
2447 register Namval_t *np,*nq, *npnext; in table_unset() local
2448 for(np=(Namval_t*)dtfirst(root);np;np=npnext) in table_unset()
2450 if(nq=dtsearch(oroot,np)) in table_unset()
2466 np->nvfun = 0; in table_unset()
2473 if(nv_isvtree(np)) in table_unset()
2475 int len = strlen(np->nvname); in table_unset()
2476 npnext = (Namval_t*)dtnext(root,np); in table_unset()
2477 while((nq=npnext) && memcmp(np->nvname,nq->nvname,len)==0 && nq->nvname[len]=='.') in table_unset()
2485 npnext = (Namval_t*)dtnext(root,np); in table_unset()
2486 _nv_unset(np,flags); in table_unset()
2487 nv_delete(np,root,0); in table_unset()
2501 void _nv_unset(register Namval_t *np,int flags) in _nv_unset() argument
2508 if(!(flags&NV_RDONLY) && nv_isattr (np,NV_RDONLY)) in _nv_unset()
2509 errormsg(SH_DICT,ERROR_exit(1),e_readonly, nv_name(np)); in _nv_unset()
2510 if(is_afunction(np) && np->nvalue.ip) in _nv_unset()
2512 register struct slnod *slp = (struct slnod*)(np->nvenv); in _nv_unset()
2513 if(shp->st.real_fun == np->nvalue.rp) in _nv_unset()
2515 np->nvalue.rp->running |= 1; in _nv_unset()
2518 if(slp && !nv_isattr(np,NV_NOFREE)) in _nv_unset()
2520 struct Ufunction *rq,*rp = np->nvalue.rp; in _nv_unset()
2522 register char *name=nv_name(np),*cp= strrchr(name,'.'); in _nv_unset()
2536 if(rq->np != np) in _nv_unset()
2555 free((void*)np->nvalue.ip); in _nv_unset()
2556 np->nvalue.ip = 0; in _nv_unset()
2561 np = sh_assignok(np,0); in _nv_unset()
2562 nv_offattr(np,NV_NODISC); in _nv_unset()
2563 if(np->nvfun && !nv_isref(np)) in _nv_unset()
2569 nv_putv(np,NIL(char*),flags,np->nvfun); in _nv_unset()
2576 if(nv_isattr(np,NV_INT16P) == NV_INT16) in _nv_unset()
2578 np->nvalue.cp = nv_isarray(np)?Empty:0; in _nv_unset()
2582 else if(np->nvalue.up && nv_isarray(np) && (ap=nv_arrayptr(np)) && !ap->fixed) in _nv_unset()
2584 else if(np->nvalue.up && nv_isarray(np) && nv_arrayptr(np)) in _nv_unset()
2586 up = np->nvalue.up; in _nv_unset()
2587 else if(nv_isref(np) && !nv_isattr(np,NV_EXPORT|NV_MINIMAL) && np->nvalue.nrp) in _nv_unset()
2590 if(np->nvalue.nrp->root) in _nv_unset()
2591 dtdelete(Refdict,(void*)np->nvalue.nrp); in _nv_unset()
2592 if(np->nvalue.nrp->sub) in _nv_unset()
2593 free(np->nvalue.nrp->sub); in _nv_unset()
2594 free((void*)np->nvalue.nrp); in _nv_unset()
2595 np->nvalue.cp = 0; in _nv_unset()
2599 up = &np->nvalue; in _nv_unset()
2602 if(up->cp!=Empty && up->cp!=Null && !nv_isattr(np, NV_NOFREE)) in _nv_unset()
2607 if(!nv_isarray(np) || !nv_arrayptr(np)) in _nv_unset()
2609 nv_setsize(np,0); in _nv_unset()
2610 if(!nv_isattr(np,NV_MINIMAL) || nv_isattr(np,NV_EXPORT)) in _nv_unset()
2612 if(nv_isattr(np,NV_EXPORT) && !strchr(np->nvname,'[')) in _nv_unset()
2613 env_delete(shp->env,nv_name(np)); in _nv_unset()
2614 if(!(flags&NV_EXPORT) || nv_isattr(np,NV_EXPORT)) in _nv_unset()
2615 np->nvenv = 0; in _nv_unset()
2616 nv_setattr(np,0); in _nv_unset()
2620 nv_setattr(np,NV_MINIMAL); in _nv_unset()
2621 nv_delete(np,(Dt_t*)0,0); in _nv_unset()
2629 Namval_t *sh_scoped(Shell_t *shp, register Namval_t *np) in sh_scoped() argument
2632 return(np); in sh_scoped()
2633 return(dtsearch(shp->var_tree,np)); in sh_scoped()
2643 register Namval_t *np; in tableval() local
2650 for(np=(Namval_t*)dtfirst(root);np;np=(Namval_t*)dtnext(root,np)) in tableval()
2652 if(!nv_isnull(np) || np->nvfun || nv_isattr(np,~NV_NOFREE)) in tableval()
2658 sfputr(out,np->nvname,-1); in tableval()
2675 Namval_t *np; member
2680 static void optimize_clear(Namval_t* np, Namfun_t *fp) in optimize_clear() argument
2683 nv_stack(np,fp); in optimize_clear()
2684 nv_stack(np,(Namfun_t*)0); in optimize_clear()
2685 for(;op && op->np==np; op=op->next) in optimize_clear()
2695 static void put_optimize(Namval_t* np,const char *val,int flags,Namfun_t *fp) in put_optimize() argument
2697 nv_putv(np,val,flags,fp); in put_optimize()
2698 optimize_clear(np,fp); in put_optimize()
2701 static Namfun_t *clone_optimize(Namval_t* np, Namval_t *mp, int flags, Namfun_t *fp) in clone_optimize() argument
2708 void nv_optimize(Namval_t *np) in nv_optimize() argument
2715 if(np==SH_LINENO) in nv_optimize()
2720 for(fp=np->nvfun; fp; fp = fp->next) in nv_optimize()
2737 op->np = np; in nv_optimize()
2749 nv_stack(np,&op->hdr); in nv_optimize()
2762 nv_stack(op->np,&op->hdr); in sh_optclear()
2763 nv_stack(op->np,(Namfun_t*)0); in sh_optclear()
2772 # define optimize_clear(np,fp) argument
2786 char *nv_getval(register Namval_t *np) in nv_getval() argument
2789 register union Value *up= &np->nvalue; in nv_getval()
2793 nv_optimize(np); in nv_getval()
2795 if((!np->nvfun || !np->nvfun->disc) && !nv_isattr(np,NV_ARRAY|NV_INTEGER|NV_FUNCT|NV_REF)) in nv_getval()
2797 if(nv_isref(np)) in nv_getval()
2800 if(!np->nvalue.cp) in nv_getval()
2802 shp->last_table = nv_reftable(np); in nv_getval()
2803 sub=nv_refsub(np); in nv_getval()
2804 np = nv_refnode(np); in nv_getval()
2807 sfprintf(shp->strbuf,"%s[%s]",nv_name(np),sub); in nv_getval()
2810 return(nv_name(np)); in nv_getval()
2812 if(np->nvfun && np->nvfun->disc) in nv_getval()
2817 return(nv_getv(np, np->nvfun)); in nv_getval()
2821 numeric = ((nv_isattr (np, NV_INTEGER)) != 0); in nv_getval()
2827 if(nv_isattr (np,NV_DOUBLE)==NV_DOUBLE) in nv_getval()
2832 if(nv_isattr(np,NV_LONG)) in nv_getval()
2835 if(nv_isattr (np,NV_EXPNOTE)) in nv_getval()
2837 else if(nv_isattr (np,NV_HEXFLOAT)) in nv_getval()
2841 sfprintf(shp->strbuf,format,nv_size(np),ld); in nv_getval()
2846 if(nv_isattr (np,NV_EXPNOTE)) in nv_getval()
2848 else if(nv_isattr (np,NV_HEXFLOAT)) in nv_getval()
2852 sfprintf(shp->strbuf,format,nv_size(np),d); in nv_getval()
2856 else if(nv_isattr(np,NV_UNSIGN)) in nv_getval()
2858 if(nv_isattr (np,NV_LONG)) in nv_getval()
2860 else if(nv_isattr (np,NV_SHORT)) in nv_getval()
2862 if(nv_isattr(np,NV_INT16P)==NV_INT16P) in nv_getval()
2870 else if(nv_isattr (np,NV_LONG)) in nv_getval()
2872 else if(nv_isattr (np,NV_SHORT)) in nv_getval()
2874 if(nv_isattr(np,NV_INT16P)==NV_INT16P) in nv_getval()
2881 if((numeric=nv_size(np))==10) in nv_getval()
2883 if(nv_isattr(np,NV_UNSIGN)) in nv_getval()
2898 if(up->cp && nv_isattr(np,NV_BINARY) && !nv_isattr(np,NV_RAW)) in nv_getval()
2902 int size= nv_size(np), insize=(4*size)/3+size/45+8; in nv_getval()
2908 if(!nv_isattr(np,NV_LJUST|NV_RJUST) && (numeric=nv_size(np)) && up->cp && up->cp[numeric]) in nv_getval()
2918 Sfdouble_t nv_getnum(register Namval_t *np) in nv_getnum() argument
2926 nv_optimize(np); in nv_getnum()
2928 if(nv_istable(np)) in nv_getnum()
2929 errormsg(SH_DICT,ERROR_exit(1),e_number,nv_name(np)); in nv_getnum()
2930 if(np->nvfun && np->nvfun->disc) in nv_getnum()
2935 return(nv_getn(np, np->nvfun)); in nv_getnum()
2939 if(nv_isref(np)) in nv_getnum()
2941 str = nv_refsub(np); in nv_getnum()
2942 np = nv_refnode(np); in nv_getnum()
2944 nv_putsub(np,str,0L); in nv_getnum()
2946 if(nv_isattr (np, NV_INTEGER)) in nv_getnum()
2948 up= &np->nvalue; in nv_getnum()
2951 else if(nv_isattr(np, NV_DOUBLE)==NV_DOUBLE) in nv_getnum()
2953 if(nv_isattr(np, NV_LONG)) in nv_getnum()
2958 else if(nv_isattr(np, NV_UNSIGN)) in nv_getnum()
2960 if(nv_isattr(np, NV_LONG)) in nv_getnum()
2962 else if(nv_isattr(np, NV_SHORT)) in nv_getnum()
2964 if(nv_isattr(np,NV_INT16P)==NV_INT16P) in nv_getnum()
2974 if(nv_isattr(np, NV_LONG)) in nv_getnum()
2976 else if(nv_isattr(np, NV_SHORT)) in nv_getnum()
2978 if(nv_isattr(np,NV_INT16P)==NV_INT16P) in nv_getnum()
2987 else if((str=nv_getval(np)) && *str!=0) in nv_getnum()
2989 if(nv_isattr(np,NV_LJUST|NV_RJUST) || (*str=='0' && !(str[1]=='x'||str[1]=='X'))) in nv_getnum()
3004 void nv_newattr (register Namval_t *np, unsigned newatts, int size) in nv_newattr() argument
3013 Namfun_t *fp= (newatts&NV_NODISC)?np->nvfun:0; in nv_newattr()
3018 …if(sh_isoption(SH_RESTRICTED) && ((sp=nv_name(np))==nv_name(PATHNOD) || sp==nv_name(SHELLNOD) || s… in nv_newattr()
3019 errormsg(SH_DICT,ERROR_exit(1),e_restricted,nv_name(np)); in nv_newattr()
3021 n = np->nvflag; in nv_newattr()
3024 nv_offattr(np,NV_IMPORT); in nv_newattr()
3030 nv_offattr(np,NV_EXPORT); in nv_newattr()
3031 env_delete(shp->env,nv_name(np)); in nv_newattr()
3035 nv_onattr(np,NV_EXPORT); in nv_newattr()
3036 sh_envput(shp->env,np); in nv_newattr()
3041 oldsize = nv_size(np); in nv_newattr()
3045 nv_setsize(np,size); in nv_newattr()
3046 nv_offattr(np, ~NV_NOFREE); in nv_newattr()
3047 nv_onattr(np, newatts); in nv_newattr()
3051 if((ap=nv_arrayptr(np)) && ap->nelem>0) in nv_newattr()
3052 nv_putsub(np,NIL(char*),ARRAY_SCAN); in nv_newattr()
3053 oldsize = nv_size(np); in nv_newattr()
3054 oldatts = np->nvflag; in nv_newattr()
3056 np->nvfun = 0; in nv_newattr()
3063 nv_setsize(np,size); in nv_newattr()
3064 np->nvflag &= NV_ARRAY; in nv_newattr()
3065 np->nvflag |= newatts; in nv_newattr()
3072 nv_setsize(np,oldsize); in nv_newattr()
3073 np->nvflag = oldatts; in nv_newattr()
3074 if (sp = nv_getval(np)) in nv_newattr()
3076 if(nv_isattr(np,NV_ZFILL)) in nv_newattr()
3080 if(sp && (mp=nv_opensub(np))) in nv_newattr()
3084 nv_disc(np, &ap->hdr,NV_POP); in nv_newattr()
3085 nv_clone(np,mp,0); in nv_newattr()
3086 nv_disc(np, &ap->hdr,NV_FIRST); in nv_newattr()
3096 _nv_unset(np,NV_RDONLY|NV_EXPORT); in nv_newattr()
3104 _nv_unset(np,NV_EXPORT); in nv_newattr()
3105 nv_setsize(np,size); in nv_newattr()
3106 np->nvflag &= (NV_ARRAY|NV_NOFREE); in nv_newattr()
3107 np->nvflag |= newatts; in nv_newattr()
3111 nv_putval (np, cp, NV_RDONLY); in nv_newattr()
3115 while(ap && nv_nextsub(np)); in nv_newattr()
3120 np->nvfun = fp; in nv_newattr()
3154 register Namval_t *np; in sh_getenv() local
3162 else if((np = nv_search(name,shp->var_tree,0)) && nv_isattr(np,NV_EXPORT)) in sh_getenv()
3163 return(nv_getval(np)); in sh_getenv()
3186 register Namval_t *np; in putenv() local
3189 np = nv_open(name,shp->var_tree,NV_EXPORT|NV_IDENT|NV_NOARRAY|NV_ASSIGN); in putenv()
3191 _nv_unset(np,0); in putenv()
3202 register Namval_t *np; in sh_setenviron() local
3205 np = nv_open(name,shp->var_tree,NV_EXPORT|NV_IDENT|NV_NOARRAY|NV_ASSIGN); in sh_setenviron()
3207 return(nv_getval(np)); in sh_setenviron()
3208 _nv_unset(np,0); in sh_setenviron()
3256 int nv_rename(register Namval_t *np, int flags) in nv_rename() argument
3267 if(nv_isattr(np,NV_PARAM) && shp->st.prevst) in nv_rename()
3272 if(!nv_isattr(np,NV_MINIMAL)) in nv_rename()
3273 nvenv = np->nvenv; in nv_rename()
3274 if(nvenv || (cp = nv_name(np)) && nv_isarray(np) && cp[strlen(cp)-1] == ']') in nv_rename()
3276 if(!(cp=nv_getval(np))) in nv_rename()
3282 if(lastdot(cp,0) && nv_isattr(np,NV_MINIMAL)) in nv_rename()
3283 errormsg(SH_DICT,ERROR_exit(1),e_varname,nv_name(np)); in nv_rename()
3285 if(nv_isarray(np) && !(mp=nv_opensub(np))) in nv_rename()
3286 index=nv_aindex(np); in nv_rename()
3306 if(!nv_isvtree(np)) in nv_rename()
3307 _nv_unset(np,0); in nv_rename()
3312 sfprintf(shp->strbuf,"%s[%d]%c",nv_name(np),index,0); in nv_rename()
3316 if(ap = nv_arrayptr(np)) in nv_rename()
3318 mp->nvenv = nvenv = (void*)np; in nv_rename()
3323 nvenv = (char*)np; in nv_rename()
3324 np = mp; in nv_rename()
3326 if(nr==np) in nv_rename()
3330 if(cp = nv_getval(np)) in nv_rename()
3333 _nv_unset(np,NV_EXPORT); in nv_rename()
3334 if(nr==np) in nv_rename()
3336 nv_putsub(np,(char*)0, index); in nv_rename()
3337 nv_putval(np,cp,0); in nv_rename()
3347 if(arraynp && !nv_isattr(np,NV_MINIMAL) && (mp=(Namval_t*)np->nvenv) && (ap=nv_arrayptr(mp))) in nv_rename()
3352 if(ap=nv_arrayptr(np)) in nv_rename()
3357 mp = nv_search(nv_getsub(np),ap->table,NV_ADD); in nv_rename()
3358 nv_arraychild(np,mp,0); in nv_rename()
3359 nvenv = (void*)np; in nv_rename()
3362 mp = np; in nv_rename()
3377 nv_putval(np,nv_getval(nr),0); in nv_rename()
3391 void nv_setref(register Namval_t *np, Dt_t *hp, int flags) in nv_setref() argument
3399 if(nv_isref(np)) in nv_setref()
3401 if(nv_isarray(np)) in nv_setref()
3402 errormsg(SH_DICT,ERROR_exit(1),e_badref,nv_name(np)); in nv_setref()
3403 if(!(cp=nv_getval(np))) in nv_setref()
3405 _nv_unset(np,0); in nv_setref()
3406 nv_onattr(np,NV_REF); in nv_setref()
3409 if((ep = lastdot(cp,0)) && nv_isattr(np,NV_MINIMAL)) in nv_setref()
3410 errormsg(SH_DICT,ERROR_exit(1),e_badref,nv_name(np)); in nv_setref()
3423 if(nr==np) in nv_setref()
3426 errormsg(SH_DICT,ERROR_exit(1),e_selfref,nv_name(np)); in nv_setref()
3428 if(!(hp=dtvnext(hp)) || (nq=nv_search((char*)np,hp,NV_ADD|HASH_BUCKET))==np) in nv_setref()
3429 errormsg(SH_DICT,ERROR_exit(1),e_selfref,nv_name(np)); in nv_setref()
3455 _nv_unset(np,NV_RDONLY); in nv_setref()
3456 nv_onattr(np,NV_REF); in nv_setref()
3457 errormsg(SH_DICT,ERROR_exit(1),e_globalref,nv_name(np)); in nv_setref()
3485 _nv_unset(np,0); in nv_setref()
3486 nv_delete(np,(Dt_t*)0,0); in nv_setref()
3487 np->nvalue.nrp = newof(0,struct Namref,1,sizeof(Dtlink_t)); in nv_setref()
3488 np->nvalue.nrp->np = nq; in nv_setref()
3489 np->nvalue.nrp->root = hp; in nv_setref()
3494 np->nvalue.nrp->curi = ARRAY_FIXED|nv_arrfixed(nq,(Sfio_t*)0,1,&np->nvalue.nrp->dim); in nv_setref()
3497 np->nvalue.nrp->sub = strdup(ep); in nv_setref()
3499 np->nvalue.nrp->table = shp->last_table; in nv_setref()
3500 nv_onattr(np,NV_REF|NV_NOFREE); in nv_setref()
3507 dtinsert(Refdict,np->nvalue.nrp); in nv_setref()
3577 void nv_unref(register Namval_t *np) in nv_unref() argument
3580 if(!nv_isref(np)) in nv_unref()
3582 nv_offattr(np,NV_NOFREE|NV_REF); in nv_unref()
3583 if(!np->nvalue.nrp) in nv_unref()
3585 nq = nv_refnode(np); in nv_unref()
3588 if(np->nvalue.nrp->sub) in nv_unref()
3589 free(np->nvalue.nrp->sub); in nv_unref()
3590 dtdelete(Refdict,(void*)np->nvalue.nrp); in nv_unref()
3592 free((void*)np->nvalue.nrp); in nv_unref()
3593 np->nvalue.cp = strdup(nv_name(nq)); in nv_unref()
3638 Namval_t *np = (Namval_t*)obj; in hashname() local
3639 return(np->nvname); in hashname()
3650 char *nv_name(register Namval_t *np) in nv_name() argument
3659 if(is_abuiltin(np) || is_afunction(np)) in nv_name()
3662 if(shp->namespace && is_afunction(np)) in nv_name()
3666 if(memcmp(np->nvname,name,n)==0 && np->nvname[n]=='.') in nv_name()
3667 return(np->nvname+n+1); in nv_name()
3670 return(np->nvname); in nv_name()
3673 ap = nv_arrayptr(np); in nv_name()
3675 if(!nv_isattr(np,NV_MINIMAL|NV_EXPORT) && np->nvenv) in nv_name()
3677 Namval_t *nq= shp->last_table, *mp= (Namval_t*)np->nvenv; in nv_name()
3678 if(np==shp->last_table) in nv_name()
3681 sfprintf(shp->strbuf,"%s[%s]",nv_name(mp),np->nvname); in nv_name()
3683 sfprintf(shp->strbuf,"%s.%s",nv_name(mp),np->nvname); in nv_name()
3687 if(nv_istable(np)) in nv_name()
3689 shp->last_table = nv_parent(np); in nv_name()
3691 shp->last_table = nv_create(np,0, NV_LAST,(Namfun_t*)0); in nv_name()
3693 else if(!nv_isref(np)) in nv_name()
3695 for(fp= np->nvfun ; fp; fp=fp->next) in nv_name()
3698 if(np==shp->last_table) in nv_name()
3700 return((*fp->disc->namef)(np,fp)); in nv_name()
3703 if(!(table=shp->last_table) || *np->nvname=='.' || table==shp->namespace || np==table) in nv_name()
3707 return(np->nvname); in nv_name()
3710 return(np->nvname); in nv_name()
3716 sfprintf(shp->strbuf,"%s.%s",cp,np->nvname); in nv_name()
3719 sfprintf(shp->strbuf,"%s",np->nvname); in nv_name()
3722 nv_arrfixed(np,shp->strbuf,1,(char*)0); in nv_name()
3737 void *nv_context(Namval_t *np) in nv_context() argument
3739 return((void*)np->nvfun); in nv_context()
3744 int nv_isnull DISABLE (register Namval_t *np) in DISABLE() argument
3746 return(nv_isnull(np)); in DISABLE()
3750 int nv_setsize(register Namval_t *np, int size) in nv_setsize() argument
3752 int oldsize = nv_size(np); in nv_setsize()
3754 np->nvsize = size; in nv_setsize()
3758 Shell_t *nv_shell(Namval_t *np) in nv_shell() argument
3761 for(fp=np->nvfun;fp;fp=fp->next) in nv_shell()
3771 void nv_unset(register Namval_t *np) in nv_unset() argument
3773 _nv_unset(np,0); in nv_unset()