Lines Matching refs:p

146 #define lua_str2number(s,p)strtod((s),(p))  argument
210 #define IntPoint(p)((unsigned int)(lu_mem)(p)) argument
227 void*p; member
245 #define pvalue(o)check_exp(ttislightuserdata(o),(o)->value.p)
295 struct Proto**p; member
337 struct Proto*p; member
393 #define zgetc(z)(((z)->n--)>0?char2int(*(z)->p++):luaZ_fill(z))
408 const char*p; member
496 struct Proto p; member
506 #define gco2p(o)check_exp((o)->gch.tt==(8+1),&((o)->p))
512 #define pcRel(pc,p)(cast(int,(pc)-(p)->code)-1) argument
520 #define savestack(L,p)((char*)(p)-(char*)L->stack) argument
522 #define saveci(L,p)((char*)(p)-(char*)L->base_ci) argument
581 #define luaC_barrier(L,p,v){if(valiswhite(v)&&isblack(obj2gco(p)))luaC_barrierf(L,obj2gco(p),gcvalu… argument
583 #define luaC_objbarrier(L,p,o){if(iswhite(obj2gco(o))&&isblack(obj2gco(p)))luaC_barrierf(L,obj2gco( argument
842 UpVal*p;
844 while(*pp!=NULL&&(p=ngcotouv(*pp))->v>=level){
845 if(p->v==level){
846 if(isdead(g,obj2gco(p)))
847 changewhite(obj2gco(p));
848 return p;
850 pp=&p->next;
894 f->p=NULL;
915 luaM_freearray(L,f->p,f->sizep,Proto*);
927 #define MASK1(n,p)((~((~(Instruction)0)<<n))<<p)
928 #define MASK0(n,p)(~MASK1(n,p))
1094 static StkId adjust_varargs(lua_State*L,Proto*p,int actual){
1096 int nfixargs=p->numparams;
1114 StkId p;
1118 for(p=L->top;p>func;p--)setobj(L,p,p-1);
1136 Proto*p=cl->p;
1137 luaD_checkstack(L,p->maxstacksize);
1139 if(!p->is_vararg){
1141 if(L->top>base+p->numparams)
1142 L->top=base+p->numparams;
1146 base=adjust_varargs(L,p,nargs);
1152 ci->top=L->base+p->maxstacksize;
1153 L->savedpc=p->code;
1239 struct SParser*p=cast(struct SParser*,ud);
1241 tf=luaY_parser(L,p->z,
1242 &p->buff,p->name);
1244 cl->l.p=tf;
1251 struct SParser p;
1253 p.z=z;p.name=name;
1254 luaZ_initbuffer(L,&p.buff);
1255 status=luaD_pcall(L,f_parser,&p,savestack(L,L->top),L->errfunc);
1256 luaZ_freebuffer(L,&p.buff);
1269 GCObject*p=tb->hash[i];
1270 while(p){
1271 GCObject*next=p->gch.next;
1272 unsigned int h=gco2ts(p)->hash;
1274 p->gch.next=newhash[h1];
1275 newhash[h1]=p;
1276 p=next;
1340 #define hashboolean(t,p)hashpow2(t,p)
1342 #define hashpointer(t,p)hashmod(t,IntPoint(p))
1654 const TValue*p=luaH_get(t,key);
1656 if(p!=(&luaO_nilobject_))
1657 return cast(TValue*,p);
1666 const TValue*p=luaH_getnum(t,key);
1667 if(p!=(&luaO_nilobject_))
1668 return cast(TValue*,p);
1676 const TValue*p=luaH_getstr(t,key);
1677 if(p!=(&luaO_nilobject_))
1678 return cast(TValue*,p);
1788 GCObject**p=&g->mainthread->next;
1790 while((curr=*p)!=NULL){
1792 p=&curr->gch.next;
1795 p=&curr->gch.next;
1800 *p=curr->gch.next;
1859 if(f->p[i])
1860 markobject(g,f->p[i]);
1876 markobject(g,cl->l.p);
1938 Proto*p=gco2p(o);
1939 g->gray=p->gclist;
1940 traverseproto(g,p);
1941 return sizeof(Proto)+sizeof(Instruction)*p->sizecode+
1942 sizeof(Proto*)*p->sizep+
1943 sizeof(TValue)*p->sizek+
1944 sizeof(int)*p->sizelineinfo+
1945 sizeof(LocVar)*p->sizelocvars+
1946 sizeof(TString*)*p->sizeupvalues;
2010 #define sweepwholelist(L,p)sweeplist(L,p,((lu_mem)(~(lu_mem)0)-2))
2011 static GCObject**sweeplist(lua_State*L,GCObject**p,lu_mem count){
2015 while((curr=*p)!=NULL&&count-->0){
2020 p=&curr->gch.next;
2023 *p=curr->gch.next;
2029 return p;
2401 return pcRel(ci->savedpc,ci_func(ci)->l.p);
2408 return getline_(ci_func(ci)->l.p,pc);
2430 return(isLua(ci)?ci_func(ci)->l.p:NULL);
2440 ar->source=getstr(cl->l.p->source);
2441 ar->linedefined=cl->l.p->linedefined;
2442 ar->lastlinedefined=cl->l.p->lastlinedefined;
2461 int*lineinfo=f->l.p->lineinfo;
2463 for(i=0;i<f->l.p->sizelineinfo;i++)
2532 StkId p;
2533 for(p=ci->base;p<ci->top;p++)
2534 if(o==p)return 1;
2602 z->p=buff;
2603 return char2int(*(z->p++));
2610 z->p=NULL;
2759 char*p=luaZ_buffer(ls->buff);
2761 if(p[n]==from)p[n]=to;
3863 luaM_growvector(ls->L,f->p,fs->np,f->sizep,Proto*,
3865 while(oldsize<f->sizep)f->p[oldsize++]=NULL;
3866 f->p[fs->np++]=func->f;
3911 luaM_reallocvector(L,f->p,f->sizep,fs->np,Proto*);
4953 k=cl->p->k;
5268 Proto*p;
5271 p=cl->p->p[GETARG_Bx(i)];
5272 nup=p->nups;
5274 ncl->l.p=p;
5290 int n=cast_int(ci->base-ci->func)-cl->p->numparams-1;
5382 StkId p;
5383 p=index2adr(L,idx);
5384 api_checkvalidindex(L,p);
5385 while(++p<L->top)setobj(L,p-1,p);
5389 StkId p;
5391 p=index2adr(L,idx);
5392 api_checkvalidindex(L,p);
5393 for(q=L->top;q>p;q--)setobj(L,q,q-1);
5394 setobj(L,p,L->top);
5863 char*p;
5868 #define luaL_addchar(B,c)((void)((B)->p<((B)->buffer+BUFSIZ)||luaL_prepbuffer(B)),(*(B)->p++=(char)…
5869 #define luaL_addsize(B,n)((B)->p+=(n))
5926 void*p=lua_touserdata(L,ud);
5927 if(p!=NULL){
5932 return p;
6054 #define bufflen(B)((B)->p-(B)->buffer)
6061 B->p=B->buffer;
6102 memcpy(B->p,s,vl);
6103 B->p+=vl;
6115 B->p=B->buffer;
6667 FILE**p=tofilep(L);
6668 int ok=lua_pclose(L,*p);
6669 *p=NULL;
6673 FILE**p=tofilep(L);
6674 int ok=(fclose(*p)==0);
6675 *p=NULL;
6782 char*p=luaL_prepbuffer(&b);
6783 if(fgets(p,BUFSIZ,f)==NULL){
6787 l=strlen(p);
6788 if(l==0||p[l-1]!='\n')
6804 char*p=luaL_prepbuffer(&b);
6806 nr=fread(p,sizeof(char),rlen,f);
6831 const char*p=lua_tostring(L,n);
6832 luaL_argcheck(L,p&&p[0]=='*',n,"invalid option");
6833 switch(p[1]){
7099 static const char*classend(MatchState*ms,const char*p){
7100 switch(*p++){
7102 if(*p=='\0')
7104 return p+1;
7107 if(*p=='^')p++;
7109 if(*p=='\0')
7111 if(*(p++)=='%'&&*p!='\0')
7112 p++;
7113 }while(*p!=']');
7114 return p+1;
7117 return p;
7138 static int matchbracketclass(int c,const char*p,const char*ec){
7140 if(*(p+1)=='^'){
7142 p++;
7144 while(++p<ec){
7145 if(*p=='%'){
7146 p++;
7147 if(match_class(c,uchar(*p)))
7150 else if((*(p+1)=='-')&&(p+2<ec)){
7151 p+=2;
7152 if(uchar(*(p-2))<=c&&c<=uchar(*p))
7155 else if(uchar(*p)==c)return sig;
7159 static int singlematch(int c,const char*p,const char*ep){
7160 switch(*p){
7162 case'%':return match_class(c,uchar(*(p+1)));
7163 case'[':return matchbracketclass(c,p,ep-1);
7164 default:return(uchar(*p)==c);
7167 static const char*match(MatchState*ms,const char*s,const char*p);
7169 const char*p){
7170 if(*p==0||*(p+1)==0)
7172 if(*s!=*p)return NULL;
7174 int b=*p;
7175 int e=*(p+1);
7187 const char*p,const char*ep){
7189 while((s+i)<ms->src_end&&singlematch(uchar(*(s+i)),p,ep))
7199 const char*p,const char*ep){
7204 else if(s<ms->src_end&&singlematch(uchar(*s),p,ep))
7210 const char*p,int what){
7217 if((res=match(ms,s,p))==NULL)
7222 const char*p){
7226 if((res=match(ms,s,p))==NULL)
7239 static const char*match(MatchState*ms,const char*s,const char*p){
7241 switch(*p){
7243 if(*(p+1)==')')
7244 return start_capture(ms,s,p+2,(-2));
7246 return start_capture(ms,s,p+1,(-1));
7249 return end_capture(ms,s,p+1);
7252 switch(*(p+1)){
7254 s=matchbalance(ms,s,p+2);
7256 p+=4;goto init;
7260 p+=2;
7261 if(*p!='[')
7264 ep=classend(ms,p);
7266 if(matchbracketclass(uchar(previous),p,ep-1)||
7267 !matchbracketclass(uchar(*s),p,ep-1))return NULL;
7268 p=ep;goto init;
7271 if(isdigit(uchar(*(p+1)))){
7272 s=match_capture(ms,s,uchar(*(p+1)));
7274 p+=2;goto init;
7284 if(*(p+1)=='\0')
7289 const char*ep=classend(ms,p);
7290 int m=s<ms->src_end&&singlematch(uchar(*s),p,ep);
7296 p=ep+1;goto init;
7299 return max_expand(ms,s,p,ep);
7302 return(m?max_expand(ms,s+1,p,ep):NULL);
7305 return min_expand(ms,s,p,ep);
7309 s++;p=ep;goto init;
7363 const char*p=luaL_checklstring(L,2,&l2);
7368 strpbrk(p,"^$*+?.([%-")==NULL)){
7369 const char*s2=lmemfind(s+init,l1-init,p,l2);
7378 int anchor=(*p=='^')?(p++,1):0;
7386 if((res=match(&ms,s1,p))!=NULL){
7410 const char*p=lua_tostring(L,lua_upvalueindex(2));
7420 if((e=match(&ms,src,p))!=NULL){
7491 const char*p=luaL_checkstring(L,2);
7494 int anchor=(*p=='^')?(p++,1):0;
7508 e=match(&ms,src,p);
7554 const char*p=strfrmt;
7555 while(*p!='\0'&&strchr("-+ #0",*p)!=NULL)p++;
7556 if((size_t)(p-strfrmt)>=sizeof("-+ #0"))
7558 if(isdigit(uchar(*p)))p++;
7559 if(isdigit(uchar(*p)))p++;
7560 if(*p=='.'){
7561 p++;
7562 if(isdigit(uchar(*p)))p++;
7563 if(isdigit(uchar(*p)))p++;
7565 if(isdigit(uchar(*p)))
7568 strncpy(form,strfrmt,p-strfrmt+1);
7569 form+=p-strfrmt+1;
7571 return p;