Skip to content

Commit 1337208

Browse files
author
Tom Szczesny
committed
fix bogus commit
1 parent 1f02a06 commit 1337208

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

src/kx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ K vf_ex(V q, K g)
638638
if(t) cd(kV(f)[CACHE_WD]);
639639
K fc = kclone(f); //clone the function to pass for _f
640640
cd(kV(fc)[CONJ]); kV(fc)[CONJ]=0;
641-
kV(fc)[DEPTH]++; fw=wd_(kC(o),o->n,tree,fc); kV(f)[CACHE_WD]=fw; cd(fc); }
641+
kV(fc)[DEPTH]++; fw=wd_(kC(o),o->n,&tree,fc); kV(f)[CACHE_WD]=fw; cd(fc); }
642642

643643
#ifdef DEBUG
644644
if(stk1>5) {cd(g); kerr("stack"); R _n();}

src/kx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ K ex1(V *w,K k,I *i,I n,I f);
1313
K _n();
1414
extern C errmsg[256];
1515
I bk(V p);
16-
K wd_(S s,int n,K dict,K func);
16+
K wd_(S s,int n,K *dict,K func);
1717
K ex(K a);
1818
K DI(K d,I i);
1919
K kcloneI(K a,const char*f,int n);

src/p.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -325,15 +325,15 @@ I mark(I*m,I k,I t){DO(k, m[i]=i?t:-t) R k;}
325325
// this rule doesn't apply to function argument lists, eg: f:{ [a] 1} is ok. however f: {\n\n [a;b;d] 1+1} not ok
326326
// so the check probably has to do with whether some useful symbol occurred on the line already
327327
//other errors: syntax error
328-
K wd(S s, int n){lineA=s; fdc=0;R wd_(s,n,*denameD(&KTREE,d_,1),0);}
329-
K wd_(S s, int n, K dict, K func) //parse: s input string, n length ;
328+
K wd(S s, int n){lineA=s; fdc=0;R wd_(s,n,denameD(&KTREE,d_,1),0);}
329+
K wd_(S s, int n, K*dict, K func) //parse: s input string, n length ;
330330
//assumes: s does not contain a }])([{ mismatch, s is a "complete" expression
331331
{
332332
if(!s) R 0;
333333
if(strstr(s,":\\t")) { show(kerr("\\t syntax")); R 0; }
334334
//I z=0; if((z=syntaxChk(s))) {O("%lld\n",z); R SYE;}
335335
if(syntaxChk(s)) R SYE;
336-
if('\\'==s[0] && fbs){fbs=0; R backslash(s,n,&dict);}
336+
if('\\'==s[0] && fbs){fbs=0; R backslash(s,n,dict);}
337337

338338
PDA p=0;
339339
K km=newK(-1,1+n); U(km) I *m = kI(km);//marks
@@ -461,7 +461,7 @@ K* inKtree(K*d, S t, I create) {
461461
}
462462

463463
//TODO: capture - oom all
464-
I capture(S s,I n,I k,I*m,V*w,I*d,K*locals,K dict,K func)
464+
I capture(S s,I n,I k,I*m,V*w,I*d,K*locals,K*dict,K func)
465465
//IN string, string length, pos in string, markings;
466466
//OUT words, current #words; IN locals-storage, names-storage, charfunc/NULL
467467
{
@@ -581,23 +581,23 @@ I capture(S s,I n,I k,I*m,V*w,I*d,K*locals,K dict,K func)
581581
if(state) //Bracketed parameters exist and are well-formed
582582
{
583583
S a=strchr(s+k+1,'['); S b=strchr(a,']');
584-
j=wd_(a+1,b-a-1,*zdict,z); //Grab only params. This must create entries in *zdict
584+
j=wd_(a+1,b-a-1,zdict,z); //Grab only params. This must create entries in *zdict
585585
M(z,j) //not g
586586
cd(j);
587587
}
588588
else //Deal with any implicit Z,Y,X parameters
589589
{
590590
K t=Kd();
591591
M(z,t)
592-
j=wd_(s+k+1,r-2,t,0); //Grab all local names
592+
j=wd_(s+k+1,r-2,&t,0); //Grab all local names
593593
M(z,t,j);
594594
I n=0;
595595
DO(3, if(DE(t,IFP[2-i])){n=3-i;break;})
596596
DO(n,denameD(zdict,IFP[i],1)) //TODO: oom
597597
cd(t); cd(j);
598598
}
599599

600-
j=wd_(s+k+1,r-2,*ydict,z);
600+
j=wd_(s+k+1,r-2,ydict,z);
601601
M(z,j)
602602
cd(j);
603603

@@ -655,20 +655,20 @@ I capture(S s,I n,I k,I*m,V*w,I*d,K*locals,K dict,K func)
655655
else z=((K(*)())vn_[charpos(n_s,u[1])])();
656656
else if(func)
657657
{
658-
if(&dict==(K*)kV(func)+PARAMS)
658+
if(dict==(K*)kV(func)+PARAMS)
659659
{
660660
V q=newEntry(u);
661661
U(q)
662-
M(q,kap(&dict,&q))
662+
M(q,kap(dict,&q))
663663
z=EV(q);
664664
cd(q);
665665
}
666-
else if((q=DE(dict,u))) z=EVP(q); //If func has its local, use it
666+
else if((q=DE(*dict,u))) z=EVP(q); //If func has its local, use it
667667
//else if(':'==s[k+r] && ':'==s[k+r+1] && -MARK_VERB==m[k+r+1])
668668
// {m[k+r]=MARK_NAME; r++; z=denameS(kV(func)[CONTeXT],u);} //m[]= probably superfluous
669669
else if(-MARK_VERB==m[k+r] && ':'==s[k+r+1] && -MARK_VERB==m[k+r+1])
670670
{if(':'==s[k+r])r++; z=denameS(kV(func)[CONTeXT],u,1);}
671-
else if(dict==*((K*)kV(func)+LOCALS) && ':'==s[k+r] && -MARK_VERB==m[k+r]) z=denameD(&dict,u,1);
671+
else if(dict==(K*)kV(func)+LOCALS && ':'==s[k+r] && -MARK_VERB==m[k+r]) z=denameD(dict,u,1);
672672
//K3.2: a+:1 format applies to context-globals not locals
673673
else z=denameS(kV(func)[CONTeXT],u,0);//Otherwise check the context (refactor with above?)
674674
}
@@ -678,13 +678,13 @@ I capture(S s,I n,I k,I*m,V*w,I*d,K*locals,K dict,K func)
678678
I i;for(i=k;i<strlen(s);i++){
679679
if(!fbr && s[i]==';')break;
680680
else if(s[i]==':'|| (fbr && (s[i]=='x'||s[i]=='y'||s[i]=='z'))){fdc=1;break;}}
681-
z=inKtree(&dict,u,0);
681+
z=inKtree(dict,u,0);
682682
if((!fdc)&&!z){L err=(L)VLE;
683683
#ifndef DEBUG
684684
oerr(); O("%s\n%c\n",u,'^');
685685
#endif
686686
R err;}
687-
z=denameD(&dict,u,fll&&fdc); }
687+
z=denameD(dict,u,fll&&fdc); }
688688
)
689689
CS(MARK_VERB , // "+" "4:" "_bin" ; grab "+:", "4::"
690690
if(s[k]=='\\'){z=(V)0x7c; break;} //trace or scan

src/p.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ extern V offsetSSR,offsetWhat,offsetAt,offsetDot,offsetColon;
3535
extern S param_dfa;
3636
I sz(I t,I n);
3737
I lsz(I k);
38-
I capture(S s,I n,I k,I *m,V *w,I *d,K *locals,K dict,K func);
38+
I capture(S s,I n,I k,I *m,V *w,I *d,K *locals,K *dict,K func);
3939
K Kv();
4040
K cd(K a);
4141
void pdafree(PDA p);
@@ -44,7 +44,7 @@ K backslash(S s,I n,K*dict);
4444
extern S d_;
4545
extern K KTREE;
4646
K *denameD(K *d,S t,I create);
47-
K wd_(S s,int n,K dict,K func);
47+
K wd_(S s,int n,K *dict,K func);
4848
K wd(S s,int n);
4949
I maX(I a,I b);
5050
I mark(I *m,I k,I t);

src/v.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ K at_verb(K a, K b) { //[Internal Function]
128128
else if( 0==at){DO(bn,kK(z)[i]=ci(kK(a)[kI(b)[i]])) if(bt==ABS(bt) || bn!=1)z=collapse(z);} }
129129
else if(3==ABS(bt)) { //a is dict/directory & b is executable string like "1+1+c"
130130
P(5!=at,TE)
131-
z=ex(wd_(kC(b),bn,a,0)); }
131+
z=ex(wd_(kC(b),bn,&a,0)); }
132132
else if(4==ABS(bt)) {
133133
P(5!=at,TE)
134134
z=newK(0,bn);

src/v.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ K collapse(K x); //ko.c
55
K of(K x, K y); //vd.c
66
extern V offsetSSR,offsetWhat,offsetAt,offsetDot,offsetColon; //k.c
77
extern K KTREE; //k.c
8-
K wd_(S s,int n,K dict,K func); //p.c
8+
K wd_(S s,int n,K*dict,K func); //p.c

0 commit comments

Comments
 (0)