Lines Matching defs:aq

82 	Namarr_t *aq;
90 if(!(aq=newof(NIL(Namarr_t*),Namarr_t,1,size-sizeof(Namarr_t))))
92 memcpy(aq,ap,size);
93 aq->hdr.nofree &= ~1;
94 aq->hdr.nofree |= (flags&NV_RDONLY)?1:0;
95 if(is_associative(aq))
97 aq->scope = (void*)dtopen(&_Nvdisc,Dtoset);
98 dtview((Dt_t*)aq->scope,aq->table);
99 aq->table = (Dt_t*)aq->scope;
100 return(aq);
105 aq->scope = (void*)ap;
106 fp = (struct fixed_array*)(aq+1);
107 aq->fixed = (void*)fp;
111 return(aq);
114 aq->scope = (void*)ap;
115 ar = (struct index_array*)aq;
118 return(aq);
134 static void array_syncsub(Namarr_t *ap, Namarr_t *aq)
136 ((struct index_array*)ap)->cur = ((struct index_array*)aq)->cur;
141 struct index_array *aq = (struct index_array*)ap->header.scope;
142 if(!ap->header.fun && aq)
144 return (ap->header.fixed || ((ap->cur<aq->maxi) && aq->val[ap->cur].cp));
146 return ((ap->cur<aq->maxi) && aq->val[ap->cur].cp);
454 struct index_array *aq = (struct index_array*)ap, *ar;
526 array_setbit(aq->bits,aq->cur,ARRAY_NOFREE);
546 aq->header.nelem |= ARRAY_NOSCOPE;
556 aq->header.nelem = ap->nelem = nelem;
562 register Namarr_t *aq,*ap = (Namarr_t*)disc;
567 if(!mp && !is_associative(ap) && (aq=(Namarr_t*)ap->scope))
569 array_syncsub(aq,ap);
570 if((mp=array_find(np,aq,ARRAY_LOOKUP))==np)
571 return(nv_getv(np,&aq->hdr));
589 register Namarr_t *aq,*ap = (Namarr_t*)disc;
593 if(!mp && !is_associative(ap) && (aq=(Namarr_t*)ap->scope))
595 array_syncsub(aq,ap);
596 if((mp=array_find(np,aq,ARRAY_LOOKUP))==np)
597 return(nv_getn(np,&aq->hdr));
609 register struct index_array *aq = (struct index_array*)ap;
616 int xfree = (ap->fixed||is_associative(ap))?0:array_isbit(aq->bits,aq->cur,ARRAY_NOFREE);
626 array_clrbit(aq->bits,aq->cur,ARRAY_CHILD);
627 aq->val[aq->cur].cp = 0;
657 array_clrbit(aq->bits,aq->cur,ARRAY_CHILD);
658 aq->val[aq->cur].cp = 0;
718 array_clrbit(aq->bits,aq->cur,ARRAY_NOFREE);
720 aq->val[aq->cur].cp = 0;
759 if(!is_associative(ap) && aq->xp)
761 _nv_unset(nv_namptr(aq->xp,0),NV_RDONLY);
762 free((void*)aq->xp);
1057 struct index_array *aq = (struct index_array*)ap;
1058 array_setbit(aq->bits,aq->cur,ARRAY_CHILD);
1077 struct index_array *aq=0, *ar=0;
1129 aq = ap;
1132 if(!(aq=ar) || dot>=(unsigned)aq->maxi)
1135 if(aq->val[dot].cp==Empty && array_elem(&aq->header) < nv_aimax(np)+1) {
1140 if(aq->val[dot].cp)
1143 if(array_isbit(aq->bits, dot,ARRAY_CHILD))
1145 Namval_t *mp = aq->val[dot].np;
1146 if((aq->header.nelem&ARRAY_NOCHILD) && nv_isvtree(mp) && !mp->nvfun->dsize)
1813 struct index_array *ap=0,*aq;
1824 if(!(aq = (struct index_array*)ap->header.scope))
1825 aq = ap;
1827 while(--arg0>0 && ap->val[arg0].cp==0 && aq->val[arg0].cp==0);