Fix 2004/burley
There were two things that had to change with my previous fix (getting it to compile), one in code and one in the Makefile. Instead of doing ',1' after the calls to longjmp() do ',0'. The way it originally was is in binary expressions but since the function returns void I made the result be 0 rather than 1 and along with the other change it works (though maybe it would work with 1 anyway but it seems not to be necessary and I don't feel like testing it now). The Makefile change is that it won't work right with the optimiser enabled so that was disabled. I removed this entry from bugs.md (which was listed twice by accident - and some other things were too) and updated it in the thanks-for-fixes.md file as well.
This commit is contained in:
1 parent
5d1b739100
commit
61de38e6f0
4 files changed
+41
-146
No files matched your search
@@ -66,7 +66,7 @@ CINCLUDE= -include stdio.h -include setjmp.h -include string.h -include time.h -
|
||||
|
||||
# Optimization
|
||||
#
|
||||
OPT= -O3
|
||||
OPT=
|
||||
|
||||
# Default flags for ANSI C compilation
|
||||
#
|
||||
|
||||
+16
-16
@@ -19,31 +19,31 @@ setjmp(p[0]),
|
||||
setjmp(p[3]),
|
||||
(i||!++i)&&((h--||(k|=i),
|
||||
i/=2,
|
||||
longjmp(p[3],4)),1),
|
||||
longjmp(p[0],1)),1),
|
||||
longjmp(p[3],4)),0),
|
||||
longjmp(p[0],0)),0),
|
||||
k^=-1,
|
||||
k+=1<<037,
|
||||
setjmp(p[3]),
|
||||
k&&(((--i<5&&1&k)&&(s=(rand()>>9)%0x4,
|
||||
setjmp(p[0]),
|
||||
t+=(rand()>>3)%015-t,
|
||||
e[s]&(1<<t)&&(longjmp(p[0],1),1),
|
||||
e[s]&(1<<t)&&(longjmp(p[0],0),0),
|
||||
e[s]|=1<<t,
|
||||
g[i]=t|++s<<"\004"["\004"[1]]|t),
|
||||
k>>=1,
|
||||
i+=1<<1,
|
||||
longjmp(p[3],4)),1),
|
||||
longjmp(p[3],4)),0),
|
||||
setjmp(p[0]),
|
||||
putchar(0x20+!putchar(012+"(.7-A,G+@*J)/"[(017&(i=g[4-k]))*013%13])),
|
||||
++k^005&&(longjmp(p[0],1),1),
|
||||
++k^005&&(longjmp(p[0],0),0),
|
||||
putchar('\n'),
|
||||
setjmp(p[3]),
|
||||
putchar(0x1F+!!putchar(("BCDHS"[g[--k]>>4]))),
|
||||
k&&(longjmp(p[3],4),1),
|
||||
k&&(longjmp(p[3],4),0),
|
||||
putchar('\n'),
|
||||
j+=1<<0,
|
||||
1^j||(d=(char*)fgets(a,sizeof a, stdin)),
|
||||
longjmp(p[1],2)),1),
|
||||
longjmp(p[1],2)),0),
|
||||
s=1==(f=0),
|
||||
i=0<<1,
|
||||
setjmp(p[3]),
|
||||
@@ -53,13 +53,13 @@ j<5&&(((017&g[j])>(g[i]&15)&&(k=g[i],
|
||||
g[i]=g[j],
|
||||
g[j]=k),
|
||||
j++,
|
||||
longjmp(p[1],2)),1),
|
||||
longjmp(p[1],2)),0),
|
||||
i++,
|
||||
longjmp(p[3],4)),1),
|
||||
longjmp(p[3],4)),0),
|
||||
setjmp(p[0]),
|
||||
i--&&!((g[1+i]^g[i])>>4)&&(longjmp(p[0],1),1),
|
||||
i--&&!((g[1+i]^g[i])>>4)&&(longjmp(p[0],0),0),
|
||||
setjmp(p[1]),
|
||||
--j&&(!(k=(g[j]&15)-(g[j-1]&017)+1)||(!(j-1)&&(8==-k)))&&(longjmp(p[1],2),1),
|
||||
--j&&(!(k=(g[j]&15)-(g[j-1]&017)+1)||(!(j-1)&&(8==-k)))&&(longjmp(p[1],2),0),
|
||||
s+=3*!j|!(++i^17),
|
||||
(j*=i*=4)&&(i=1),
|
||||
setjmp(p[3]),
|
||||
@@ -68,9 +68,9 @@ setjmp(p[1]),
|
||||
5-i>j&&(((g[j]^g[j+1])&0xf?g[j]^=g[j]:(s+=((g[j]&0xf)>8&&f++,
|
||||
!!g[j]*i)),
|
||||
j++,
|
||||
longjmp(p[1],2)),1),
|
||||
longjmp(p[1],2)),0),
|
||||
i++,
|
||||
longjmp(p[3],4)),1),
|
||||
longjmp(p[3],4)),0),
|
||||
s=1^s?"AACEDJQZHello World"[s]-'A':!!f,
|
||||
s+=(!i)*(6+12*s-!!s*((g[2]&017)^0xa?8:-192)),
|
||||
s--,
|
||||
@@ -84,10 +84,10 @@ setjmp(p[0]),
|
||||
setjmp(p[1]),
|
||||
0<=j&&((e[i+j]^=*(i-j+e+(j<<1)),
|
||||
--j,
|
||||
longjmp(p[1],2)),1),
|
||||
longjmp(p[1],2)),0),
|
||||
i+=i+1,
|
||||
longjmp(p[0],1)),1),
|
||||
longjmp(p[2],3)),1));
|
||||
longjmp(p[0],0)),0),
|
||||
longjmp(p[2],3)),0));
|
||||
}
|
||||
int main(int argc, char**d){
|
||||
(void)argc;
|
||||
|
||||
Reference in new issue
Block a user