Fix 2005/toledo for some versions of clang
In some versions of clang there is an additional defect where it only allows main() to have 0, 2 or 3 args. A new function was added which is what used to be main() that main() now calls. The alt versions have also had this fix applied.
This commit is contained in:
1 parent
f2fe137618
commit
4abc9e3936
4 files changed
+24
-13
No files matched your search
@@ -2,7 +2,7 @@
|
||||
#define F getchar())
|
||||
#define H(z)*n++=z;
|
||||
#include <setjmp.h>
|
||||
#define v main(0,0,0
|
||||
#define v pain(0,0,0
|
||||
#define Z while(
|
||||
#define _ if(
|
||||
#define o(d) (u[l]=0,l[d]=6^e,q=1e4>v,0),l[d]=0,u[l]=e^6,q)
|
||||
@@ -14,19 +14,20 @@ a=((j^e)!=1?6!=(j^e)?O[32+x/10]-O[u/10+32]-q:(S|=6!=j?8\
|
||||
10)|r)*99+(j==1?90<x:29>x)*(9*O[28+i]-288))+O[r+28\
|
||||
]*9-288+O[x%10+33]-f-O[33+u%10]; x[l]=i; S|=(21=\
|
||||
=u|21==x)*2+(u==28|28==x)*4+(91==u|x==91)*16+32\
|
||||
*(u==98|x==98)+(20==d)*64*x; a-=k>f?main(a,f+1\
|
||||
*(u==98|x==98)+(20==d)*64*x; a-=k>f?pain(a,f+1\
|
||||
,M,k):0; _ i==c&u==h&!f&N&a>-1e4&x==y)longjm\
|
||||
p(z,1); S=b; _!N|f&&(a>M||!f&a==M&&1&rand()\
|
||||
)){ _!f){ _ k){ c=i; h=u; y=x; } } else _ \
|
||||
L-a<N){ n; e=~e; u[l]=j; x[l]=r; return\
|
||||
a; } M=a; } } x[l]=r; u[l]=j; n; } }
|
||||
typedef int G; char J [ 78 ], O [ ]
|
||||
typedef int G; C kk; char J [ 78 ], O [ ]
|
||||
= "HRQAMS#-smaqrh[UTZYTU[|TBA("
|
||||
"$#(ABT|ba`gg`ab8>GK[_`fFDZXEYR" "L\t####"
|
||||
"##B#A#@#G#F#E#D#K\t\3Zlv#tjm" "\3J#tjm\3Pwb"
|
||||
"ofnbwf\3Joofdbo\3)&`&`.&`&`" "#+&g*\t"; G y,
|
||||
c,h,e,S,*s,l[149]; jmp_buf z ; G main(G L,C fa,
|
||||
C Na,C ka){G f=fa; G N=Na; G k=ka;
|
||||
c,h,e,S,*s,l[149]; jmp_buf z; G main(G L, C fa, C Na){
|
||||
return pain(L, fa, Na, kk);} G pain(G L,C fa,
|
||||
C Na, C ka){G f=fa; G N=Na; G k=ka;
|
||||
G u=99,p,q,r,j,i,x ,t, a, b,d,M=-1e9
|
||||
; char *n; if( *l){ e=~e; Z u >21){ q= l[--u]^e;
|
||||
_!-- q){ _!l[p=e?u-10:u+10]){ I(p,)_ e?u>80 & !l[p
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define F getchar())
|
||||
#define H(z)*n++=z;
|
||||
#include <setjmp.h>
|
||||
#define v main(0,0,0
|
||||
#define v pain(0,0,0
|
||||
#define Z while(
|
||||
#define _ if(
|
||||
#define o(d)(S=63,l[d]=6^e,q=1e4>v,u[l]=0),l[d]=0,u[l]=e^6,S=b,q)
|
||||
@@ -14,18 +14,19 @@ a=((j^e)!=1?6!=(j^e)?O[32+x/10]-O[u/10+32]-q:(S|=6!=j?8\
|
||||
10)|r)*99+(j==1?90<x:29>x)*(9*O[28+i]-288))+O[r+28\
|
||||
]*9-288+O[x%10+33]-f-O[33+u%10]; x[l]=i; S|=(21=\
|
||||
=u|21==x)*2+(u==28|28==x)*4+(91==u|x==91)*16+32\
|
||||
*(u==98|x==98)+(20==d)*64*x; a-=k>f?main(a,f+1\
|
||||
*(u==98|x==98)+(20==d)*64*x; a-=k>f?pain(a,f+1\
|
||||
,M,k):0; _ i==c&u==h&!f&N&a>-1e4&x==y)longjm\
|
||||
p(z,1); S=b; _!N|f&&(a>M||!f&a==M&&1&rand()\
|
||||
)){ _!f){ _ k){ c=i; h=u; y=x; } } else _ \
|
||||
L-a<N){ n; e=~e; u[l]=j; x[l]=r; return\
|
||||
a; } M=a; } } x[l]=r; u[l]=j; n; } }
|
||||
typedef int G; char J [ 78 ], O [ ]
|
||||
typedef int G; C kk; char J [ 78 ], O [ ]
|
||||
= "HRQAMS#-smaqrh[UTZYTU[|TBA("
|
||||
"$#(ABT|ba`gg`ab8>GK[_`fFDZXEYR" "L\t####"
|
||||
"##B#A#@#G#F#E#D#K\t\3Zlv#tjm" "\3J#tjm\3Pwb"
|
||||
"ofnbwf\3Joofdbo\3)&`&`.&`&`" "#+&g*\t"; G y,
|
||||
c,h,e,S,*s,l[149]; jmp_buf z ; G main(G L,C fa,
|
||||
c,h,e,S,*s,l[149]; jmp_buf z; G main(G L, C fa, C Na){
|
||||
return pain(L, fa, Na, kk); } G pain(G L,C fa,
|
||||
C Na,C ka){ G f=fa; G N=Na; G k=ka;
|
||||
G u=99,p,q,r,j,i,x ,t,a,b=S,d,M=-1e9
|
||||
; char *n; if( *l){ e=~e; Z u >21){ q= l[--u]^e;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define F getchar())
|
||||
#define H(z)*n++=z;
|
||||
#include <setjmp.h>
|
||||
#define v main(0,0,0
|
||||
#define v pain(0,0,0
|
||||
#define Z while(
|
||||
#define _ if(
|
||||
#define o(d)(S=63,u[l]=0,l[d]=6^e,q=1e4>v,0),l[d]=0,u[l]=e^6,S=b,q)
|
||||
@@ -14,18 +14,19 @@ a=((j^e)!=1?6!=(j^e)?O[32+x/10]-O[u/10+32]-q:(S|=6!=j?8\
|
||||
10)|r)*99+(j==1?90<x:29>x)*(9*O[28+i]-288))+O[r+28\
|
||||
]*9-288+O[x%10+33]-f-O[33+u%10]; x[l]=i; S|=(21=\
|
||||
=u|21==x)*2+(u==28|28==x)*4+(91==u|x==91)*16+32\
|
||||
*(u==98|x==98)+(20==d)*64*x; a-=k>f?main(a,f+1\
|
||||
*(u==98|x==98)+(20==d)*64*x; a-=k>f?pain(a,f+1\
|
||||
,M,k):0; _ i==c&u==h&!f&N&a>-1e4&x==y)longjm\
|
||||
p(z,1); S=b; _!N|f&&(a>M||!f&a==M&&1&rand()\
|
||||
)){ _!f){ _ k){ c=i; h=u; y=x; } } else _ \
|
||||
L-a<N){ n; e=~e; u[l]=j; x[l]=r; return\
|
||||
a; } M=a; } } x[l]=r; u[l]=j; n; } }
|
||||
typedef int G; char J [ 78 ], O [ ]
|
||||
typedef int G; C kk; char J [ 78 ], O [ ]
|
||||
= "HRQAMS#-smaqrh[UTZYTU[|TBA("
|
||||
"$#(ABT|ba`gg`ab8>GK[_`fFDZXEYR" "L\t####"
|
||||
"##B#A#@#G#F#E#D#K\t\3Zlv#tjm" "\3J#tjm\3Pwb"
|
||||
"ofnbwf\3Joofdbo\3)&`&`.&`&`" "#+&g*\t"; G y,
|
||||
c,h,e,S,*s,l[149]; jmp_buf z ; G main(G L,C fa,
|
||||
c,h,e,S,*s,l[149]; jmp_buf z; G main(G L, C fa, C Na) {
|
||||
return pain(L, fa, Na, kk); } G pain(G L,C fa,
|
||||
C Na,C ka){ G f=fa; G N=Na; G k=ka;
|
||||
G u=99,p,q,r,j,i,x ,t,a,b=S,d,M=-1e9
|
||||
; char *n; if( *l){ e=~e; Z u >21){ q= l[--u]^e;
|
||||
|
||||
@@ -1217,6 +1217,14 @@ Cody also added the alt code which does scan for https. Futile, maybe, based on
|
||||
how https is set up, in which case just enjoy it for what it was. But there
|
||||
might be some command line that will let it work that way.
|
||||
|
||||
## [2005/toledo](2005/toledo/toledo.c) ([README.md](2005/toledo/README.md))
|
||||
|
||||
Cody fixed this to compile with some versions of clang which have an additional
|
||||
defect where `main()` can only have 0, 2 or 3 args (it was 4). It now calls
|
||||
another function that takes 4 args and which is what used to be `main()`.
|
||||
|
||||
The alternate versions were also fixed.
|
||||
|
||||
|
||||
## [2006/birken](2006/birken/birken.c) ([README.md](2006/birken/README.md]))
|
||||
|
||||
|
||||
Reference in new issue
Block a user