From a1494028d73bc141f7fd2613fc551e406885cbd4 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Mon, 13 Feb 2023 09:53:39 -0800 Subject: [PATCH 01/50] Add a limitation note in sgit Namely that if the sed command has spaces it will be a problem. Whether this will be fixed is yet to be seen. --- bin/sgit | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/sgit b/bin/sgit index 68399b889..92b2e7478 100755 --- a/bin/sgit +++ b/bin/sgit @@ -13,6 +13,10 @@ # how it is and I don't think it would do good to add any additional features # except perhaps allowing for one to specify path to sed. # +# A limitation is that if the sed command has spaces it will be a problem. +# Whether this will be fixed is not yet decided. I have some ideas of how it +# might happen but it might not be worth it. +# # - Cody Boone Ferguson (@xexyl) # From 88f1e9d514b9434e0e1f7d60f6afee29e4956d6a Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 11:20:18 -0800 Subject: [PATCH 02/50] restore original 1991/davidguy source --- 1991/cdupont/cdupont.c | 6 ++-- 1991/cdupont/cdupont_ansi.c | 26 ---------------- 1991/davidguy/davidguy.c | 57 +++++++++++++++++------------------ 1991/davidguy/davidguy.orig.c | 32 -------------------- 4 files changed, 31 insertions(+), 90 deletions(-) delete mode 100644 1991/cdupont/cdupont_ansi.c delete mode 100644 1991/davidguy/davidguy.orig.c diff --git a/1991/cdupont/cdupont.c b/1991/cdupont/cdupont.c index 3a63eabfe..fdae94064 100644 --- a/1991/cdupont/cdupont.c +++ b/1991/cdupont/cdupont.c @@ -7,8 +7,8 @@ main(){int x ,gi=4,i,f,ri=1,httxkbl=1,m=012;long cd=0x5765248d,n; x= u [gi][m]; sorryfor_this_unused_but_very_needed_label: if( m==gi){x=0x70;f=0x68;}else goto cOg0 ; b:putchar(x); if( !(n-httxkbl++)) -#define yank putchar(' - {httxkbl=1; yank ');goto +#define yank(x) putchar(x) + {httxkbl=1; yank(' ');goto hxi;}goto bl; /* hardlyundrstandable, but likely to be missed if removed */ @@ -18,7 +18,7 @@ likely to be missed if removed */ c0g0 : n=cd&0x40000000L>>0x1e; goto cOgO; g6w: if(x!=0x2e){i++;goto c0gO;}else /* -injail*/yank\n');goto vhjsgfdyl1lgjhd; +injail*/yank('\n');goto vhjsgfdyl1lgjhd; cOg0 : f=u[m][gi];goto b;bl:m=(i+1)*(4* x+3*f)%032;gi=(i+1)*(x+2*f)%0x1a; goto g6w; diff --git a/1991/cdupont/cdupont_ansi.c b/1991/cdupont/cdupont_ansi.c deleted file mode 100644 index fdae94064..000000000 --- a/1991/cdupont/cdupont_ansi.c +++ /dev/null @@ -1,26 +0,0 @@ - /* common sense to nohonest programmer */ -#include -main(){int x ,gi=4,i,f,ri=1,httxkbl=1,m=012;long cd=0x5765248d,n; - char u[0x50][032];FILE *ind; - ind=fopen(s,t); for(i=0; i<0x1a; i++){goto daswjhkls;vhjsgfdy1l1gjhd:;} -/*borntorun.*/goto c0g0;cOgO:i=0;fclose(ind);c0gO: -x= u [gi][m]; sorryfor_this_unused_but_very_needed_label: - if( m==gi){x=0x70;f=0x68;}else goto cOg0 ; b:putchar(x); if( -!(n-httxkbl++)) -#define yank(x) putchar(x) - {httxkbl=1; yank(' ');goto - hxi;}goto bl; - /* hardlyundrstandable, but -likely to be missed if removed */ - daswjhkls: fgets(u[i], 0120, ind); - /*obfuscated, eh? */goto - vhjsgfdy1l1gjhd; - c0g0 : n=cd&0x40000000L>>0x1e; - goto cOgO; g6w: - if(x!=0x2e){i++;goto c0gO;}else /* -injail*/yank('\n');goto vhjsgfdyl1lgjhd; -cOg0 : -f=u[m][gi];goto b;bl:m=(i+1)*(4* -x+3*f)%032;gi=(i+1)*(x+2*f)%0x1a; goto g6w; - hxi:cd^= n= cd&(7<<3*(014-++ri)); -n >>=3*(12-ri); goto bl;vhjsgfdyl1lgjhd:;} diff --git a/1991/davidguy/davidguy.c b/1991/davidguy/davidguy.c index 8d7a75726..421c014d3 100644 --- a/1991/davidguy/davidguy.c +++ b/1991/davidguy/davidguy.c @@ -1,33 +1,32 @@ -#define u unsigned -#define w char* -#define j(x)(*(*(x*)&T)++) -#define H j(short*) -#define K j(w) -#define e j(u*) -#define r register u -#define R(b)write(A,T=h,4*b); -#define S (u*)sbrk(Q*4+U*8)+U -#define E(a,b,c)a=c&1<<31|b/2;c=c*2|b&1; -#define V q=h^*L;L+=F;E(d,q,x)E(f,d,s)g=f&q;f^=q -#define W while( -#define Z q=I&f;M|=q&c;c^=q;I^=f;M|=g&c;c^=g -#define Y W(F= *s++-'0')<=9)*T=10**T+F;K -#define D(q,s)c);W q>s)G= *--q,*q= *s,*s++=G; -#define P if(i^z){x=Q+(n=D(x,n) -#define C if(i){q=Q*4+(s=(w)D(q,s) -u A,U,Q,J,X[9999],B;main(a,b)w*b;{r*c,*d,y=0,f,g,F,I,M,N,z,*x,*n,i,G;w q,*h=(w -)X,*T,*s=".slo.-W00,tmhw.W/";T=h;if(a>1){e;s=b[1];Y;Y;Y;Y;T=h;H;K=23;Y+=112;T= -h;Y;y= *--T;H=2;}else{H=1;W*s)K=1+*s++;}connect(A=socket(a,1,0),T=h,24-a*4);H= -17004;H=11;e=0;e=0;i=66==*h;R(3)read(A,h,8);e;H;read(A,h,4*H);T=h;e;F=e;e;e;I= -11+H;f=H-6;K;U=K;i^=K;z=!K;T+=I/4*4+8*U;W y--){T+=39;I=K;W I--)H,T+=4+24*H;}I= -e;e;B=(!e^**b&1)-1;e;e;U=H/32;J=H/30*30;T+=14;M=K;f/=U;T=h;K=55;K;H=4;e=F;e=I; +#define _ define +#_ u unsigned +#_ w char* +#_ j(x)(*(*(x*)&T)++) +#_ H j(short*) +#_ K j(w) +#_ e j(u*) +#_ r register u +#_ R(b)write(A,T=h,4*b); +#_ S (u*)sbrk(Q*4+U*8)+U +#_ E(a,b,c)a=c&1<<31|b/2;c=c*2|b&1; +#_ V q= *L;L+=F;E(d,q,x)E(f,d,s)g=f&q;f^=q +#_ W while( +#_ Z q=I&f;M|=q&c;c^=q;I^=f;M|=g&c;c^=g +#_ Y W(F= *s++)&16)*T=10**T+F-'0';T++ +#_ D(q,s)c);W q>s)G= *--q,*q= *s,*s++=G; +#_ P if(i^z){x=Q+(n=D(x,n) +#_ C if(i){q=Q*4+(s=(w)D(q,s) +u A,U,Q,J,X[9999];main(a,b)w*b;{r*c,*d,y,f,g,F,G,I,M,N,z,*x,*n,i;w q,*h=(w)X,* +T,*s=".slo.-W00,tmhw.W/";T=h;if(a>1){H=2;K=23;K=112;s=b[1];Y;Y;Y;Y;}else{H=1;W +*s)K=1+*s++;}connect(A=socket(a,1,0),T=h,24-a*4);H=17004;H=11;e=0;e=0;i=66==*h +;R(3)read(A,h,8);e;H;read(A,h,4*H);T=h;e;F=e;e;e;I=11+H;f=H-6;K;U=K;i^=K;z=!K; +T+=I/4*4+8*U;I=e;T+=16;U=H/32;J=H/30*30;T+=14;M=K;f/=U;T=h;K=55;K;H=4;e=F;e=I; e=0;R(4)N=F+8192;K=53;K=M;H=4;e=N;e=I;H=U*32;H=J;R(4)K=2;K;H=4;e=I;e=1;e=N;R(4 )Q=J*U;c=S;d=S;L(c);W 1){P}C}y=0;W yf?g=f:g);e=N;e =F;H=U*32;H=g;H=0;H=y;K=0;K=1;R(6)write(A,c+y*U,g*U*4);y+=g;}K=61;K=0;H=4;e=I; e=0;e=0;R(4)C}P}v(c,d);}}L(A)r*A;{r*T=A+Q,X=getpid();W A>31;G=z+F;L=y+F;W G>z){M= *--G;*--L=(M*2)+f;f=M>>31;}z+=F;y+ -=F;}} +,O)u*n,*O;{r*A,F=U,*L=n-F,*G=L+Q,I,c,d,M,f,g,N,q,i=0,X,T,v,s,x,*y,*z;W L>31;G=z+F;L=y+F;W G>z){M= *--G;*--L=(M*2)+f;f=M>>31;}z+=F;y+=F;}} diff --git a/1991/davidguy/davidguy.orig.c b/1991/davidguy/davidguy.orig.c deleted file mode 100644 index 421c014d3..000000000 --- a/1991/davidguy/davidguy.orig.c +++ /dev/null @@ -1,32 +0,0 @@ -#define _ define -#_ u unsigned -#_ w char* -#_ j(x)(*(*(x*)&T)++) -#_ H j(short*) -#_ K j(w) -#_ e j(u*) -#_ r register u -#_ R(b)write(A,T=h,4*b); -#_ S (u*)sbrk(Q*4+U*8)+U -#_ E(a,b,c)a=c&1<<31|b/2;c=c*2|b&1; -#_ V q= *L;L+=F;E(d,q,x)E(f,d,s)g=f&q;f^=q -#_ W while( -#_ Z q=I&f;M|=q&c;c^=q;I^=f;M|=g&c;c^=g -#_ Y W(F= *s++)&16)*T=10**T+F-'0';T++ -#_ D(q,s)c);W q>s)G= *--q,*q= *s,*s++=G; -#_ P if(i^z){x=Q+(n=D(x,n) -#_ C if(i){q=Q*4+(s=(w)D(q,s) -u A,U,Q,J,X[9999];main(a,b)w*b;{r*c,*d,y,f,g,F,G,I,M,N,z,*x,*n,i;w q,*h=(w)X,* -T,*s=".slo.-W00,tmhw.W/";T=h;if(a>1){H=2;K=23;K=112;s=b[1];Y;Y;Y;Y;}else{H=1;W -*s)K=1+*s++;}connect(A=socket(a,1,0),T=h,24-a*4);H=17004;H=11;e=0;e=0;i=66==*h -;R(3)read(A,h,8);e;H;read(A,h,4*H);T=h;e;F=e;e;e;I=11+H;f=H-6;K;U=K;i^=K;z=!K; -T+=I/4*4+8*U;I=e;T+=16;U=H/32;J=H/30*30;T+=14;M=K;f/=U;T=h;K=55;K;H=4;e=F;e=I; -e=0;R(4)N=F+8192;K=53;K=M;H=4;e=N;e=I;H=U*32;H=J;R(4)K=2;K;H=4;e=I;e=1;e=N;R(4 -)Q=J*U;c=S;d=S;L(c);W 1){P}C}y=0;W yf?g=f:g);e=N;e -=F;H=U*32;H=g;H=0;H=y;K=0;K=1;R(6)write(A,c+y*U,g*U*4);y+=g;}K=61;K=0;H=4;e=I; -e=0;e=0;R(4)C}P}v(c,d);}}L(A)r*A;{r*T=A+Q,X=getpid();W A>31;G=z+F;L=y+F;W G>z){M= *--G;*--L=(M*2)+f;f=M>>31;}z+=F;y+=F;}} From 87fa417be0e5d7db601d4e2a093d4293738089f6 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 11:21:14 -0800 Subject: [PATCH 03/50] fix cpp for 1991//davidguy/davidguy.c --- 1991/davidguy/davidguy.c | 57 ++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/1991/davidguy/davidguy.c b/1991/davidguy/davidguy.c index 421c014d3..8d7a75726 100644 --- a/1991/davidguy/davidguy.c +++ b/1991/davidguy/davidguy.c @@ -1,32 +1,33 @@ -#define _ define -#_ u unsigned -#_ w char* -#_ j(x)(*(*(x*)&T)++) -#_ H j(short*) -#_ K j(w) -#_ e j(u*) -#_ r register u -#_ R(b)write(A,T=h,4*b); -#_ S (u*)sbrk(Q*4+U*8)+U -#_ E(a,b,c)a=c&1<<31|b/2;c=c*2|b&1; -#_ V q= *L;L+=F;E(d,q,x)E(f,d,s)g=f&q;f^=q -#_ W while( -#_ Z q=I&f;M|=q&c;c^=q;I^=f;M|=g&c;c^=g -#_ Y W(F= *s++)&16)*T=10**T+F-'0';T++ -#_ D(q,s)c);W q>s)G= *--q,*q= *s,*s++=G; -#_ P if(i^z){x=Q+(n=D(x,n) -#_ C if(i){q=Q*4+(s=(w)D(q,s) -u A,U,Q,J,X[9999];main(a,b)w*b;{r*c,*d,y,f,g,F,G,I,M,N,z,*x,*n,i;w q,*h=(w)X,* -T,*s=".slo.-W00,tmhw.W/";T=h;if(a>1){H=2;K=23;K=112;s=b[1];Y;Y;Y;Y;}else{H=1;W -*s)K=1+*s++;}connect(A=socket(a,1,0),T=h,24-a*4);H=17004;H=11;e=0;e=0;i=66==*h -;R(3)read(A,h,8);e;H;read(A,h,4*H);T=h;e;F=e;e;e;I=11+H;f=H-6;K;U=K;i^=K;z=!K; -T+=I/4*4+8*U;I=e;T+=16;U=H/32;J=H/30*30;T+=14;M=K;f/=U;T=h;K=55;K;H=4;e=F;e=I; +#define u unsigned +#define w char* +#define j(x)(*(*(x*)&T)++) +#define H j(short*) +#define K j(w) +#define e j(u*) +#define r register u +#define R(b)write(A,T=h,4*b); +#define S (u*)sbrk(Q*4+U*8)+U +#define E(a,b,c)a=c&1<<31|b/2;c=c*2|b&1; +#define V q=h^*L;L+=F;E(d,q,x)E(f,d,s)g=f&q;f^=q +#define W while( +#define Z q=I&f;M|=q&c;c^=q;I^=f;M|=g&c;c^=g +#define Y W(F= *s++-'0')<=9)*T=10**T+F;K +#define D(q,s)c);W q>s)G= *--q,*q= *s,*s++=G; +#define P if(i^z){x=Q+(n=D(x,n) +#define C if(i){q=Q*4+(s=(w)D(q,s) +u A,U,Q,J,X[9999],B;main(a,b)w*b;{r*c,*d,y=0,f,g,F,I,M,N,z,*x,*n,i,G;w q,*h=(w +)X,*T,*s=".slo.-W00,tmhw.W/";T=h;if(a>1){e;s=b[1];Y;Y;Y;Y;T=h;H;K=23;Y+=112;T= +h;Y;y= *--T;H=2;}else{H=1;W*s)K=1+*s++;}connect(A=socket(a,1,0),T=h,24-a*4);H= +17004;H=11;e=0;e=0;i=66==*h;R(3)read(A,h,8);e;H;read(A,h,4*H);T=h;e;F=e;e;e;I= +11+H;f=H-6;K;U=K;i^=K;z=!K;T+=I/4*4+8*U;W y--){T+=39;I=K;W I--)H,T+=4+24*H;}I= +e;e;B=(!e^**b&1)-1;e;e;U=H/32;J=H/30*30;T+=14;M=K;f/=U;T=h;K=55;K;H=4;e=F;e=I; e=0;R(4)N=F+8192;K=53;K=M;H=4;e=N;e=I;H=U*32;H=J;R(4)K=2;K;H=4;e=I;e=1;e=N;R(4 )Q=J*U;c=S;d=S;L(c);W 1){P}C}y=0;W yf?g=f:g);e=N;e =F;H=U*32;H=g;H=0;H=y;K=0;K=1;R(6)write(A,c+y*U,g*U*4);y+=g;}K=61;K=0;H=4;e=I; e=0;e=0;R(4)C}P}v(c,d);}}L(A)r*A;{r*T=A+Q,X=getpid();W A>31;G=z+F;L=y+F;W G>z){M= *--G;*--L=(M*2)+f;f=M>>31;}z+=F;y+=F;}} +,O)u*n,*O;{r*A,F=U,*L=n-F,*G=L+Q,I,c,d,M,f,g,N,q,i=0,X,T,v,s,x,*y,*z,h=B;W L>31;G=z+F;L=y+F;W G>z){M= *--G;*--L=(M*2)+f;f=M>>31;}z+=F;y+ +=F;}} From a47ecd7db3a73d65fbbce78cb636aa9846199d1f Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 11:22:31 -0800 Subject: [PATCH 04/50] fix and cleanup 1991/davidguy --- 1991/davidguy/davidguy.c | 37 ++++++++++++++++++------------------ 1991/davidguy/davidguy.fix.c | 34 --------------------------------- 2 files changed, 19 insertions(+), 52 deletions(-) delete mode 100644 1991/davidguy/davidguy.fix.c diff --git a/1991/davidguy/davidguy.c b/1991/davidguy/davidguy.c index 8d7a75726..21ea9da20 100644 --- a/1991/davidguy/davidguy.c +++ b/1991/davidguy/davidguy.c @@ -8,26 +8,27 @@ #define R(b)write(A,T=h,4*b); #define S (u*)sbrk(Q*4+U*8)+U #define E(a,b,c)a=c&1<<31|b/2;c=c*2|b&1; -#define V q=h^*L;L+=F;E(d,q,x)E(f,d,s)g=f&q;f^=q +#define V q= *L;L+=F;E(d,q,x)E(f,d,s)g=f&q;f^=q #define W while( #define Z q=I&f;M|=q&c;c^=q;I^=f;M|=g&c;c^=g -#define Y W(F= *s++-'0')<=9)*T=10**T+F;K +#define Y W(F= *s++)&16)*T=10**T+F-'0';T++ #define D(q,s)c);W q>s)G= *--q,*q= *s,*s++=G; #define P if(i^z){x=Q+(n=D(x,n) #define C if(i){q=Q*4+(s=(w)D(q,s) -u A,U,Q,J,X[9999],B;main(a,b)w*b;{r*c,*d,y=0,f,g,F,I,M,N,z,*x,*n,i,G;w q,*h=(w -)X,*T,*s=".slo.-W00,tmhw.W/";T=h;if(a>1){e;s=b[1];Y;Y;Y;Y;T=h;H;K=23;Y+=112;T= -h;Y;y= *--T;H=2;}else{H=1;W*s)K=1+*s++;}connect(A=socket(a,1,0),T=h,24-a*4);H= -17004;H=11;e=0;e=0;i=66==*h;R(3)read(A,h,8);e;H;read(A,h,4*H);T=h;e;F=e;e;e;I= -11+H;f=H-6;K;U=K;i^=K;z=!K;T+=I/4*4+8*U;W y--){T+=39;I=K;W I--)H,T+=4+24*H;}I= -e;e;B=(!e^**b&1)-1;e;e;U=H/32;J=H/30*30;T+=14;M=K;f/=U;T=h;K=55;K;H=4;e=F;e=I; -e=0;R(4)N=F+8192;K=53;K=M;H=4;e=N;e=I;H=U*32;H=J;R(4)K=2;K;H=4;e=I;e=1;e=N;R(4 -)Q=J*U;c=S;d=S;L(c);W 1){P}C}y=0;W yf?g=f:g);e=N;e -=F;H=U*32;H=g;H=0;H=y;K=0;K=1;R(6)write(A,c+y*U,g*U*4);y+=g;}K=61;K=0;H=4;e=I; -e=0;e=0;R(4)C}P}v(c,d);}}L(A)r*A;{r*T=A+Q,X=getpid();W A>31;G=z+F;L=y+F;W G>z){M= *--G;*--L=(M*2)+f;f=M>>31;}z+=F;y+ -=F;}} +u A,U,Q,J,X[9999];main(a,b)w*b;{r*c,*d,y,f,g,F,G,I,M,N,z,*x,*n,i,B,O;w q,*h=(w +)X,*T,*s;T=h;if(a>1){H=2;K=23;K=112;s=b[1];Y;Y;Y;Y;}else{s=".slo.-W00,tmhw.W/" +;H=1;W*s)K=1+*s++;K=0;}s=T;H=17004;H=11;e=0;e=0;i=66==*s;W connect(A=socket(a, +3-Q++,0),h,24-a*4)||write(A,s,12)!=12||read(A,T,8)!=8);e;H;read(A,h,4*H);T=h;e +;F=e;e;e;I=11+H;f=H-6;K;U=K;i^=K;z=!K;T+=I/4*4+8*U;I=e;e;O=e;B=e;e;U=H/32;J=H/ +30*30;T+=14;M=K;f/=U;T=h;K=55;K;H=6;e=F;e=I;e=12;e=B;e=O;R(6)B=F+8192;K=53;K=1 +;H=4;e=B;e=I;H=U*32;H=J;R(4)O=B+8192;K=55;K;H=4;e=O;e=B;e=0;R(4)N=O+8192;K=53; +K=M;H=4;e=N;e=I;H=U*32;H=J;R(4)K=2;K;H=4;e=I;e=1;e=N;R(4)Q=J*U;c=S;d=S;L(c);W +1){P}C}y=0;W yf?g=f:g);e=B;e=O;H=U*32;H=g;H=0;H=y; +K=0;K=1;R(6)write(A,c+y*U,g*U*4);y+=g;}K=63;K;H=8;e=B;e=N;e=F;e=0;e=0;H=U*32;H +=J;e=1;R(8)K=61;K=0;H=4;e=I;e=0;e=0;R(4)C}P}v(c,d);}}L(A)r*A;{r*T=A+Q,X=getpid +();W A>31;G=z+F;L=y+F;W G>z){M= *--G;*--L=(M*2)+ +f;f=M>>31;}z+=F;y+=F;}} diff --git a/1991/davidguy/davidguy.fix.c b/1991/davidguy/davidguy.fix.c deleted file mode 100644 index 21ea9da20..000000000 --- a/1991/davidguy/davidguy.fix.c +++ /dev/null @@ -1,34 +0,0 @@ -#define u unsigned -#define w char* -#define j(x)(*(*(x*)&T)++) -#define H j(short*) -#define K j(w) -#define e j(u*) -#define r register u -#define R(b)write(A,T=h,4*b); -#define S (u*)sbrk(Q*4+U*8)+U -#define E(a,b,c)a=c&1<<31|b/2;c=c*2|b&1; -#define V q= *L;L+=F;E(d,q,x)E(f,d,s)g=f&q;f^=q -#define W while( -#define Z q=I&f;M|=q&c;c^=q;I^=f;M|=g&c;c^=g -#define Y W(F= *s++)&16)*T=10**T+F-'0';T++ -#define D(q,s)c);W q>s)G= *--q,*q= *s,*s++=G; -#define P if(i^z){x=Q+(n=D(x,n) -#define C if(i){q=Q*4+(s=(w)D(q,s) -u A,U,Q,J,X[9999];main(a,b)w*b;{r*c,*d,y,f,g,F,G,I,M,N,z,*x,*n,i,B,O;w q,*h=(w -)X,*T,*s;T=h;if(a>1){H=2;K=23;K=112;s=b[1];Y;Y;Y;Y;}else{s=".slo.-W00,tmhw.W/" -;H=1;W*s)K=1+*s++;K=0;}s=T;H=17004;H=11;e=0;e=0;i=66==*s;W connect(A=socket(a, -3-Q++,0),h,24-a*4)||write(A,s,12)!=12||read(A,T,8)!=8);e;H;read(A,h,4*H);T=h;e -;F=e;e;e;I=11+H;f=H-6;K;U=K;i^=K;z=!K;T+=I/4*4+8*U;I=e;e;O=e;B=e;e;U=H/32;J=H/ -30*30;T+=14;M=K;f/=U;T=h;K=55;K;H=6;e=F;e=I;e=12;e=B;e=O;R(6)B=F+8192;K=53;K=1 -;H=4;e=B;e=I;H=U*32;H=J;R(4)O=B+8192;K=55;K;H=4;e=O;e=B;e=0;R(4)N=O+8192;K=53; -K=M;H=4;e=N;e=I;H=U*32;H=J;R(4)K=2;K;H=4;e=I;e=1;e=N;R(4)Q=J*U;c=S;d=S;L(c);W -1){P}C}y=0;W yf?g=f:g);e=B;e=O;H=U*32;H=g;H=0;H=y; -K=0;K=1;R(6)write(A,c+y*U,g*U*4);y+=g;}K=63;K;H=8;e=B;e=N;e=F;e=0;e=0;H=U*32;H -=J;e=1;R(8)K=61;K=0;H=4;e=I;e=0;e=0;R(4)C}P}v(c,d);}}L(A)r*A;{r*T=A+Q,X=getpid -();W A>31;G=z+F;L=y+F;W G>z){M= *--G;*--L=(M*2)+ -f;f=M>>31;}z+=F;y+=F;}} From f4bd607fb7b52bb54391f9bf2921184580f73762 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 11:24:13 -0800 Subject: [PATCH 05/50] fix 1991/ant Makefile and README.md --- 1991/ant/Makefile | 717 ++++++++++++++++++++++++++++++++++++++------- 1991/ant/README.md | 28 +- 2 files changed, 612 insertions(+), 133 deletions(-) diff --git a/1991/ant/Makefile b/1991/ant/Makefile index 57c7302a6..a324cf0c0 100644 --- a/1991/ant/Makefile +++ b/1991/ant/Makefile @@ -1,129 +1,620 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1991 makefile +# IOCCC 1991 winning entry - ant + +################################################################################ # -# Copyright (c) 1991, Landon Curt Noll & Larry Bassel. -# All Rights Reserved. Permission for personal, educational or non-profit -# use is granted provided this this copyright and notice are included in its -# entirety and remains unaltered. All other uses must receive prior permission -# from Landon Curt Noll and Larry Bassel. - - -SHELL=/bin/sh -MAKE=make -MAKEFLAGS=e - -# uncomment the line to select the preferred type of compile +# An Historical Makefile NOTE: # -# You should also check the ansi.mk or common.mk for the -# proper compiler name and flags. +# The orig.Makefile, if it exits, is the original Makefile before this IOCCC +# year directory was reworked so that entries are in separate directories. +# This also applies to any orig.ansi.mk and orig.common.mk files. # -# NOTE ==> USE=ansi compile with an ANSI compiler by default -#USE=ansi -# NOTE ==> USE=common compile with a common K&R compiler by default -#USE=common +# Several Makefiles were modified / formed in 2022, and as such it may have +# elements that are not historically compatible with way entries were built. +# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile. +# +# Regarding individual entries: +# +# IOCCC winning entry code may not work on your system. Even with standards, +# conditions and build environments change, especially when it comes to more +# extreme code such you might find in an IOCCC winner. Moreover, what was +# allowed and liked in one IOCCC contest may no longer be liked/allowed in +# later IOCCC years. +# +# Corrections on winning author and fixing typos in remarks are VERY WELCOME. +# +# GitHub pull requests are welcome: +# +# If you have a patch that might make running an entry work in modern Unix-like +# environments, please create a GitHub pull request for the IOCCC judges to +# consider. +# +# Suggestions and corrections regarding Makefiles, winning author information, +# fixing typos in remarks, and code patches are welcome via opening a GitHub +# issue or better yet, by creating a GitHub pull request for the IOCCC judges +# to consider. To form a GitHub issue or GitHub pull, please visit: +# +# https://github.com/ioccc-src/winner +# +################################################################################ -WINNERS= ant brnstnd buzzard cdupont davidguy dds fine rince westley +# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under: +# +# Creative Commons Attribution-ShareAlike 3.0 Unported License. +# +# See: http://creativecommons.org/licenses/by-sa/3.0/ -all: - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -k -f common.mk all; \ - ${MAKE} -k -f common.mk all; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -k -f ansi.mk all; \ - ${MAKE} -k -f ansi.mk all; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1; \ - fi -ansi: - ${MAKE} -f ansi.mk all +############################# +# shell used by this Makefile +############################# +# +SHELL= bash -common: - ${MAKE} -f common.mk all +####################### +# common tool locations +####################### +# +A2P= a2p +AR= ar +ASA= asa +AT= at +ATQ= atq +ATRM= atrm +AWK= awk +BANNER= banner +BASE64= base64 +BASENAME= basename +BATCH= batch +BC= bc +BINHEX= binhex +BISON= bison +BUNZIP2= bunzip2 +BZCAT= bzcat +BZCMP= bzcmp +BZDIFF= bzdiff +BZEGREP= bzegrep +BZFGREP= bzfgrep +BZGREP= bzgrep +BZIP2= bzip2 +BZLESS= bzless +BZMORE= bzmore +C2PH= c2ph +C89= c89 +C99= c99 +CAL= cal +CALC= calc +CAT= cat +CD= cd +CHFLAGS= chflags +CHGRP= chgrp +CHMOD= chmod +CKSUM= cksum +CLANG= clang +CLANG_PLUSPLUS= clang++ +CLEAR= clear +CMP= cmp +COL= col +COLLDEF= colldef +COLRM= colrm +COLUMN= column +COMPRESS= compress +CP= cp +CPIO= cpio +CPP= cpp +CRC32= crc32 +CSH= csh +CSPLIT= csplit +CURL= curl +CUT= cut +C_PLUSPLUS= c++ +C_PLUSPLUS_FILT= c++filt +DATE= date +DC= dc +DD= dd +DF= df +DIFF3= diff3 +DIFF= diff +DIG= dig +DIRNAME= dirname +ED= ed +EGREP= egrep +ENV= env +EQN= eqn +ETAGS= etags +EXPECT= expect +EXPR= expr +FALSE= false +FGREP= fgrep +FILE= file +FIND2PERL= find2perl +FIND= find +FLEX= flex +FLEX_PLUSPLUS= flex++ +FMT= fmt +FOLD= fold +FS_USAGE= fs_usage +FUNZIP= funzip +FUSER= fuser +GCC= gcc +GDIFFMK= gdiffmk +GENCAT= gencat +GENSTRINGS= genstrings +GETOPT= getopt +GETOPTS= getopts +GINDENT= gindent +GNUMAKE= gnumake +GREP= grep +GROFF= groff +GROFFER= groffer +GROG= grog +GROPS= grops +GROTTY= grotty +GUNZIP= gunzip +GVIM= gvim +GZCAT= gzcat +GZEXE= gzexe +GZIP_PROG= gzip +G_PLUSPLUS= g++ +H2PH= h2ph +H2XS= h2xs +HASH= hash +HEAD= head +HOSTNAME_PROG= hostname +ICONV= iconv +ID= id +INDENT= indent +INFO= info +JOT= jot +KILL= kill +KSH= ksh +LAST= last +LD= ld +LESSECHO= lessecho +LEX= len +LINK= link +LN= ln +LS= ls +M4= m4 +MAKE= make +MAN= man +MKDIR= mkdir +MKFIFO= mkfifo +MKTEMP= mktemp +MV= mv +NANO= nano +NASM= nasm +NEQN= neqn +NICE= nice +NL= nl +NM= nm +NOHUP= nohup +NROFF= nroff +NSLOOKUP= nslookup +OD= od +OPENSSL= openssl +PASTE= paste +PATCH= patch +PATHCHK= pathchk +PAX= pax +PERL= perl +PICO= pico +PR= pr +PRINTENV= printenv +PS= ps +PTAR= ptar +PTARDIFF= ptardiff +PTARGREP= ptargrep +PWD= pwd +PYDOC= pydoc +PYTHON= python +PYTHONW= pythonw +READLINK= readlink +RENICE= renice +RESET= reset +REV= rev +RI= ri +RM= rm +RMDIR= rmdir +RSYNC= rsync +RUBY= ruby +RVIM= rvim +SAY= say +SCP= scp +SCREEN= screen +SCRIPT= script +SDIFF= sdiff +SED= sed +SEQ= seq +SFTP= sftp +SH= sh +SHA1= sha1 +SHA= sha +SHAR= shar +SHASUM5_18= shasum5.18 +SHASUM= shasum +SIZE= size +SLEEP= sleep +SORT= sort +SSH= ssh +STAT= stat +STRIP= strip +STTY= stty +SUM= sum +SYNC= sync +TABS= tabs +TAIL= tail +TAR= tar +TEE= tee +TEST= test +TFTP= tftp +TIDY= tidy +TIME= time +TOP= top +TOUCH= touch +TPUT= tout +TPUT= tput +TR= tr +TROFF= troff +TRUE= true +TSET= tset +TSORT= tsort +UL= ul +UNAME= uname +UNCOMPRESS= uncompress +UNEXPAND= unexpand +UNIFDEF= unifdef +UNIFDEFALL= unifdefall +UNIQ= uniq +UNITS= units +UNLINK= unlink +UNZIP= unzip +UNZIPSFX= unzipsfx +UPTIME= uptime +UUDECODE= uudecode +UUENCODE= uuencode +UUIDGEN= uuidgen +VI= vi +VIEW= view +VIM= vim +VIMDIFF= vimdiff +W= w +WAIT4PATH= wait4path +WAIT= wait +WC= wc +WGET= wget +WHAT= what +WHATIS= whatis +WHICH= which +WHO= who +WHOAMI= whoami +WHOIS= whois +WRTIE= write +XAR= xar +XARGS= xargs +XATTR= xattr +XXD= xxd +YACC= yacc +YES= yes +ZCAT= zcat +ZCMP= zcmp +ZDIFF= zdiff +ZEGREP= zegrep +ZFGREP= zfgrep +ZFORCE= zforce +ZGREP= zgrep +ZIP= zip +ZIPCLOAK= zipcloak +ZIPGREp= zipgrep +ZIPINFo= zipinfo +ZIPNOTE= zipnote +ZIPSPLIT= zipsplit +ZLESS= zless +ZMORE= zmore +ZNEW= znew +ZPRINT= zprint +ZSH= zsh -${WINNERS} merlyn.c nextmove.c ttt_game.c: - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# Set X11_LIBDIR to the directory where the X11 library resides +# +#X11_LIBDIR= /usr/X11R6/lib +#X11_LIBDIR= /usr/X11/lib +X11_LIBDIR= /opt/X11/lib -ttt: ttt.sh - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# Set X11_INCLUDEDIR to the directory where the X11 include files reside +# +#X11_INCDIR= /usr/X11R6/include +#X11_INCDIR= /usr/X11/include +X11_INCDIR= /opt/X11/include -merlyn: merlyn.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@ \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# CWARN - Silence warnings that ${CWARN} would normally complain about +# CSILENCE -Compiler warnings +# +ifeq ($(CC),clang) -ttt_game: ttt_game.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# clang CSILENCE and CWARN +# +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-empty-body \ + -Wno-implicit-function-declaration -Wno-return-type +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} +CWARN= -Wall -Wextra -Weverything ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -nextmove: nextmove.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +else +ifeq ($(CC),gcc) +# gcc CSILENCE and CWARN +# +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-empty-body \ + -Wno-implicit-function-declaration -Wno-return-type +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +else + +# default CSILENCE and WARN +# +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-empty-body \ + -Wno-implicit-function-declaration -Wno-return-type +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} + +endif +endif + +# compiler standard +# +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu90 + +# compiler bit architecture +# +# Some entries require 32-bitness: +# ARCH= -m32 +# +# Some entries require 64-bitness: +# ARCH= -m64 +# +# By default we assume nothing: +# +ARCH= + +# defines that are needed to compile +# +#CDEFINE= +CDEFINE= -DMODE=0600 -DBUF=32767 + +# include files that are needed to compile +# +CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 + +# optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +#LIBS= +LIBS= -lcurses -ltermcap +#LIBS= -L ${X11_LIBDIR} -lX11 +#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL + +# ANSI compiler +# +# Set CC to the name of your ANSI compiler. +# +# Some entries seem to need gcc. If you have gcc, set +# both CC and MAY_NEED_GCC to gcc. +# +# If you do not have gcc, set CC to the name of your ANSI compiler, and +# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : +# to disable such programs. +# +CC= cc +#CC=clang +MAY_NEED_GCC= gcc + + +############################## +# Special flags for this entry +############################## +# +ENTRY= ant +PROG= ${ENTRY} +# +OBJ= ${PROG}.o +DATA= +TARGET= ${PROG} +# +ALT_OBJ= +ALT_TARGET= + + +################# +# build the entry +################# +# +all: data ${TARGET} + @${TRUE} + +.PHONY: all alt data everything clean clobber install \ + love haste waste maker easter_egg sandwich \ + supernova deep_magic magic charon pluto + +${PROG}: ${PROG}.c + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + +# alternative executable +# +alt: data ${ALT_TARGET} + @${TRUE} + +# data files +# +data: ${DATA} + @${TRUE} + +# both all and alt +# +everything: all alt + + +############### +# utility rules +############### +# clean: - ${MAKE} -f ansi.mk clean - ${MAKE} -f common.mk clean -clobber: - ${MAKE} -f ansi.mk clobber - ${MAKE} -f common.mk clobber -nuke: clobber - ${MAKE} -f ansi.mk nuke - ${MAKE} -f common.mk nuke + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + echo ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi + +clobber: clean + ${RM} -f ${TARGET} ${ALT_TARGET} + @-if [ -e sandwich ]; then \ + ${RM} -f sandwich; \ + echo 'ate sandwich'; \ + fi + install: - ${MAKE} -f ansi.mk install - ${MAKE} -f common.mk install + @echo "Dr. Spock says that is not logical!" + @${TRUE} + +# you may be able to misunderstand the source by reading indent.c +# +indent.c: ${PROG}.c + @if which "${GINDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${GINDENT} < $< > $@"; \ + ${GINDENT} < $< > $@; \ + elif which "${INDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${INDENT} < $< > $@"; \ + ${INDENT} < $< > $@; \ + else \ + echo "no intent tool found, ident $< yourself, sorry"; \ + echo "exit 1"; \ + exit 1; \ + fi + + +################## +# 133t hacker rulz +################## +# +love: + @echo 'not war?' + @${TRUE} + +haste: + $(MAKE) waste + @${TRUE} + +waste: + @echo 'haste' + @${TRUE} + +maker: + @echo 'Participate in a maker faire' + @${TRUE} + +easter_egg: + @echo "you expected to often misunderstand this $${RANDOM} magic" + @echo "chongo '' /\\oo/\\" + @echo "Eggy" + +sandwich: easter_egg + @if [ `id -u` -eq 0 ]; then \ + echo 'Okay.'; \ + echo "$${RANDOM}`date +%s`$${RANDOM}" > $@; \ + else \ + echo 'What? Make it yourself.'; \ + exit 1; \ + fi + +# Understand the history of the Homebrew Computer Club +# as well as the West Coast Computer Faire and +# you might be confused different. :-) +# +supernova: sandwich + @-if [ -r .code_anal ]; then \ + ${RM} -f .code_anal_v6; \ + else \ + echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \ + fi + @echo "A $@ helps ${MAKE} the elements that help form planets" + @${TRUE} + +deep_magic: supernova + @-if [ -r .code_anal ]; then \ + ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 \ + --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + fi + @${TRUE} + +magic: deep_magic + @-if [ -r .code_anal ]; then \ + ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "If you don't eat yer meat, you can't have any pudding!"; \ + echo "How can you have any pudding if you don't eat yer meat?!"; \ + fi + @${TRUE} + +# The IOCCC resident astronomer states +# +charon: magic + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore IAU, $@ is a planet" + +pluto: charon + ${MAKE} charon + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore, $@ is a planet" + @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" diff --git a/1991/ant/README.md b/1991/ant/README.md index ae3a4d15b..09c9ba2d0 100644 --- a/1991/ant/README.md +++ b/1991/ant/README.md @@ -1,4 +1,4 @@ -Best Utility: +# Best Utility: Anthony C Howe Mortice Kern Systems Inc. #CL-23 @@ -7,34 +7,22 @@ Best Utility: Canada, N2J 2W9 Canada, N2L 6G9 -Judges' comments: +## To buil: - Make and run with a filename (writable or to be created) as an argument. - For example, try: + make all + +### To run - make ant cp ant.hint hill - ant hill + ./ant hill - Note that some old BSD systems may have trouble compiling this entry. - They may complain about 'idlok' being undefined. You can fix this - by changing line 26 from: - - 2;initscr();d=LINES;raw();noecho();idlok(stdscr,1);if(0<(i= ... - to: - 2;initscr();d=LINES;raw();noecho();if(0<(i= ... - - ***or*** update to a modern version of Un*x. :-) If you have source, - you can use this entry to help in your upgrade. - - You may need to change the makefile depending on what type of system - you are running. See the notes in ansi.mk or common.mk. +## Judges' comments The author was kind enough to supply a list of references below, in case you are still confused after read the source! :-) -Selected notes from the author: +## Author's comments Ant's Editor vIOCCC91 From 6965e6bf83975f1aaa26e4259f527ff8ca7512d7 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 11:25:13 -0800 Subject: [PATCH 06/50] fix 1991/buzzard Makefile, source and README.md --- 1991/brnstnd/Makefile | 718 ++++++++++++++++++++++++++++++++++------- 1991/brnstnd/README.md | 25 +- 1991/brnstnd/brnstnd.c | 57 ++-- 3 files changed, 647 insertions(+), 153 deletions(-) diff --git a/1991/brnstnd/Makefile b/1991/brnstnd/Makefile index 57c7302a6..3623b7788 100644 --- a/1991/brnstnd/Makefile +++ b/1991/brnstnd/Makefile @@ -1,129 +1,621 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1991 makefile +# IOCCC 1991 winning entry - brnstnd + +################################################################################ # -# Copyright (c) 1991, Landon Curt Noll & Larry Bassel. -# All Rights Reserved. Permission for personal, educational or non-profit -# use is granted provided this this copyright and notice are included in its -# entirety and remains unaltered. All other uses must receive prior permission -# from Landon Curt Noll and Larry Bassel. - - -SHELL=/bin/sh -MAKE=make -MAKEFLAGS=e - -# uncomment the line to select the preferred type of compile +# An Historical Makefile NOTE: # -# You should also check the ansi.mk or common.mk for the -# proper compiler name and flags. +# The orig.Makefile, if it exits, is the original Makefile before this IOCCC +# year directory was reworked so that entries are in separate directories. +# This also applies to any orig.ansi.mk and orig.common.mk files. # -# NOTE ==> USE=ansi compile with an ANSI compiler by default -#USE=ansi -# NOTE ==> USE=common compile with a common K&R compiler by default -#USE=common +# Several Makefiles were modified / formed in 2022, and as such it may have +# elements that are not historically compatible with way entries were built. +# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile. +# +# Regarding individual entries: +# +# IOCCC winning entry code may not work on your system. Even with standards, +# conditions and build environments change, especially when it comes to more +# extreme code such you might find in an IOCCC winner. Moreover, what was +# allowed and liked in one IOCCC contest may no longer be liked/allowed in +# later IOCCC years. +# +# Corrections on winning author and fixing typos in remarks are VERY WELCOME. +# +# GitHub pull requests are welcome: +# +# If you have a patch that might make running an entry work in modern Unix-like +# environments, please create a GitHub pull request for the IOCCC judges to +# consider. +# +# Suggestions and corrections regarding Makefiles, winning author information, +# fixing typos in remarks, and code patches are welcome via opening a GitHub +# issue or better yet, by creating a GitHub pull request for the IOCCC judges +# to consider. To form a GitHub issue or GitHub pull, please visit: +# +# https://github.com/ioccc-src/winner +# +################################################################################ -WINNERS= ant brnstnd buzzard cdupont davidguy dds fine rince westley +# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under: +# +# Creative Commons Attribution-ShareAlike 3.0 Unported License. +# +# See: http://creativecommons.org/licenses/by-sa/3.0/ -all: - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -k -f common.mk all; \ - ${MAKE} -k -f common.mk all; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -k -f ansi.mk all; \ - ${MAKE} -k -f ansi.mk all; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1; \ - fi -ansi: - ${MAKE} -f ansi.mk all +############################# +# shell used by this Makefile +############################# +# +SHELL= bash -common: - ${MAKE} -f common.mk all +####################### +# common tool locations +####################### +# +A2P= a2p +AR= ar +ASA= asa +AT= at +ATQ= atq +ATRM= atrm +AWK= awk +BANNER= banner +BASE64= base64 +BASENAME= basename +BATCH= batch +BC= bc +BINHEX= binhex +BISON= bison +BUNZIP2= bunzip2 +BZCAT= bzcat +BZCMP= bzcmp +BZDIFF= bzdiff +BZEGREP= bzegrep +BZFGREP= bzfgrep +BZGREP= bzgrep +BZIP2= bzip2 +BZLESS= bzless +BZMORE= bzmore +C2PH= c2ph +C89= c89 +C99= c99 +CAL= cal +CALC= calc +CAT= cat +CD= cd +CHFLAGS= chflags +CHGRP= chgrp +CHMOD= chmod +CKSUM= cksum +CLANG= clang +CLANG_PLUSPLUS= clang++ +CLEAR= clear +CMP= cmp +COL= col +COLLDEF= colldef +COLRM= colrm +COLUMN= column +COMPRESS= compress +CP= cp +CPIO= cpio +CPP= cpp +CRC32= crc32 +CSH= csh +CSPLIT= csplit +CURL= curl +CUT= cut +C_PLUSPLUS= c++ +C_PLUSPLUS_FILT= c++filt +DATE= date +DC= dc +DD= dd +DF= df +DIFF3= diff3 +DIFF= diff +DIG= dig +DIRNAME= dirname +ED= ed +EGREP= egrep +ENV= env +EQN= eqn +ETAGS= etags +EXPECT= expect +EXPR= expr +FALSE= false +FGREP= fgrep +FILE= file +FIND2PERL= find2perl +FIND= find +FLEX= flex +FLEX_PLUSPLUS= flex++ +FMT= fmt +FOLD= fold +FS_USAGE= fs_usage +FUNZIP= funzip +FUSER= fuser +GCC= gcc +GDIFFMK= gdiffmk +GENCAT= gencat +GENSTRINGS= genstrings +GETOPT= getopt +GETOPTS= getopts +GINDENT= gindent +GNUMAKE= gnumake +GREP= grep +GROFF= groff +GROFFER= groffer +GROG= grog +GROPS= grops +GROTTY= grotty +GUNZIP= gunzip +GVIM= gvim +GZCAT= gzcat +GZEXE= gzexe +GZIP_PROG= gzip +G_PLUSPLUS= g++ +H2PH= h2ph +H2XS= h2xs +HASH= hash +HEAD= head +HOSTNAME_PROG= hostname +ICONV= iconv +ID= id +INDENT= indent +INFO= info +JOT= jot +KILL= kill +KSH= ksh +LAST= last +LD= ld +LESSECHO= lessecho +LEX= len +LINK= link +LN= ln +LS= ls +M4= m4 +MAKE= make +MAN= man +MKDIR= mkdir +MKFIFO= mkfifo +MKTEMP= mktemp +MV= mv +NANO= nano +NASM= nasm +NEQN= neqn +NICE= nice +NL= nl +NM= nm +NOHUP= nohup +NROFF= nroff +NSLOOKUP= nslookup +OD= od +OPENSSL= openssl +PASTE= paste +PATCH= patch +PATHCHK= pathchk +PAX= pax +PERL= perl +PICO= pico +PR= pr +PRINTENV= printenv +PS= ps +PTAR= ptar +PTARDIFF= ptardiff +PTARGREP= ptargrep +PWD= pwd +PYDOC= pydoc +PYTHON= python +PYTHONW= pythonw +READLINK= readlink +RENICE= renice +RESET= reset +REV= rev +RI= ri +RM= rm +RMDIR= rmdir +RSYNC= rsync +RUBY= ruby +RVIM= rvim +SAY= say +SCP= scp +SCREEN= screen +SCRIPT= script +SDIFF= sdiff +SED= sed +SEQ= seq +SFTP= sftp +SH= sh +SHA1= sha1 +SHA= sha +SHAR= shar +SHASUM5_18= shasum5.18 +SHASUM= shasum +SIZE= size +SLEEP= sleep +SORT= sort +SSH= ssh +STAT= stat +STRIP= strip +STTY= stty +SUM= sum +SYNC= sync +TABS= tabs +TAIL= tail +TAR= tar +TEE= tee +TEST= test +TFTP= tftp +TIDY= tidy +TIME= time +TOP= top +TOUCH= touch +TPUT= tout +TPUT= tput +TR= tr +TROFF= troff +TRUE= true +TSET= tset +TSORT= tsort +UL= ul +UNAME= uname +UNCOMPRESS= uncompress +UNEXPAND= unexpand +UNIFDEF= unifdef +UNIFDEFALL= unifdefall +UNIQ= uniq +UNITS= units +UNLINK= unlink +UNZIP= unzip +UNZIPSFX= unzipsfx +UPTIME= uptime +UUDECODE= uudecode +UUENCODE= uuencode +UUIDGEN= uuidgen +VI= vi +VIEW= view +VIM= vim +VIMDIFF= vimdiff +W= w +WAIT4PATH= wait4path +WAIT= wait +WC= wc +WGET= wget +WHAT= what +WHATIS= whatis +WHICH= which +WHO= who +WHOAMI= whoami +WHOIS= whois +WRTIE= write +XAR= xar +XARGS= xargs +XATTR= xattr +XXD= xxd +YACC= yacc +YES= yes +ZCAT= zcat +ZCMP= zcmp +ZDIFF= zdiff +ZEGREP= zegrep +ZFGREP= zfgrep +ZFORCE= zforce +ZGREP= zgrep +ZIP= zip +ZIPCLOAK= zipcloak +ZIPGREp= zipgrep +ZIPINFo= zipinfo +ZIPNOTE= zipnote +ZIPSPLIT= zipsplit +ZLESS= zless +ZMORE= zmore +ZNEW= znew +ZPRINT= zprint +ZSH= zsh -${WINNERS} merlyn.c nextmove.c ttt_game.c: - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# Set X11_LIBDIR to the directory where the X11 library resides +# +#X11_LIBDIR= /usr/X11R6/lib +#X11_LIBDIR= /usr/X11/lib +X11_LIBDIR= /opt/X11/lib -ttt: ttt.sh - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# Set X11_INCLUDEDIR to the directory where the X11 include files reside +# +#X11_INCDIR= /usr/X11R6/include +#X11_INCDIR= /usr/X11/include +X11_INCDIR= /opt/X11/include -merlyn: merlyn.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@ \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# CWARN - Silence warnings that ${CWARN} would normally complain about +# CSILENCE -Compiler warnings +# +ifeq ($(CC),clang) -ttt_game: ttt_game.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# clang CSILENCE and CWARN +# +#CSILENCE= +CSILENCE= -Wno-c99-extensions -Wno-error -Wno-implicit-function-declaration \ + -Wno-parentheses -Wno-return-type +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything ${CSILENCE} +CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -nextmove: nextmove.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +else +ifeq ($(CC),gcc) +# gcc CSILENCE and CWARN +# +#CSILENCE= +CSILENCE= -Wno-c99-extensions -Wno-error -Wno-implicit-function-declaration \ + -Wno-parentheses -Wno-return-type +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +else + +# default CSILENCE and WARN +# +#CSILENCE= +CSILENCE= -Wno-c99-extensions -Wno-error -Wno-implicit-function-declaration \ + -Wno-parentheses -Wno-return-type +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} + +endif +endif + +# compiler standard +# +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu90 + +# compiler bit architecture +# +# Some entries require 32-bitness: +# ARCH= -m32 +# +# Some entries require 64-bitness: +# ARCH= -m64 +# +# By default we assume nothing: +# +ARCH= + +# defines that are needed to compile +# +#CDEFINE= +CDEFINE= -DM=malloc -DX=free -Do=250 + +# include files that are needed to compile +# +CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 + +# optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +LIBS= +#LIBS= -lm +#LIBS= -L ${X11_LIBDIR} -lX11 +#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL + +# ANSI compiler +# +# Set CC to the name of your ANSI compiler. +# +# Some entries seem to need gcc. If you have gcc, set +# both CC and MAY_NEED_GCC to gcc. +# +# If you do not have gcc, set CC to the name of your ANSI compiler, and +# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : +# to disable such programs. +# +CC= cc +#CC=clang +MAY_NEED_GCC= gcc + + +############################## +# Special flags for this entry +############################## +# +ENTRY= brnstnd +PROG= ${ENTRY} +# +OBJ= ${PROG}.o +DATA= +TARGET= ${PROG} +# +ALT_OBJ= +ALT_TARGET= + + +################# +# build the entry +################# +# +all: data ${TARGET} + @${TRUE} + +.PHONY: all alt data everything clean clobber install \ + love haste waste maker easter_egg sandwich \ + supernova deep_magic magic charon pluto + +${PROG}: ${PROG}.c + @echo "NOTE: This entry may not compile when using modern compilers." + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + +# alternative executable +# +alt: data ${ALT_TARGET} + @${TRUE} + +# data files +# +data: ${DATA} + @${TRUE} + +# both all and alt +# +everything: all alt + + +############### +# utility rules +############### +# clean: - ${MAKE} -f ansi.mk clean - ${MAKE} -f common.mk clean -clobber: - ${MAKE} -f ansi.mk clobber - ${MAKE} -f common.mk clobber -nuke: clobber - ${MAKE} -f ansi.mk nuke - ${MAKE} -f common.mk nuke + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + echo ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi + +clobber: clean + ${RM} -f ${TARGET} ${ALT_TARGET} + @-if [ -e sandwich ]; then \ + ${RM} -f sandwich; \ + echo 'ate sandwich'; \ + fi + install: - ${MAKE} -f ansi.mk install - ${MAKE} -f common.mk install + @echo "Dr. Spock says that is not logical!" + @${TRUE} + +# you may be able to misunderstand the source by reading indent.c +# +indent.c: ${PROG}.c + @if which "${GINDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${GINDENT} < $< > $@"; \ + ${GINDENT} < $< > $@; \ + elif which "${INDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${INDENT} < $< > $@"; \ + ${INDENT} < $< > $@; \ + else \ + echo "no intent tool found, ident $< yourself, sorry"; \ + echo "exit 1"; \ + exit 1; \ + fi + + +################## +# 133t hacker rulz +################## +# +love: + @echo 'not war?' + @${TRUE} + +haste: + $(MAKE) waste + @${TRUE} + +waste: + @echo 'haste' + @${TRUE} + +maker: + @echo 'Participate in a maker faire' + @${TRUE} + +easter_egg: + @echo "you expected to often misunderstand this $${RANDOM} magic" + @echo "chongo '' /\\oo/\\" + @echo "Eggy" + +sandwich: easter_egg + @if [ `id -u` -eq 0 ]; then \ + echo 'Okay.'; \ + echo "$${RANDOM}`date +%s`$${RANDOM}" > $@; \ + else \ + echo 'What? Make it yourself.'; \ + exit 1; \ + fi + +# Understand the history of the Homebrew Computer Club +# as well as the West Coast Computer Faire and +# you might be confused different. :-) +# +supernova: sandwich + @-if [ -r .code_anal ]; then \ + ${RM} -f .code_anal_v6; \ + else \ + echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \ + fi + @echo "A $@ helps ${MAKE} the elements that help form planets" + @${TRUE} + +deep_magic: supernova + @-if [ -r .code_anal ]; then \ + ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 \ + --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + fi + @${TRUE} + +magic: deep_magic + @-if [ -r .code_anal ]; then \ + ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "If you don't eat yer meat, you can't have any pudding!"; \ + echo "How can you have any pudding if you don't eat yer meat?!"; \ + fi + @${TRUE} + +# The IOCCC resident astronomer states +# +charon: magic + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore IAU, $@ is a planet" + +pluto: charon + ${MAKE} charon + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore, $@ is a planet" + @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" diff --git a/1991/brnstnd/README.md b/1991/brnstnd/README.md index b2169e7d9..a3634c413 100644 --- a/1991/brnstnd/README.md +++ b/1991/brnstnd/README.md @@ -1,15 +1,20 @@ -Best Of Show: +# Best Of Show: Daniel J. Bernstein New York University +## To buil: -Judges' comments: + make all - Make and run. Try: + NOTE: This entry may not compile when using modern compilers. + +### To run + + ./brnstnd < sorta.i2+2 + +## Judges' comments - make brnstnd - brnstnd < sorta.i2+2 For info on more examples, read the sorta.README file. @@ -18,16 +23,14 @@ Judges' comments: by this blatant attempt to influence the contest and rejected this idea... so we gave it the Best of Show award instead!! - NOTE: Due to minor problems with some ANSI C compilers, we have - supplied a more portable ANSI version. See the top level - README file for details. - NOTE: One should remove the final trailing newline to obtain the original source file. This step is not needed to compile this entry. - -Selected notes from the author: + To have a chance to compile under a modern CPP, we had to + replace `#D` with `#define`. + +## Author's comments This is an interpreter for the programming language SORTA, a systems and numerical programming language with features sorta from C, sorta diff --git a/1991/brnstnd/brnstnd.c b/1991/brnstnd/brnstnd.c index 015f2cac2..7a0044ebf 100644 --- a/1991/brnstnd/brnstnd.c +++ b/1991/brnstnd/brnstnd.c @@ -1,33 +1,32 @@ #include -#define D define -#D H(x,y,z) f(p){--p;c=x-_+1];f(c>0){y+1]=z[c];z[c]=y];y]=y+1];}} -#D O(x,y) F(x,int U;int T=0;d=M(U=1);W{f(c==y)b g[T++]=c;f(T==U)g=realloc(g,U<<=1);}g[T]=0;) -#D W Y((c=k?K[--k]:getchar())-EOF) -#D S i[q -#D F(w,z) f(c==w){z h} -#D f if -#D P p>1&&(c=u, -#D _ s[p -#D C =G -#D g S] -#D J(x,y) F(I[x],y) -#D Q P e -#D Y while -#D b break; -#D u _--] -#D m p&& -#D R char* -#D l Z[c] -#D L strlen -#D d i[++q] -#D G c) -#D h ;continue; -#D N s[++p] -#D e _] -#D j x;{R r=M(L( -#D v return -#D w [256] -#D V f(k>o||p>o||q>o)v 2; +#define H(x,y,z) f(p){--p;c=x-_+1];f(c>0){y+1]=z[c];z[c]=y];y]=y+1];}} +#define O(x,y) F(x,int U;int T=0;d=M(U=1);W{f(c==y)b g[T++]=c;f(T==U)g=realloc(g,U<<=1);}g[T]=0;) +#define W Y((c=k?K[--k]:getchar())-EOF) +#define S i[q +#define F(w,z) f(c==w){z h} +#define f if +#define P p>1&&(c=u, +#define _ s[p +#define C =G +#define g S] +#define J(x,y) F(I[x],y) +#define Q P e +#define Y while +#define b break; +#define u _--] +#define m p&& +#define R char* +#define l Z[c] +#define L strlen +#define d i[++q] +#define G c) +#define h ;continue; +#define N s[++p] +#define e _] +#define j x;{R r=M(L( +#define v return +#define w [256] +#define V f(k>o||p>o||q>o)v 2; R I="I'd love ta win: the most useful !$>%`/#<&*|^ _OBFUSCATED_ utility. Pleez?";U(y,x)R y;R*j*x)+L(y)+1);sprintf(r,"%s%s",*x,y);*x=r;}R T(x)R j x)+1);strcpy(r,x);v r;}R(i w);static R(Z w);K w;main(a,A)int a;R*A;{int s w,p=0,q=0,n=0,c,k=0;W{V f(c>='0'&&c<='9'){f(!n)N=0;n=1;e=10*e+(c-'0')h}n=0;J(39,m From 7eb9811512603835cef22a351d40d79a44091729 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 11:26:15 -0800 Subject: [PATCH 07/50] fix 1991/buzzard Makefile and README.md --- 1991/buzzard/Makefile | 720 ++++++++++++++++++++++++++++++++++------- 1991/buzzard/README.md | 13 +- 2 files changed, 615 insertions(+), 118 deletions(-) diff --git a/1991/buzzard/Makefile b/1991/buzzard/Makefile index 57c7302a6..039a32e55 100644 --- a/1991/buzzard/Makefile +++ b/1991/buzzard/Makefile @@ -1,129 +1,623 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1991 makefile +# IOCCC 1991 winning entry - buzzard + +################################################################################ # -# Copyright (c) 1991, Landon Curt Noll & Larry Bassel. -# All Rights Reserved. Permission for personal, educational or non-profit -# use is granted provided this this copyright and notice are included in its -# entirety and remains unaltered. All other uses must receive prior permission -# from Landon Curt Noll and Larry Bassel. - - -SHELL=/bin/sh -MAKE=make -MAKEFLAGS=e - -# uncomment the line to select the preferred type of compile +# An Historical Makefile NOTE: # -# You should also check the ansi.mk or common.mk for the -# proper compiler name and flags. +# The orig.Makefile, if it exits, is the original Makefile before this IOCCC +# year directory was reworked so that entries are in separate directories. +# This also applies to any orig.ansi.mk and orig.common.mk files. # -# NOTE ==> USE=ansi compile with an ANSI compiler by default -#USE=ansi -# NOTE ==> USE=common compile with a common K&R compiler by default -#USE=common +# Several Makefiles were modified / formed in 2022, and as such it may have +# elements that are not historically compatible with way entries were built. +# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile. +# +# Regarding individual entries: +# +# IOCCC winning entry code may not work on your system. Even with standards, +# conditions and build environments change, especially when it comes to more +# extreme code such you might find in an IOCCC winner. Moreover, what was +# allowed and liked in one IOCCC contest may no longer be liked/allowed in +# later IOCCC years. +# +# Corrections on winning author and fixing typos in remarks are VERY WELCOME. +# +# GitHub pull requests are welcome: +# +# If you have a patch that might make running an entry work in modern Unix-like +# environments, please create a GitHub pull request for the IOCCC judges to +# consider. +# +# Suggestions and corrections regarding Makefiles, winning author information, +# fixing typos in remarks, and code patches are welcome via opening a GitHub +# issue or better yet, by creating a GitHub pull request for the IOCCC judges +# to consider. To form a GitHub issue or GitHub pull, please visit: +# +# https://github.com/ioccc-src/winner +# +################################################################################ -WINNERS= ant brnstnd buzzard cdupont davidguy dds fine rince westley +# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under: +# +# Creative Commons Attribution-ShareAlike 3.0 Unported License. +# +# See: http://creativecommons.org/licenses/by-sa/3.0/ -all: - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -k -f common.mk all; \ - ${MAKE} -k -f common.mk all; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -k -f ansi.mk all; \ - ${MAKE} -k -f ansi.mk all; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1; \ - fi -ansi: - ${MAKE} -f ansi.mk all +############################# +# shell used by this Makefile +############################# +# +SHELL= bash -common: - ${MAKE} -f common.mk all +####################### +# common tool locations +####################### +# +A2P= a2p +AR= ar +ASA= asa +AT= at +ATQ= atq +ATRM= atrm +AWK= awk +BANNER= banner +BASE64= base64 +BASENAME= basename +BATCH= batch +BC= bc +BINHEX= binhex +BISON= bison +BUNZIP2= bunzip2 +BZCAT= bzcat +BZCMP= bzcmp +BZDIFF= bzdiff +BZEGREP= bzegrep +BZFGREP= bzfgrep +BZGREP= bzgrep +BZIP2= bzip2 +BZLESS= bzless +BZMORE= bzmore +C2PH= c2ph +C89= c89 +C99= c99 +CAL= cal +CALC= calc +CAT= cat +CD= cd +CHFLAGS= chflags +CHGRP= chgrp +CHMOD= chmod +CKSUM= cksum +CLANG= clang +CLANG_PLUSPLUS= clang++ +CLEAR= clear +CMP= cmp +COL= col +COLLDEF= colldef +COLRM= colrm +COLUMN= column +COMPRESS= compress +CP= cp +CPIO= cpio +CPP= cpp +CRC32= crc32 +CSH= csh +CSPLIT= csplit +CURL= curl +CUT= cut +C_PLUSPLUS= c++ +C_PLUSPLUS_FILT= c++filt +DATE= date +DC= dc +DD= dd +DF= df +DIFF3= diff3 +DIFF= diff +DIG= dig +DIRNAME= dirname +ED= ed +EGREP= egrep +ENV= env +EQN= eqn +ETAGS= etags +EXPECT= expect +EXPR= expr +FALSE= false +FGREP= fgrep +FILE= file +FIND2PERL= find2perl +FIND= find +FLEX= flex +FLEX_PLUSPLUS= flex++ +FMT= fmt +FOLD= fold +FS_USAGE= fs_usage +FUNZIP= funzip +FUSER= fuser +GCC= gcc +GDIFFMK= gdiffmk +GENCAT= gencat +GENSTRINGS= genstrings +GETOPT= getopt +GETOPTS= getopts +GINDENT= gindent +GNUMAKE= gnumake +GREP= grep +GROFF= groff +GROFFER= groffer +GROG= grog +GROPS= grops +GROTTY= grotty +GUNZIP= gunzip +GVIM= gvim +GZCAT= gzcat +GZEXE= gzexe +GZIP_PROG= gzip +G_PLUSPLUS= g++ +H2PH= h2ph +H2XS= h2xs +HASH= hash +HEAD= head +HOSTNAME_PROG= hostname +ICONV= iconv +ID= id +INDENT= indent +INFO= info +JOT= jot +KILL= kill +KSH= ksh +LAST= last +LD= ld +LESSECHO= lessecho +LEX= len +LINK= link +LN= ln +LS= ls +M4= m4 +MAKE= make +MAN= man +MKDIR= mkdir +MKFIFO= mkfifo +MKTEMP= mktemp +MV= mv +NANO= nano +NASM= nasm +NEQN= neqn +NICE= nice +NL= nl +NM= nm +NOHUP= nohup +NROFF= nroff +NSLOOKUP= nslookup +OD= od +OPENSSL= openssl +PASTE= paste +PATCH= patch +PATHCHK= pathchk +PAX= pax +PERL= perl +PICO= pico +PR= pr +PRINTENV= printenv +PS= ps +PTAR= ptar +PTARDIFF= ptardiff +PTARGREP= ptargrep +PWD= pwd +PYDOC= pydoc +PYTHON= python +PYTHONW= pythonw +READLINK= readlink +RENICE= renice +RESET= reset +REV= rev +RI= ri +RM= rm +RMDIR= rmdir +RSYNC= rsync +RUBY= ruby +RVIM= rvim +SAY= say +SCP= scp +SCREEN= screen +SCRIPT= script +SDIFF= sdiff +SED= sed +SEQ= seq +SFTP= sftp +SH= sh +SHA1= sha1 +SHA= sha +SHAR= shar +SHASUM5_18= shasum5.18 +SHASUM= shasum +SIZE= size +SLEEP= sleep +SORT= sort +SSH= ssh +STAT= stat +STRIP= strip +STTY= stty +SUM= sum +SYNC= sync +TABS= tabs +TAIL= tail +TAR= tar +TEE= tee +TEST= test +TFTP= tftp +TIDY= tidy +TIME= time +TOP= top +TOUCH= touch +TPUT= tout +TPUT= tput +TR= tr +TROFF= troff +TRUE= true +TSET= tset +TSORT= tsort +UL= ul +UNAME= uname +UNCOMPRESS= uncompress +UNEXPAND= unexpand +UNIFDEF= unifdef +UNIFDEFALL= unifdefall +UNIQ= uniq +UNITS= units +UNLINK= unlink +UNZIP= unzip +UNZIPSFX= unzipsfx +UPTIME= uptime +UUDECODE= uudecode +UUENCODE= uuencode +UUIDGEN= uuidgen +VI= vi +VIEW= view +VIM= vim +VIMDIFF= vimdiff +W= w +WAIT4PATH= wait4path +WAIT= wait +WC= wc +WGET= wget +WHAT= what +WHATIS= whatis +WHICH= which +WHO= who +WHOAMI= whoami +WHOIS= whois +WRTIE= write +XAR= xar +XARGS= xargs +XATTR= xattr +XXD= xxd +YACC= yacc +YES= yes +ZCAT= zcat +ZCMP= zcmp +ZDIFF= zdiff +ZEGREP= zegrep +ZFGREP= zfgrep +ZFORCE= zforce +ZGREP= zgrep +ZIP= zip +ZIPCLOAK= zipcloak +ZIPGREp= zipgrep +ZIPINFo= zipinfo +ZIPNOTE= zipnote +ZIPSPLIT= zipsplit +ZLESS= zless +ZMORE= zmore +ZNEW= znew +ZPRINT= zprint +ZSH= zsh -${WINNERS} merlyn.c nextmove.c ttt_game.c: - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# Set X11_LIBDIR to the directory where the X11 library resides +# +#X11_LIBDIR= /usr/X11R6/lib +#X11_LIBDIR= /usr/X11/lib +X11_LIBDIR= /opt/X11/lib -ttt: ttt.sh - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# Set X11_INCLUDEDIR to the directory where the X11 include files reside +# +#X11_INCDIR= /usr/X11R6/include +#X11_INCDIR= /usr/X11/include +X11_INCDIR= /opt/X11/include -merlyn: merlyn.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@ \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# CWARN - Silence warnings that ${CWARN} would normally complain about +# CSILENCE -Compiler warnings +# +ifeq ($(CC),clang) -ttt_game: ttt_game.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# clang CSILENCE and CWARN +# +#CSILENCE= +CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \ + -Wno-int-conversion -Wno-logical-op-parentheses -Wno-pedantic \ + -Wno-return-type -Wno-unknown-escape-sequence -Wno-unused-value +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything ${CSILENCE} +CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -nextmove: nextmove.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +else +ifeq ($(CC),gcc) +# gcc CSILENCE and CWARN +# +#CSILENCE= +CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \ + -Wno-int-conversion -Wno-logical-op-parentheses -Wno-pedantic \ + -Wno-return-type -Wno-unknown-escape-sequence -Wno-unused-value +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +else + +# default CSILENCE and WARN +# +#CSILENCE= +CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \ + -Wno-int-conversion -Wno-logical-op-parentheses -Wno-pedantic \ + -Wno-return-type -Wno-unknown-escape-sequence -Wno-unused-value +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} + +endif +endif + +# compiler standard +# +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu90 + +# compiler bit architecture +# +# Some entries require 32-bitness: +# ARCH= -m32 +# +# Some entries require 64-bitness: +# ARCH= -m64 +# +# By default we assume nothing: +# +ARCH= + +# defines that are needed to compile +# +CDEFINE= +#CDEFINE= -DIOCCC=26 + +# include files that are needed to compile +# +CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 + +# optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +LIBS= +#LIBS= -lm +#LIBS= -L ${X11_LIBDIR} -lX11 +#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL + +# ANSI compiler +# +# Set CC to the name of your ANSI compiler. +# +# Some entries seem to need gcc. If you have gcc, set +# both CC and MAY_NEED_GCC to gcc. +# +# If you do not have gcc, set CC to the name of your ANSI compiler, and +# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : +# to disable such programs. +# +CC= cc +#CC=clang +MAY_NEED_GCC= gcc + + +############################## +# Special flags for this entry +############################## +# +ENTRY= buzzard +PROG= ${ENTRY} +# +OBJ= ${PROG}.o +DATA= +TARGET= ${PROG} +# +ALT_OBJ= +ALT_TARGET= + + +################# +# build the entry +################# +# +all: data ${TARGET} + @${TRUE} + +.PHONY: all alt data everything clean clobber install \ + love haste waste maker easter_egg sandwich \ + supernova deep_magic magic charon pluto + +${PROG}: ${PROG}.c + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + +# alternative executable +# +alt: data ${ALT_TARGET} + @${TRUE} + +# data files +# +data: ${DATA} + @${TRUE} + +# both all and alt +# +everything: all alt + + +############### +# utility rules +############### +# clean: - ${MAKE} -f ansi.mk clean - ${MAKE} -f common.mk clean -clobber: - ${MAKE} -f ansi.mk clobber - ${MAKE} -f common.mk clobber -nuke: clobber - ${MAKE} -f ansi.mk nuke - ${MAKE} -f common.mk nuke + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + echo ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi + +clobber: clean + ${RM} -f ${TARGET} ${ALT_TARGET} + @-if [ -e sandwich ]; then \ + ${RM} -f sandwich; \ + echo 'ate sandwich'; \ + fi + install: - ${MAKE} -f ansi.mk install - ${MAKE} -f common.mk install + @echo "Dr. Spock says that is not logical!" + @${TRUE} + +# you may be able to misunderstand the source by reading indent.c +# +indent.c: ${PROG}.c + @if which "${GINDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${GINDENT} < $< > $@"; \ + ${GINDENT} < $< > $@; \ + elif which "${INDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${INDENT} < $< > $@"; \ + ${INDENT} < $< > $@; \ + else \ + echo "no intent tool found, ident $< yourself, sorry"; \ + echo "exit 1"; \ + exit 1; \ + fi + + +################## +# 133t hacker rulz +################## +# +love: + @echo 'not war?' + @${TRUE} + +haste: + $(MAKE) waste + @${TRUE} + +waste: + @echo 'haste' + @${TRUE} + +maker: + @echo 'Participate in a maker faire' + @${TRUE} + +easter_egg: + @echo "you expected to often misunderstand this $${RANDOM} magic" + @echo "chongo '' /\\oo/\\" + @echo "Eggy" + +sandwich: easter_egg + @if [ `id -u` -eq 0 ]; then \ + echo 'Okay.'; \ + echo "$${RANDOM}`date +%s`$${RANDOM}" > $@; \ + else \ + echo 'What? Make it yourself.'; \ + exit 1; \ + fi + +# Understand the history of the Homebrew Computer Club +# as well as the West Coast Computer Faire and +# you might be confused different. :-) +# +supernova: sandwich + @-if [ -r .code_anal ]; then \ + ${RM} -f .code_anal_v6; \ + else \ + echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \ + fi + @echo "A $@ helps ${MAKE} the elements that help form planets" + @${TRUE} + +deep_magic: supernova + @-if [ -r .code_anal ]; then \ + ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 \ + --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + fi + @${TRUE} + +magic: deep_magic + @-if [ -r .code_anal ]; then \ + ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "If you don't eat yer meat, you can't have any pudding!"; \ + echo "How can you have any pudding if you don't eat yer meat?!"; \ + fi + @${TRUE} + +# The IOCCC resident astronomer states +# +charon: magic + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore IAU, $@ is a planet" + +pluto: charon + ${MAKE} charon + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore, $@ is a planet" + @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" diff --git a/1991/buzzard/README.md b/1991/buzzard/README.md index fbeb55ac7..4030b1638 100644 --- a/1991/buzzard/README.md +++ b/1991/buzzard/README.md @@ -7,19 +7,22 @@ Best Output: USA -Judges' comments: +## To buil: - Make and run as follows: + make all - make buzzard - buzzard +### To run + + ./buzzard + +## Judges' comments You will be A-mazed. You are invited to try to cheat, ... if you can figure out how! :-) -Selected notes from the author: +## Author's comments HOW TO PLAY: From 329e5d1891bbf59273b2095b2edbf05633d51668 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 11:27:08 -0800 Subject: [PATCH 08/50] fix 1991/cdupont Makefile and README.md --- 1991/cdupont/Makefile | 714 ++++++++++++++++++++++++++++++++++------- 1991/cdupont/README.md | 19 +- 2 files changed, 610 insertions(+), 123 deletions(-) diff --git a/1991/cdupont/Makefile b/1991/cdupont/Makefile index 57c7302a6..76b480857 100644 --- a/1991/cdupont/Makefile +++ b/1991/cdupont/Makefile @@ -1,129 +1,617 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1991 makefile +# IOCCC 1991 winning entry - cdupont + +################################################################################ # -# Copyright (c) 1991, Landon Curt Noll & Larry Bassel. -# All Rights Reserved. Permission for personal, educational or non-profit -# use is granted provided this this copyright and notice are included in its -# entirety and remains unaltered. All other uses must receive prior permission -# from Landon Curt Noll and Larry Bassel. - - -SHELL=/bin/sh -MAKE=make -MAKEFLAGS=e - -# uncomment the line to select the preferred type of compile +# An Historical Makefile NOTE: # -# You should also check the ansi.mk or common.mk for the -# proper compiler name and flags. +# The orig.Makefile, if it exits, is the original Makefile before this IOCCC +# year directory was reworked so that entries are in separate directories. +# This also applies to any orig.ansi.mk and orig.common.mk files. # -# NOTE ==> USE=ansi compile with an ANSI compiler by default -#USE=ansi -# NOTE ==> USE=common compile with a common K&R compiler by default -#USE=common +# Several Makefiles were modified / formed in 2022, and as such it may have +# elements that are not historically compatible with way entries were built. +# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile. +# +# Regarding individual entries: +# +# IOCCC winning entry code may not work on your system. Even with standards, +# conditions and build environments change, especially when it comes to more +# extreme code such you might find in an IOCCC winner. Moreover, what was +# allowed and liked in one IOCCC contest may no longer be liked/allowed in +# later IOCCC years. +# +# Corrections on winning author and fixing typos in remarks are VERY WELCOME. +# +# GitHub pull requests are welcome: +# +# If you have a patch that might make running an entry work in modern Unix-like +# environments, please create a GitHub pull request for the IOCCC judges to +# consider. +# +# Suggestions and corrections regarding Makefiles, winning author information, +# fixing typos in remarks, and code patches are welcome via opening a GitHub +# issue or better yet, by creating a GitHub pull request for the IOCCC judges +# to consider. To form a GitHub issue or GitHub pull, please visit: +# +# https://github.com/ioccc-src/winner +# +################################################################################ -WINNERS= ant brnstnd buzzard cdupont davidguy dds fine rince westley +# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under: +# +# Creative Commons Attribution-ShareAlike 3.0 Unported License. +# +# See: http://creativecommons.org/licenses/by-sa/3.0/ -all: - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -k -f common.mk all; \ - ${MAKE} -k -f common.mk all; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -k -f ansi.mk all; \ - ${MAKE} -k -f ansi.mk all; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1; \ - fi -ansi: - ${MAKE} -f ansi.mk all +############################# +# shell used by this Makefile +############################# +# +SHELL= bash -common: - ${MAKE} -f common.mk all +####################### +# common tool locations +####################### +# +A2P= a2p +AR= ar +ASA= asa +AT= at +ATQ= atq +ATRM= atrm +AWK= awk +BANNER= banner +BASE64= base64 +BASENAME= basename +BATCH= batch +BC= bc +BINHEX= binhex +BISON= bison +BUNZIP2= bunzip2 +BZCAT= bzcat +BZCMP= bzcmp +BZDIFF= bzdiff +BZEGREP= bzegrep +BZFGREP= bzfgrep +BZGREP= bzgrep +BZIP2= bzip2 +BZLESS= bzless +BZMORE= bzmore +C2PH= c2ph +C89= c89 +C99= c99 +CAL= cal +CALC= calc +CAT= cat +CD= cd +CHFLAGS= chflags +CHGRP= chgrp +CHMOD= chmod +CKSUM= cksum +CLANG= clang +CLANG_PLUSPLUS= clang++ +CLEAR= clear +CMP= cmp +COL= col +COLLDEF= colldef +COLRM= colrm +COLUMN= column +COMPRESS= compress +CP= cp +CPIO= cpio +CPP= cpp +CRC32= crc32 +CSH= csh +CSPLIT= csplit +CURL= curl +CUT= cut +C_PLUSPLUS= c++ +C_PLUSPLUS_FILT= c++filt +DATE= date +DC= dc +DD= dd +DF= df +DIFF3= diff3 +DIFF= diff +DIG= dig +DIRNAME= dirname +ED= ed +EGREP= egrep +ENV= env +EQN= eqn +ETAGS= etags +EXPECT= expect +EXPR= expr +FALSE= false +FGREP= fgrep +FILE= file +FIND2PERL= find2perl +FIND= find +FLEX= flex +FLEX_PLUSPLUS= flex++ +FMT= fmt +FOLD= fold +FS_USAGE= fs_usage +FUNZIP= funzip +FUSER= fuser +GCC= gcc +GDIFFMK= gdiffmk +GENCAT= gencat +GENSTRINGS= genstrings +GETOPT= getopt +GETOPTS= getopts +GINDENT= gindent +GNUMAKE= gnumake +GREP= grep +GROFF= groff +GROFFER= groffer +GROG= grog +GROPS= grops +GROTTY= grotty +GUNZIP= gunzip +GVIM= gvim +GZCAT= gzcat +GZEXE= gzexe +GZIP_PROG= gzip +G_PLUSPLUS= g++ +H2PH= h2ph +H2XS= h2xs +HASH= hash +HEAD= head +HOSTNAME_PROG= hostname +ICONV= iconv +ID= id +INDENT= indent +INFO= info +JOT= jot +KILL= kill +KSH= ksh +LAST= last +LD= ld +LESSECHO= lessecho +LEX= len +LINK= link +LN= ln +LS= ls +M4= m4 +MAKE= make +MAN= man +MKDIR= mkdir +MKFIFO= mkfifo +MKTEMP= mktemp +MV= mv +NANO= nano +NASM= nasm +NEQN= neqn +NICE= nice +NL= nl +NM= nm +NOHUP= nohup +NROFF= nroff +NSLOOKUP= nslookup +OD= od +OPENSSL= openssl +PASTE= paste +PATCH= patch +PATHCHK= pathchk +PAX= pax +PERL= perl +PICO= pico +PR= pr +PRINTENV= printenv +PS= ps +PTAR= ptar +PTARDIFF= ptardiff +PTARGREP= ptargrep +PWD= pwd +PYDOC= pydoc +PYTHON= python +PYTHONW= pythonw +READLINK= readlink +RENICE= renice +RESET= reset +REV= rev +RI= ri +RM= rm +RMDIR= rmdir +RSYNC= rsync +RUBY= ruby +RVIM= rvim +SAY= say +SCP= scp +SCREEN= screen +SCRIPT= script +SDIFF= sdiff +SED= sed +SEQ= seq +SFTP= sftp +SH= sh +SHA1= sha1 +SHA= sha +SHAR= shar +SHASUM5_18= shasum5.18 +SHASUM= shasum +SIZE= size +SLEEP= sleep +SORT= sort +SSH= ssh +STAT= stat +STRIP= strip +STTY= stty +SUM= sum +SYNC= sync +TABS= tabs +TAIL= tail +TAR= tar +TEE= tee +TEST= test +TFTP= tftp +TIDY= tidy +TIME= time +TOP= top +TOUCH= touch +TPUT= tout +TPUT= tput +TR= tr +TROFF= troff +TRUE= true +TSET= tset +TSORT= tsort +UL= ul +UNAME= uname +UNCOMPRESS= uncompress +UNEXPAND= unexpand +UNIFDEF= unifdef +UNIFDEFALL= unifdefall +UNIQ= uniq +UNITS= units +UNLINK= unlink +UNZIP= unzip +UNZIPSFX= unzipsfx +UPTIME= uptime +UUDECODE= uudecode +UUENCODE= uuencode +UUIDGEN= uuidgen +VI= vi +VIEW= view +VIM= vim +VIMDIFF= vimdiff +W= w +WAIT4PATH= wait4path +WAIT= wait +WC= wc +WGET= wget +WHAT= what +WHATIS= whatis +WHICH= which +WHO= who +WHOAMI= whoami +WHOIS= whois +WRTIE= write +XAR= xar +XARGS= xargs +XATTR= xattr +XXD= xxd +YACC= yacc +YES= yes +ZCAT= zcat +ZCMP= zcmp +ZDIFF= zdiff +ZEGREP= zegrep +ZFGREP= zfgrep +ZFORCE= zforce +ZGREP= zgrep +ZIP= zip +ZIPCLOAK= zipcloak +ZIPGREp= zipgrep +ZIPINFo= zipinfo +ZIPNOTE= zipnote +ZIPSPLIT= zipsplit +ZLESS= zless +ZMORE= zmore +ZNEW= znew +ZPRINT= zprint +ZSH= zsh -${WINNERS} merlyn.c nextmove.c ttt_game.c: - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# Set X11_LIBDIR to the directory where the X11 library resides +# +#X11_LIBDIR= /usr/X11R6/lib +#X11_LIBDIR= /usr/X11/lib +X11_LIBDIR= /opt/X11/lib -ttt: ttt.sh - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# Set X11_INCLUDEDIR to the directory where the X11 include files reside +# +#X11_INCDIR= /usr/X11R6/include +#X11_INCDIR= /usr/X11/include +X11_INCDIR= /opt/X11/include -merlyn: merlyn.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@ \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# CWARN - Silence warnings that ${CWARN} would normally complain about +# CSILENCE -Compiler warnings +# +ifeq ($(CC),clang) -ttt_game: ttt_game.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# clang CSILENCE and CWARN +# +CSILENCE= +#CSILENCE= -Wno-implicit-int +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything ${CSILENCE} +CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -nextmove: nextmove.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +else +ifeq ($(CC),gcc) +# gcc CSILENCE and CWARN +# +CSILENCE= +#CSILENCE= -Wno-implicit-int +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +else + +# default CSILENCE and WARN +# +CSILENCE= +#CSILENCE= -Wno-implicit-int +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} + +endif +endif + +# compiler standard +# +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu90 + +# compiler bit architecture +# +# Some entries require 32-bitness: +# ARCH= -m32 +# +# Some entries require 64-bitness: +# ARCH= -m64 +# +# By default we assume nothing: +# +ARCH= + +# defines that are needed to compile +# +#CDEFINE= +CDEFINE= -Ds=\"cdupont.c\" -Dt=\"r\" + +# include files that are needed to compile +# +CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 + +# optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +LIBS= +#LIBS= -lm +#LIBS= -L ${X11_LIBDIR} -lX11 +#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL + +# ANSI compiler +# +# Set CC to the name of your ANSI compiler. +# +# Some entries seem to need gcc. If you have gcc, set +# both CC and MAY_NEED_GCC to gcc. +# +# If you do not have gcc, set CC to the name of your ANSI compiler, and +# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : +# to disable such programs. +# +CC= cc +#CC=clang +MAY_NEED_GCC= gcc + + +############################## +# Special flags for this entry +############################## +# +ENTRY= cdupont +PROG= ${ENTRY} +# +OBJ= ${PROG}.o +DATA= +TARGET= ${PROG} +# +ALT_OBJ= +ALT_TARGET= + + +################# +# build the entry +################# +# +all: data ${TARGET} + @${TRUE} + +.PHONY: all alt data everything clean clobber install \ + love haste waste maker easter_egg sandwich \ + supernova deep_magic magic charon pluto + +${PROG}: ${PROG}.c + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + +# alternative executable +# +alt: data ${ALT_TARGET} + @${TRUE} + +# data files +# +data: ${DATA} + @${TRUE} + +# both all and alt +# +everything: all alt + + +############### +# utility rules +############### +# clean: - ${MAKE} -f ansi.mk clean - ${MAKE} -f common.mk clean -clobber: - ${MAKE} -f ansi.mk clobber - ${MAKE} -f common.mk clobber -nuke: clobber - ${MAKE} -f ansi.mk nuke - ${MAKE} -f common.mk nuke + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + echo ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi + +clobber: clean + ${RM} -f ${TARGET} ${ALT_TARGET} + @-if [ -e sandwich ]; then \ + ${RM} -f sandwich; \ + echo 'ate sandwich'; \ + fi + install: - ${MAKE} -f ansi.mk install - ${MAKE} -f common.mk install + @echo "Dr. Spock says that is not logical!" + @${TRUE} + +# you may be able to misunderstand the source by reading indent.c +# +indent.c: ${PROG}.c + @if which "${GINDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${GINDENT} < $< > $@"; \ + ${GINDENT} < $< > $@; \ + elif which "${INDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${INDENT} < $< > $@"; \ + ${INDENT} < $< > $@; \ + else \ + echo "no intent tool found, ident $< yourself, sorry"; \ + echo "exit 1"; \ + exit 1; \ + fi + + +################## +# 133t hacker rulz +################## +# +love: + @echo 'not war?' + @${TRUE} + +haste: + $(MAKE) waste + @${TRUE} + +waste: + @echo 'haste' + @${TRUE} + +maker: + @echo 'Participate in a maker faire' + @${TRUE} + +easter_egg: + @echo "you expected to often misunderstand this $${RANDOM} magic" + @echo "chongo '' /\\oo/\\" + @echo "Eggy" + +sandwich: easter_egg + @if [ `id -u` -eq 0 ]; then \ + echo 'Okay.'; \ + echo "$${RANDOM}`date +%s`$${RANDOM}" > $@; \ + else \ + echo 'What? Make it yourself.'; \ + exit 1; \ + fi + +# Understand the history of the Homebrew Computer Club +# as well as the West Coast Computer Faire and +# you might be confused different. :-) +# +supernova: sandwich + @-if [ -r .code_anal ]; then \ + ${RM} -f .code_anal_v6; \ + else \ + echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \ + fi + @echo "A $@ helps ${MAKE} the elements that help form planets" + @${TRUE} + +deep_magic: supernova + @-if [ -r .code_anal ]; then \ + ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 \ + --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + fi + @${TRUE} + +magic: deep_magic + @-if [ -r .code_anal ]; then \ + ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "If you don't eat yer meat, you can't have any pudding!"; \ + echo "How can you have any pudding if you don't eat yer meat?!"; \ + fi + @${TRUE} + +# The IOCCC resident astronomer states +# +charon: magic + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore IAU, $@ is a planet" + +pluto: charon + ${MAKE} charon + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore, $@ is a planet" + @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" diff --git a/1991/cdupont/README.md b/1991/cdupont/README.md index ea1f178a5..00a19a69c 100644 --- a/1991/cdupont/README.md +++ b/1991/cdupont/README.md @@ -1,4 +1,4 @@ -Most Useful Label: +# Most Useful Label: Christian Dupont Ecole Normale Superieure de Lyon, @@ -8,12 +8,15 @@ Most Useful Label: France -Judges' comments: +## To buil: - Make and run as follows: + make all - make cdupont - cdupont +### To run + + ./cdupont + +## Judges' comments Why is the following label necessary? @@ -22,16 +25,12 @@ Judges' comments: Notice that if you C beautify (cb) or pre-process this program, it will no longer work correctly, or at all. (go ahead, try it... :-)) - NOTE: Due to minor problems with some ANSI C compilers, we have - supplied a more portable ANSI version. See the top level - README file for details. - NOTE: One should remove the final trailing newline to obtain the original source file. This step is not needed to compile this entry. -Selected notes from the author: +## Author's comments Spoiler, rot13 to read: From 0b4b628975cace35e6fe6f6de05da72d5da394a0 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 11:27:54 -0800 Subject: [PATCH 09/50] fix 1991/davidguy Makefile and README.md --- 1991/davidguy/Makefile | 717 +++++++++++++++++++++++++++++++++------- 1991/davidguy/README.md | 29 +- 2 files changed, 618 insertions(+), 128 deletions(-) diff --git a/1991/davidguy/Makefile b/1991/davidguy/Makefile index 57c7302a6..0eb09efb0 100644 --- a/1991/davidguy/Makefile +++ b/1991/davidguy/Makefile @@ -1,129 +1,620 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1991 makefile +# IOCCC 1991 winning entry - davidguy + +################################################################################ # -# Copyright (c) 1991, Landon Curt Noll & Larry Bassel. -# All Rights Reserved. Permission for personal, educational or non-profit -# use is granted provided this this copyright and notice are included in its -# entirety and remains unaltered. All other uses must receive prior permission -# from Landon Curt Noll and Larry Bassel. - - -SHELL=/bin/sh -MAKE=make -MAKEFLAGS=e - -# uncomment the line to select the preferred type of compile +# An Historical Makefile NOTE: # -# You should also check the ansi.mk or common.mk for the -# proper compiler name and flags. +# The orig.Makefile, if it exits, is the original Makefile before this IOCCC +# year directory was reworked so that entries are in separate directories. +# This also applies to any orig.ansi.mk and orig.common.mk files. # -# NOTE ==> USE=ansi compile with an ANSI compiler by default -#USE=ansi -# NOTE ==> USE=common compile with a common K&R compiler by default -#USE=common +# Several Makefiles were modified / formed in 2022, and as such it may have +# elements that are not historically compatible with way entries were built. +# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile. +# +# Regarding individual entries: +# +# IOCCC winning entry code may not work on your system. Even with standards, +# conditions and build environments change, especially when it comes to more +# extreme code such you might find in an IOCCC winner. Moreover, what was +# allowed and liked in one IOCCC contest may no longer be liked/allowed in +# later IOCCC years. +# +# Corrections on winning author and fixing typos in remarks are VERY WELCOME. +# +# GitHub pull requests are welcome: +# +# If you have a patch that might make running an entry work in modern Unix-like +# environments, please create a GitHub pull request for the IOCCC judges to +# consider. +# +# Suggestions and corrections regarding Makefiles, winning author information, +# fixing typos in remarks, and code patches are welcome via opening a GitHub +# issue or better yet, by creating a GitHub pull request for the IOCCC judges +# to consider. To form a GitHub issue or GitHub pull, please visit: +# +# https://github.com/ioccc-src/winner +# +################################################################################ -WINNERS= ant brnstnd buzzard cdupont davidguy dds fine rince westley +# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under: +# +# Creative Commons Attribution-ShareAlike 3.0 Unported License. +# +# See: http://creativecommons.org/licenses/by-sa/3.0/ -all: - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -k -f common.mk all; \ - ${MAKE} -k -f common.mk all; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -k -f ansi.mk all; \ - ${MAKE} -k -f ansi.mk all; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1; \ - fi -ansi: - ${MAKE} -f ansi.mk all +############################# +# shell used by this Makefile +############################# +# +SHELL= bash -common: - ${MAKE} -f common.mk all +####################### +# common tool locations +####################### +# +A2P= a2p +AR= ar +ASA= asa +AT= at +ATQ= atq +ATRM= atrm +AWK= awk +BANNER= banner +BASE64= base64 +BASENAME= basename +BATCH= batch +BC= bc +BINHEX= binhex +BISON= bison +BUNZIP2= bunzip2 +BZCAT= bzcat +BZCMP= bzcmp +BZDIFF= bzdiff +BZEGREP= bzegrep +BZFGREP= bzfgrep +BZGREP= bzgrep +BZIP2= bzip2 +BZLESS= bzless +BZMORE= bzmore +C2PH= c2ph +C89= c89 +C99= c99 +CAL= cal +CALC= calc +CAT= cat +CD= cd +CHFLAGS= chflags +CHGRP= chgrp +CHMOD= chmod +CKSUM= cksum +CLANG= clang +CLANG_PLUSPLUS= clang++ +CLEAR= clear +CMP= cmp +COL= col +COLLDEF= colldef +COLRM= colrm +COLUMN= column +COMPRESS= compress +CP= cp +CPIO= cpio +CPP= cpp +CRC32= crc32 +CSH= csh +CSPLIT= csplit +CURL= curl +CUT= cut +C_PLUSPLUS= c++ +C_PLUSPLUS_FILT= c++filt +DATE= date +DC= dc +DD= dd +DF= df +DIFF3= diff3 +DIFF= diff +DIG= dig +DIRNAME= dirname +ED= ed +EGREP= egrep +ENV= env +EQN= eqn +ETAGS= etags +EXPECT= expect +EXPR= expr +FALSE= false +FGREP= fgrep +FILE= file +FIND2PERL= find2perl +FIND= find +FLEX= flex +FLEX_PLUSPLUS= flex++ +FMT= fmt +FOLD= fold +FS_USAGE= fs_usage +FUNZIP= funzip +FUSER= fuser +GCC= gcc +GDIFFMK= gdiffmk +GENCAT= gencat +GENSTRINGS= genstrings +GETOPT= getopt +GETOPTS= getopts +GINDENT= gindent +GNUMAKE= gnumake +GREP= grep +GROFF= groff +GROFFER= groffer +GROG= grog +GROPS= grops +GROTTY= grotty +GUNZIP= gunzip +GVIM= gvim +GZCAT= gzcat +GZEXE= gzexe +GZIP_PROG= gzip +G_PLUSPLUS= g++ +H2PH= h2ph +H2XS= h2xs +HASH= hash +HEAD= head +HOSTNAME_PROG= hostname +ICONV= iconv +ID= id +INDENT= indent +INFO= info +JOT= jot +KILL= kill +KSH= ksh +LAST= last +LD= ld +LESSECHO= lessecho +LEX= len +LINK= link +LN= ln +LS= ls +M4= m4 +MAKE= make +MAN= man +MKDIR= mkdir +MKFIFO= mkfifo +MKTEMP= mktemp +MV= mv +NANO= nano +NASM= nasm +NEQN= neqn +NICE= nice +NL= nl +NM= nm +NOHUP= nohup +NROFF= nroff +NSLOOKUP= nslookup +OD= od +OPENSSL= openssl +PASTE= paste +PATCH= patch +PATHCHK= pathchk +PAX= pax +PERL= perl +PICO= pico +PR= pr +PRINTENV= printenv +PS= ps +PTAR= ptar +PTARDIFF= ptardiff +PTARGREP= ptargrep +PWD= pwd +PYDOC= pydoc +PYTHON= python +PYTHONW= pythonw +READLINK= readlink +RENICE= renice +RESET= reset +REV= rev +RI= ri +RM= rm +RMDIR= rmdir +RSYNC= rsync +RUBY= ruby +RVIM= rvim +SAY= say +SCP= scp +SCREEN= screen +SCRIPT= script +SDIFF= sdiff +SED= sed +SEQ= seq +SFTP= sftp +SH= sh +SHA1= sha1 +SHA= sha +SHAR= shar +SHASUM5_18= shasum5.18 +SHASUM= shasum +SIZE= size +SLEEP= sleep +SORT= sort +SSH= ssh +STAT= stat +STRIP= strip +STTY= stty +SUM= sum +SYNC= sync +TABS= tabs +TAIL= tail +TAR= tar +TEE= tee +TEST= test +TFTP= tftp +TIDY= tidy +TIME= time +TOP= top +TOUCH= touch +TPUT= tout +TPUT= tput +TR= tr +TROFF= troff +TRUE= true +TSET= tset +TSORT= tsort +UL= ul +UNAME= uname +UNCOMPRESS= uncompress +UNEXPAND= unexpand +UNIFDEF= unifdef +UNIFDEFALL= unifdefall +UNIQ= uniq +UNITS= units +UNLINK= unlink +UNZIP= unzip +UNZIPSFX= unzipsfx +UPTIME= uptime +UUDECODE= uudecode +UUENCODE= uuencode +UUIDGEN= uuidgen +VI= vi +VIEW= view +VIM= vim +VIMDIFF= vimdiff +W= w +WAIT4PATH= wait4path +WAIT= wait +WC= wc +WGET= wget +WHAT= what +WHATIS= whatis +WHICH= which +WHO= who +WHOAMI= whoami +WHOIS= whois +WRTIE= write +XAR= xar +XARGS= xargs +XATTR= xattr +XXD= xxd +YACC= yacc +YES= yes +ZCAT= zcat +ZCMP= zcmp +ZDIFF= zdiff +ZEGREP= zegrep +ZFGREP= zfgrep +ZFORCE= zforce +ZGREP= zgrep +ZIP= zip +ZIPCLOAK= zipcloak +ZIPGREp= zipgrep +ZIPINFo= zipinfo +ZIPNOTE= zipnote +ZIPSPLIT= zipsplit +ZLESS= zless +ZMORE= zmore +ZNEW= znew +ZPRINT= zprint +ZSH= zsh -${WINNERS} merlyn.c nextmove.c ttt_game.c: - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# Set X11_LIBDIR to the directory where the X11 library resides +# +#X11_LIBDIR= /usr/X11R6/lib +#X11_LIBDIR= /usr/X11/lib +X11_LIBDIR= /opt/X11/lib -ttt: ttt.sh - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# Set X11_INCLUDEDIR to the directory where the X11 include files reside +# +#X11_INCDIR= /usr/X11R6/include +#X11_INCDIR= /usr/X11/include +X11_INCDIR= /opt/X11/include -merlyn: merlyn.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@ \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# CWARN - Silence warnings that ${CWARN} would normally complain about +# CSILENCE -Compiler warnings +# +ifeq ($(CC),clang) -ttt_game: ttt_game.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# clang CSILENCE and CWARN +# +#CSILENCE= +CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \ + -Wno-int-to-pointer-cast -Wno-return-type -Wno-sign-compare +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} +CWARN= -Wall -Wextra -Weverything ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -nextmove: nextmove.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +else +ifeq ($(CC),gcc) +# gcc CSILENCE and CWARN +# +#CSILENCE= +CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \ + -Wno-int-to-pointer-cast -Wno-return-type -Wno-sign-compare +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +else + +# default CSILENCE and WARN +# +#CSILENCE= +CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \ + -Wno-int-to-pointer-cast -Wno-return-type -Wno-sign-compare +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} + +endif +endif + +# compiler standard +# +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu90 + +# compiler bit architecture +# +# Some entries require 32-bitness: +# ARCH= -m32 +# +# Some entries require 64-bitness: +# ARCH= -m64 +# +# By default we assume nothing: +# +ARCH= + +# defines that are needed to compile +# +CDEFINE= +#CDEFINE= -DIOCCC=26 + +# include files that are needed to compile +# +CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 + +# optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +LIBS= +#LIBS= -lsocket -lnsl +#LIBS= -L ${X11_LIBDIR} -lX11 +#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL + +# ANSI compiler +# +# Set CC to the name of your ANSI compiler. +# +# Some entries seem to need gcc. If you have gcc, set +# both CC and MAY_NEED_GCC to gcc. +# +# If you do not have gcc, set CC to the name of your ANSI compiler, and +# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : +# to disable such programs. +# +CC= cc +#CC=clang +MAY_NEED_GCC= gcc + + +############################## +# Special flags for this entry +############################## +# +ENTRY= davidguy +PROG= ${ENTRY} +# +OBJ= ${PROG}.o +DATA= +TARGET= ${PROG} +# +ALT_OBJ= +ALT_TARGET= + + +################# +# build the entry +################# +# +all: data ${TARGET} + @${TRUE} + +.PHONY: all alt data everything clean clobber install \ + love haste waste maker easter_egg sandwich \ + supernova deep_magic magic charon pluto + +${PROG}: ${PROG}.c + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + +# alternative executable +# +alt: data ${ALT_TARGET} + @${TRUE} + +# data files +# +data: ${DATA} + @${TRUE} + +# both all and alt +# +everything: all alt + + +############### +# utility rules +############### +# clean: - ${MAKE} -f ansi.mk clean - ${MAKE} -f common.mk clean -clobber: - ${MAKE} -f ansi.mk clobber - ${MAKE} -f common.mk clobber -nuke: clobber - ${MAKE} -f ansi.mk nuke - ${MAKE} -f common.mk nuke + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + echo ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi + +clobber: clean + ${RM} -f ${TARGET} ${ALT_TARGET} + @-if [ -e sandwich ]; then \ + ${RM} -f sandwich; \ + echo 'ate sandwich'; \ + fi + install: - ${MAKE} -f ansi.mk install - ${MAKE} -f common.mk install + @echo "Dr. Spock says that is not logical!" + @${TRUE} + +# you may be able to misunderstand the source by reading indent.c +# +indent.c: ${PROG}.c + @if which "${GINDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${GINDENT} < $< > $@"; \ + ${GINDENT} < $< > $@; \ + elif which "${INDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${INDENT} < $< > $@"; \ + ${INDENT} < $< > $@; \ + else \ + echo "no intent tool found, ident $< yourself, sorry"; \ + echo "exit 1"; \ + exit 1; \ + fi + + +################## +# 133t hacker rulz +################## +# +love: + @echo 'not war?' + @${TRUE} + +haste: + $(MAKE) waste + @${TRUE} + +waste: + @echo 'haste' + @${TRUE} + +maker: + @echo 'Participate in a maker faire' + @${TRUE} + +easter_egg: + @echo "you expected to often misunderstand this $${RANDOM} magic" + @echo "chongo '' /\\oo/\\" + @echo "Eggy" + +sandwich: easter_egg + @if [ `id -u` -eq 0 ]; then \ + echo 'Okay.'; \ + echo "$${RANDOM}`date +%s`$${RANDOM}" > $@; \ + else \ + echo 'What? Make it yourself.'; \ + exit 1; \ + fi + +# Understand the history of the Homebrew Computer Club +# as well as the West Coast Computer Faire and +# you might be confused different. :-) +# +supernova: sandwich + @-if [ -r .code_anal ]; then \ + ${RM} -f .code_anal_v6; \ + else \ + echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \ + fi + @echo "A $@ helps ${MAKE} the elements that help form planets" + @${TRUE} + +deep_magic: supernova + @-if [ -r .code_anal ]; then \ + ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 \ + --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + fi + @${TRUE} + +magic: deep_magic + @-if [ -r .code_anal ]; then \ + ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "If you don't eat yer meat, you can't have any pudding!"; \ + echo "How can you have any pudding if you don't eat yer meat?!"; \ + fi + @${TRUE} + +# The IOCCC resident astronomer states +# +charon: magic + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore IAU, $@ is a planet" + +pluto: charon + ${MAKE} charon + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore, $@ is a planet" + @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" diff --git a/1991/davidguy/README.md b/1991/davidguy/README.md index 972f25d44..83606ab21 100644 --- a/1991/davidguy/README.md +++ b/1991/davidguy/README.md @@ -7,23 +7,26 @@ Best X11 Graphics: USA USA -Judges' comments: +## To buil: - Make and run as follows: + make all - make davidguy - davidguy ip_address:server.screen +### To run - where 'ip_address' in an IP address of an X server. For example, try: + ./davidguy ip_address:server.screen - davidguy 127.0.0.1:0.0 + where 'ip_address' in an IP address of an X server. For example, try: - Of course, may need to supply a more reasonable address. :-) + davidguy 127.0.0.1:0.0 - Also try: + Of course, may need to supply a more reasonable address. :-) - cp davidguy guydavid - guydavid 127.0.0.1:0.0 + Also try: + + cp -f davidguy guydavid + ./guydavid 127.0.0.1:0.0 + +## Judges' comments Can you determine why this makes a difference. @@ -39,12 +42,8 @@ Judges' comments: We are pleased that this entry has helped bring new 'life' into the contest. - NOTE: The orignal program that won may be found in davidguy.orig.c. - The author supplied a second version of the program, which - we have placed in the default location davidguy.c. - -Selected notes from the authors: +## Author's comments The program is a fully-functional X client. It talks directly to the X server through a socket without using Xlib, Xt or any other From 41c1dd3dd5e8bf00a3fa0e1d25064f7e20871958 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 11:32:06 -0800 Subject: [PATCH 10/50] fix typos in README.md --- 1991/ant/README.md | 4 +--- 1991/brnstnd/README.md | 3 +-- 1991/buzzard/README.md | 4 +--- 1991/cdupont/README.md | 4 +--- 1991/davidguy/README.md | 4 +--- 5 files changed, 5 insertions(+), 14 deletions(-) diff --git a/1991/ant/README.md b/1991/ant/README.md index 09c9ba2d0..f01cd6f6b 100644 --- a/1991/ant/README.md +++ b/1991/ant/README.md @@ -6,8 +6,7 @@ Waterloo, On Waterloo, On Canada, N2J 2W9 Canada, N2L 6G9 - -## To buil: +## To build: make all @@ -21,7 +20,6 @@ The author was kind enough to supply a list of references below, in case you are still confused after read the source! :-) - ## Author's comments Ant's Editor vIOCCC91 diff --git a/1991/brnstnd/README.md b/1991/brnstnd/README.md index a3634c413..952f5a23b 100644 --- a/1991/brnstnd/README.md +++ b/1991/brnstnd/README.md @@ -3,7 +3,7 @@ Daniel J. Bernstein New York University -## To buil: +## To build: make all @@ -15,7 +15,6 @@ ## Judges' comments - For info on more examples, read the sorta.README file. The author wished to win the "most useful program" award and diff --git a/1991/buzzard/README.md b/1991/buzzard/README.md index 4030b1638..2edd28dd7 100644 --- a/1991/buzzard/README.md +++ b/1991/buzzard/README.md @@ -6,8 +6,7 @@ Best Output: Hyattsville MD 20782 USA - -## To buil: +## To build: make all @@ -21,7 +20,6 @@ Best Output: You are invited to try to cheat, ... if you can figure out how! :-) - ## Author's comments HOW TO PLAY: diff --git a/1991/cdupont/README.md b/1991/cdupont/README.md index 00a19a69c..d5666ac10 100644 --- a/1991/cdupont/README.md +++ b/1991/cdupont/README.md @@ -7,8 +7,7 @@ 69009 Lyon France - -## To buil: +## To build: make all @@ -29,7 +28,6 @@ original source file. This step is not needed to compile this entry. - ## Author's comments Spoiler, rot13 to read: diff --git a/1991/davidguy/README.md b/1991/davidguy/README.md index 83606ab21..7b9a0105e 100644 --- a/1991/davidguy/README.md +++ b/1991/davidguy/README.md @@ -6,8 +6,7 @@ Best X11 Graphics: Pittsburgh PA 15213 Murray Hill NJ 07974 USA USA - -## To buil: +## To build: make all @@ -42,7 +41,6 @@ Best X11 Graphics: We are pleased that this entry has helped bring new 'life' into the contest. - ## Author's comments The program is a fully-functional X client. It talks directly to From b17990a6ad3b1d3eb23f506d76f59893d7e23c72 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 11:37:15 -0800 Subject: [PATCH 11/50] fix and cleanup Makefile, README.md, dds.c --- 1991/dds/Makefile | 718 +++++++++++++++++++++++++++++++++++++------- 1991/dds/README.md | 18 +- 1991/dds/dds.ansi.c | 17 -- 1991/dds/dds.c | 2 +- 4 files changed, 618 insertions(+), 137 deletions(-) delete mode 100644 1991/dds/dds.ansi.c diff --git a/1991/dds/Makefile b/1991/dds/Makefile index 57c7302a6..eb855ba34 100644 --- a/1991/dds/Makefile +++ b/1991/dds/Makefile @@ -1,129 +1,621 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1991 makefile +# IOCCC 1991 winning entry - dds + +################################################################################ # -# Copyright (c) 1991, Landon Curt Noll & Larry Bassel. -# All Rights Reserved. Permission for personal, educational or non-profit -# use is granted provided this this copyright and notice are included in its -# entirety and remains unaltered. All other uses must receive prior permission -# from Landon Curt Noll and Larry Bassel. - - -SHELL=/bin/sh -MAKE=make -MAKEFLAGS=e - -# uncomment the line to select the preferred type of compile +# An Historical Makefile NOTE: # -# You should also check the ansi.mk or common.mk for the -# proper compiler name and flags. +# The orig.Makefile, if it exits, is the original Makefile before this IOCCC +# year directory was reworked so that entries are in separate directories. +# This also applies to any orig.ansi.mk and orig.common.mk files. # -# NOTE ==> USE=ansi compile with an ANSI compiler by default -#USE=ansi -# NOTE ==> USE=common compile with a common K&R compiler by default -#USE=common +# Several Makefiles were modified / formed in 2022, and as such it may have +# elements that are not historically compatible with way entries were built. +# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile. +# +# Regarding individual entries: +# +# IOCCC winning entry code may not work on your system. Even with standards, +# conditions and build environments change, especially when it comes to more +# extreme code such you might find in an IOCCC winner. Moreover, what was +# allowed and liked in one IOCCC contest may no longer be liked/allowed in +# later IOCCC years. +# +# Corrections on winning author and fixing typos in remarks are VERY WELCOME. +# +# GitHub pull requests are welcome: +# +# If you have a patch that might make running an entry work in modern Unix-like +# environments, please create a GitHub pull request for the IOCCC judges to +# consider. +# +# Suggestions and corrections regarding Makefiles, winning author information, +# fixing typos in remarks, and code patches are welcome via opening a GitHub +# issue or better yet, by creating a GitHub pull request for the IOCCC judges +# to consider. To form a GitHub issue or GitHub pull, please visit: +# +# https://github.com/ioccc-src/winner +# +################################################################################ -WINNERS= ant brnstnd buzzard cdupont davidguy dds fine rince westley +# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under: +# +# Creative Commons Attribution-ShareAlike 3.0 Unported License. +# +# See: http://creativecommons.org/licenses/by-sa/3.0/ -all: - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -k -f common.mk all; \ - ${MAKE} -k -f common.mk all; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -k -f ansi.mk all; \ - ${MAKE} -k -f ansi.mk all; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1; \ - fi -ansi: - ${MAKE} -f ansi.mk all +############################# +# shell used by this Makefile +############################# +# +SHELL= bash -common: - ${MAKE} -f common.mk all +####################### +# common tool locations +####################### +# +A2P= a2p +AR= ar +ASA= asa +AT= at +ATQ= atq +ATRM= atrm +AWK= awk +BANNER= banner +BASE64= base64 +BASENAME= basename +BATCH= batch +BC= bc +BINHEX= binhex +BISON= bison +BUNZIP2= bunzip2 +BZCAT= bzcat +BZCMP= bzcmp +BZDIFF= bzdiff +BZEGREP= bzegrep +BZFGREP= bzfgrep +BZGREP= bzgrep +BZIP2= bzip2 +BZLESS= bzless +BZMORE= bzmore +C2PH= c2ph +C89= c89 +C99= c99 +CAL= cal +CALC= calc +CAT= cat +CD= cd +CHFLAGS= chflags +CHGRP= chgrp +CHMOD= chmod +CKSUM= cksum +CLANG= clang +CLANG_PLUSPLUS= clang++ +CLEAR= clear +CMP= cmp +COL= col +COLLDEF= colldef +COLRM= colrm +COLUMN= column +COMPRESS= compress +CP= cp +CPIO= cpio +CPP= cpp +CRC32= crc32 +CSH= csh +CSPLIT= csplit +CURL= curl +CUT= cut +C_PLUSPLUS= c++ +C_PLUSPLUS_FILT= c++filt +DATE= date +DC= dc +DD= dd +DF= df +DIFF3= diff3 +DIFF= diff +DIG= dig +DIRNAME= dirname +ED= ed +EGREP= egrep +ENV= env +EQN= eqn +ETAGS= etags +EXPECT= expect +EXPR= expr +FALSE= false +FGREP= fgrep +FILE= file +FIND2PERL= find2perl +FIND= find +FLEX= flex +FLEX_PLUSPLUS= flex++ +FMT= fmt +FOLD= fold +FS_USAGE= fs_usage +FUNZIP= funzip +FUSER= fuser +GCC= gcc +GDIFFMK= gdiffmk +GENCAT= gencat +GENSTRINGS= genstrings +GETOPT= getopt +GETOPTS= getopts +GINDENT= gindent +GNUMAKE= gnumake +GREP= grep +GROFF= groff +GROFFER= groffer +GROG= grog +GROPS= grops +GROTTY= grotty +GUNZIP= gunzip +GVIM= gvim +GZCAT= gzcat +GZEXE= gzexe +GZIP_PROG= gzip +G_PLUSPLUS= g++ +H2PH= h2ph +H2XS= h2xs +HASH= hash +HEAD= head +HOSTNAME_PROG= hostname +ICONV= iconv +ID= id +INDENT= indent +INFO= info +JOT= jot +KILL= kill +KSH= ksh +LAST= last +LD= ld +LESSECHO= lessecho +LEX= len +LINK= link +LN= ln +LS= ls +M4= m4 +MAKE= make +MAN= man +MKDIR= mkdir +MKFIFO= mkfifo +MKTEMP= mktemp +MV= mv +NANO= nano +NASM= nasm +NEQN= neqn +NICE= nice +NL= nl +NM= nm +NOHUP= nohup +NROFF= nroff +NSLOOKUP= nslookup +OD= od +OPENSSL= openssl +PASTE= paste +PATCH= patch +PATHCHK= pathchk +PAX= pax +PERL= perl +PICO= pico +PR= pr +PRINTENV= printenv +PS= ps +PTAR= ptar +PTARDIFF= ptardiff +PTARGREP= ptargrep +PWD= pwd +PYDOC= pydoc +PYTHON= python +PYTHONW= pythonw +READLINK= readlink +RENICE= renice +RESET= reset +REV= rev +RI= ri +RM= rm +RMDIR= rmdir +RSYNC= rsync +RUBY= ruby +RVIM= rvim +SAY= say +SCP= scp +SCREEN= screen +SCRIPT= script +SDIFF= sdiff +SED= sed +SEQ= seq +SFTP= sftp +SH= sh +SHA1= sha1 +SHA= sha +SHAR= shar +SHASUM5_18= shasum5.18 +SHASUM= shasum +SIZE= size +SLEEP= sleep +SORT= sort +SSH= ssh +STAT= stat +STRIP= strip +STTY= stty +SUM= sum +SYNC= sync +TABS= tabs +TAIL= tail +TAR= tar +TEE= tee +TEST= test +TFTP= tftp +TIDY= tidy +TIME= time +TOP= top +TOUCH= touch +TPUT= tout +TPUT= tput +TR= tr +TROFF= troff +TRUE= true +TSET= tset +TSORT= tsort +UL= ul +UNAME= uname +UNCOMPRESS= uncompress +UNEXPAND= unexpand +UNIFDEF= unifdef +UNIFDEFALL= unifdefall +UNIQ= uniq +UNITS= units +UNLINK= unlink +UNZIP= unzip +UNZIPSFX= unzipsfx +UPTIME= uptime +UUDECODE= uudecode +UUENCODE= uuencode +UUIDGEN= uuidgen +VI= vi +VIEW= view +VIM= vim +VIMDIFF= vimdiff +W= w +WAIT4PATH= wait4path +WAIT= wait +WC= wc +WGET= wget +WHAT= what +WHATIS= whatis +WHICH= which +WHO= who +WHOAMI= whoami +WHOIS= whois +WRTIE= write +XAR= xar +XARGS= xargs +XATTR= xattr +XXD= xxd +YACC= yacc +YES= yes +ZCAT= zcat +ZCMP= zcmp +ZDIFF= zdiff +ZEGREP= zegrep +ZFGREP= zfgrep +ZFORCE= zforce +ZGREP= zgrep +ZIP= zip +ZIPCLOAK= zipcloak +ZIPGREp= zipgrep +ZIPINFo= zipinfo +ZIPNOTE= zipnote +ZIPSPLIT= zipsplit +ZLESS= zless +ZMORE= zmore +ZNEW= znew +ZPRINT= zprint +ZSH= zsh -${WINNERS} merlyn.c nextmove.c ttt_game.c: - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# Set X11_LIBDIR to the directory where the X11 library resides +# +#X11_LIBDIR= /usr/X11R6/lib +#X11_LIBDIR= /usr/X11/lib +X11_LIBDIR= /opt/X11/lib -ttt: ttt.sh - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# Set X11_INCLUDEDIR to the directory where the X11 include files reside +# +#X11_INCDIR= /usr/X11R6/include +#X11_INCDIR= /usr/X11/include +X11_INCDIR= /opt/X11/include -merlyn: merlyn.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@ \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# CWARN - Silence warnings that ${CWARN} would normally complain about +# CSILENCE -Compiler warnings +# +ifeq ($(CC),clang) -ttt_game: ttt_game.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# clang CSILENCE and CWARN +# +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-overlength-strings \ + -Wno-unused-parameter +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} +CWARN= -Wall -Wextra -Weverything ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -nextmove: nextmove.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +else +ifeq ($(CC),gcc) +# gcc CSILENCE and CWARN +# +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-overlength-strings \ + -Wno-unused-parameter +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +else + +# default CSILENCE and WARN +# +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-overlength-strings \ + -Wno-unused-parameter +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} + +endif +endif + +# compiler standard +# +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu90 + +# compiler bit architecture +# +# Some entries require 32-bitness: +# ARCH= -m32 +# +# Some entries require 64-bitness: +# ARCH= -m64 +# +# By default we assume nothing: +# +ARCH= + +# defines that are needed to compile +# +CDEFINE= +#CDEFINE= -DIOCCC=26 + +# include files that are needed to compile +# +CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 + +# optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +LIBS= +#LIBS= -lm +#LIBS= -L ${X11_LIBDIR} -lX11 +#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL + +# ANSI compiler +# +# Set CC to the name of your ANSI compiler. +# +# Some entries seem to need gcc. If you have gcc, set +# both CC and MAY_NEED_GCC to gcc. +# +# If you do not have gcc, set CC to the name of your ANSI compiler, and +# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : +# to disable such programs. +# +CC= cc +#CC=clang +MAY_NEED_GCC= gcc + + +############################## +# Special flags for this entry +############################## +# +ENTRY= dds +PROG= ${ENTRY} +# +OBJ= ${PROG}.o +DATA= +TARGET= ${PROG} +# +ALT_OBJ= +ALT_TARGET= + + +################# +# build the entry +################# +# +all: data ${TARGET} + @${TRUE} + +.PHONY: all alt data everything clean clobber install \ + love haste waste maker easter_egg sandwich \ + supernova deep_magic magic charon pluto + +${PROG}: ${PROG}.c + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + +# alternative executable +# +alt: data ${ALT_TARGET} + @${TRUE} + +# data files +# +data: ${DATA} + @${TRUE} + +# both all and alt +# +everything: all alt + + +############### +# utility rules +############### +# clean: - ${MAKE} -f ansi.mk clean - ${MAKE} -f common.mk clean -clobber: - ${MAKE} -f ansi.mk clobber - ${MAKE} -f common.mk clobber -nuke: clobber - ${MAKE} -f ansi.mk nuke - ${MAKE} -f common.mk nuke + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + echo ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi + +clobber: clean + ${RM} -f ${TARGET} ${ALT_TARGET} + ${RM} -f a.out + @-if [ -e sandwich ]; then \ + ${RM} -f sandwich; \ + echo 'ate sandwich'; \ + fi + install: - ${MAKE} -f ansi.mk install - ${MAKE} -f common.mk install + @echo "Dr. Spock says that is not logical!" + @${TRUE} + +# you may be able to misunderstand the source by reading indent.c +# +indent.c: ${PROG}.c + @if which "${GINDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${GINDENT} < $< > $@"; \ + ${GINDENT} < $< > $@; \ + elif which "${INDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${INDENT} < $< > $@"; \ + ${INDENT} < $< > $@; \ + else \ + echo "no intent tool found, ident $< yourself, sorry"; \ + echo "exit 1"; \ + exit 1; \ + fi + + +################## +# 133t hacker rulz +################## +# +love: + @echo 'not war?' + @${TRUE} + +haste: + $(MAKE) waste + @${TRUE} + +waste: + @echo 'haste' + @${TRUE} + +maker: + @echo 'Participate in a maker faire' + @${TRUE} + +easter_egg: + @echo "you expected to often misunderstand this $${RANDOM} magic" + @echo "chongo '' /\\oo/\\" + @echo "Eggy" + +sandwich: easter_egg + @if [ `id -u` -eq 0 ]; then \ + echo 'Okay.'; \ + echo "$${RANDOM}`date +%s`$${RANDOM}" > $@; \ + else \ + echo 'What? Make it yourself.'; \ + exit 1; \ + fi + +# Understand the history of the Homebrew Computer Club +# as well as the West Coast Computer Faire and +# you might be confused different. :-) +# +supernova: sandwich + @-if [ -r .code_anal ]; then \ + ${RM} -f .code_anal_v6; \ + else \ + echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \ + fi + @echo "A $@ helps ${MAKE} the elements that help form planets" + @${TRUE} + +deep_magic: supernova + @-if [ -r .code_anal ]; then \ + ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 \ + --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + fi + @${TRUE} + +magic: deep_magic + @-if [ -r .code_anal ]; then \ + ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "If you don't eat yer meat, you can't have any pudding!"; \ + echo "How can you have any pudding if you don't eat yer meat?!"; \ + fi + @${TRUE} + +# The IOCCC resident astronomer states +# +charon: magic + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore IAU, $@ is a planet" + +pluto: charon + ${MAKE} charon + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore, $@ is a planet" + @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" diff --git a/1991/dds/README.md b/1991/dds/README.md index 897823dc3..b2551e607 100644 --- a/1991/dds/README.md +++ b/1991/dds/README.md @@ -1,4 +1,4 @@ -Most Well Rounded: +# Most Well Rounded: Diomidis Spinellis Imperial College, University of London @@ -7,14 +7,20 @@ Most Well Rounded: Greece -Judges' comments: +## To build: + + make all + +### To run + + ./dds basic_program + ./a.out + +## Judges' comments Make and run as follows: make dds - dds basic_program - a.out - For example, the author suggests trying: dds LANDER.BAS @@ -30,7 +36,7 @@ Judges' comments: have supplied a more portable ANSI version. -Selected notes from the author: +## Author's comments This program is a companion to the DDS-BASIC interpreter program that was submitted to the contest in 1990. This compiles BASIC programs into diff --git a/1991/dds/dds.ansi.c b/1991/dds/dds.ansi.c deleted file mode 100644 index 1868a83e0..000000000 --- a/1991/dds/dds.ansi.c +++ /dev/null @@ -1,17 +0,0 @@ -#include -#define Q r=R[*p++-'0'];while( -#define B ;break;case -char*s="Qjou!s\\311^-g\\311^-n\\311^-c\\::^-q-ma%mO1JBHm%BQ-aP1J[O1HB%[QaP2QaP4HC%T\ -Qs\\q,,^>m,2aP4HC%SD12N1\nJNQm>s\\..q^aHC%NHb%GN1!D32P3%RN1UP1D12JPQUaP1H\ -R%PN4\nQaP2Q,2aP4Hb%OD12D12N2!N3\nJVP3Q,,n\ -\\(aP3Q(^*m>g\\(aP3Q(^::::aHC%VP3Q>bupj)hfut)c**aHb%JD12JON1!Qjg)a%LN1UP1D12JIQUa\ -P1HL%IQ*m>aN2!N2\nP2QP2Q>aN2\nP2Hbdd!b/d";int k;char R[4][99] -;main(c,v)char**v;{char*p,*r,*q;for(q=s;*q;q++)*q>' '&&(*q)--;{FILE*i=fopen(v -[1],"r"),*o=fopen(q-3,"w");for(p=s;;p++)switch(*p++){B'M':Q(k=fgetc(i))!=EOF -&&k!=*p)*r++=k;if(k==EOF){fputs("}}\n",o);fclose(o);return system(q-6);}*r=0 -B'P':while(*p!='`')fputc(*p++,o)B'O':Q*r)fputc(*r++,o);p--B'C':k=0;Q k<*p-'0' -)(*r++=fgetc(i),k++);*r=0 B'I':k= *p;if(**R==k)goto G B'G':k= *p;G:p=s;while( -*p!='$'||p[1]!= k)p++;p++B'N':R[*p-'0'][0]++;}}} diff --git a/1991/dds/dds.c b/1991/dds/dds.c index c2e837c57..1868a83e0 100644 --- a/1991/dds/dds.c +++ b/1991/dds/dds.c @@ -8,7 +8,7 @@ Qs\\q,,^>m,2aP4HC%SD12N1\nJNQm>s\\..q^aHC%NHb%GN1!D32P3%RN1UP1D12JPQUaP1H\ R%PN4\nQaP2Q,2aP4Hb%OD12D12N2!N3\nJVP3Q,,n\ \\(aP3Q(^*m>g\\(aP3Q(^::::aHC%VP3Q>bupj)hfut)c**aHb%JD12JON1!Qjg)a%LN1UP1D12JIQUa\ -P1HL%IQ*m>aN2!N2\nP2QP2Q>aN2\nP2Hbdd!b/d";k;char R[4][99] +P1HL%IQ*m>aN2!N2\nP2QP2Q>aN2\nP2Hbdd!b/d";int k;char R[4][99] ;main(c,v)char**v;{char*p,*r,*q;for(q=s;*q;q++)*q>' '&&(*q)--;{FILE*i=fopen(v [1],"r"),*o=fopen(q-3,"w");for(p=s;;p++)switch(*p++){B'M':Q(k=fgetc(i))!=EOF &&k!=*p)*r++=k;if(k==EOF){fputs("}}\n",o);fclose(o);return system(q-6);}*r=0 From 9369d7c1d6741b16eb4d09ac368c1e9e86dcbb4a Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 11:44:34 -0800 Subject: [PATCH 12/50] fix 1991/fine Makefile, README.md, source --- 1991/fine/Makefile | 717 +++++++++++++++++++++++++++++++++++++------- 1991/fine/README.md | 25 +- 1991/fine/fine.c | 2 +- 3 files changed, 618 insertions(+), 126 deletions(-) diff --git a/1991/fine/Makefile b/1991/fine/Makefile index 57c7302a6..2db9474f1 100644 --- a/1991/fine/Makefile +++ b/1991/fine/Makefile @@ -1,129 +1,620 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1991 makefile +# IOCCC 1991 winning entry - fine + +################################################################################ # -# Copyright (c) 1991, Landon Curt Noll & Larry Bassel. -# All Rights Reserved. Permission for personal, educational or non-profit -# use is granted provided this this copyright and notice are included in its -# entirety and remains unaltered. All other uses must receive prior permission -# from Landon Curt Noll and Larry Bassel. - - -SHELL=/bin/sh -MAKE=make -MAKEFLAGS=e - -# uncomment the line to select the preferred type of compile +# An Historical Makefile NOTE: # -# You should also check the ansi.mk or common.mk for the -# proper compiler name and flags. +# The orig.Makefile, if it exits, is the original Makefile before this IOCCC +# year directory was reworked so that entries are in separate directories. +# This also applies to any orig.ansi.mk and orig.common.mk files. # -# NOTE ==> USE=ansi compile with an ANSI compiler by default -#USE=ansi -# NOTE ==> USE=common compile with a common K&R compiler by default -#USE=common +# Several Makefiles were modified / formed in 2022, and as such it may have +# elements that are not historically compatible with way entries were built. +# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile. +# +# Regarding individual entries: +# +# IOCCC winning entry code may not work on your system. Even with standards, +# conditions and build environments change, especially when it comes to more +# extreme code such you might find in an IOCCC winner. Moreover, what was +# allowed and liked in one IOCCC contest may no longer be liked/allowed in +# later IOCCC years. +# +# Corrections on winning author and fixing typos in remarks are VERY WELCOME. +# +# GitHub pull requests are welcome: +# +# If you have a patch that might make running an entry work in modern Unix-like +# environments, please create a GitHub pull request for the IOCCC judges to +# consider. +# +# Suggestions and corrections regarding Makefiles, winning author information, +# fixing typos in remarks, and code patches are welcome via opening a GitHub +# issue or better yet, by creating a GitHub pull request for the IOCCC judges +# to consider. To form a GitHub issue or GitHub pull, please visit: +# +# https://github.com/ioccc-src/winner +# +################################################################################ -WINNERS= ant brnstnd buzzard cdupont davidguy dds fine rince westley +# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under: +# +# Creative Commons Attribution-ShareAlike 3.0 Unported License. +# +# See: http://creativecommons.org/licenses/by-sa/3.0/ -all: - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -k -f common.mk all; \ - ${MAKE} -k -f common.mk all; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -k -f ansi.mk all; \ - ${MAKE} -k -f ansi.mk all; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1; \ - fi -ansi: - ${MAKE} -f ansi.mk all +############################# +# shell used by this Makefile +############################# +# +SHELL= bash -common: - ${MAKE} -f common.mk all +####################### +# common tool locations +####################### +# +A2P= a2p +AR= ar +ASA= asa +AT= at +ATQ= atq +ATRM= atrm +AWK= awk +BANNER= banner +BASE64= base64 +BASENAME= basename +BATCH= batch +BC= bc +BINHEX= binhex +BISON= bison +BUNZIP2= bunzip2 +BZCAT= bzcat +BZCMP= bzcmp +BZDIFF= bzdiff +BZEGREP= bzegrep +BZFGREP= bzfgrep +BZGREP= bzgrep +BZIP2= bzip2 +BZLESS= bzless +BZMORE= bzmore +C2PH= c2ph +C89= c89 +C99= c99 +CAL= cal +CALC= calc +CAT= cat +CD= cd +CHFLAGS= chflags +CHGRP= chgrp +CHMOD= chmod +CKSUM= cksum +CLANG= clang +CLANG_PLUSPLUS= clang++ +CLEAR= clear +CMP= cmp +COL= col +COLLDEF= colldef +COLRM= colrm +COLUMN= column +COMPRESS= compress +CP= cp +CPIO= cpio +CPP= cpp +CRC32= crc32 +CSH= csh +CSPLIT= csplit +CURL= curl +CUT= cut +C_PLUSPLUS= c++ +C_PLUSPLUS_FILT= c++filt +DATE= date +DC= dc +DD= dd +DF= df +DIFF3= diff3 +DIFF= diff +DIG= dig +DIRNAME= dirname +ED= ed +EGREP= egrep +ENV= env +EQN= eqn +ETAGS= etags +EXPECT= expect +EXPR= expr +FALSE= false +FGREP= fgrep +FILE= file +FIND2PERL= find2perl +FIND= find +FLEX= flex +FLEX_PLUSPLUS= flex++ +FMT= fmt +FOLD= fold +FS_USAGE= fs_usage +FUNZIP= funzip +FUSER= fuser +GCC= gcc +GDIFFMK= gdiffmk +GENCAT= gencat +GENSTRINGS= genstrings +GETOPT= getopt +GETOPTS= getopts +GINDENT= gindent +GNUMAKE= gnumake +GREP= grep +GROFF= groff +GROFFER= groffer +GROG= grog +GROPS= grops +GROTTY= grotty +GUNZIP= gunzip +GVIM= gvim +GZCAT= gzcat +GZEXE= gzexe +GZIP_PROG= gzip +G_PLUSPLUS= g++ +H2PH= h2ph +H2XS= h2xs +HASH= hash +HEAD= head +HOSTNAME_PROG= hostname +ICONV= iconv +ID= id +INDENT= indent +INFO= info +JOT= jot +KILL= kill +KSH= ksh +LAST= last +LD= ld +LESSECHO= lessecho +LEX= len +LINK= link +LN= ln +LS= ls +M4= m4 +MAKE= make +MAN= man +MKDIR= mkdir +MKFIFO= mkfifo +MKTEMP= mktemp +MV= mv +NANO= nano +NASM= nasm +NEQN= neqn +NICE= nice +NL= nl +NM= nm +NOHUP= nohup +NROFF= nroff +NSLOOKUP= nslookup +OD= od +OPENSSL= openssl +PASTE= paste +PATCH= patch +PATHCHK= pathchk +PAX= pax +PERL= perl +PICO= pico +PR= pr +PRINTENV= printenv +PS= ps +PTAR= ptar +PTARDIFF= ptardiff +PTARGREP= ptargrep +PWD= pwd +PYDOC= pydoc +PYTHON= python +PYTHONW= pythonw +READLINK= readlink +RENICE= renice +RESET= reset +REV= rev +RI= ri +RM= rm +RMDIR= rmdir +RSYNC= rsync +RUBY= ruby +RVIM= rvim +SAY= say +SCP= scp +SCREEN= screen +SCRIPT= script +SDIFF= sdiff +SED= sed +SEQ= seq +SFTP= sftp +SH= sh +SHA1= sha1 +SHA= sha +SHAR= shar +SHASUM5_18= shasum5.18 +SHASUM= shasum +SIZE= size +SLEEP= sleep +SORT= sort +SSH= ssh +STAT= stat +STRIP= strip +STTY= stty +SUM= sum +SYNC= sync +TABS= tabs +TAIL= tail +TAR= tar +TEE= tee +TEST= test +TFTP= tftp +TIDY= tidy +TIME= time +TOP= top +TOUCH= touch +TPUT= tout +TPUT= tput +TR= tr +TROFF= troff +TRUE= true +TSET= tset +TSORT= tsort +UL= ul +UNAME= uname +UNCOMPRESS= uncompress +UNEXPAND= unexpand +UNIFDEF= unifdef +UNIFDEFALL= unifdefall +UNIQ= uniq +UNITS= units +UNLINK= unlink +UNZIP= unzip +UNZIPSFX= unzipsfx +UPTIME= uptime +UUDECODE= uudecode +UUENCODE= uuencode +UUIDGEN= uuidgen +VI= vi +VIEW= view +VIM= vim +VIMDIFF= vimdiff +W= w +WAIT4PATH= wait4path +WAIT= wait +WC= wc +WGET= wget +WHAT= what +WHATIS= whatis +WHICH= which +WHO= who +WHOAMI= whoami +WHOIS= whois +WRTIE= write +XAR= xar +XARGS= xargs +XATTR= xattr +XXD= xxd +YACC= yacc +YES= yes +ZCAT= zcat +ZCMP= zcmp +ZDIFF= zdiff +ZEGREP= zegrep +ZFGREP= zfgrep +ZFORCE= zforce +ZGREP= zgrep +ZIP= zip +ZIPCLOAK= zipcloak +ZIPGREp= zipgrep +ZIPINFo= zipinfo +ZIPNOTE= zipnote +ZIPSPLIT= zipsplit +ZLESS= zless +ZMORE= zmore +ZNEW= znew +ZPRINT= zprint +ZSH= zsh -${WINNERS} merlyn.c nextmove.c ttt_game.c: - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# Set X11_LIBDIR to the directory where the X11 library resides +# +#X11_LIBDIR= /usr/X11R6/lib +#X11_LIBDIR= /usr/X11/lib +X11_LIBDIR= /opt/X11/lib -ttt: ttt.sh - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# Set X11_INCLUDEDIR to the directory where the X11 include files reside +# +#X11_INCDIR= /usr/X11R6/include +#X11_INCDIR= /usr/X11/include +X11_INCDIR= /opt/X11/include -merlyn: merlyn.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@ \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# CWARN - Silence warnings that ${CWARN} would normally complain about +# CSILENCE -Compiler warnings +# +ifeq ($(CC),clang) -ttt_game: ttt_game.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# clang CSILENCE and CWARN +# +#CSILENCE= +CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \ + -Wno-int-conversion -Wno-pointer-to-int-cast +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} +CWARN= -Wall -Wextra -Weverything ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -nextmove: nextmove.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +else +ifeq ($(CC),gcc) +# gcc CSILENCE and CWARN +# +#CSILENCE= +CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \ + -Wno-int-conversion -Wno-pointer-to-int-cast +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +else + +# default CSILENCE and WARN +# +#CSILENCE= +CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \ + -Wno-int-conversion -Wno-pointer-to-int-cast +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} + +endif +endif + +# compiler standard +# +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu90 + +# compiler bit architecture +# +# Some entries require 32-bitness: +# ARCH= -m32 +# +# Some entries require 64-bitness: +# ARCH= -m64 +# +# By default we assume nothing: +# +ARCH= + +# defines that are needed to compile +# +CDEFINE= +#CDEFINE= -DIOCCC=26 + +# include files that are needed to compile +# +CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 + +# optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +LIBS= +#LIBS= -lm +#LIBS= -L ${X11_LIBDIR} -lX11 +#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL + +# ANSI compiler +# +# Set CC to the name of your ANSI compiler. +# +# Some entries seem to need gcc. If you have gcc, set +# both CC and MAY_NEED_GCC to gcc. +# +# If you do not have gcc, set CC to the name of your ANSI compiler, and +# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : +# to disable such programs. +# +CC= cc +#CC=clang +MAY_NEED_GCC= gcc + + +############################## +# Special flags for this entry +############################## +# +ENTRY= fine +PROG= ${ENTRY} +# +OBJ= ${PROG}.o +DATA= +TARGET= ${PROG} +# +ALT_OBJ= +ALT_TARGET= + + +################# +# build the entry +################# +# +all: data ${TARGET} + @${TRUE} + +.PHONY: all alt data everything clean clobber install \ + love haste waste maker easter_egg sandwich \ + supernova deep_magic magic charon pluto + +${PROG}: ${PROG}.c + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + +# alternative executable +# +alt: data ${ALT_TARGET} + @${TRUE} + +# data files +# +data: ${DATA} + @${TRUE} + +# both all and alt +# +everything: all alt + + +############### +# utility rules +############### +# clean: - ${MAKE} -f ansi.mk clean - ${MAKE} -f common.mk clean -clobber: - ${MAKE} -f ansi.mk clobber - ${MAKE} -f common.mk clobber -nuke: clobber - ${MAKE} -f ansi.mk nuke - ${MAKE} -f common.mk nuke + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + echo ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi + +clobber: clean + ${RM} -f ${TARGET} ${ALT_TARGET} + @-if [ -e sandwich ]; then \ + ${RM} -f sandwich; \ + echo 'ate sandwich'; \ + fi + install: - ${MAKE} -f ansi.mk install - ${MAKE} -f common.mk install + @echo "Dr. Spock says that is not logical!" + @${TRUE} + +# you may be able to misunderstand the source by reading indent.c +# +indent.c: ${PROG}.c + @if which "${GINDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${GINDENT} < $< > $@"; \ + ${GINDENT} < $< > $@; \ + elif which "${INDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${INDENT} < $< > $@"; \ + ${INDENT} < $< > $@; \ + else \ + echo "no intent tool found, ident $< yourself, sorry"; \ + echo "exit 1"; \ + exit 1; \ + fi + + +################## +# 133t hacker rulz +################## +# +love: + @echo 'not war?' + @${TRUE} + +haste: + $(MAKE) waste + @${TRUE} + +waste: + @echo 'haste' + @${TRUE} + +maker: + @echo 'Participate in a maker faire' + @${TRUE} + +easter_egg: + @echo "you expected to often misunderstand this $${RANDOM} magic" + @echo "chongo '' /\\oo/\\" + @echo "Eggy" + +sandwich: easter_egg + @if [ `id -u` -eq 0 ]; then \ + echo 'Okay.'; \ + echo "$${RANDOM}`date +%s`$${RANDOM}" > $@; \ + else \ + echo 'What? Make it yourself.'; \ + exit 1; \ + fi + +# Understand the history of the Homebrew Computer Club +# as well as the West Coast Computer Faire and +# you might be confused different. :-) +# +supernova: sandwich + @-if [ -r .code_anal ]; then \ + ${RM} -f .code_anal_v6; \ + else \ + echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \ + fi + @echo "A $@ helps ${MAKE} the elements that help form planets" + @${TRUE} + +deep_magic: supernova + @-if [ -r .code_anal ]; then \ + ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 \ + --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + fi + @${TRUE} + +magic: deep_magic + @-if [ -r .code_anal ]; then \ + ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "If you don't eat yer meat, you can't have any pudding!"; \ + echo "How can you have any pudding if you don't eat yer meat?!"; \ + fi + @${TRUE} + +# The IOCCC resident astronomer states +# +charon: magic + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore IAU, $@ is a planet" + +pluto: charon + ${MAKE} charon + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore, $@ is a planet" + @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" diff --git a/1991/fine/README.md b/1991/fine/README.md index a7a51f518..498cb1bee 100644 --- a/1991/fine/README.md +++ b/1991/fine/README.md @@ -1,4 +1,4 @@ -Best One Liner: +# Best One Liner: Thomas A. Fine Ohio State University @@ -7,19 +7,21 @@ Best One Liner: Columbus, Ohio 43210 USA +## To build: -Judges' comments: + make all - Make and run as follows: +### To run - make fine echo "green terra - vex - tang - vend onyx - cheryl be flashy - rail - clerk" | fine +vex +tang +vend onyx +cheryl be flashy +rail +clerk" | ./fine + +## Judges' comments This filter, 80 chars plus a newline, fits into a single line on most terminals (unless your terminal has a line wrap mis-feature :-)). @@ -32,8 +34,7 @@ Judges' comments: into 2 bytes, allowing the program to still work, but also stripping the high bit off of some input? - -Selected notes from the author: +## Author's comments The author wishes to thank J Greely for the last 6 bytes. diff --git a/1991/fine/fine.c b/1991/fine/fine.c index f48cef507..b465e06f3 100644 --- a/1991/fine/fine.c +++ b/1991/fine/fine.c @@ -1 +1 @@ -main(a,b){while((a=getchar())+1)putchar((b=64^a&223)&&b<27?a&96|(b+12)%26+1:a);} +int main(int a, char **b){while((a=getchar())+1)putchar((b=64^a&223)&&(int)b<27?a&96|((int)b+12)%26+1:a);} From 43a88496f3b12cf39110076047753fc4579366e7 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 11:46:00 -0800 Subject: [PATCH 13/50] restore original 1991/rince source --- 1991/rince/rince.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/1991/rince/rince.c b/1991/rince/rince.c index 1d5d5edd5..dce39f4f6 100644 --- a/1991/rince/rince.c +++ b/1991/rince/rince.c @@ -1,12 +1,30 @@ #include -int u=484,X[]={-1,0,0,1},Y[]={0,1,-1,0},x,y,D,i,j,a; -char o,m,*t,*O="MNOH",*k="hjkl",*s="######\0######\0######\0 \0 \0 \0 ___ \0 / \\\0 \\___/\0 ___ \0 /@@@\\\0 \\@@@/\0| | /\\\0----||\0 \\/\0 /--\\\0 \\/ \0 ==| \0 ==| \0 /\\ \0 \\--/\0 /O__o\0 \\___/\0 /_\\_ \0 << \0 << \0 << \0 \0vvvvvv\0 \0 \0^^^^^^\0 \0 /\\ \0 < > \0 \\/ \0o__O\\ \0\\___/ \0 _/_\\ \0 O__O \0/----\\\0_/ \\_\0 ^__^ \0/----\\\0_/ \\_" , -M[12][22]={"AAAAAAAAAAAAAAAAAAAAAA" ,"ALCABBBBBBBABBCBBCABBA", "ACCABAKAAABAFBABABAEBA", "ABBBBABBIBBBBBEEABACLA", "ACCBNIBBAAAAGALBBBABCA", "AAAAAAAJACBABBCABAABCA", "ALLAACCBACBAAALLCABBBA", "ABDLAAABABCAAAALCABBLA", "ABCBIBBBBBBBBAAAAACBBA", "ABCCAABBADBBBBDBDBDBCA", "ALBBACCCCDBCABBBDBBBBA", "AAAAAAAAAAAAAAAAAAAAAA" };main(){initscr();clear(); -noecho();cbreak();x=y=4;D=39,o='M';m=M[y][x] ;while(D&&u){for(i=j=a=0;j<7;!(mvaddstr( +#define R break +#define U M[h][f] +#define W M[g][e] +#define T M[y][x] +#define B(a) "A"#a"A", +#define A "AAAAAAAAAAAAAAAAAAAAAA" +#define z(a) case a:if(U=='B')U=W,x=e,y=g,u--; +#define Z(a,b) else if(U==a&&d==b)U=W='B';R; +#define K(a) a##a##a +#define k(a) #a#a#a#a#a#a"\0" +#define V " \0" +#define S " \0/----\\\0_/ \\_" +int u=484,X[]={-1,0,0,1},Y[]={0,1,-1,0},x,y,D,i,j,a;char o,m,*t,*O="MNOH" +,*k="hjkl",*s=K(k(#))V V V" ___ \0 / \\\0 \\___/\0 ___ \0 /@@@\\\0 " +"\\@@@/\0| | /\\\0----||\0 \\/\0 /--\\\0 \\/ \0 ==| \0 ==| \0 " +" /\\ \0 \\--/\0 /O__o\0 \\___/\0 /_\\_ \0"K(" << \0")V k(v)V V k(^)V +" /\\ \0 < > \0 \\/ \0o__O\\ \0\\___/ \0 _/_\\ \0 O__O"S"\0 ^__^"S, +M[12][22]={A,B(LCABBBBBBBABBCBBCABB)B(CCABAKAAABAFBABABAEB +)B(BBBBABBIBBBBBEEABACL)B(CCBNIBBAAAAGALBBBABC)B(AAAAAAJACBABBCABAABC +)B(LLAACCBACBAAALLCABBB)B(BDLAAABABCAAAALCABBL)B(BCBIBBBBBBBBAAAAACBB +)B(BCCAABBADBBBBDBDBDBC)B(LBBACCCCDBCABBBDBBBB)A};main(){initscr();clear(); +noecho();cbreak();x=y=4;D=39,o='M';m=T;while(D&&u){for(i=j=a=0;j<7;!(mvaddstr( j*3+a,i*6,s+(((M[((y-1)/5)*5+j][((x-1)/10)*10+i]-'A')*3+a++)*7)),a^3)&&(a=0,! -(++i^12))&&(a=i=0,j++));refresh();M[y][x] ='B';if(t=(char*)strchr(k,getch())){int e= -x,g=y,f=x,h=y,d=t-k;o=O[d];f=(e=x+X[d])+X[d];h=(g=y+Y[d])+Y[d];switch(M[g][e] ){case -'B':x=e;y=g,u--;break ;case 'C':if(M[h][f] =='B')M[h][f] =M[g][e] ,x=e,y=g,u--; else if(M[h][f] =='C')M[h][f] =M[g][e] ='L';break ;case 'D':if(M[h][f] =='B')M[h][f] =M[g][e] ,x=e,y=g,u--; break ;case'L':x=e;y=g,u--;D ---;break ;case 'E':if(M[h][f] =='B')M[h][f] =M[g][e] ,x=e,y=g,u--; else if(M[h][f] =='I'&&d==0)M[h][f] =M[g][e] ='B';break ; case 'F':if(M[h][f] =='B')M[h][f] =M[g][e] ,x=e,y=g,u--; else if(M[h][f] =='J'&&d==1)M[h][f] =M[g][e] ='B';break ; case 'G':if(M[h][f] =='B')M[h][f] =M[g][e] ,x=e,y=g,u--; else if(M[h][f] =='K'&&d==2)M[h][f] =M[g][e] ='B';break ; }}m=M[y][x] ;M[y][x] =o;}clear();mvaddstr(12 +(++i^12))&&(a=i=0,j++));refresh();T='B';if(t=(char*)strchr(k,getch())){int e= +x,g=y,f=x,h=y,d=t-k;o=O[d];f=(e=x+X[d])+d[X];h=(g=y+Y[d])+d[Y];switch(W){case +'B':x=e;y=g,u--;R;z('C')else if(U=='C')U=W='L';R;z('D')R;case'L':x=e;y=g,u--;D +--;R;z('E')Z('I',0)z('F')Z('J',1)z('G')Z('K',2)}}m=T;T=o;}clear();mvaddstr(12 ,31,u?"Well done!":"Too many moves");move(23,0);refresh();endwin();return 0;} From 6fca374adbaf9c788e6495942110d0e063712157 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 11:49:38 -0800 Subject: [PATCH 14/50] fix 1991/rince Makefile, README.md, and source --- 1991/rince/Makefile | 714 +++++++++++++++++++++++++++++++++------- 1991/rince/README.md | 25 +- 1991/rince/rince.c | 34 +- 1991/rince/rince.orig.c | 30 -- 1991/rince/rince_ansi.c | 12 - 5 files changed, 617 insertions(+), 198 deletions(-) delete mode 100644 1991/rince/rince.orig.c delete mode 100644 1991/rince/rince_ansi.c diff --git a/1991/rince/Makefile b/1991/rince/Makefile index 57c7302a6..4944bde93 100644 --- a/1991/rince/Makefile +++ b/1991/rince/Makefile @@ -1,129 +1,617 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1991 makefile +# IOCCC 1991 winning entry - rince + +################################################################################ # -# Copyright (c) 1991, Landon Curt Noll & Larry Bassel. -# All Rights Reserved. Permission for personal, educational or non-profit -# use is granted provided this this copyright and notice are included in its -# entirety and remains unaltered. All other uses must receive prior permission -# from Landon Curt Noll and Larry Bassel. - - -SHELL=/bin/sh -MAKE=make -MAKEFLAGS=e - -# uncomment the line to select the preferred type of compile +# An Historical Makefile NOTE: # -# You should also check the ansi.mk or common.mk for the -# proper compiler name and flags. +# The orig.Makefile, if it exits, is the original Makefile before this IOCCC +# year directory was reworked so that entries are in separate directories. +# This also applies to any orig.ansi.mk and orig.common.mk files. # -# NOTE ==> USE=ansi compile with an ANSI compiler by default -#USE=ansi -# NOTE ==> USE=common compile with a common K&R compiler by default -#USE=common +# Several Makefiles were modified / formed in 2022, and as such it may have +# elements that are not historically compatible with way entries were built. +# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile. +# +# Regarding individual entries: +# +# IOCCC winning entry code may not work on your system. Even with standards, +# conditions and build environments change, especially when it comes to more +# extreme code such you might find in an IOCCC winner. Moreover, what was +# allowed and liked in one IOCCC contest may no longer be liked/allowed in +# later IOCCC years. +# +# Corrections on winning author and fixing typos in remarks are VERY WELCOME. +# +# GitHub pull requests are welcome: +# +# If you have a patch that might make running an entry work in modern Unix-like +# environments, please create a GitHub pull request for the IOCCC judges to +# consider. +# +# Suggestions and corrections regarding Makefiles, winning author information, +# fixing typos in remarks, and code patches are welcome via opening a GitHub +# issue or better yet, by creating a GitHub pull request for the IOCCC judges +# to consider. To form a GitHub issue or GitHub pull, please visit: +# +# https://github.com/ioccc-src/winner +# +################################################################################ -WINNERS= ant brnstnd buzzard cdupont davidguy dds fine rince westley +# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under: +# +# Creative Commons Attribution-ShareAlike 3.0 Unported License. +# +# See: http://creativecommons.org/licenses/by-sa/3.0/ -all: - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -k -f common.mk all; \ - ${MAKE} -k -f common.mk all; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -k -f ansi.mk all; \ - ${MAKE} -k -f ansi.mk all; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1; \ - fi -ansi: - ${MAKE} -f ansi.mk all +############################# +# shell used by this Makefile +############################# +# +SHELL= bash -common: - ${MAKE} -f common.mk all +####################### +# common tool locations +####################### +# +A2P= a2p +AR= ar +ASA= asa +AT= at +ATQ= atq +ATRM= atrm +AWK= awk +BANNER= banner +BASE64= base64 +BASENAME= basename +BATCH= batch +BC= bc +BINHEX= binhex +BISON= bison +BUNZIP2= bunzip2 +BZCAT= bzcat +BZCMP= bzcmp +BZDIFF= bzdiff +BZEGREP= bzegrep +BZFGREP= bzfgrep +BZGREP= bzgrep +BZIP2= bzip2 +BZLESS= bzless +BZMORE= bzmore +C2PH= c2ph +C89= c89 +C99= c99 +CAL= cal +CALC= calc +CAT= cat +CD= cd +CHFLAGS= chflags +CHGRP= chgrp +CHMOD= chmod +CKSUM= cksum +CLANG= clang +CLANG_PLUSPLUS= clang++ +CLEAR= clear +CMP= cmp +COL= col +COLLDEF= colldef +COLRM= colrm +COLUMN= column +COMPRESS= compress +CP= cp +CPIO= cpio +CPP= cpp +CRC32= crc32 +CSH= csh +CSPLIT= csplit +CURL= curl +CUT= cut +C_PLUSPLUS= c++ +C_PLUSPLUS_FILT= c++filt +DATE= date +DC= dc +DD= dd +DF= df +DIFF3= diff3 +DIFF= diff +DIG= dig +DIRNAME= dirname +ED= ed +EGREP= egrep +ENV= env +EQN= eqn +ETAGS= etags +EXPECT= expect +EXPR= expr +FALSE= false +FGREP= fgrep +FILE= file +FIND2PERL= find2perl +FIND= find +FLEX= flex +FLEX_PLUSPLUS= flex++ +FMT= fmt +FOLD= fold +FS_USAGE= fs_usage +FUNZIP= funzip +FUSER= fuser +GCC= gcc +GDIFFMK= gdiffmk +GENCAT= gencat +GENSTRINGS= genstrings +GETOPT= getopt +GETOPTS= getopts +GINDENT= gindent +GNUMAKE= gnumake +GREP= grep +GROFF= groff +GROFFER= groffer +GROG= grog +GROPS= grops +GROTTY= grotty +GUNZIP= gunzip +GVIM= gvim +GZCAT= gzcat +GZEXE= gzexe +GZIP_PROG= gzip +G_PLUSPLUS= g++ +H2PH= h2ph +H2XS= h2xs +HASH= hash +HEAD= head +HOSTNAME_PROG= hostname +ICONV= iconv +ID= id +INDENT= indent +INFO= info +JOT= jot +KILL= kill +KSH= ksh +LAST= last +LD= ld +LESSECHO= lessecho +LEX= len +LINK= link +LN= ln +LS= ls +M4= m4 +MAKE= make +MAN= man +MKDIR= mkdir +MKFIFO= mkfifo +MKTEMP= mktemp +MV= mv +NANO= nano +NASM= nasm +NEQN= neqn +NICE= nice +NL= nl +NM= nm +NOHUP= nohup +NROFF= nroff +NSLOOKUP= nslookup +OD= od +OPENSSL= openssl +PASTE= paste +PATCH= patch +PATHCHK= pathchk +PAX= pax +PERL= perl +PICO= pico +PR= pr +PRINTENV= printenv +PS= ps +PTAR= ptar +PTARDIFF= ptardiff +PTARGREP= ptargrep +PWD= pwd +PYDOC= pydoc +PYTHON= python +PYTHONW= pythonw +READLINK= readlink +RENICE= renice +RESET= reset +REV= rev +RI= ri +RM= rm +RMDIR= rmdir +RSYNC= rsync +RUBY= ruby +RVIM= rvim +SAY= say +SCP= scp +SCREEN= screen +SCRIPT= script +SDIFF= sdiff +SED= sed +SEQ= seq +SFTP= sftp +SH= sh +SHA1= sha1 +SHA= sha +SHAR= shar +SHASUM5_18= shasum5.18 +SHASUM= shasum +SIZE= size +SLEEP= sleep +SORT= sort +SSH= ssh +STAT= stat +STRIP= strip +STTY= stty +SUM= sum +SYNC= sync +TABS= tabs +TAIL= tail +TAR= tar +TEE= tee +TEST= test +TFTP= tftp +TIDY= tidy +TIME= time +TOP= top +TOUCH= touch +TPUT= tout +TPUT= tput +TR= tr +TROFF= troff +TRUE= true +TSET= tset +TSORT= tsort +UL= ul +UNAME= uname +UNCOMPRESS= uncompress +UNEXPAND= unexpand +UNIFDEF= unifdef +UNIFDEFALL= unifdefall +UNIQ= uniq +UNITS= units +UNLINK= unlink +UNZIP= unzip +UNZIPSFX= unzipsfx +UPTIME= uptime +UUDECODE= uudecode +UUENCODE= uuencode +UUIDGEN= uuidgen +VI= vi +VIEW= view +VIM= vim +VIMDIFF= vimdiff +W= w +WAIT4PATH= wait4path +WAIT= wait +WC= wc +WGET= wget +WHAT= what +WHATIS= whatis +WHICH= which +WHO= who +WHOAMI= whoami +WHOIS= whois +WRTIE= write +XAR= xar +XARGS= xargs +XATTR= xattr +XXD= xxd +YACC= yacc +YES= yes +ZCAT= zcat +ZCMP= zcmp +ZDIFF= zdiff +ZEGREP= zegrep +ZFGREP= zfgrep +ZFORCE= zforce +ZGREP= zgrep +ZIP= zip +ZIPCLOAK= zipcloak +ZIPGREp= zipgrep +ZIPINFo= zipinfo +ZIPNOTE= zipnote +ZIPSPLIT= zipsplit +ZLESS= zless +ZMORE= zmore +ZNEW= znew +ZPRINT= zprint +ZSH= zsh -${WINNERS} merlyn.c nextmove.c ttt_game.c: - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# Set X11_LIBDIR to the directory where the X11 library resides +# +#X11_LIBDIR= /usr/X11R6/lib +#X11_LIBDIR= /usr/X11/lib +X11_LIBDIR= /opt/X11/lib -ttt: ttt.sh - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# Set X11_INCLUDEDIR to the directory where the X11 include files reside +# +#X11_INCDIR= /usr/X11R6/include +#X11_INCDIR= /usr/X11/include +X11_INCDIR= /opt/X11/include -merlyn: merlyn.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@ \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# CWARN - Silence warnings that ${CWARN} would normally complain about +# CSILENCE -Compiler warnings +# +ifeq ($(CC),clang) -ttt_game: ttt_game.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# clang CSILENCE and CWARN +# +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-parentheses +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything ${CSILENCE} +CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -nextmove: nextmove.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +else +ifeq ($(CC),gcc) +# gcc CSILENCE and CWARN +# +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-parentheses +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +else + +# default CSILENCE and WARN +# +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-parentheses +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} + +endif +endif + +# compiler standard +# +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu90 + +# compiler bit architecture +# +# Some entries require 32-bitness: +# ARCH= -m32 +# +# Some entries require 64-bitness: +# ARCH= -m64 +# +# By default we assume nothing: +# +ARCH= + +# defines that are needed to compile +# +CDEFINE= +#CDEFINE= -DIOCCC=26 + +# include files that are needed to compile +# +CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 + +# optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +#LIBS= +LIBS= -lcurses -ltermcap +#LIBS= -L ${X11_LIBDIR} -lX11 +#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL + +# ANSI compiler +# +# Set CC to the name of your ANSI compiler. +# +# Some entries seem to need gcc. If you have gcc, set +# both CC and MAY_NEED_GCC to gcc. +# +# If you do not have gcc, set CC to the name of your ANSI compiler, and +# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : +# to disable such programs. +# +CC= cc +#CC=clang +MAY_NEED_GCC= gcc + + +############################## +# Special flags for this entry +############################## +# +ENTRY= rince +PROG= ${ENTRY} +# +OBJ= ${PROG}.o +DATA= +TARGET= ${PROG} +# +ALT_OBJ= +ALT_TARGET= + + +################# +# build the entry +################# +# +all: data ${TARGET} + @${TRUE} + +.PHONY: all alt data everything clean clobber install \ + love haste waste maker easter_egg sandwich \ + supernova deep_magic magic charon pluto + +${PROG}: ${PROG}.c + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + +# alternative executable +# +alt: data ${ALT_TARGET} + @${TRUE} + +# data files +# +data: ${DATA} + @${TRUE} + +# both all and alt +# +everything: all alt + + +############### +# utility rules +############### +# clean: - ${MAKE} -f ansi.mk clean - ${MAKE} -f common.mk clean -clobber: - ${MAKE} -f ansi.mk clobber - ${MAKE} -f common.mk clobber -nuke: clobber - ${MAKE} -f ansi.mk nuke - ${MAKE} -f common.mk nuke + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + echo ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi + +clobber: clean + ${RM} -f ${TARGET} ${ALT_TARGET} + @-if [ -e sandwich ]; then \ + ${RM} -f sandwich; \ + echo 'ate sandwich'; \ + fi + install: - ${MAKE} -f ansi.mk install - ${MAKE} -f common.mk install + @echo "Dr. Spock says that is not logical!" + @${TRUE} + +# you may be able to misunderstand the source by reading indent.c +# +indent.c: ${PROG}.c + @if which "${GINDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${GINDENT} < $< > $@"; \ + ${GINDENT} < $< > $@; \ + elif which "${INDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${INDENT} < $< > $@"; \ + ${INDENT} < $< > $@; \ + else \ + echo "no intent tool found, ident $< yourself, sorry"; \ + echo "exit 1"; \ + exit 1; \ + fi + + +################## +# 133t hacker rulz +################## +# +love: + @echo 'not war?' + @${TRUE} + +haste: + $(MAKE) waste + @${TRUE} + +waste: + @echo 'haste' + @${TRUE} + +maker: + @echo 'Participate in a maker faire' + @${TRUE} + +easter_egg: + @echo "you expected to often misunderstand this $${RANDOM} magic" + @echo "chongo '' /\\oo/\\" + @echo "Eggy" + +sandwich: easter_egg + @if [ `id -u` -eq 0 ]; then \ + echo 'Okay.'; \ + echo "$${RANDOM}`date +%s`$${RANDOM}" > $@; \ + else \ + echo 'What? Make it yourself.'; \ + exit 1; \ + fi + +# Understand the history of the Homebrew Computer Club +# as well as the West Coast Computer Faire and +# you might be confused different. :-) +# +supernova: sandwich + @-if [ -r .code_anal ]; then \ + ${RM} -f .code_anal_v6; \ + else \ + echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \ + fi + @echo "A $@ helps ${MAKE} the elements that help form planets" + @${TRUE} + +deep_magic: supernova + @-if [ -r .code_anal ]; then \ + ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 \ + --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + fi + @${TRUE} + +magic: deep_magic + @-if [ -r .code_anal ]; then \ + ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "If you don't eat yer meat, you can't have any pudding!"; \ + echo "How can you have any pudding if you don't eat yer meat?!"; \ + fi + @${TRUE} + +# The IOCCC resident astronomer states +# +charon: magic + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore IAU, $@ is a planet" + +pluto: charon + ${MAKE} charon + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore, $@ is a planet" + @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" diff --git a/1991/rince/README.md b/1991/rince/README.md index 2ab9c0060..c307fd550 100644 --- a/1991/rince/README.md +++ b/1991/rince/README.md @@ -1,4 +1,4 @@ -Best Game: +# Best Game: James Bonfield University of Warwick @@ -8,28 +8,19 @@ Best Game: SG19 2HA England +## To build: -Judges' comments: + make all - Make and run as follows: +### To run - make rince - rince + ./rince - This entry exposed a number of bugs in a number of ANSI C compilers! - Because of this, we have provided a number of different versions: +## Judges' comments - rince.orig.c - James Bonfield entry - (many non-GNU ANSI compilers can't grok this code) - rince.c - our non-ANSI version of rince.orig.c - rince_ansi.c - same as rince.c - (most ANSI C compilers can deal with this) - - You may need to change the makefile depending on what type of system - you are running. See the notes in ansi.mk or common.mk. + This entry has been updated to allow most ANSI C compiler. - -Selected notes from the author: +## Author's comments This program is a simple puzzle type game. (I'll leave you to play it to see the rest of it .. :-) .) The general idea was to try and diff --git a/1991/rince/rince.c b/1991/rince/rince.c index dce39f4f6..1d5d5edd5 100644 --- a/1991/rince/rince.c +++ b/1991/rince/rince.c @@ -1,30 +1,12 @@ #include -#define R break -#define U M[h][f] -#define W M[g][e] -#define T M[y][x] -#define B(a) "A"#a"A", -#define A "AAAAAAAAAAAAAAAAAAAAAA" -#define z(a) case a:if(U=='B')U=W,x=e,y=g,u--; -#define Z(a,b) else if(U==a&&d==b)U=W='B';R; -#define K(a) a##a##a -#define k(a) #a#a#a#a#a#a"\0" -#define V " \0" -#define S " \0/----\\\0_/ \\_" -int u=484,X[]={-1,0,0,1},Y[]={0,1,-1,0},x,y,D,i,j,a;char o,m,*t,*O="MNOH" -,*k="hjkl",*s=K(k(#))V V V" ___ \0 / \\\0 \\___/\0 ___ \0 /@@@\\\0 " -"\\@@@/\0| | /\\\0----||\0 \\/\0 /--\\\0 \\/ \0 ==| \0 ==| \0 " -" /\\ \0 \\--/\0 /O__o\0 \\___/\0 /_\\_ \0"K(" << \0")V k(v)V V k(^)V -" /\\ \0 < > \0 \\/ \0o__O\\ \0\\___/ \0 _/_\\ \0 O__O"S"\0 ^__^"S, -M[12][22]={A,B(LCABBBBBBBABBCBBCABB)B(CCABAKAAABAFBABABAEB -)B(BBBBABBIBBBBBEEABACL)B(CCBNIBBAAAAGALBBBABC)B(AAAAAAJACBABBCABAABC -)B(LLAACCBACBAAALLCABBB)B(BDLAAABABCAAAALCABBL)B(BCBIBBBBBBBBAAAAACBB -)B(BCCAABBADBBBBDBDBDBC)B(LBBACCCCDBCABBBDBBBB)A};main(){initscr();clear(); -noecho();cbreak();x=y=4;D=39,o='M';m=T;while(D&&u){for(i=j=a=0;j<7;!(mvaddstr( +int u=484,X[]={-1,0,0,1},Y[]={0,1,-1,0},x,y,D,i,j,a; +char o,m,*t,*O="MNOH",*k="hjkl",*s="######\0######\0######\0 \0 \0 \0 ___ \0 / \\\0 \\___/\0 ___ \0 /@@@\\\0 \\@@@/\0| | /\\\0----||\0 \\/\0 /--\\\0 \\/ \0 ==| \0 ==| \0 /\\ \0 \\--/\0 /O__o\0 \\___/\0 /_\\_ \0 << \0 << \0 << \0 \0vvvvvv\0 \0 \0^^^^^^\0 \0 /\\ \0 < > \0 \\/ \0o__O\\ \0\\___/ \0 _/_\\ \0 O__O \0/----\\\0_/ \\_\0 ^__^ \0/----\\\0_/ \\_" , +M[12][22]={"AAAAAAAAAAAAAAAAAAAAAA" ,"ALCABBBBBBBABBCBBCABBA", "ACCABAKAAABAFBABABAEBA", "ABBBBABBIBBBBBEEABACLA", "ACCBNIBBAAAAGALBBBABCA", "AAAAAAAJACBABBCABAABCA", "ALLAACCBACBAAALLCABBBA", "ABDLAAABABCAAAALCABBLA", "ABCBIBBBBBBBBAAAAACBBA", "ABCCAABBADBBBBDBDBDBCA", "ALBBACCCCDBCABBBDBBBBA", "AAAAAAAAAAAAAAAAAAAAAA" };main(){initscr();clear(); +noecho();cbreak();x=y=4;D=39,o='M';m=M[y][x] ;while(D&&u){for(i=j=a=0;j<7;!(mvaddstr( j*3+a,i*6,s+(((M[((y-1)/5)*5+j][((x-1)/10)*10+i]-'A')*3+a++)*7)),a^3)&&(a=0,! -(++i^12))&&(a=i=0,j++));refresh();T='B';if(t=(char*)strchr(k,getch())){int e= -x,g=y,f=x,h=y,d=t-k;o=O[d];f=(e=x+X[d])+d[X];h=(g=y+Y[d])+d[Y];switch(W){case -'B':x=e;y=g,u--;R;z('C')else if(U=='C')U=W='L';R;z('D')R;case'L':x=e;y=g,u--;D ---;R;z('E')Z('I',0)z('F')Z('J',1)z('G')Z('K',2)}}m=T;T=o;}clear();mvaddstr(12 +(++i^12))&&(a=i=0,j++));refresh();M[y][x] ='B';if(t=(char*)strchr(k,getch())){int e= +x,g=y,f=x,h=y,d=t-k;o=O[d];f=(e=x+X[d])+X[d];h=(g=y+Y[d])+Y[d];switch(M[g][e] ){case +'B':x=e;y=g,u--;break ;case 'C':if(M[h][f] =='B')M[h][f] =M[g][e] ,x=e,y=g,u--; else if(M[h][f] =='C')M[h][f] =M[g][e] ='L';break ;case 'D':if(M[h][f] =='B')M[h][f] =M[g][e] ,x=e,y=g,u--; break ;case'L':x=e;y=g,u--;D +--;break ;case 'E':if(M[h][f] =='B')M[h][f] =M[g][e] ,x=e,y=g,u--; else if(M[h][f] =='I'&&d==0)M[h][f] =M[g][e] ='B';break ; case 'F':if(M[h][f] =='B')M[h][f] =M[g][e] ,x=e,y=g,u--; else if(M[h][f] =='J'&&d==1)M[h][f] =M[g][e] ='B';break ; case 'G':if(M[h][f] =='B')M[h][f] =M[g][e] ,x=e,y=g,u--; else if(M[h][f] =='K'&&d==2)M[h][f] =M[g][e] ='B';break ; }}m=M[y][x] ;M[y][x] =o;}clear();mvaddstr(12 ,31,u?"Well done!":"Too many moves");move(23,0);refresh();endwin();return 0;} diff --git a/1991/rince/rince.orig.c b/1991/rince/rince.orig.c deleted file mode 100644 index dce39f4f6..000000000 --- a/1991/rince/rince.orig.c +++ /dev/null @@ -1,30 +0,0 @@ -#include -#define R break -#define U M[h][f] -#define W M[g][e] -#define T M[y][x] -#define B(a) "A"#a"A", -#define A "AAAAAAAAAAAAAAAAAAAAAA" -#define z(a) case a:if(U=='B')U=W,x=e,y=g,u--; -#define Z(a,b) else if(U==a&&d==b)U=W='B';R; -#define K(a) a##a##a -#define k(a) #a#a#a#a#a#a"\0" -#define V " \0" -#define S " \0/----\\\0_/ \\_" -int u=484,X[]={-1,0,0,1},Y[]={0,1,-1,0},x,y,D,i,j,a;char o,m,*t,*O="MNOH" -,*k="hjkl",*s=K(k(#))V V V" ___ \0 / \\\0 \\___/\0 ___ \0 /@@@\\\0 " -"\\@@@/\0| | /\\\0----||\0 \\/\0 /--\\\0 \\/ \0 ==| \0 ==| \0 " -" /\\ \0 \\--/\0 /O__o\0 \\___/\0 /_\\_ \0"K(" << \0")V k(v)V V k(^)V -" /\\ \0 < > \0 \\/ \0o__O\\ \0\\___/ \0 _/_\\ \0 O__O"S"\0 ^__^"S, -M[12][22]={A,B(LCABBBBBBBABBCBBCABB)B(CCABAKAAABAFBABABAEB -)B(BBBBABBIBBBBBEEABACL)B(CCBNIBBAAAAGALBBBABC)B(AAAAAAJACBABBCABAABC -)B(LLAACCBACBAAALLCABBB)B(BDLAAABABCAAAALCABBL)B(BCBIBBBBBBBBAAAAACBB -)B(BCCAABBADBBBBDBDBDBC)B(LBBACCCCDBCABBBDBBBB)A};main(){initscr();clear(); -noecho();cbreak();x=y=4;D=39,o='M';m=T;while(D&&u){for(i=j=a=0;j<7;!(mvaddstr( -j*3+a,i*6,s+(((M[((y-1)/5)*5+j][((x-1)/10)*10+i]-'A')*3+a++)*7)),a^3)&&(a=0,! -(++i^12))&&(a=i=0,j++));refresh();T='B';if(t=(char*)strchr(k,getch())){int e= -x,g=y,f=x,h=y,d=t-k;o=O[d];f=(e=x+X[d])+d[X];h=(g=y+Y[d])+d[Y];switch(W){case -'B':x=e;y=g,u--;R;z('C')else if(U=='C')U=W='L';R;z('D')R;case'L':x=e;y=g,u--;D ---;R;z('E')Z('I',0)z('F')Z('J',1)z('G')Z('K',2)}}m=T;T=o;}clear();mvaddstr(12 -,31,u?"Well done!":"Too many moves");move(23,0);refresh();endwin();return 0;} - diff --git a/1991/rince/rince_ansi.c b/1991/rince/rince_ansi.c deleted file mode 100644 index 1d5d5edd5..000000000 --- a/1991/rince/rince_ansi.c +++ /dev/null @@ -1,12 +0,0 @@ -#include -int u=484,X[]={-1,0,0,1},Y[]={0,1,-1,0},x,y,D,i,j,a; -char o,m,*t,*O="MNOH",*k="hjkl",*s="######\0######\0######\0 \0 \0 \0 ___ \0 / \\\0 \\___/\0 ___ \0 /@@@\\\0 \\@@@/\0| | /\\\0----||\0 \\/\0 /--\\\0 \\/ \0 ==| \0 ==| \0 /\\ \0 \\--/\0 /O__o\0 \\___/\0 /_\\_ \0 << \0 << \0 << \0 \0vvvvvv\0 \0 \0^^^^^^\0 \0 /\\ \0 < > \0 \\/ \0o__O\\ \0\\___/ \0 _/_\\ \0 O__O \0/----\\\0_/ \\_\0 ^__^ \0/----\\\0_/ \\_" , -M[12][22]={"AAAAAAAAAAAAAAAAAAAAAA" ,"ALCABBBBBBBABBCBBCABBA", "ACCABAKAAABAFBABABAEBA", "ABBBBABBIBBBBBEEABACLA", "ACCBNIBBAAAAGALBBBABCA", "AAAAAAAJACBABBCABAABCA", "ALLAACCBACBAAALLCABBBA", "ABDLAAABABCAAAALCABBLA", "ABCBIBBBBBBBBAAAAACBBA", "ABCCAABBADBBBBDBDBDBCA", "ALBBACCCCDBCABBBDBBBBA", "AAAAAAAAAAAAAAAAAAAAAA" };main(){initscr();clear(); -noecho();cbreak();x=y=4;D=39,o='M';m=M[y][x] ;while(D&&u){for(i=j=a=0;j<7;!(mvaddstr( -j*3+a,i*6,s+(((M[((y-1)/5)*5+j][((x-1)/10)*10+i]-'A')*3+a++)*7)),a^3)&&(a=0,! -(++i^12))&&(a=i=0,j++));refresh();M[y][x] ='B';if(t=(char*)strchr(k,getch())){int e= -x,g=y,f=x,h=y,d=t-k;o=O[d];f=(e=x+X[d])+X[d];h=(g=y+Y[d])+Y[d];switch(M[g][e] ){case -'B':x=e;y=g,u--;break ;case 'C':if(M[h][f] =='B')M[h][f] =M[g][e] ,x=e,y=g,u--; else if(M[h][f] =='C')M[h][f] =M[g][e] ='L';break ;case 'D':if(M[h][f] =='B')M[h][f] =M[g][e] ,x=e,y=g,u--; break ;case'L':x=e;y=g,u--;D ---;break ;case 'E':if(M[h][f] =='B')M[h][f] =M[g][e] ,x=e,y=g,u--; else if(M[h][f] =='I'&&d==0)M[h][f] =M[g][e] ='B';break ; case 'F':if(M[h][f] =='B')M[h][f] =M[g][e] ,x=e,y=g,u--; else if(M[h][f] =='J'&&d==1)M[h][f] =M[g][e] ='B';break ; case 'G':if(M[h][f] =='B')M[h][f] =M[g][e] ,x=e,y=g,u--; else if(M[h][f] =='K'&&d==2)M[h][f] =M[g][e] ='B';break ; }}m=M[y][x] ;M[y][x] =o;}clear();mvaddstr(12 -,31,u?"Well done!":"Too many moves");move(23,0);refresh();endwin();return 0;} - From ebac0b0cdc579278b64670f37a86dd25d68c4dc8 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 13:06:49 -0800 Subject: [PATCH 15/50] fix 1991/westley Makefile, README.md, ttt.sh --- 1991/westley/Makefile | 769 +++++++++++++++++++++++++++++++++++------ 1991/westley/README.md | 25 +- 1991/westley/ttt.sh | 2 +- 3 files changed, 672 insertions(+), 124 deletions(-) mode change 100644 => 100755 1991/westley/ttt.sh diff --git a/1991/westley/Makefile b/1991/westley/Makefile index 57c7302a6..0834f1006 100644 --- a/1991/westley/Makefile +++ b/1991/westley/Makefile @@ -1,129 +1,674 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1991 makefile +# IOCCC 1991 winning entry - westley + +################################################################################ # -# Copyright (c) 1991, Landon Curt Noll & Larry Bassel. -# All Rights Reserved. Permission for personal, educational or non-profit -# use is granted provided this this copyright and notice are included in its -# entirety and remains unaltered. All other uses must receive prior permission -# from Landon Curt Noll and Larry Bassel. - - -SHELL=/bin/sh -MAKE=make -MAKEFLAGS=e - -# uncomment the line to select the preferred type of compile +# An Historical Makefile NOTE: # -# You should also check the ansi.mk or common.mk for the -# proper compiler name and flags. +# The orig.Makefile, if it exits, is the original Makefile before this IOCCC +# year directory was reworked so that entries are in separate directories. +# This also applies to any orig.ansi.mk and orig.common.mk files. # -# NOTE ==> USE=ansi compile with an ANSI compiler by default -#USE=ansi -# NOTE ==> USE=common compile with a common K&R compiler by default -#USE=common +# Several Makefiles were modified / formed in 2022, and as such it may have +# elements that are not historically compatible with way entries were built. +# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile. +# +# Regarding individual entries: +# +# IOCCC winning entry code may not work on your system. Even with standards, +# conditions and build environments change, especially when it comes to more +# extreme code such you might find in an IOCCC winner. Moreover, what was +# allowed and liked in one IOCCC contest may no longer be liked/allowed in +# later IOCCC years. +# +# Corrections on winning author and fixing typos in remarks are VERY WELCOME. +# +# GitHub pull requests are welcome: +# +# If you have a patch that might make running an entry work in modern Unix-like +# environments, please create a GitHub pull request for the IOCCC judges to +# consider. +# +# Suggestions and corrections regarding Makefiles, winning author information, +# fixing typos in remarks, and code patches are welcome via opening a GitHub +# issue or better yet, by creating a GitHub pull request for the IOCCC judges +# to consider. To form a GitHub issue or GitHub pull, please visit: +# +# https://github.com/ioccc-src/winner +# +################################################################################ -WINNERS= ant brnstnd buzzard cdupont davidguy dds fine rince westley +# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under: +# +# Creative Commons Attribution-ShareAlike 3.0 Unported License. +# +# See: http://creativecommons.org/licenses/by-sa/3.0/ -all: - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -k -f common.mk all; \ - ${MAKE} -k -f common.mk all; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -k -f ansi.mk all; \ - ${MAKE} -k -f ansi.mk all; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1; \ - fi -ansi: - ${MAKE} -f ansi.mk all +############################# +# shell used by this Makefile +############################# +# +SHELL= bash -common: - ${MAKE} -f common.mk all +####################### +# common tool locations +####################### +# +A2P= a2p +AR= ar +ASA= asa +AT= at +ATQ= atq +ATRM= atrm +AWK= awk +BANNER= banner +BASE64= base64 +BASENAME= basename +BATCH= batch +BC= bc +BINHEX= binhex +BISON= bison +BUNZIP2= bunzip2 +BZCAT= bzcat +BZCMP= bzcmp +BZDIFF= bzdiff +BZEGREP= bzegrep +BZFGREP= bzfgrep +BZGREP= bzgrep +BZIP2= bzip2 +BZLESS= bzless +BZMORE= bzmore +C2PH= c2ph +C89= c89 +C99= c99 +CAL= cal +CALC= calc +CAT= cat +CD= cd +CHFLAGS= chflags +CHGRP= chgrp +CHMOD= chmod +CKSUM= cksum +CLANG= clang +CLANG_PLUSPLUS= clang++ +CLEAR= clear +CMP= cmp +COL= col +COLLDEF= colldef +COLRM= colrm +COLUMN= column +COMPRESS= compress +CP= cp +CPIO= cpio +CPP= cpp +CRC32= crc32 +CSH= csh +CSPLIT= csplit +CURL= curl +CUT= cut +C_PLUSPLUS= c++ +C_PLUSPLUS_FILT= c++filt +DATE= date +DC= dc +DD= dd +DF= df +DIFF3= diff3 +DIFF= diff +DIG= dig +DIRNAME= dirname +ED= ed +EGREP= egrep +ENV= env +EQN= eqn +ETAGS= etags +EXPECT= expect +EXPR= expr +FALSE= false +FGREP= fgrep +FILE= file +FIND2PERL= find2perl +FIND= find +FLEX= flex +FLEX_PLUSPLUS= flex++ +FMT= fmt +FOLD= fold +FS_USAGE= fs_usage +FUNZIP= funzip +FUSER= fuser +GCC= gcc +GDIFFMK= gdiffmk +GENCAT= gencat +GENSTRINGS= genstrings +GETOPT= getopt +GETOPTS= getopts +GINDENT= gindent +GNUMAKE= gnumake +GREP= grep +GROFF= groff +GROFFER= groffer +GROG= grog +GROPS= grops +GROTTY= grotty +GUNZIP= gunzip +GVIM= gvim +GZCAT= gzcat +GZEXE= gzexe +GZIP_PROG= gzip +G_PLUSPLUS= g++ +H2PH= h2ph +H2XS= h2xs +HASH= hash +HEAD= head +HOSTNAME_PROG= hostname +ICONV= iconv +ID= id +INDENT= indent +INFO= info +JOT= jot +KILL= kill +KSH= ksh +LAST= last +LD= ld +LESSECHO= lessecho +LEX= len +LINK= link +LN= ln +LS= ls +M4= m4 +MAKE= make +MAN= man +MKDIR= mkdir +MKFIFO= mkfifo +MKTEMP= mktemp +MV= mv +NANO= nano +NASM= nasm +NEQN= neqn +NICE= nice +NL= nl +NM= nm +NOHUP= nohup +NROFF= nroff +NSLOOKUP= nslookup +OD= od +OPENSSL= openssl +PASTE= paste +PATCH= patch +PATHCHK= pathchk +PAX= pax +PERL= perl +PICO= pico +PR= pr +PRINTENV= printenv +PS= ps +PTAR= ptar +PTARDIFF= ptardiff +PTARGREP= ptargrep +PWD= pwd +PYDOC= pydoc +PYTHON= python +PYTHONW= pythonw +READLINK= readlink +RENICE= renice +RESET= reset +REV= rev +RI= ri +RM= rm +RMDIR= rmdir +RSYNC= rsync +RUBY= ruby +RVIM= rvim +SAY= say +SCP= scp +SCREEN= screen +SCRIPT= script +SDIFF= sdiff +SED= sed +SEQ= seq +SFTP= sftp +SH= sh +SHA1= sha1 +SHA= sha +SHAR= shar +SHASUM5_18= shasum5.18 +SHASUM= shasum +SIZE= size +SLEEP= sleep +SORT= sort +SSH= ssh +STAT= stat +STRIP= strip +STTY= stty +SUM= sum +SYNC= sync +TABS= tabs +TAIL= tail +TAR= tar +TEE= tee +TEST= test +TFTP= tftp +TIDY= tidy +TIME= time +TOP= top +TOUCH= touch +TPUT= tout +TPUT= tput +TR= tr +TROFF= troff +TRUE= true +TSET= tset +TSORT= tsort +UL= ul +UNAME= uname +UNCOMPRESS= uncompress +UNEXPAND= unexpand +UNIFDEF= unifdef +UNIFDEFALL= unifdefall +UNIQ= uniq +UNITS= units +UNLINK= unlink +UNZIP= unzip +UNZIPSFX= unzipsfx +UPTIME= uptime +UUDECODE= uudecode +UUENCODE= uuencode +UUIDGEN= uuidgen +VI= vi +VIEW= view +VIM= vim +VIMDIFF= vimdiff +W= w +WAIT4PATH= wait4path +WAIT= wait +WC= wc +WGET= wget +WHAT= what +WHATIS= whatis +WHICH= which +WHO= who +WHOAMI= whoami +WHOIS= whois +WRTIE= write +XAR= xar +XARGS= xargs +XATTR= xattr +XXD= xxd +YACC= yacc +YES= yes +ZCAT= zcat +ZCMP= zcmp +ZDIFF= zdiff +ZEGREP= zegrep +ZFGREP= zfgrep +ZFORCE= zforce +ZGREP= zgrep +ZIP= zip +ZIPCLOAK= zipcloak +ZIPGREp= zipgrep +ZIPINFo= zipinfo +ZIPNOTE= zipnote +ZIPSPLIT= zipsplit +ZLESS= zless +ZMORE= zmore +ZNEW= znew +ZPRINT= zprint +ZSH= zsh -${WINNERS} merlyn.c nextmove.c ttt_game.c: - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# Set X11_LIBDIR to the directory where the X11 library resides +# +#X11_LIBDIR= /usr/X11R6/lib +#X11_LIBDIR= /usr/X11/lib +X11_LIBDIR= /opt/X11/lib +# Set X11_INCLUDEDIR to the directory where the X11 include files reside +# +#X11_INCDIR= /usr/X11R6/include +#X11_INCDIR= /usr/X11/include +X11_INCDIR= /opt/X11/include + +# CWARN - Silence warnings that ${CWARN} would normally complain about +# CSILENCE -Compiler warnings +# +ifeq ($(CC),clang) + +# clang CSILENCE and CWARN +# +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-parentheses \ + -Wno-shift-op-parentheses -Wno-return-type +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} +CWARN= -Wall -Wextra -Weverything ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} + +else +ifeq ($(CC),gcc) + +# gcc CSILENCE and CWARN +# +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-parentheses \ + -Wno-shift-op-parentheses -Wno-return-type +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +else + +# default CSILENCE and WARN +# +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-parentheses \ + -Wno-shift-op-parentheses -Wno-return-type +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything ${CSILENCE} +#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} + +endif +endif + +# compiler standard +# +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu90 + +# compiler bit architecture +# +# Some entries require 32-bitness: +# ARCH= -m32 +# +# Some entries require 64-bitness: +# ARCH= -m64 +# +# By default we assume nothing: +# +ARCH= + +# defines that are needed to compile +# +#CDEFINE= +CDEFINE= -DP=putchar -DN="P(10)" -DQ="P(34)" -DF="S(&X)" \ + -DJ=z[4] -DK=J[14] \ + -DH="w[]={146,7,292,73,448,56,84,273,325,297,108,324,22,40,48,40,17,325}" + +# include files that are needed to compile +# +CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 + +# optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +LIBS= +#LIBS= -lm +#LIBS= -L ${X11_LIBDIR} -lX11 +#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL + +# ANSI compiler +# +# Set CC to the name of your ANSI compiler. +# +# Some entries seem to need gcc. If you have gcc, set +# both CC and MAY_NEED_GCC to gcc. +# +# If you do not have gcc, set CC to the name of your ANSI compiler, and +# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : +# to disable such programs. +# +CC= cc +#CC=clang +MAY_NEED_GCC= gcc + + +############################## +# Special flags for this entry +############################## +# +ENTRY= westley +PROG= ${ENTRY} +# +OBJ= ${PROG}.o +DATA= +TARGET= ${PROG} ttt +# +ALT_OBJ= +ALT_TARGET= + + +################# +# build the entry +################# +# +all: data ${TARGET} + @${TRUE} + +.PHONY: all alt data everything clean clobber install \ + love haste waste maker easter_egg sandwich \ + supernova deep_magic magic charon pluto + +${PROG}: ${PROG}.c + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + +# alternative executable +# +alt: data ${ALT_TARGET} + @${TRUE} + +# the hint file gives nextmove.c as an example, provide a build rule for it +# +nextmove: nextmove.c ttt + ${CC} ${CFLAGS} -DP=putchar -DN="P(10)" -DQ="P(34)" -DF="S(&X)" \ + -DJ=z[4] -DK=J[14] \ + -DH="w[]={146,7,292,73,448,56,84,273,325,297,108,324,22,40,48,40,17,325}" \ + nextmove.c -o nextmove + +# the ttt script has been added by the judges to make playing westley easy +# ttt: ttt.sh - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi + ${RM} -f ttt + ${CP} -f ttt.sh ttt + ${CHMOD} +x ttt -merlyn: merlyn.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@ \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# used by the ttt shell script when playing westley +# +# The ttt script controls what goes into merlyn.c, and how it is used. +# The merlyn program and source represent the best (hopefully) state that +# the program has evolved into thus far. The ttt_game program and source +# represent the current state of the game. +# +merlyn: merlyn.c ttt + @${CC} ${CFLAGS} -DP=putchar -DN="P(10)" -DQ="P(34)" -DF="S(&X)" \ + -DJ=z[4] -DK=J[14] \ + -DH="w[]={146,7,292,73,448,56,84,273,325,297,108,324,22,40,48,40,17,325}" \ + merlyn.c -o merlyn +ttt_game: ttt_game.c ttt + @${CC} ${CFLAGS} -DP=putchar -DN="P(10)" -DQ="P(34)" -DF="S(&X)" \ + -DJ=z[4] -DK=J[14] \ + -DH="w[]={146,7,292,73,448,56,84,273,325,297,108,324,22,40,48,40,17,325}" \ + ttt_game.c -o ttt_game -ttt_game: ttt_game.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# The upper level makefile wants to make these source files if they don't +# already exist. +# +merlyn.c: westley.c + ${RM} -f merlyn.c + ${CP} -f westley.c merlyn.c + ${CHMOD} +w merlyn.c +nextmove.c: westley.c + ${RM} -f nextmove.c + ${CP} -f westley.c nextmove.c + ${CHMOD} +w nextmove.c +ttt_game.c: westley.c + ${RM} -f ttt_game.c + ${CP} -f westley.c ttt_game.c + ${CHMOD} +w ttt_game.c -nextmove: nextmove.c - -@if [ "${USE}" = "common" ]; then \ - echo ${MAKE} -f common.mk $@; \ - ${MAKE} -f common.mk $@; \ - elif [ "${USE}" = "ansi" ]; then \ - echo ${MAKE} -f ansi.mk $@; \ - ${MAKE} -f ansi.mk $@; \ - else \ - echo "set USE= in Makefile to be ansi or common as desired"; \ - echo "or type: make -f ansi.mk for ansi makes"; \ - echo "or type: make -f common.mk for common K&R makes"; \ - exit 1;\ - fi +# data files +# +data: ${DATA} + @${TRUE} +# both all and alt +# +everything: all alt + + +############### +# utility rules +############### +# clean: - ${MAKE} -f ansi.mk clean - ${MAKE} -f common.mk clean -clobber: - ${MAKE} -f ansi.mk clobber - ${MAKE} -f common.mk clobber -nuke: clobber - ${MAKE} -f ansi.mk nuke - ${MAKE} -f common.mk nuke + ${RM} -f ${OBJ} ${ALT_OBJ} + ${RM} -f new_merlyn.c + @-if [ -f indent.c ]; then \ + echo ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi + +clobber: clean + ${RM} -f ${TARGET} ${ALT_TARGET} + ${RM} -f merlyn merlyn.c nextmove.c nextmove.c + ${RM} -f ttt_game ttt_game.c ttt_old.c ttt_new.c nextmove + @-if [ -e sandwich ]; then \ + ${RM} -f sandwich; \ + echo 'ate sandwich'; \ + fi + install: - ${MAKE} -f ansi.mk install - ${MAKE} -f common.mk install + @echo "Dr. Spock says that is not logical!" + @${TRUE} + +# you may be able to misunderstand the source by reading indent.c +# +indent.c: ${PROG}.c + @if which "${GINDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${GINDENT} < $< > $@"; \ + ${GINDENT} < $< > $@; \ + elif which "${INDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${INDENT} < $< > $@"; \ + ${INDENT} < $< > $@; \ + else \ + echo "no intent tool found, ident $< yourself, sorry"; \ + echo "exit 1"; \ + exit 1; \ + fi + + +################## +# 133t hacker rulz +################## +# +love: + @echo 'not war?' + @${TRUE} + +haste: + $(MAKE) waste + @${TRUE} + +waste: + @echo 'haste' + @${TRUE} + +maker: + @echo 'Participate in a maker faire' + @${TRUE} + +easter_egg: + @echo "you expected to often misunderstand this $${RANDOM} magic" + @echo "chongo '' /\\oo/\\" + @echo "Eggy" + +sandwich: easter_egg + @if [ `id -u` -eq 0 ]; then \ + echo 'Okay.'; \ + echo "$${RANDOM}`date +%s`$${RANDOM}" > $@; \ + else \ + echo 'What? Make it yourself.'; \ + exit 1; \ + fi + +# Understand the history of the Homebrew Computer Club +# as well as the West Coast Computer Faire and +# you might be confused different. :-) +# +supernova: sandwich + @-if [ -r .code_anal ]; then \ + ${RM} -f .code_anal_v6; \ + else \ + echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \ + fi + @echo "A $@ helps ${MAKE} the elements that help form planets" + @${TRUE} + +deep_magic: supernova + @-if [ -r .code_anal ]; then \ + ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 \ + --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + fi + @${TRUE} + +magic: deep_magic + @-if [ -r .code_anal ]; then \ + ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "If you don't eat yer meat, you can't have any pudding!"; \ + echo "How can you have any pudding if you don't eat yer meat?!"; \ + fi + @${TRUE} + +# The IOCCC resident astronomer states +# +charon: magic + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore IAU, $@ is a planet" + +pluto: charon + ${MAKE} charon + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore, $@ is a planet" + @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" diff --git a/1991/westley/README.md b/1991/westley/README.md index b66225efd..9397b175a 100644 --- a/1991/westley/README.md +++ b/1991/westley/README.md @@ -1,17 +1,19 @@ -Grand Prize: +# Grand Prize: Brian Westley (Merlyn LeRoy on usenet) DigiBoard, Inc. 1026 Blair Ave. St. Paul, MN 55104 USA +## To build: -Judges' comments: + make all + +### To run Make and run as follows: - make westley - westley [move_location] | tee nextmove.c + ./westley [move_location] | tee nextmove.c where the 'move_location' is a digit from 1 to 9 that represents a move on a tic-tac-toe board: @@ -24,25 +26,26 @@ Judges' comments: next move, recompile nextmove.c and play it again: make nextmove - nextmove move_location | tee nextmove.c + ./nextmove move_location | tee nextmove.c + +## Judges' comments We have provided the shell script, ttt, to make it easier to play the game: make ttt - ttt [first_move] <- omit first arg to have it move first - ttt next_move + ./ttt [first_move] <- omit first arg to have it move first + ./ttt next_move The shell script determines when the game is over, and automatically replaces merlyn.c with an improved version after a loss. The ttt script has two other modes: - ttt quitgame <- cancel any game in process, revert to merlyn.c - ttt clobber <- remove all game files, revert to original source + ./ttt quitgame <- cancel any game in process, revert to merlyn.c + ./ttt clobber <- remove all game files, revert to original source Try not to cheat, the computer has not learned how to catch you doing it. - -Selected notes from the author: +## Author's comments A tic-tac-toe self-modifying program that "learns". This C program plays standard tic-tac-toe on itself. The code is written as a diff --git a/1991/westley/ttt.sh b/1991/westley/ttt.sh old mode 100644 new mode 100755 index b17d91fbf..f5a37adcb --- a/1991/westley/ttt.sh +++ b/1991/westley/ttt.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # # play tic-tac-toe From e86100b024628c1c1bb3025b0859eae0d878f7b2 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 14:16:46 -0800 Subject: [PATCH 16/50] add initial .gitignore files per entry chmod +x 2014/sinon/glock.sh 2014/sinon/hecate.sh --- .gitignore | 2 -- 1984/anonymous/.gitignore | 1 + 1984/decot/.gitignore | 1 + 1984/laman/.gitignore | 1 + 1984/mullender/.gitignore | 1 + 1985/applin/.gitignore | 1 + 1985/august/.gitignore | 1 + 1985/shapiro/.gitignore | 1 + 1985/sicherman/.gitignore | 1 + 1986/applin/.gitignore | 1 + 1986/august/.gitignore | 1 + 1986/hague/.gitignore | 1 + 1986/holloway/.gitignore | 1 + 1986/marshall/.gitignore | 1 + 1986/stein/.gitignore | 2 ++ 1986/wall/.gitignore | 1 + 1987/heckbert/.gitignore | 1 + 1987/hines/.gitignore | 1 + 1987/korn/.gitignore | 1 + 1987/lievaart/.gitignore | 2 ++ 1987/wall/.gitignore | 1 + 1987/westley/.gitignore | 1 + 1988/applin/.gitignore | 3 +++ 1988/dale/.gitignore | 1 + 1988/isaak/.gitignore | 1 + 1988/litmaath/.gitignore | 1 + 1988/phillipps/.gitignore | 1 + 1988/reddy/.gitignore | 1 + 1988/robison/.gitignore | 1 + 1988/spinellis/.gitignore | 1 + 1988/westley/.gitignore | 1 + 1989/fubar/.gitignore | 1 + 1989/jar.1/.gitignore | 1 + 1989/jar.2/.gitignore | 1 + 1989/ovdluhe/.gitignore | 1 + 1989/paul/.gitignore | 1 + 1989/robison/.gitignore | 1 + 1989/roemer/.gitignore | 1 + 1989/tromp/.gitignore | 1 + 1989/vanb/.gitignore | 1 + 1989/westley/.gitignore | 1 + 1990/baruch/.gitignore | 1 + 1990/cmills/.gitignore | 1 + 1990/dds/.gitignore | 1 + 1990/dg/.gitignore | 1 + 1990/jaw/.gitignore | 3 +++ 1990/pjr/.gitignore | 1 + 1990/scjones/.gitignore | 1 + 1990/stig/.gitignore | 3 +++ 1990/tbr/.gitignore | 1 + 1990/theorem/.gitignore | 5 +++++ 1990/westley/.gitignore | 1 + 1991/ant/.gitignore | 1 + 1991/brnstnd/.gitignore | 1 + 1991/buzzard/.gitignore | 1 + 1991/cdupont/.gitignore | 1 + 1991/davidguy/.gitignore | 1 + 1991/dds/.gitignore | 1 + 1991/fine/.gitignore | 1 + 1991/rince/.gitignore | 1 + 1991/westley/.gitignore | 8 ++++++++ 1992/adrian/.gitignore | 1 + 1992/albert/.gitignore | 1 + 1992/ant/.gitignore | 1 + 1992/buzzard.1/.gitignore | 1 + 1992/buzzard.2/.gitignore | 1 + 1992/gson/.gitignore | 1 + 1992/imc/.gitignore | 1 + 1992/kivinen/.gitignore | 1 + 1992/lush/.gitignore | 1 + 1992/marangon/.gitignore | 1 + 1992/nathan/.gitignore | 1 + 1992/vern/.gitignore | 1 + 1992/westley/.gitignore | 1 + 1993/ant/.gitignore | 1 + 1993/cmills/.gitignore | 1 + 1993/dgibson/.gitignore | 1 + 1993/ejb/.gitignore | 1 + 1993/jonth/.gitignore | 1 + 1993/leo/.gitignore | 1 + 1993/lmfjyh/.gitignore | 1 + 1993/plummer/.gitignore | 1 + 1993/rince/.gitignore | 1 + 1993/schnitzi/.gitignore | 1 + 1993/vanb/.gitignore | 1 + 1994/dodsond1/.gitignore | 1 + 1994/dodsond2/.gitignore | 1 + 1994/horton/.gitignore | 1 + 1994/imc/.gitignore | 1 + 1994/ldb/.gitignore | 1 + 1994/schnitzi/.gitignore | 1 + 1994/shapiro/.gitignore | 1 + 1994/smr/.gitignore | 1 + 1994/tvr/.gitignore | 1 + 1994/weisberg/.gitignore | 1 + 1994/westley/.gitignore | 1 + 1995/cdua/.gitignore | 1 + 1995/dodsond1/.gitignore | 1 + 1995/dodsond2/.gitignore | 1 + 1995/esde/.gitignore | 1 + 1995/garry/.gitignore | 1 + 1995/heathbar/.gitignore | 1 + 1995/leo/.gitignore | 1 + 1995/makarios/.gitignore | 1 + 1995/savastio/.gitignore | 1 + 1995/schnitzi/.gitignore | 1 + 1995/spinellis/.gitignore | 1 + 1995/vanschnitz/.gitignore | 1 + 1996/august/.gitignore | 1 + 1996/dalbec/.gitignore | 1 + 1996/eldby/.gitignore | 1 + 1996/gandalf/.gitignore | 1 + 1996/huffman/.gitignore | 1 + 1996/jonth/.gitignore | 1 + 1996/rcm/.gitignore | 1 + 1996/schweikh1/.gitignore | 1 + 1996/schweikh2/.gitignore | 1 + 1996/schweikh3/.gitignore | 1 + 1996/westley/.gitignore | 1 + 1998/banks/.gitignore | 1 + 1998/bas1/.gitignore | 1 + 1998/bas2/.gitignore | 1 + 1998/chaos/.gitignore | 1 + 1998/df/.gitignore | 1 + 1998/dlowe/.gitignore | 1 + 1998/dloweneil/.gitignore | 1 + 1998/dorssel/.gitignore | 1 + 1998/fanf/.gitignore | 1 + 1998/schnitzi/.gitignore | 1 + 1998/schweikh1/.gitignore | 1 + 1998/schweikh2/.gitignore | 1 + 1998/schweikh3/.gitignore | 1 + 1998/tomtorfs/.gitignore | 1 + 2000/anderson/.gitignore | 1 + 2000/bellard/.gitignore | 1 + 2000/bmeyer/.gitignore | 1 + 2000/briddlebane/.gitignore | 1 + 2000/dhyang/.gitignore | 1 + 2000/dlowe/.gitignore | 1 + 2000/jarijyrki/.gitignore | 1 + 2000/natori/.gitignore | 1 + 2000/primenum/.gitignore | 1 + 2000/rince/.gitignore | 1 + 2000/robison/.gitignore | 1 + 2000/schneiderwent/.gitignore | 1 + 2000/thadgavin/.gitignore | 1 + 2000/tomx/.gitignore | 1 + 2001/anonymous/.gitignore | 1 + 2001/bellard/.gitignore | 1 + 2001/cheong/.gitignore | 1 + 2001/coupard/.gitignore | 1 + 2001/ctk/.gitignore | 1 + 2001/dgbeards/.gitignore | 1 + 2001/herrmann1/.gitignore | 1 + 2001/herrmann2/.gitignore | 1 + 2001/jason/.gitignore | 1 + 2001/kev/.gitignore | 1 + 2001/ollinger/.gitignore | 1 + 2001/rosten/.gitignore | 1 + 2001/schweikh/.gitignore | 1 + 2001/westley/.gitignore | 1 + 2001/williams/.gitignore | 1 + 2004/anonymous/.gitignore | 1 + 2004/arachnid/.gitignore | 1 + 2004/burley/.gitignore | 1 + 2004/gavare/.gitignore | 1 + 2004/gavin/.gitignore | 1 + 2004/hibachi/.gitignore | 1 + 2004/hoyle/.gitignore | 1 + 2004/jdalbec/.gitignore | 1 + 2004/kopczynski/.gitignore | 1 + 2004/newbern/.gitignore | 1 + 2004/omoikane/.gitignore | 1 + 2004/schnitzi/.gitignore | 1 + 2004/sds/.gitignore | 1 + 2004/vik1/.gitignore | 1 + 2004/vik2/.gitignore | 1 + 2006/birken/.gitignore | 1 + 2006/borsanyi/.gitignore | 1 + 2006/grothe/.gitignore | 1 + 2006/hamre/.gitignore | 1 + 2006/meyer/.gitignore | 1 + 2006/monge/.gitignore | 1 + 2006/night/.gitignore | 1 + 2006/sloane/.gitignore | 1 + 2006/stewart/.gitignore | 1 + 2006/sykes1/.gitignore | 1 + 2006/sykes2/.gitignore | 1 + 2006/toledo1/.gitignore | 1 + 2006/toledo2/.gitignore | 1 + 2006/toledo3/.gitignore | 1 + 2011/akari/.gitignore | 1 + 2011/blakely/.gitignore | 1 + 2011/borsanyi/.gitignore | 1 + 2011/dlowe/.gitignore | 1 + 2011/eastman/.gitignore | 1 + 2011/fredriksson/.gitignore | 1 + 2011/goren/.gitignore | 1 + 2011/hamaji/.gitignore | 1 + 2011/hou/.gitignore | 1 + 2011/konno/.gitignore | 1 + 2011/richards/.gitignore | 1 + 2011/toledo/.gitignore | 1 + 2011/vik/.gitignore | 1 + 2011/zucker/.gitignore | 1 + 2012/blakely/.gitignore | 1 + 2012/deckmyn/.gitignore | 1 + 2012/dlowe/.gitignore | 1 + 2012/endoh1/.gitignore | 1 + 2012/endoh2/.gitignore | 1 + 2012/grothe/.gitignore | 1 + 2012/hamano/.gitignore | 1 + 2012/hou/.gitignore | 1 + 2012/kang/.gitignore | 1 + 2012/konno/.gitignore | 1 + 2012/omoikane/.gitignore | 1 + 2012/tromp/.gitignore | 1 + 2012/vik/.gitignore | 1 + 2012/zeitak/.gitignore | 1 + 2013/birken/.gitignore | 3 +++ 2013/cable1/.gitignore | 1 + 2013/cable2/.gitignore | 7 +++++++ 2013/cable3/.gitignore | 1 + 2013/dlowe/.gitignore | 1 + 2013/endoh1/.gitignore | 4 ++++ 2013/endoh2/.gitignore | 4 ++++ 2013/endoh3/.gitignore | 1 + 2013/endoh4/.gitignore | 2 ++ 2013/hou/.gitignore | 3 +++ 2013/mills/.gitignore | 1 + 2013/misaka/.gitignore | 18 ++++++++++++++++++ 2013/morgan1/.gitignore | 1 + 2013/morgan2/.gitignore | 1 + 2013/robison/.gitignore | 1 + 2014/birken/.gitignore | 1 + 2014/deak/.gitignore | 1 + 2014/endoh1/.gitignore | 3 +++ 2014/endoh2/.gitignore | 1 + 2014/maffiodo1/.gitignore | 1 + 2014/maffiodo2/.gitignore | 1 + 2014/morgan/.gitignore | 1 + 2014/sinon/.gitignore | 2 ++ 2014/sinon/glock.sh | 0 2014/sinon/hecate.sh | 0 2014/skeggs/.gitignore | 1 + 2014/vik/.gitignore | 1 + 2014/wiedijk/.gitignore | 1 + 2015/burton/.gitignore | 1 + 2015/dogon/.gitignore | 1 + 2015/duble/.gitignore | 1 + 2015/endoh1/.gitignore | 9 +++++++++ 2015/endoh2/.gitignore | 1 + 2015/endoh3/.gitignore | 1 + 2015/endoh4/.gitignore | 1 + 2015/hou/.gitignore | 2 ++ 2015/howe/.gitignore | 1 + 2015/mills1/.gitignore | 1 + 2015/mills2/.gitignore | 1 + 2015/muth/.gitignore | 1 + 2015/schweikhardt/.gitignore | 1 + 2015/yang/.gitignore | 7 +++++++ 2018/algmyr/.gitignore | 1 + 2018/anderson/.gitignore | 1 + 2018/bellard/.gitignore | 1 + 2018/burton1/.gitignore | 2 ++ 2018/burton2/.gitignore | 2 ++ 2018/ciura/.gitignore | 1 + 2018/endoh1/.gitignore | 1 + 2018/endoh2/.gitignore | 1 + 2018/ferguson/.gitignore | 5 +++++ 2018/giles/.gitignore | 1 + 2018/hou/.gitignore | 1 + 2018/mills/.gitignore | 9 +++++++++ 2018/poikola/.gitignore | 1 + 2018/vokes/.gitignore | 1 + 2018/yang/.gitignore | 12 ++++++++++++ 2019/adamovsky/.gitignore | 4 ++++ 2019/burton/.gitignore | 2 ++ 2019/ciura/.gitignore | 1 + 2019/diels-grabsch1/.gitignore | 1 + 2019/diels-grabsch2/.gitignore | 1 + 2019/dogon/.gitignore | 1 + 2019/duble/.gitignore | 2 ++ 2019/endoh/.gitignore | 1 + 2019/giles/.gitignore | 1 + 2019/karns/.gitignore | 1 + 2019/lynn/.gitignore | 1 + 2019/mills/.gitignore | 22 ++++++++++++++++++++++ 2019/poikola/.gitignore | 1 + 2019/yang/.gitignore | 1 + 2020/burton/.gitignore | 4 ++++ 2020/carlini/.gitignore | 1 + 2020/endoh1/.gitignore | 1 + 2020/endoh2/.gitignore | 1 + 2020/endoh3/.gitignore | 4 ++++ 2020/ferguson1/.gitignore | 1 + 2020/ferguson2/.gitignore | 2 ++ 2020/giles/.gitignore | 1 + 2020/kurdyukov1/.gitignore | 1 + 2020/kurdyukov2/.gitignore | 1 + 2020/kurdyukov3/.gitignore | 1 + 2020/kurdyukov4/.gitignore | 1 + 2020/otterness/.gitignore | 1 + 2020/tsoj/.gitignore | 1 + 2020/yang/.gitignore | 1 + 305 files changed, 431 insertions(+), 2 deletions(-) create mode 100644 1984/anonymous/.gitignore create mode 100644 1984/decot/.gitignore create mode 100644 1984/laman/.gitignore create mode 100644 1984/mullender/.gitignore create mode 100644 1985/applin/.gitignore create mode 100644 1985/august/.gitignore create mode 100644 1985/shapiro/.gitignore create mode 100644 1985/sicherman/.gitignore create mode 100644 1986/applin/.gitignore create mode 100644 1986/august/.gitignore create mode 100644 1986/hague/.gitignore create mode 100644 1986/holloway/.gitignore create mode 100644 1986/marshall/.gitignore create mode 100644 1986/stein/.gitignore create mode 100644 1986/wall/.gitignore create mode 100644 1987/heckbert/.gitignore create mode 100644 1987/hines/.gitignore create mode 100644 1987/korn/.gitignore create mode 100644 1987/lievaart/.gitignore create mode 100644 1987/wall/.gitignore create mode 100644 1987/westley/.gitignore create mode 100644 1988/applin/.gitignore create mode 100644 1988/dale/.gitignore create mode 100644 1988/isaak/.gitignore create mode 100644 1988/litmaath/.gitignore create mode 100644 1988/phillipps/.gitignore create mode 100644 1988/reddy/.gitignore create mode 100644 1988/robison/.gitignore create mode 100644 1988/spinellis/.gitignore create mode 100644 1988/westley/.gitignore create mode 100644 1989/fubar/.gitignore create mode 100644 1989/jar.1/.gitignore create mode 100644 1989/jar.2/.gitignore create mode 100644 1989/ovdluhe/.gitignore create mode 100644 1989/paul/.gitignore create mode 100644 1989/robison/.gitignore create mode 100644 1989/roemer/.gitignore create mode 100644 1989/tromp/.gitignore create mode 100644 1989/vanb/.gitignore create mode 100644 1989/westley/.gitignore create mode 100644 1990/baruch/.gitignore create mode 100644 1990/cmills/.gitignore create mode 100644 1990/dds/.gitignore create mode 100644 1990/dg/.gitignore create mode 100644 1990/jaw/.gitignore create mode 100644 1990/pjr/.gitignore create mode 100644 1990/scjones/.gitignore create mode 100644 1990/stig/.gitignore create mode 100644 1990/tbr/.gitignore create mode 100644 1990/theorem/.gitignore create mode 100644 1990/westley/.gitignore create mode 100644 1991/ant/.gitignore create mode 100644 1991/brnstnd/.gitignore create mode 100644 1991/buzzard/.gitignore create mode 100644 1991/cdupont/.gitignore create mode 100644 1991/davidguy/.gitignore create mode 100644 1991/dds/.gitignore create mode 100644 1991/fine/.gitignore create mode 100644 1991/rince/.gitignore create mode 100644 1991/westley/.gitignore create mode 100644 1992/adrian/.gitignore create mode 100644 1992/albert/.gitignore create mode 100644 1992/ant/.gitignore create mode 100644 1992/buzzard.1/.gitignore create mode 100644 1992/buzzard.2/.gitignore create mode 100644 1992/gson/.gitignore create mode 100644 1992/imc/.gitignore create mode 100644 1992/kivinen/.gitignore create mode 100644 1992/lush/.gitignore create mode 100644 1992/marangon/.gitignore create mode 100644 1992/nathan/.gitignore create mode 100644 1992/vern/.gitignore create mode 100644 1992/westley/.gitignore create mode 100644 1993/ant/.gitignore create mode 100644 1993/cmills/.gitignore create mode 100644 1993/dgibson/.gitignore create mode 100644 1993/ejb/.gitignore create mode 100644 1993/jonth/.gitignore create mode 100644 1993/leo/.gitignore create mode 100644 1993/lmfjyh/.gitignore create mode 100644 1993/plummer/.gitignore create mode 100644 1993/rince/.gitignore create mode 100644 1993/schnitzi/.gitignore create mode 100644 1993/vanb/.gitignore create mode 100644 1994/dodsond1/.gitignore create mode 100644 1994/dodsond2/.gitignore create mode 100644 1994/horton/.gitignore create mode 100644 1994/imc/.gitignore create mode 100644 1994/ldb/.gitignore create mode 100644 1994/schnitzi/.gitignore create mode 100644 1994/shapiro/.gitignore create mode 100644 1994/smr/.gitignore create mode 100644 1994/tvr/.gitignore create mode 100644 1994/weisberg/.gitignore create mode 100644 1994/westley/.gitignore create mode 100644 1995/cdua/.gitignore create mode 100644 1995/dodsond1/.gitignore create mode 100644 1995/dodsond2/.gitignore create mode 100644 1995/esde/.gitignore create mode 100644 1995/garry/.gitignore create mode 100644 1995/heathbar/.gitignore create mode 100644 1995/leo/.gitignore create mode 100644 1995/makarios/.gitignore create mode 100644 1995/savastio/.gitignore create mode 100644 1995/schnitzi/.gitignore create mode 100644 1995/spinellis/.gitignore create mode 100644 1995/vanschnitz/.gitignore create mode 100644 1996/august/.gitignore create mode 100644 1996/dalbec/.gitignore create mode 100644 1996/eldby/.gitignore create mode 100644 1996/gandalf/.gitignore create mode 100644 1996/huffman/.gitignore create mode 100644 1996/jonth/.gitignore create mode 100644 1996/rcm/.gitignore create mode 100644 1996/schweikh1/.gitignore create mode 100644 1996/schweikh2/.gitignore create mode 100644 1996/schweikh3/.gitignore create mode 100644 1996/westley/.gitignore create mode 100644 1998/banks/.gitignore create mode 100644 1998/bas1/.gitignore create mode 100644 1998/bas2/.gitignore create mode 100644 1998/chaos/.gitignore create mode 100644 1998/df/.gitignore create mode 100644 1998/dlowe/.gitignore create mode 100644 1998/dloweneil/.gitignore create mode 100644 1998/dorssel/.gitignore create mode 100644 1998/fanf/.gitignore create mode 100644 1998/schnitzi/.gitignore create mode 100644 1998/schweikh1/.gitignore create mode 100644 1998/schweikh2/.gitignore create mode 100644 1998/schweikh3/.gitignore create mode 100644 1998/tomtorfs/.gitignore create mode 100644 2000/anderson/.gitignore create mode 100644 2000/bellard/.gitignore create mode 100644 2000/bmeyer/.gitignore create mode 100644 2000/briddlebane/.gitignore create mode 100644 2000/dhyang/.gitignore create mode 100644 2000/dlowe/.gitignore create mode 100644 2000/jarijyrki/.gitignore create mode 100644 2000/natori/.gitignore create mode 100644 2000/primenum/.gitignore create mode 100644 2000/rince/.gitignore create mode 100644 2000/robison/.gitignore create mode 100644 2000/schneiderwent/.gitignore create mode 100644 2000/thadgavin/.gitignore create mode 100644 2000/tomx/.gitignore create mode 100644 2001/anonymous/.gitignore create mode 100644 2001/bellard/.gitignore create mode 100644 2001/cheong/.gitignore create mode 100644 2001/coupard/.gitignore create mode 100644 2001/ctk/.gitignore create mode 100644 2001/dgbeards/.gitignore create mode 100644 2001/herrmann1/.gitignore create mode 100644 2001/herrmann2/.gitignore create mode 100644 2001/jason/.gitignore create mode 100644 2001/kev/.gitignore create mode 100644 2001/ollinger/.gitignore create mode 100644 2001/rosten/.gitignore create mode 100644 2001/schweikh/.gitignore create mode 100644 2001/westley/.gitignore create mode 100644 2001/williams/.gitignore create mode 100644 2004/anonymous/.gitignore create mode 100644 2004/arachnid/.gitignore create mode 100644 2004/burley/.gitignore create mode 100644 2004/gavare/.gitignore create mode 100644 2004/gavin/.gitignore create mode 100644 2004/hibachi/.gitignore create mode 100644 2004/hoyle/.gitignore create mode 100644 2004/jdalbec/.gitignore create mode 100644 2004/kopczynski/.gitignore create mode 100644 2004/newbern/.gitignore create mode 100644 2004/omoikane/.gitignore create mode 100644 2004/schnitzi/.gitignore create mode 100644 2004/sds/.gitignore create mode 100644 2004/vik1/.gitignore create mode 100644 2004/vik2/.gitignore create mode 100644 2006/birken/.gitignore create mode 100644 2006/borsanyi/.gitignore create mode 100644 2006/grothe/.gitignore create mode 100644 2006/hamre/.gitignore create mode 100644 2006/meyer/.gitignore create mode 100644 2006/monge/.gitignore create mode 100644 2006/night/.gitignore create mode 100644 2006/sloane/.gitignore create mode 100644 2006/stewart/.gitignore create mode 100644 2006/sykes1/.gitignore create mode 100644 2006/sykes2/.gitignore create mode 100644 2006/toledo1/.gitignore create mode 100644 2006/toledo2/.gitignore create mode 100644 2006/toledo3/.gitignore create mode 100644 2011/akari/.gitignore create mode 100644 2011/blakely/.gitignore create mode 100644 2011/borsanyi/.gitignore create mode 100644 2011/dlowe/.gitignore create mode 100644 2011/eastman/.gitignore create mode 100644 2011/fredriksson/.gitignore create mode 100644 2011/goren/.gitignore create mode 100644 2011/hamaji/.gitignore create mode 100644 2011/hou/.gitignore create mode 100644 2011/konno/.gitignore create mode 100644 2011/richards/.gitignore create mode 100644 2011/toledo/.gitignore create mode 100644 2011/vik/.gitignore create mode 100644 2011/zucker/.gitignore create mode 100644 2012/blakely/.gitignore create mode 100644 2012/deckmyn/.gitignore create mode 100644 2012/dlowe/.gitignore create mode 100644 2012/endoh1/.gitignore create mode 100644 2012/endoh2/.gitignore create mode 100644 2012/grothe/.gitignore create mode 100644 2012/hamano/.gitignore create mode 100644 2012/hou/.gitignore create mode 100644 2012/kang/.gitignore create mode 100644 2012/konno/.gitignore create mode 100644 2012/omoikane/.gitignore create mode 100644 2012/tromp/.gitignore create mode 100644 2012/vik/.gitignore create mode 100644 2012/zeitak/.gitignore create mode 100644 2013/birken/.gitignore create mode 100644 2013/cable1/.gitignore create mode 100644 2013/cable2/.gitignore create mode 100644 2013/cable3/.gitignore create mode 100644 2013/dlowe/.gitignore create mode 100644 2013/endoh1/.gitignore create mode 100644 2013/endoh2/.gitignore create mode 100644 2013/endoh3/.gitignore create mode 100644 2013/endoh4/.gitignore create mode 100644 2013/hou/.gitignore create mode 100644 2013/mills/.gitignore create mode 100644 2013/misaka/.gitignore create mode 100644 2013/morgan1/.gitignore create mode 100644 2013/morgan2/.gitignore create mode 100644 2013/robison/.gitignore create mode 100644 2014/birken/.gitignore create mode 100644 2014/deak/.gitignore create mode 100644 2014/endoh1/.gitignore create mode 100644 2014/endoh2/.gitignore create mode 100644 2014/maffiodo1/.gitignore create mode 100644 2014/maffiodo2/.gitignore create mode 100644 2014/morgan/.gitignore create mode 100644 2014/sinon/.gitignore mode change 100644 => 100755 2014/sinon/glock.sh mode change 100644 => 100755 2014/sinon/hecate.sh create mode 100644 2014/skeggs/.gitignore create mode 100644 2014/vik/.gitignore create mode 100644 2014/wiedijk/.gitignore create mode 100644 2015/burton/.gitignore create mode 100644 2015/dogon/.gitignore create mode 100644 2015/duble/.gitignore create mode 100644 2015/endoh1/.gitignore create mode 100644 2015/endoh2/.gitignore create mode 100644 2015/endoh3/.gitignore create mode 100644 2015/endoh4/.gitignore create mode 100644 2015/hou/.gitignore create mode 100644 2015/howe/.gitignore create mode 100644 2015/mills1/.gitignore create mode 100644 2015/mills2/.gitignore create mode 100644 2015/muth/.gitignore create mode 100644 2015/schweikhardt/.gitignore create mode 100644 2015/yang/.gitignore create mode 100644 2018/algmyr/.gitignore create mode 100644 2018/anderson/.gitignore create mode 100644 2018/bellard/.gitignore create mode 100644 2018/burton1/.gitignore create mode 100644 2018/burton2/.gitignore create mode 100644 2018/ciura/.gitignore create mode 100644 2018/endoh1/.gitignore create mode 100644 2018/endoh2/.gitignore create mode 100644 2018/ferguson/.gitignore create mode 100644 2018/giles/.gitignore create mode 100644 2018/hou/.gitignore create mode 100644 2018/mills/.gitignore create mode 100644 2018/poikola/.gitignore create mode 100644 2018/vokes/.gitignore create mode 100644 2018/yang/.gitignore create mode 100644 2019/adamovsky/.gitignore create mode 100644 2019/burton/.gitignore create mode 100644 2019/ciura/.gitignore create mode 100644 2019/diels-grabsch1/.gitignore create mode 100644 2019/diels-grabsch2/.gitignore create mode 100644 2019/dogon/.gitignore create mode 100644 2019/duble/.gitignore create mode 100644 2019/endoh/.gitignore create mode 100644 2019/giles/.gitignore create mode 100644 2019/karns/.gitignore create mode 100644 2019/lynn/.gitignore create mode 100644 2019/mills/.gitignore create mode 100644 2019/poikola/.gitignore create mode 100644 2019/yang/.gitignore create mode 100644 2020/burton/.gitignore create mode 100644 2020/carlini/.gitignore create mode 100644 2020/endoh1/.gitignore create mode 100644 2020/endoh2/.gitignore create mode 100644 2020/endoh3/.gitignore create mode 100644 2020/ferguson2/.gitignore create mode 100644 2020/giles/.gitignore create mode 100644 2020/kurdyukov1/.gitignore create mode 100644 2020/kurdyukov2/.gitignore create mode 100644 2020/kurdyukov3/.gitignore create mode 100644 2020/kurdyukov4/.gitignore create mode 100644 2020/otterness/.gitignore create mode 100644 2020/tsoj/.gitignore create mode 100644 2020/yang/.gitignore diff --git a/.gitignore b/.gitignore index 4264b3818..cb8267a07 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,4 @@ /archive/2018/ /archive/2019/ /archive/2020/ -alt.prog mkentry -prog diff --git a/1984/anonymous/.gitignore b/1984/anonymous/.gitignore new file mode 100644 index 000000000..ed6d4bce0 --- /dev/null +++ b/1984/anonymous/.gitignore @@ -0,0 +1 @@ +anonymous diff --git a/1984/decot/.gitignore b/1984/decot/.gitignore new file mode 100644 index 000000000..44d155e10 --- /dev/null +++ b/1984/decot/.gitignore @@ -0,0 +1 @@ +decot diff --git a/1984/laman/.gitignore b/1984/laman/.gitignore new file mode 100644 index 000000000..0723ff8d6 --- /dev/null +++ b/1984/laman/.gitignore @@ -0,0 +1 @@ +laman diff --git a/1984/mullender/.gitignore b/1984/mullender/.gitignore new file mode 100644 index 000000000..995d74a91 --- /dev/null +++ b/1984/mullender/.gitignore @@ -0,0 +1 @@ +mullender diff --git a/1985/applin/.gitignore b/1985/applin/.gitignore new file mode 100644 index 000000000..65b2a0f49 --- /dev/null +++ b/1985/applin/.gitignore @@ -0,0 +1 @@ +applin diff --git a/1985/august/.gitignore b/1985/august/.gitignore new file mode 100644 index 000000000..36c24223d --- /dev/null +++ b/1985/august/.gitignore @@ -0,0 +1 @@ +august diff --git a/1985/shapiro/.gitignore b/1985/shapiro/.gitignore new file mode 100644 index 000000000..9912ed2e4 --- /dev/null +++ b/1985/shapiro/.gitignore @@ -0,0 +1 @@ +shapiro diff --git a/1985/sicherman/.gitignore b/1985/sicherman/.gitignore new file mode 100644 index 000000000..82b0ebb1e --- /dev/null +++ b/1985/sicherman/.gitignore @@ -0,0 +1 @@ +sicherman diff --git a/1986/applin/.gitignore b/1986/applin/.gitignore new file mode 100644 index 000000000..65b2a0f49 --- /dev/null +++ b/1986/applin/.gitignore @@ -0,0 +1 @@ +applin diff --git a/1986/august/.gitignore b/1986/august/.gitignore new file mode 100644 index 000000000..36c24223d --- /dev/null +++ b/1986/august/.gitignore @@ -0,0 +1 @@ +august diff --git a/1986/hague/.gitignore b/1986/hague/.gitignore new file mode 100644 index 000000000..6d1bd4618 --- /dev/null +++ b/1986/hague/.gitignore @@ -0,0 +1 @@ +hague diff --git a/1986/holloway/.gitignore b/1986/holloway/.gitignore new file mode 100644 index 000000000..47d139d24 --- /dev/null +++ b/1986/holloway/.gitignore @@ -0,0 +1 @@ +holloway diff --git a/1986/marshall/.gitignore b/1986/marshall/.gitignore new file mode 100644 index 000000000..461019cfd --- /dev/null +++ b/1986/marshall/.gitignore @@ -0,0 +1 @@ +marshall diff --git a/1986/stein/.gitignore b/1986/stein/.gitignore new file mode 100644 index 000000000..941454984 --- /dev/null +++ b/1986/stein/.gitignore @@ -0,0 +1,2 @@ +a.out +stein diff --git a/1986/wall/.gitignore b/1986/wall/.gitignore new file mode 100644 index 000000000..8d40b1eda --- /dev/null +++ b/1986/wall/.gitignore @@ -0,0 +1 @@ +wall diff --git a/1987/heckbert/.gitignore b/1987/heckbert/.gitignore new file mode 100644 index 000000000..9733e438c --- /dev/null +++ b/1987/heckbert/.gitignore @@ -0,0 +1 @@ +heckbert diff --git a/1987/hines/.gitignore b/1987/hines/.gitignore new file mode 100644 index 000000000..d95f2717a --- /dev/null +++ b/1987/hines/.gitignore @@ -0,0 +1 @@ +hines diff --git a/1987/korn/.gitignore b/1987/korn/.gitignore new file mode 100644 index 000000000..e537c34cc --- /dev/null +++ b/1987/korn/.gitignore @@ -0,0 +1 @@ +korn diff --git a/1987/lievaart/.gitignore b/1987/lievaart/.gitignore new file mode 100644 index 000000000..dd7c87acf --- /dev/null +++ b/1987/lievaart/.gitignore @@ -0,0 +1,2 @@ +lievaart +lievaart2 diff --git a/1987/wall/.gitignore b/1987/wall/.gitignore new file mode 100644 index 000000000..8d40b1eda --- /dev/null +++ b/1987/wall/.gitignore @@ -0,0 +1 @@ +wall diff --git a/1987/westley/.gitignore b/1987/westley/.gitignore new file mode 100644 index 000000000..2a0c890f9 --- /dev/null +++ b/1987/westley/.gitignore @@ -0,0 +1 @@ +westley diff --git a/1988/applin/.gitignore b/1988/applin/.gitignore new file mode 100644 index 000000000..a612d2239 --- /dev/null +++ b/1988/applin/.gitignore @@ -0,0 +1,3 @@ +applin +large.c +zsmall diff --git a/1988/dale/.gitignore b/1988/dale/.gitignore new file mode 100644 index 000000000..1328948de --- /dev/null +++ b/1988/dale/.gitignore @@ -0,0 +1 @@ +dale diff --git a/1988/isaak/.gitignore b/1988/isaak/.gitignore new file mode 100644 index 000000000..5514b6845 --- /dev/null +++ b/1988/isaak/.gitignore @@ -0,0 +1 @@ +isaak diff --git a/1988/litmaath/.gitignore b/1988/litmaath/.gitignore new file mode 100644 index 000000000..5722bebf5 --- /dev/null +++ b/1988/litmaath/.gitignore @@ -0,0 +1 @@ +litmaath diff --git a/1988/phillipps/.gitignore b/1988/phillipps/.gitignore new file mode 100644 index 000000000..d9a2e652b --- /dev/null +++ b/1988/phillipps/.gitignore @@ -0,0 +1 @@ +phillipps diff --git a/1988/reddy/.gitignore b/1988/reddy/.gitignore new file mode 100644 index 000000000..a7e8e8ce4 --- /dev/null +++ b/1988/reddy/.gitignore @@ -0,0 +1 @@ +reddy diff --git a/1988/robison/.gitignore b/1988/robison/.gitignore new file mode 100644 index 000000000..c124d1dbc --- /dev/null +++ b/1988/robison/.gitignore @@ -0,0 +1 @@ +robison diff --git a/1988/spinellis/.gitignore b/1988/spinellis/.gitignore new file mode 100644 index 000000000..5cf5145a5 --- /dev/null +++ b/1988/spinellis/.gitignore @@ -0,0 +1 @@ +spinellis diff --git a/1988/westley/.gitignore b/1988/westley/.gitignore new file mode 100644 index 000000000..2a0c890f9 --- /dev/null +++ b/1988/westley/.gitignore @@ -0,0 +1 @@ +westley diff --git a/1989/fubar/.gitignore b/1989/fubar/.gitignore new file mode 100644 index 000000000..d894f2906 --- /dev/null +++ b/1989/fubar/.gitignore @@ -0,0 +1 @@ +fubar diff --git a/1989/jar.1/.gitignore b/1989/jar.1/.gitignore new file mode 100644 index 000000000..c4791d11a --- /dev/null +++ b/1989/jar.1/.gitignore @@ -0,0 +1 @@ +jar.1 diff --git a/1989/jar.2/.gitignore b/1989/jar.2/.gitignore new file mode 100644 index 000000000..f445be170 --- /dev/null +++ b/1989/jar.2/.gitignore @@ -0,0 +1 @@ +jar.2 diff --git a/1989/ovdluhe/.gitignore b/1989/ovdluhe/.gitignore new file mode 100644 index 000000000..14b8483be --- /dev/null +++ b/1989/ovdluhe/.gitignore @@ -0,0 +1 @@ +ovdluhe diff --git a/1989/paul/.gitignore b/1989/paul/.gitignore new file mode 100644 index 000000000..ea015f609 --- /dev/null +++ b/1989/paul/.gitignore @@ -0,0 +1 @@ +paul diff --git a/1989/robison/.gitignore b/1989/robison/.gitignore new file mode 100644 index 000000000..c124d1dbc --- /dev/null +++ b/1989/robison/.gitignore @@ -0,0 +1 @@ +robison diff --git a/1989/roemer/.gitignore b/1989/roemer/.gitignore new file mode 100644 index 000000000..f50dd86a6 --- /dev/null +++ b/1989/roemer/.gitignore @@ -0,0 +1 @@ +roemer diff --git a/1989/tromp/.gitignore b/1989/tromp/.gitignore new file mode 100644 index 000000000..48d35ef74 --- /dev/null +++ b/1989/tromp/.gitignore @@ -0,0 +1 @@ +tromp diff --git a/1989/vanb/.gitignore b/1989/vanb/.gitignore new file mode 100644 index 000000000..c0fa8eb22 --- /dev/null +++ b/1989/vanb/.gitignore @@ -0,0 +1 @@ +vanb diff --git a/1989/westley/.gitignore b/1989/westley/.gitignore new file mode 100644 index 000000000..2a0c890f9 --- /dev/null +++ b/1989/westley/.gitignore @@ -0,0 +1 @@ +westley diff --git a/1990/baruch/.gitignore b/1990/baruch/.gitignore new file mode 100644 index 000000000..20e5ca7fd --- /dev/null +++ b/1990/baruch/.gitignore @@ -0,0 +1 @@ +baruch diff --git a/1990/cmills/.gitignore b/1990/cmills/.gitignore new file mode 100644 index 000000000..931adc228 --- /dev/null +++ b/1990/cmills/.gitignore @@ -0,0 +1 @@ +cmills diff --git a/1990/dds/.gitignore b/1990/dds/.gitignore new file mode 100644 index 000000000..d7985d043 --- /dev/null +++ b/1990/dds/.gitignore @@ -0,0 +1 @@ +dds diff --git a/1990/dg/.gitignore b/1990/dg/.gitignore new file mode 100644 index 000000000..943f7b015 --- /dev/null +++ b/1990/dg/.gitignore @@ -0,0 +1 @@ +dg diff --git a/1990/jaw/.gitignore b/1990/jaw/.gitignore new file mode 100644 index 000000000..b52d4cb82 --- /dev/null +++ b/1990/jaw/.gitignore @@ -0,0 +1,3 @@ +atob +jaw +zcat diff --git a/1990/pjr/.gitignore b/1990/pjr/.gitignore new file mode 100644 index 000000000..f1d5f5301 --- /dev/null +++ b/1990/pjr/.gitignore @@ -0,0 +1 @@ +pjr diff --git a/1990/scjones/.gitignore b/1990/scjones/.gitignore new file mode 100644 index 000000000..1b2174ab1 --- /dev/null +++ b/1990/scjones/.gitignore @@ -0,0 +1 @@ +scjones diff --git a/1990/stig/.gitignore b/1990/stig/.gitignore new file mode 100644 index 000000000..e3cc04a9f --- /dev/null +++ b/1990/stig/.gitignore @@ -0,0 +1,3 @@ +o +o.c +stig diff --git a/1990/tbr/.gitignore b/1990/tbr/.gitignore new file mode 100644 index 000000000..1e7f77674 --- /dev/null +++ b/1990/tbr/.gitignore @@ -0,0 +1 @@ +tbr diff --git a/1990/theorem/.gitignore b/1990/theorem/.gitignore new file mode 100644 index 000000000..e523870b9 --- /dev/null +++ b/1990/theorem/.gitignore @@ -0,0 +1,5 @@ +fibonacci +fibonacci.c +sorter +sorter.c +theorem diff --git a/1990/westley/.gitignore b/1990/westley/.gitignore new file mode 100644 index 000000000..2a0c890f9 --- /dev/null +++ b/1990/westley/.gitignore @@ -0,0 +1 @@ +westley diff --git a/1991/ant/.gitignore b/1991/ant/.gitignore new file mode 100644 index 000000000..59b09c9c8 --- /dev/null +++ b/1991/ant/.gitignore @@ -0,0 +1 @@ +ant diff --git a/1991/brnstnd/.gitignore b/1991/brnstnd/.gitignore new file mode 100644 index 000000000..30030af9d --- /dev/null +++ b/1991/brnstnd/.gitignore @@ -0,0 +1 @@ +brnstnd diff --git a/1991/buzzard/.gitignore b/1991/buzzard/.gitignore new file mode 100644 index 000000000..5caf57610 --- /dev/null +++ b/1991/buzzard/.gitignore @@ -0,0 +1 @@ +buzzard diff --git a/1991/cdupont/.gitignore b/1991/cdupont/.gitignore new file mode 100644 index 000000000..0c3243e3b --- /dev/null +++ b/1991/cdupont/.gitignore @@ -0,0 +1 @@ +cdupont diff --git a/1991/davidguy/.gitignore b/1991/davidguy/.gitignore new file mode 100644 index 000000000..77ebabb35 --- /dev/null +++ b/1991/davidguy/.gitignore @@ -0,0 +1 @@ +davidguy diff --git a/1991/dds/.gitignore b/1991/dds/.gitignore new file mode 100644 index 000000000..d7985d043 --- /dev/null +++ b/1991/dds/.gitignore @@ -0,0 +1 @@ +dds diff --git a/1991/fine/.gitignore b/1991/fine/.gitignore new file mode 100644 index 000000000..86815ca75 --- /dev/null +++ b/1991/fine/.gitignore @@ -0,0 +1 @@ +fine diff --git a/1991/rince/.gitignore b/1991/rince/.gitignore new file mode 100644 index 000000000..8e87c9d18 --- /dev/null +++ b/1991/rince/.gitignore @@ -0,0 +1 @@ +rince diff --git a/1991/westley/.gitignore b/1991/westley/.gitignore new file mode 100644 index 000000000..afba99c52 --- /dev/null +++ b/1991/westley/.gitignore @@ -0,0 +1,8 @@ +merlyn +merlyn.c +nextmove +nextmove.c +ttt +ttt_game +ttt_game.c +westley diff --git a/1992/adrian/.gitignore b/1992/adrian/.gitignore new file mode 100644 index 000000000..b1b4723da --- /dev/null +++ b/1992/adrian/.gitignore @@ -0,0 +1 @@ +adrian diff --git a/1992/albert/.gitignore b/1992/albert/.gitignore new file mode 100644 index 000000000..f6de83234 --- /dev/null +++ b/1992/albert/.gitignore @@ -0,0 +1 @@ +albert diff --git a/1992/ant/.gitignore b/1992/ant/.gitignore new file mode 100644 index 000000000..59b09c9c8 --- /dev/null +++ b/1992/ant/.gitignore @@ -0,0 +1 @@ +ant diff --git a/1992/buzzard.1/.gitignore b/1992/buzzard.1/.gitignore new file mode 100644 index 000000000..ea60d3e25 --- /dev/null +++ b/1992/buzzard.1/.gitignore @@ -0,0 +1 @@ +buzzard.1 diff --git a/1992/buzzard.2/.gitignore b/1992/buzzard.2/.gitignore new file mode 100644 index 000000000..d970c21aa --- /dev/null +++ b/1992/buzzard.2/.gitignore @@ -0,0 +1 @@ +buzzard.2 diff --git a/1992/gson/.gitignore b/1992/gson/.gitignore new file mode 100644 index 000000000..17752ddd6 --- /dev/null +++ b/1992/gson/.gitignore @@ -0,0 +1 @@ +gson diff --git a/1992/imc/.gitignore b/1992/imc/.gitignore new file mode 100644 index 000000000..eb3fb586e --- /dev/null +++ b/1992/imc/.gitignore @@ -0,0 +1 @@ +imc diff --git a/1992/kivinen/.gitignore b/1992/kivinen/.gitignore new file mode 100644 index 000000000..d0ccb8fd5 --- /dev/null +++ b/1992/kivinen/.gitignore @@ -0,0 +1 @@ +kivinen diff --git a/1992/lush/.gitignore b/1992/lush/.gitignore new file mode 100644 index 000000000..be0910751 --- /dev/null +++ b/1992/lush/.gitignore @@ -0,0 +1 @@ +lush diff --git a/1992/marangon/.gitignore b/1992/marangon/.gitignore new file mode 100644 index 000000000..d5d39567a --- /dev/null +++ b/1992/marangon/.gitignore @@ -0,0 +1 @@ +marangon diff --git a/1992/nathan/.gitignore b/1992/nathan/.gitignore new file mode 100644 index 000000000..2abfe6cf3 --- /dev/null +++ b/1992/nathan/.gitignore @@ -0,0 +1 @@ +nathan diff --git a/1992/vern/.gitignore b/1992/vern/.gitignore new file mode 100644 index 000000000..420cacfdf --- /dev/null +++ b/1992/vern/.gitignore @@ -0,0 +1 @@ +vern diff --git a/1992/westley/.gitignore b/1992/westley/.gitignore new file mode 100644 index 000000000..2a0c890f9 --- /dev/null +++ b/1992/westley/.gitignore @@ -0,0 +1 @@ +westley diff --git a/1993/ant/.gitignore b/1993/ant/.gitignore new file mode 100644 index 000000000..59b09c9c8 --- /dev/null +++ b/1993/ant/.gitignore @@ -0,0 +1 @@ +ant diff --git a/1993/cmills/.gitignore b/1993/cmills/.gitignore new file mode 100644 index 000000000..931adc228 --- /dev/null +++ b/1993/cmills/.gitignore @@ -0,0 +1 @@ +cmills diff --git a/1993/dgibson/.gitignore b/1993/dgibson/.gitignore new file mode 100644 index 000000000..409faa207 --- /dev/null +++ b/1993/dgibson/.gitignore @@ -0,0 +1 @@ +dgibson diff --git a/1993/ejb/.gitignore b/1993/ejb/.gitignore new file mode 100644 index 000000000..a05a37517 --- /dev/null +++ b/1993/ejb/.gitignore @@ -0,0 +1 @@ +ejb diff --git a/1993/jonth/.gitignore b/1993/jonth/.gitignore new file mode 100644 index 000000000..e2b0f9ceb --- /dev/null +++ b/1993/jonth/.gitignore @@ -0,0 +1 @@ +jonth diff --git a/1993/leo/.gitignore b/1993/leo/.gitignore new file mode 100644 index 000000000..d26b7dc79 --- /dev/null +++ b/1993/leo/.gitignore @@ -0,0 +1 @@ +leo diff --git a/1993/lmfjyh/.gitignore b/1993/lmfjyh/.gitignore new file mode 100644 index 000000000..7d153f367 --- /dev/null +++ b/1993/lmfjyh/.gitignore @@ -0,0 +1 @@ +lmfjyh diff --git a/1993/plummer/.gitignore b/1993/plummer/.gitignore new file mode 100644 index 000000000..0ce7bbccf --- /dev/null +++ b/1993/plummer/.gitignore @@ -0,0 +1 @@ +plummer diff --git a/1993/rince/.gitignore b/1993/rince/.gitignore new file mode 100644 index 000000000..8e87c9d18 --- /dev/null +++ b/1993/rince/.gitignore @@ -0,0 +1 @@ +rince diff --git a/1993/schnitzi/.gitignore b/1993/schnitzi/.gitignore new file mode 100644 index 000000000..563ae8705 --- /dev/null +++ b/1993/schnitzi/.gitignore @@ -0,0 +1 @@ +schnitzi diff --git a/1993/vanb/.gitignore b/1993/vanb/.gitignore new file mode 100644 index 000000000..c0fa8eb22 --- /dev/null +++ b/1993/vanb/.gitignore @@ -0,0 +1 @@ +vanb diff --git a/1994/dodsond1/.gitignore b/1994/dodsond1/.gitignore new file mode 100644 index 000000000..e95d5d7e8 --- /dev/null +++ b/1994/dodsond1/.gitignore @@ -0,0 +1 @@ +dodsond1 diff --git a/1994/dodsond2/.gitignore b/1994/dodsond2/.gitignore new file mode 100644 index 000000000..66d8e0add --- /dev/null +++ b/1994/dodsond2/.gitignore @@ -0,0 +1 @@ +dodsond2 diff --git a/1994/horton/.gitignore b/1994/horton/.gitignore new file mode 100644 index 000000000..bb28a6992 --- /dev/null +++ b/1994/horton/.gitignore @@ -0,0 +1 @@ +horton diff --git a/1994/imc/.gitignore b/1994/imc/.gitignore new file mode 100644 index 000000000..eb3fb586e --- /dev/null +++ b/1994/imc/.gitignore @@ -0,0 +1 @@ +imc diff --git a/1994/ldb/.gitignore b/1994/ldb/.gitignore new file mode 100644 index 000000000..ee4dfc7fc --- /dev/null +++ b/1994/ldb/.gitignore @@ -0,0 +1 @@ +ldb diff --git a/1994/schnitzi/.gitignore b/1994/schnitzi/.gitignore new file mode 100644 index 000000000..563ae8705 --- /dev/null +++ b/1994/schnitzi/.gitignore @@ -0,0 +1 @@ +schnitzi diff --git a/1994/shapiro/.gitignore b/1994/shapiro/.gitignore new file mode 100644 index 000000000..9912ed2e4 --- /dev/null +++ b/1994/shapiro/.gitignore @@ -0,0 +1 @@ +shapiro diff --git a/1994/smr/.gitignore b/1994/smr/.gitignore new file mode 100644 index 000000000..7c1b2274f --- /dev/null +++ b/1994/smr/.gitignore @@ -0,0 +1 @@ +smr diff --git a/1994/tvr/.gitignore b/1994/tvr/.gitignore new file mode 100644 index 000000000..c681d6557 --- /dev/null +++ b/1994/tvr/.gitignore @@ -0,0 +1 @@ +tvr diff --git a/1994/weisberg/.gitignore b/1994/weisberg/.gitignore new file mode 100644 index 000000000..59d69f5d6 --- /dev/null +++ b/1994/weisberg/.gitignore @@ -0,0 +1 @@ +weisberg diff --git a/1994/westley/.gitignore b/1994/westley/.gitignore new file mode 100644 index 000000000..2a0c890f9 --- /dev/null +++ b/1994/westley/.gitignore @@ -0,0 +1 @@ +westley diff --git a/1995/cdua/.gitignore b/1995/cdua/.gitignore new file mode 100644 index 000000000..ab8a83b7e --- /dev/null +++ b/1995/cdua/.gitignore @@ -0,0 +1 @@ +cdua diff --git a/1995/dodsond1/.gitignore b/1995/dodsond1/.gitignore new file mode 100644 index 000000000..e95d5d7e8 --- /dev/null +++ b/1995/dodsond1/.gitignore @@ -0,0 +1 @@ +dodsond1 diff --git a/1995/dodsond2/.gitignore b/1995/dodsond2/.gitignore new file mode 100644 index 000000000..66d8e0add --- /dev/null +++ b/1995/dodsond2/.gitignore @@ -0,0 +1 @@ +dodsond2 diff --git a/1995/esde/.gitignore b/1995/esde/.gitignore new file mode 100644 index 000000000..cef3ba5b0 --- /dev/null +++ b/1995/esde/.gitignore @@ -0,0 +1 @@ +esde diff --git a/1995/garry/.gitignore b/1995/garry/.gitignore new file mode 100644 index 000000000..49349a9ab --- /dev/null +++ b/1995/garry/.gitignore @@ -0,0 +1 @@ +garry diff --git a/1995/heathbar/.gitignore b/1995/heathbar/.gitignore new file mode 100644 index 000000000..4037f15f0 --- /dev/null +++ b/1995/heathbar/.gitignore @@ -0,0 +1 @@ +heathbar diff --git a/1995/leo/.gitignore b/1995/leo/.gitignore new file mode 100644 index 000000000..d26b7dc79 --- /dev/null +++ b/1995/leo/.gitignore @@ -0,0 +1 @@ +leo diff --git a/1995/makarios/.gitignore b/1995/makarios/.gitignore new file mode 100644 index 000000000..c1edbccda --- /dev/null +++ b/1995/makarios/.gitignore @@ -0,0 +1 @@ +makarios diff --git a/1995/savastio/.gitignore b/1995/savastio/.gitignore new file mode 100644 index 000000000..4e2dcaafa --- /dev/null +++ b/1995/savastio/.gitignore @@ -0,0 +1 @@ +savastio diff --git a/1995/schnitzi/.gitignore b/1995/schnitzi/.gitignore new file mode 100644 index 000000000..563ae8705 --- /dev/null +++ b/1995/schnitzi/.gitignore @@ -0,0 +1 @@ +schnitzi diff --git a/1995/spinellis/.gitignore b/1995/spinellis/.gitignore new file mode 100644 index 000000000..5cf5145a5 --- /dev/null +++ b/1995/spinellis/.gitignore @@ -0,0 +1 @@ +spinellis diff --git a/1995/vanschnitz/.gitignore b/1995/vanschnitz/.gitignore new file mode 100644 index 000000000..a2fcd7db7 --- /dev/null +++ b/1995/vanschnitz/.gitignore @@ -0,0 +1 @@ +vanschnitz diff --git a/1996/august/.gitignore b/1996/august/.gitignore new file mode 100644 index 000000000..36c24223d --- /dev/null +++ b/1996/august/.gitignore @@ -0,0 +1 @@ +august diff --git a/1996/dalbec/.gitignore b/1996/dalbec/.gitignore new file mode 100644 index 000000000..9740628a3 --- /dev/null +++ b/1996/dalbec/.gitignore @@ -0,0 +1 @@ +dalbec diff --git a/1996/eldby/.gitignore b/1996/eldby/.gitignore new file mode 100644 index 000000000..6fffc035b --- /dev/null +++ b/1996/eldby/.gitignore @@ -0,0 +1 @@ +eldby diff --git a/1996/gandalf/.gitignore b/1996/gandalf/.gitignore new file mode 100644 index 000000000..235474030 --- /dev/null +++ b/1996/gandalf/.gitignore @@ -0,0 +1 @@ +gandalf diff --git a/1996/huffman/.gitignore b/1996/huffman/.gitignore new file mode 100644 index 000000000..1f0e8c24c --- /dev/null +++ b/1996/huffman/.gitignore @@ -0,0 +1 @@ +huffman diff --git a/1996/jonth/.gitignore b/1996/jonth/.gitignore new file mode 100644 index 000000000..e2b0f9ceb --- /dev/null +++ b/1996/jonth/.gitignore @@ -0,0 +1 @@ +jonth diff --git a/1996/rcm/.gitignore b/1996/rcm/.gitignore new file mode 100644 index 000000000..13274c8d4 --- /dev/null +++ b/1996/rcm/.gitignore @@ -0,0 +1 @@ +rcm diff --git a/1996/schweikh1/.gitignore b/1996/schweikh1/.gitignore new file mode 100644 index 000000000..72fbca3a7 --- /dev/null +++ b/1996/schweikh1/.gitignore @@ -0,0 +1 @@ +schweikh1 diff --git a/1996/schweikh2/.gitignore b/1996/schweikh2/.gitignore new file mode 100644 index 000000000..85e3bc2d7 --- /dev/null +++ b/1996/schweikh2/.gitignore @@ -0,0 +1 @@ +schweikh2 diff --git a/1996/schweikh3/.gitignore b/1996/schweikh3/.gitignore new file mode 100644 index 000000000..fc8e75c24 --- /dev/null +++ b/1996/schweikh3/.gitignore @@ -0,0 +1 @@ +schweikh3 diff --git a/1996/westley/.gitignore b/1996/westley/.gitignore new file mode 100644 index 000000000..2a0c890f9 --- /dev/null +++ b/1996/westley/.gitignore @@ -0,0 +1 @@ +westley diff --git a/1998/banks/.gitignore b/1998/banks/.gitignore new file mode 100644 index 000000000..745245b44 --- /dev/null +++ b/1998/banks/.gitignore @@ -0,0 +1 @@ +banks diff --git a/1998/bas1/.gitignore b/1998/bas1/.gitignore new file mode 100644 index 000000000..c3202efb6 --- /dev/null +++ b/1998/bas1/.gitignore @@ -0,0 +1 @@ +bas1 diff --git a/1998/bas2/.gitignore b/1998/bas2/.gitignore new file mode 100644 index 000000000..be2054eb2 --- /dev/null +++ b/1998/bas2/.gitignore @@ -0,0 +1 @@ +bas2 diff --git a/1998/chaos/.gitignore b/1998/chaos/.gitignore new file mode 100644 index 000000000..508f200d6 --- /dev/null +++ b/1998/chaos/.gitignore @@ -0,0 +1 @@ +chaos diff --git a/1998/df/.gitignore b/1998/df/.gitignore new file mode 100644 index 000000000..781e137cc --- /dev/null +++ b/1998/df/.gitignore @@ -0,0 +1 @@ +df diff --git a/1998/dlowe/.gitignore b/1998/dlowe/.gitignore new file mode 100644 index 000000000..e0deed35d --- /dev/null +++ b/1998/dlowe/.gitignore @@ -0,0 +1 @@ +dlowe diff --git a/1998/dloweneil/.gitignore b/1998/dloweneil/.gitignore new file mode 100644 index 000000000..fa8cdf80d --- /dev/null +++ b/1998/dloweneil/.gitignore @@ -0,0 +1 @@ +dloweneil diff --git a/1998/dorssel/.gitignore b/1998/dorssel/.gitignore new file mode 100644 index 000000000..0a2f15060 --- /dev/null +++ b/1998/dorssel/.gitignore @@ -0,0 +1 @@ +dorssel diff --git a/1998/fanf/.gitignore b/1998/fanf/.gitignore new file mode 100644 index 000000000..218e919f9 --- /dev/null +++ b/1998/fanf/.gitignore @@ -0,0 +1 @@ +fanf diff --git a/1998/schnitzi/.gitignore b/1998/schnitzi/.gitignore new file mode 100644 index 000000000..563ae8705 --- /dev/null +++ b/1998/schnitzi/.gitignore @@ -0,0 +1 @@ +schnitzi diff --git a/1998/schweikh1/.gitignore b/1998/schweikh1/.gitignore new file mode 100644 index 000000000..72fbca3a7 --- /dev/null +++ b/1998/schweikh1/.gitignore @@ -0,0 +1 @@ +schweikh1 diff --git a/1998/schweikh2/.gitignore b/1998/schweikh2/.gitignore new file mode 100644 index 000000000..85e3bc2d7 --- /dev/null +++ b/1998/schweikh2/.gitignore @@ -0,0 +1 @@ +schweikh2 diff --git a/1998/schweikh3/.gitignore b/1998/schweikh3/.gitignore new file mode 100644 index 000000000..fc8e75c24 --- /dev/null +++ b/1998/schweikh3/.gitignore @@ -0,0 +1 @@ +schweikh3 diff --git a/1998/tomtorfs/.gitignore b/1998/tomtorfs/.gitignore new file mode 100644 index 000000000..e0fcdbcec --- /dev/null +++ b/1998/tomtorfs/.gitignore @@ -0,0 +1 @@ +tomtorfs diff --git a/2000/anderson/.gitignore b/2000/anderson/.gitignore new file mode 100644 index 000000000..7faaac2e6 --- /dev/null +++ b/2000/anderson/.gitignore @@ -0,0 +1 @@ +anderson diff --git a/2000/bellard/.gitignore b/2000/bellard/.gitignore new file mode 100644 index 000000000..6f007f6fe --- /dev/null +++ b/2000/bellard/.gitignore @@ -0,0 +1 @@ +bellard diff --git a/2000/bmeyer/.gitignore b/2000/bmeyer/.gitignore new file mode 100644 index 000000000..79a0ac3fc --- /dev/null +++ b/2000/bmeyer/.gitignore @@ -0,0 +1 @@ +bmeyer diff --git a/2000/briddlebane/.gitignore b/2000/briddlebane/.gitignore new file mode 100644 index 000000000..1b2e83009 --- /dev/null +++ b/2000/briddlebane/.gitignore @@ -0,0 +1 @@ +briddlebane diff --git a/2000/dhyang/.gitignore b/2000/dhyang/.gitignore new file mode 100644 index 000000000..88d0b9ce3 --- /dev/null +++ b/2000/dhyang/.gitignore @@ -0,0 +1 @@ +dhyang diff --git a/2000/dlowe/.gitignore b/2000/dlowe/.gitignore new file mode 100644 index 000000000..e0deed35d --- /dev/null +++ b/2000/dlowe/.gitignore @@ -0,0 +1 @@ +dlowe diff --git a/2000/jarijyrki/.gitignore b/2000/jarijyrki/.gitignore new file mode 100644 index 000000000..227c8b4f7 --- /dev/null +++ b/2000/jarijyrki/.gitignore @@ -0,0 +1 @@ +jarijyrki diff --git a/2000/natori/.gitignore b/2000/natori/.gitignore new file mode 100644 index 000000000..c2f12625e --- /dev/null +++ b/2000/natori/.gitignore @@ -0,0 +1 @@ +natori diff --git a/2000/primenum/.gitignore b/2000/primenum/.gitignore new file mode 100644 index 000000000..68da89df9 --- /dev/null +++ b/2000/primenum/.gitignore @@ -0,0 +1 @@ +primenum diff --git a/2000/rince/.gitignore b/2000/rince/.gitignore new file mode 100644 index 000000000..8e87c9d18 --- /dev/null +++ b/2000/rince/.gitignore @@ -0,0 +1 @@ +rince diff --git a/2000/robison/.gitignore b/2000/robison/.gitignore new file mode 100644 index 000000000..c124d1dbc --- /dev/null +++ b/2000/robison/.gitignore @@ -0,0 +1 @@ +robison diff --git a/2000/schneiderwent/.gitignore b/2000/schneiderwent/.gitignore new file mode 100644 index 000000000..7add82d84 --- /dev/null +++ b/2000/schneiderwent/.gitignore @@ -0,0 +1 @@ +schneiderwent diff --git a/2000/thadgavin/.gitignore b/2000/thadgavin/.gitignore new file mode 100644 index 000000000..c7930e680 --- /dev/null +++ b/2000/thadgavin/.gitignore @@ -0,0 +1 @@ +thadgavin diff --git a/2000/tomx/.gitignore b/2000/tomx/.gitignore new file mode 100644 index 000000000..2275e9ca3 --- /dev/null +++ b/2000/tomx/.gitignore @@ -0,0 +1 @@ +tomx diff --git a/2001/anonymous/.gitignore b/2001/anonymous/.gitignore new file mode 100644 index 000000000..ed6d4bce0 --- /dev/null +++ b/2001/anonymous/.gitignore @@ -0,0 +1 @@ +anonymous diff --git a/2001/bellard/.gitignore b/2001/bellard/.gitignore new file mode 100644 index 000000000..6f007f6fe --- /dev/null +++ b/2001/bellard/.gitignore @@ -0,0 +1 @@ +bellard diff --git a/2001/cheong/.gitignore b/2001/cheong/.gitignore new file mode 100644 index 000000000..df4ec6876 --- /dev/null +++ b/2001/cheong/.gitignore @@ -0,0 +1 @@ +cheong diff --git a/2001/coupard/.gitignore b/2001/coupard/.gitignore new file mode 100644 index 000000000..04b0c16d3 --- /dev/null +++ b/2001/coupard/.gitignore @@ -0,0 +1 @@ +coupard diff --git a/2001/ctk/.gitignore b/2001/ctk/.gitignore new file mode 100644 index 000000000..e02fee0dd --- /dev/null +++ b/2001/ctk/.gitignore @@ -0,0 +1 @@ +ctk diff --git a/2001/dgbeards/.gitignore b/2001/dgbeards/.gitignore new file mode 100644 index 000000000..831f17e57 --- /dev/null +++ b/2001/dgbeards/.gitignore @@ -0,0 +1 @@ +dgbeards diff --git a/2001/herrmann1/.gitignore b/2001/herrmann1/.gitignore new file mode 100644 index 000000000..957e2a9b9 --- /dev/null +++ b/2001/herrmann1/.gitignore @@ -0,0 +1 @@ +herrmann1 diff --git a/2001/herrmann2/.gitignore b/2001/herrmann2/.gitignore new file mode 100644 index 000000000..24be698bf --- /dev/null +++ b/2001/herrmann2/.gitignore @@ -0,0 +1 @@ +herrmann2 diff --git a/2001/jason/.gitignore b/2001/jason/.gitignore new file mode 100644 index 000000000..316a72f9a --- /dev/null +++ b/2001/jason/.gitignore @@ -0,0 +1 @@ +jason diff --git a/2001/kev/.gitignore b/2001/kev/.gitignore new file mode 100644 index 000000000..961ec1d0c --- /dev/null +++ b/2001/kev/.gitignore @@ -0,0 +1 @@ +kev diff --git a/2001/ollinger/.gitignore b/2001/ollinger/.gitignore new file mode 100644 index 000000000..25cc0f591 --- /dev/null +++ b/2001/ollinger/.gitignore @@ -0,0 +1 @@ +ollinger diff --git a/2001/rosten/.gitignore b/2001/rosten/.gitignore new file mode 100644 index 000000000..568e5b5bb --- /dev/null +++ b/2001/rosten/.gitignore @@ -0,0 +1 @@ +rosten diff --git a/2001/schweikh/.gitignore b/2001/schweikh/.gitignore new file mode 100644 index 000000000..9b1346d05 --- /dev/null +++ b/2001/schweikh/.gitignore @@ -0,0 +1 @@ +schweikh diff --git a/2001/westley/.gitignore b/2001/westley/.gitignore new file mode 100644 index 000000000..2a0c890f9 --- /dev/null +++ b/2001/westley/.gitignore @@ -0,0 +1 @@ +westley diff --git a/2001/williams/.gitignore b/2001/williams/.gitignore new file mode 100644 index 000000000..8a1f55820 --- /dev/null +++ b/2001/williams/.gitignore @@ -0,0 +1 @@ +williams diff --git a/2004/anonymous/.gitignore b/2004/anonymous/.gitignore new file mode 100644 index 000000000..ed6d4bce0 --- /dev/null +++ b/2004/anonymous/.gitignore @@ -0,0 +1 @@ +anonymous diff --git a/2004/arachnid/.gitignore b/2004/arachnid/.gitignore new file mode 100644 index 000000000..9eae609b9 --- /dev/null +++ b/2004/arachnid/.gitignore @@ -0,0 +1 @@ +arachnid diff --git a/2004/burley/.gitignore b/2004/burley/.gitignore new file mode 100644 index 000000000..917468cfe --- /dev/null +++ b/2004/burley/.gitignore @@ -0,0 +1 @@ +burley diff --git a/2004/gavare/.gitignore b/2004/gavare/.gitignore new file mode 100644 index 000000000..67289f99d --- /dev/null +++ b/2004/gavare/.gitignore @@ -0,0 +1 @@ +gavare diff --git a/2004/gavin/.gitignore b/2004/gavin/.gitignore new file mode 100644 index 000000000..c485d3bf1 --- /dev/null +++ b/2004/gavin/.gitignore @@ -0,0 +1 @@ +gavin diff --git a/2004/hibachi/.gitignore b/2004/hibachi/.gitignore new file mode 100644 index 000000000..6ab1a25e1 --- /dev/null +++ b/2004/hibachi/.gitignore @@ -0,0 +1 @@ +hibachi diff --git a/2004/hoyle/.gitignore b/2004/hoyle/.gitignore new file mode 100644 index 000000000..39706d1fe --- /dev/null +++ b/2004/hoyle/.gitignore @@ -0,0 +1 @@ +hoyle diff --git a/2004/jdalbec/.gitignore b/2004/jdalbec/.gitignore new file mode 100644 index 000000000..b6afac96b --- /dev/null +++ b/2004/jdalbec/.gitignore @@ -0,0 +1 @@ +jdalbec diff --git a/2004/kopczynski/.gitignore b/2004/kopczynski/.gitignore new file mode 100644 index 000000000..1c40784e5 --- /dev/null +++ b/2004/kopczynski/.gitignore @@ -0,0 +1 @@ +kopczynski diff --git a/2004/newbern/.gitignore b/2004/newbern/.gitignore new file mode 100644 index 000000000..f006a9a2c --- /dev/null +++ b/2004/newbern/.gitignore @@ -0,0 +1 @@ +newbern diff --git a/2004/omoikane/.gitignore b/2004/omoikane/.gitignore new file mode 100644 index 000000000..db7ab6ec2 --- /dev/null +++ b/2004/omoikane/.gitignore @@ -0,0 +1 @@ +omoikane diff --git a/2004/schnitzi/.gitignore b/2004/schnitzi/.gitignore new file mode 100644 index 000000000..563ae8705 --- /dev/null +++ b/2004/schnitzi/.gitignore @@ -0,0 +1 @@ +schnitzi diff --git a/2004/sds/.gitignore b/2004/sds/.gitignore new file mode 100644 index 000000000..494c133dd --- /dev/null +++ b/2004/sds/.gitignore @@ -0,0 +1 @@ +sds diff --git a/2004/vik1/.gitignore b/2004/vik1/.gitignore new file mode 100644 index 000000000..0993548ac --- /dev/null +++ b/2004/vik1/.gitignore @@ -0,0 +1 @@ +vik1 diff --git a/2004/vik2/.gitignore b/2004/vik2/.gitignore new file mode 100644 index 000000000..8e7994066 --- /dev/null +++ b/2004/vik2/.gitignore @@ -0,0 +1 @@ +vik2 diff --git a/2006/birken/.gitignore b/2006/birken/.gitignore new file mode 100644 index 000000000..e5a552e19 --- /dev/null +++ b/2006/birken/.gitignore @@ -0,0 +1 @@ +birken diff --git a/2006/borsanyi/.gitignore b/2006/borsanyi/.gitignore new file mode 100644 index 000000000..5d7cdea5f --- /dev/null +++ b/2006/borsanyi/.gitignore @@ -0,0 +1 @@ +borsanyi diff --git a/2006/grothe/.gitignore b/2006/grothe/.gitignore new file mode 100644 index 000000000..11e3173dd --- /dev/null +++ b/2006/grothe/.gitignore @@ -0,0 +1 @@ +grothe diff --git a/2006/hamre/.gitignore b/2006/hamre/.gitignore new file mode 100644 index 000000000..7bf9e29be --- /dev/null +++ b/2006/hamre/.gitignore @@ -0,0 +1 @@ +hamre diff --git a/2006/meyer/.gitignore b/2006/meyer/.gitignore new file mode 100644 index 000000000..6e1b3595d --- /dev/null +++ b/2006/meyer/.gitignore @@ -0,0 +1 @@ +meyer diff --git a/2006/monge/.gitignore b/2006/monge/.gitignore new file mode 100644 index 000000000..42cc3d02d --- /dev/null +++ b/2006/monge/.gitignore @@ -0,0 +1 @@ +monge diff --git a/2006/night/.gitignore b/2006/night/.gitignore new file mode 100644 index 000000000..41feb5b6d --- /dev/null +++ b/2006/night/.gitignore @@ -0,0 +1 @@ +night diff --git a/2006/sloane/.gitignore b/2006/sloane/.gitignore new file mode 100644 index 000000000..84c5a1b15 --- /dev/null +++ b/2006/sloane/.gitignore @@ -0,0 +1 @@ +sloane diff --git a/2006/stewart/.gitignore b/2006/stewart/.gitignore new file mode 100644 index 000000000..db5a3b068 --- /dev/null +++ b/2006/stewart/.gitignore @@ -0,0 +1 @@ +stewart diff --git a/2006/sykes1/.gitignore b/2006/sykes1/.gitignore new file mode 100644 index 000000000..cd92228d4 --- /dev/null +++ b/2006/sykes1/.gitignore @@ -0,0 +1 @@ +sykes1 diff --git a/2006/sykes2/.gitignore b/2006/sykes2/.gitignore new file mode 100644 index 000000000..95e0a5398 --- /dev/null +++ b/2006/sykes2/.gitignore @@ -0,0 +1 @@ +sykes2 diff --git a/2006/toledo1/.gitignore b/2006/toledo1/.gitignore new file mode 100644 index 000000000..4cf03b026 --- /dev/null +++ b/2006/toledo1/.gitignore @@ -0,0 +1 @@ +toledo1 diff --git a/2006/toledo2/.gitignore b/2006/toledo2/.gitignore new file mode 100644 index 000000000..08125c0b0 --- /dev/null +++ b/2006/toledo2/.gitignore @@ -0,0 +1 @@ +toledo2 diff --git a/2006/toledo3/.gitignore b/2006/toledo3/.gitignore new file mode 100644 index 000000000..752239a81 --- /dev/null +++ b/2006/toledo3/.gitignore @@ -0,0 +1 @@ +toledo3 diff --git a/2011/akari/.gitignore b/2011/akari/.gitignore new file mode 100644 index 000000000..a8c33ec96 --- /dev/null +++ b/2011/akari/.gitignore @@ -0,0 +1 @@ +akari diff --git a/2011/blakely/.gitignore b/2011/blakely/.gitignore new file mode 100644 index 000000000..5c36c9097 --- /dev/null +++ b/2011/blakely/.gitignore @@ -0,0 +1 @@ +blakely diff --git a/2011/borsanyi/.gitignore b/2011/borsanyi/.gitignore new file mode 100644 index 000000000..5d7cdea5f --- /dev/null +++ b/2011/borsanyi/.gitignore @@ -0,0 +1 @@ +borsanyi diff --git a/2011/dlowe/.gitignore b/2011/dlowe/.gitignore new file mode 100644 index 000000000..e0deed35d --- /dev/null +++ b/2011/dlowe/.gitignore @@ -0,0 +1 @@ +dlowe diff --git a/2011/eastman/.gitignore b/2011/eastman/.gitignore new file mode 100644 index 000000000..a096b10ee --- /dev/null +++ b/2011/eastman/.gitignore @@ -0,0 +1 @@ +eastman diff --git a/2011/fredriksson/.gitignore b/2011/fredriksson/.gitignore new file mode 100644 index 000000000..f2e512e6b --- /dev/null +++ b/2011/fredriksson/.gitignore @@ -0,0 +1 @@ +fredriksson diff --git a/2011/goren/.gitignore b/2011/goren/.gitignore new file mode 100644 index 000000000..ac8e9a9ac --- /dev/null +++ b/2011/goren/.gitignore @@ -0,0 +1 @@ +goren diff --git a/2011/hamaji/.gitignore b/2011/hamaji/.gitignore new file mode 100644 index 000000000..38e8b4008 --- /dev/null +++ b/2011/hamaji/.gitignore @@ -0,0 +1 @@ +hamaji diff --git a/2011/hou/.gitignore b/2011/hou/.gitignore new file mode 100644 index 000000000..02f7029f9 --- /dev/null +++ b/2011/hou/.gitignore @@ -0,0 +1 @@ +hou diff --git a/2011/konno/.gitignore b/2011/konno/.gitignore new file mode 100644 index 000000000..1f308a241 --- /dev/null +++ b/2011/konno/.gitignore @@ -0,0 +1 @@ +konno diff --git a/2011/richards/.gitignore b/2011/richards/.gitignore new file mode 100644 index 000000000..94c1e89c1 --- /dev/null +++ b/2011/richards/.gitignore @@ -0,0 +1 @@ +richards diff --git a/2011/toledo/.gitignore b/2011/toledo/.gitignore new file mode 100644 index 000000000..7e255de0f --- /dev/null +++ b/2011/toledo/.gitignore @@ -0,0 +1 @@ +toledo diff --git a/2011/vik/.gitignore b/2011/vik/.gitignore new file mode 100644 index 000000000..c28f954b2 --- /dev/null +++ b/2011/vik/.gitignore @@ -0,0 +1 @@ +vik diff --git a/2011/zucker/.gitignore b/2011/zucker/.gitignore new file mode 100644 index 000000000..4be68913b --- /dev/null +++ b/2011/zucker/.gitignore @@ -0,0 +1 @@ +zucker diff --git a/2012/blakely/.gitignore b/2012/blakely/.gitignore new file mode 100644 index 000000000..5c36c9097 --- /dev/null +++ b/2012/blakely/.gitignore @@ -0,0 +1 @@ +blakely diff --git a/2012/deckmyn/.gitignore b/2012/deckmyn/.gitignore new file mode 100644 index 000000000..cba32ef42 --- /dev/null +++ b/2012/deckmyn/.gitignore @@ -0,0 +1 @@ +deckmyn diff --git a/2012/dlowe/.gitignore b/2012/dlowe/.gitignore new file mode 100644 index 000000000..e0deed35d --- /dev/null +++ b/2012/dlowe/.gitignore @@ -0,0 +1 @@ +dlowe diff --git a/2012/endoh1/.gitignore b/2012/endoh1/.gitignore new file mode 100644 index 000000000..97dd818c8 --- /dev/null +++ b/2012/endoh1/.gitignore @@ -0,0 +1 @@ +endoh1 diff --git a/2012/endoh2/.gitignore b/2012/endoh2/.gitignore new file mode 100644 index 000000000..85f027cf4 --- /dev/null +++ b/2012/endoh2/.gitignore @@ -0,0 +1 @@ +endoh2 diff --git a/2012/grothe/.gitignore b/2012/grothe/.gitignore new file mode 100644 index 000000000..11e3173dd --- /dev/null +++ b/2012/grothe/.gitignore @@ -0,0 +1 @@ +grothe diff --git a/2012/hamano/.gitignore b/2012/hamano/.gitignore new file mode 100644 index 000000000..cd0177a16 --- /dev/null +++ b/2012/hamano/.gitignore @@ -0,0 +1 @@ +hamano diff --git a/2012/hou/.gitignore b/2012/hou/.gitignore new file mode 100644 index 000000000..02f7029f9 --- /dev/null +++ b/2012/hou/.gitignore @@ -0,0 +1 @@ +hou diff --git a/2012/kang/.gitignore b/2012/kang/.gitignore new file mode 100644 index 000000000..0ac0f0f49 --- /dev/null +++ b/2012/kang/.gitignore @@ -0,0 +1 @@ +kang diff --git a/2012/konno/.gitignore b/2012/konno/.gitignore new file mode 100644 index 000000000..1f308a241 --- /dev/null +++ b/2012/konno/.gitignore @@ -0,0 +1 @@ +konno diff --git a/2012/omoikane/.gitignore b/2012/omoikane/.gitignore new file mode 100644 index 000000000..db7ab6ec2 --- /dev/null +++ b/2012/omoikane/.gitignore @@ -0,0 +1 @@ +omoikane diff --git a/2012/tromp/.gitignore b/2012/tromp/.gitignore new file mode 100644 index 000000000..48d35ef74 --- /dev/null +++ b/2012/tromp/.gitignore @@ -0,0 +1 @@ +tromp diff --git a/2012/vik/.gitignore b/2012/vik/.gitignore new file mode 100644 index 000000000..c28f954b2 --- /dev/null +++ b/2012/vik/.gitignore @@ -0,0 +1 @@ +vik diff --git a/2012/zeitak/.gitignore b/2012/zeitak/.gitignore new file mode 100644 index 000000000..0989fbef7 --- /dev/null +++ b/2012/zeitak/.gitignore @@ -0,0 +1 @@ +zeitak diff --git a/2013/birken/.gitignore b/2013/birken/.gitignore new file mode 100644 index 000000000..0635915bc --- /dev/null +++ b/2013/birken/.gitignore @@ -0,0 +1,3 @@ +birken +examples/ +images/ diff --git a/2013/cable1/.gitignore b/2013/cable1/.gitignore new file mode 100644 index 000000000..91e453045 --- /dev/null +++ b/2013/cable1/.gitignore @@ -0,0 +1 @@ +cable1 diff --git a/2013/cable2/.gitignore b/2013/cable2/.gitignore new file mode 100644 index 000000000..bf9ec9290 --- /dev/null +++ b/2013/cable2/.gitignore @@ -0,0 +1,7 @@ +ascii.bmp +bonus.bmp +cable2 +hello_world.bmp +mixed_sizes.bmp +multi_color.bmp +typeset.bmp diff --git a/2013/cable3/.gitignore b/2013/cable3/.gitignore new file mode 100644 index 000000000..669871cfd --- /dev/null +++ b/2013/cable3/.gitignore @@ -0,0 +1 @@ +cable3 diff --git a/2013/dlowe/.gitignore b/2013/dlowe/.gitignore new file mode 100644 index 000000000..e0deed35d --- /dev/null +++ b/2013/dlowe/.gitignore @@ -0,0 +1 @@ +dlowe diff --git a/2013/endoh1/.gitignore b/2013/endoh1/.gitignore new file mode 100644 index 000000000..6e5ac6929 --- /dev/null +++ b/2013/endoh1/.gitignore @@ -0,0 +1,4 @@ +echo +endoh1 +hello +tac diff --git a/2013/endoh2/.gitignore b/2013/endoh2/.gitignore new file mode 100644 index 000000000..9aed40587 --- /dev/null +++ b/2013/endoh2/.gitignore @@ -0,0 +1,4 @@ +endoh2 +jpeg +jpeg.c +jpeg.jpg diff --git a/2013/endoh3/.gitignore b/2013/endoh3/.gitignore new file mode 100644 index 000000000..63da6681f --- /dev/null +++ b/2013/endoh3/.gitignore @@ -0,0 +1 @@ +endoh3 diff --git a/2013/endoh4/.gitignore b/2013/endoh4/.gitignore new file mode 100644 index 000000000..17beb20b3 --- /dev/null +++ b/2013/endoh4/.gitignore @@ -0,0 +1,2 @@ +endoh4 +solids/ diff --git a/2013/hou/.gitignore b/2013/hou/.gitignore new file mode 100644 index 000000000..25a091b18 --- /dev/null +++ b/2013/hou/.gitignore @@ -0,0 +1,3 @@ +a +a.c +hou diff --git a/2013/mills/.gitignore b/2013/mills/.gitignore new file mode 100644 index 000000000..435314278 --- /dev/null +++ b/2013/mills/.gitignore @@ -0,0 +1 @@ +mills diff --git a/2013/misaka/.gitignore b/2013/misaka/.gitignore new file mode 100644 index 000000000..48055accb --- /dev/null +++ b/2013/misaka/.gitignore @@ -0,0 +1,18 @@ +horizontal_cat +long_cat +long_faat_cat +long_fat_cat +loong_cat +loooong_cat +loooooooong_cat +misaka +misaka2.c +misaka3.c +misaka4.c +misaka5.c +misaka6.c +misaka7.c +misaka8.c +misaka9.c +same_as_long_cat +vertical_cat diff --git a/2013/morgan1/.gitignore b/2013/morgan1/.gitignore new file mode 100644 index 000000000..730491f82 --- /dev/null +++ b/2013/morgan1/.gitignore @@ -0,0 +1 @@ +morgan1 diff --git a/2013/morgan2/.gitignore b/2013/morgan2/.gitignore new file mode 100644 index 000000000..28e6e30d6 --- /dev/null +++ b/2013/morgan2/.gitignore @@ -0,0 +1 @@ +morgan2 diff --git a/2013/robison/.gitignore b/2013/robison/.gitignore new file mode 100644 index 000000000..c124d1dbc --- /dev/null +++ b/2013/robison/.gitignore @@ -0,0 +1 @@ +robison diff --git a/2014/birken/.gitignore b/2014/birken/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2014/birken/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2014/deak/.gitignore b/2014/deak/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2014/deak/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2014/endoh1/.gitignore b/2014/endoh1/.gitignore new file mode 100644 index 000000000..216deeb88 --- /dev/null +++ b/2014/endoh1/.gitignore @@ -0,0 +1,3 @@ +main +main.c +prog diff --git a/2014/endoh2/.gitignore b/2014/endoh2/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2014/endoh2/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2014/maffiodo1/.gitignore b/2014/maffiodo1/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2014/maffiodo1/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2014/maffiodo2/.gitignore b/2014/maffiodo2/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2014/maffiodo2/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2014/morgan/.gitignore b/2014/morgan/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2014/morgan/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2014/sinon/.gitignore b/2014/sinon/.gitignore new file mode 100644 index 000000000..91cfa07d3 --- /dev/null +++ b/2014/sinon/.gitignore @@ -0,0 +1,2 @@ +prog +sinon.c diff --git a/2014/sinon/glock.sh b/2014/sinon/glock.sh old mode 100644 new mode 100755 diff --git a/2014/sinon/hecate.sh b/2014/sinon/hecate.sh old mode 100644 new mode 100755 diff --git a/2014/skeggs/.gitignore b/2014/skeggs/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2014/skeggs/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2014/vik/.gitignore b/2014/vik/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2014/vik/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2014/wiedijk/.gitignore b/2014/wiedijk/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2014/wiedijk/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2015/burton/.gitignore b/2015/burton/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2015/burton/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2015/dogon/.gitignore b/2015/dogon/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2015/dogon/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2015/duble/.gitignore b/2015/duble/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2015/duble/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2015/endoh1/.gitignore b/2015/endoh1/.gitignore new file mode 100644 index 000000000..62cfdd752 --- /dev/null +++ b/2015/endoh1/.gitignore @@ -0,0 +1,9 @@ +fitzhugh-nagumo-1 +fitzhugh-nagumo-2 +ginzburg-landau +gray-scott-1 +gray-scott-2 +gray-scott-3 +gray-scott-4 +oregonator +prog diff --git a/2015/endoh2/.gitignore b/2015/endoh2/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2015/endoh2/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2015/endoh3/.gitignore b/2015/endoh3/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2015/endoh3/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2015/endoh4/.gitignore b/2015/endoh4/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2015/endoh4/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2015/hou/.gitignore b/2015/hou/.gitignore new file mode 100644 index 000000000..9934da7fc --- /dev/null +++ b/2015/hou/.gitignore @@ -0,0 +1,2 @@ +prebuild +prog diff --git a/2015/howe/.gitignore b/2015/howe/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2015/howe/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2015/mills1/.gitignore b/2015/mills1/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2015/mills1/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2015/mills2/.gitignore b/2015/mills2/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2015/mills2/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2015/muth/.gitignore b/2015/muth/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2015/muth/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2015/schweikhardt/.gitignore b/2015/schweikhardt/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2015/schweikhardt/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2015/yang/.gitignore b/2015/yang/.gitignore new file mode 100644 index 000000000..7e746a13e --- /dev/null +++ b/2015/yang/.gitignore @@ -0,0 +1,7 @@ +prog +prog.cc +prog_c11 +prog_c90 +prog_c99 +prog_cpp11 +prog_cpp98 diff --git a/2018/algmyr/.gitignore b/2018/algmyr/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2018/algmyr/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2018/anderson/.gitignore b/2018/anderson/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2018/anderson/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2018/bellard/.gitignore b/2018/bellard/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2018/bellard/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2018/burton1/.gitignore b/2018/burton1/.gitignore new file mode 100644 index 000000000..199b25c10 --- /dev/null +++ b/2018/burton1/.gitignore @@ -0,0 +1,2 @@ +prog +prog.nowarn diff --git a/2018/burton2/.gitignore b/2018/burton2/.gitignore new file mode 100644 index 000000000..700e2c565 --- /dev/null +++ b/2018/burton2/.gitignore @@ -0,0 +1,2 @@ +keywords +prog diff --git a/2018/ciura/.gitignore b/2018/ciura/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2018/ciura/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2018/endoh1/.gitignore b/2018/endoh1/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2018/endoh1/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2018/endoh2/.gitignore b/2018/endoh2/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2018/endoh2/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2018/ferguson/.gitignore b/2018/ferguson/.gitignore new file mode 100644 index 000000000..657860f36 --- /dev/null +++ b/2018/ferguson/.gitignore @@ -0,0 +1,5 @@ +prog +prog-simple +prog.orig +weasel +weasel-simple diff --git a/2018/giles/.gitignore b/2018/giles/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2018/giles/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2018/hou/.gitignore b/2018/hou/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2018/hou/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2018/mills/.gitignore b/2018/mills/.gitignore new file mode 100644 index 000000000..0b2e2bf71 --- /dev/null +++ b/2018/mills/.gitignore @@ -0,0 +1,9 @@ +builddisk.bsd +builddisk.v6 +empty.fs.bz2 +prog +rk05.bsd.fs +rk05.v6.fs +v0 +v6 +v6.img.bz2 diff --git a/2018/poikola/.gitignore b/2018/poikola/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2018/poikola/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2018/vokes/.gitignore b/2018/vokes/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2018/vokes/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2018/yang/.gitignore b/2018/yang/.gitignore new file mode 100644 index 000000000..7d70569fd --- /dev/null +++ b/2018/yang/.gitignore @@ -0,0 +1,12 @@ +generated1.c +generated2.c +generated3.c +generated4.c +generated5.c +left +msg0 +msg1 +msg2 +prog +right +shift diff --git a/2019/adamovsky/.gitignore b/2019/adamovsky/.gitignore new file mode 100644 index 000000000..1de53bd06 --- /dev/null +++ b/2019/adamovsky/.gitignore @@ -0,0 +1,4 @@ +identify.unl +iocccsize_2018 +prog +prog2 diff --git a/2019/burton/.gitignore b/2019/burton/.gitignore new file mode 100644 index 000000000..ac08449fb --- /dev/null +++ b/2019/burton/.gitignore @@ -0,0 +1,2 @@ +prog +prog.clean diff --git a/2019/ciura/.gitignore b/2019/ciura/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2019/ciura/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2019/diels-grabsch1/.gitignore b/2019/diels-grabsch1/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2019/diels-grabsch1/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2019/diels-grabsch2/.gitignore b/2019/diels-grabsch2/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2019/diels-grabsch2/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2019/dogon/.gitignore b/2019/dogon/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2019/dogon/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2019/duble/.gitignore b/2019/duble/.gitignore new file mode 100644 index 000000000..2b1e0c2ce --- /dev/null +++ b/2019/duble/.gitignore @@ -0,0 +1,2 @@ +Darwin +prog diff --git a/2019/endoh/.gitignore b/2019/endoh/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2019/endoh/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2019/giles/.gitignore b/2019/giles/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2019/giles/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2019/karns/.gitignore b/2019/karns/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2019/karns/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2019/lynn/.gitignore b/2019/lynn/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2019/lynn/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2019/mills/.gitignore b/2019/mills/.gitignore new file mode 100644 index 000000000..5613d8301 --- /dev/null +++ b/2019/mills/.gitignore @@ -0,0 +1,22 @@ +Eugene_Onegin.txt +IOCCC-Rules-Guidelines.txt +IOCCC-hints.txt +Shakespeare.txt +gru1 +gru2 +gru3 +lin1 +lstm1 +lstm2 +lstm3 +lstmp1 +lstmp2 +lstmp3 +per1 +prog +rlstm1 +rlstm2 +rlstm3 +rnn1 +rnn2 +rnn3 diff --git a/2019/poikola/.gitignore b/2019/poikola/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2019/poikola/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2019/yang/.gitignore b/2019/yang/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2019/yang/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2020/burton/.gitignore b/2020/burton/.gitignore new file mode 100644 index 000000000..92338fcef --- /dev/null +++ b/2020/burton/.gitignore @@ -0,0 +1,4 @@ +check +check_be +prog +prog_be diff --git a/2020/carlini/.gitignore b/2020/carlini/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2020/carlini/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2020/endoh1/.gitignore b/2020/endoh1/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2020/endoh1/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2020/endoh2/.gitignore b/2020/endoh2/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2020/endoh2/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2020/endoh3/.gitignore b/2020/endoh3/.gitignore new file mode 100644 index 000000000..2ac10321f --- /dev/null +++ b/2020/endoh3/.gitignore @@ -0,0 +1,4 @@ +clock +clock.c +prog +run_clock diff --git a/2020/ferguson1/.gitignore b/2020/ferguson1/.gitignore index 0f52baad6..560d31973 100644 --- a/2020/ferguson1/.gitignore +++ b/2020/ferguson1/.gitignore @@ -1,4 +1,5 @@ play +prog prog.alt snake snake-colours diff --git a/2020/ferguson2/.gitignore b/2020/ferguson2/.gitignore new file mode 100644 index 000000000..2a192830a --- /dev/null +++ b/2020/ferguson2/.gitignore @@ -0,0 +1,2 @@ +prog +recode diff --git a/2020/giles/.gitignore b/2020/giles/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2020/giles/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2020/kurdyukov1/.gitignore b/2020/kurdyukov1/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2020/kurdyukov1/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2020/kurdyukov2/.gitignore b/2020/kurdyukov2/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2020/kurdyukov2/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2020/kurdyukov3/.gitignore b/2020/kurdyukov3/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2020/kurdyukov3/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2020/kurdyukov4/.gitignore b/2020/kurdyukov4/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2020/kurdyukov4/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2020/otterness/.gitignore b/2020/otterness/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2020/otterness/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2020/tsoj/.gitignore b/2020/tsoj/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2020/tsoj/.gitignore @@ -0,0 +1 @@ +prog diff --git a/2020/yang/.gitignore b/2020/yang/.gitignore new file mode 100644 index 000000000..ea1749132 --- /dev/null +++ b/2020/yang/.gitignore @@ -0,0 +1 @@ +prog From e3bd4668e2c5fc13a32fe49ea22e6b00bfec3574 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 15:16:56 -0800 Subject: [PATCH 17/50] improve 1984/anonymous/Makefile --- 1984/anonymous/Makefile | 68 +++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 30 deletions(-) diff --git a/1984/anonymous/Makefile b/1984/anonymous/Makefile index 9faa8dc46..0e4bd0d63 100644 --- a/1984/anonymous/Makefile +++ b/1984/anonymous/Makefile @@ -327,30 +327,26 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings -# -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra -CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -# Silence warnings that ${CWARN} would normally complain about +# Common C compiler warnings to silence # +#CSILENCE= CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-implicit-int \ -Wno-return-type -Wno-string-plus-int -Wno-unsequenced -#CSILENCE= -Wno-implicit-int -# compiler standard +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -362,12 +358,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= #CDEFINE= -DIOCCC=26 -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -376,7 +372,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -389,7 +385,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -400,20 +396,32 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-poison-system-directories -Wno-shadow -Wno-missing-prototypes \ + -Wno-strict-prototypes -Wno-missing-variable-declarations -Wno-pedantic +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## From 531a8ef443cd52d241aef86851e6a4dd8cb55baa Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 15:17:48 -0800 Subject: [PATCH 18/50] improve 1984/anonymous/Makefile --- 1984/anonymous/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1984/anonymous/Makefile b/1984/anonymous/Makefile index 0e4bd0d63..a4c95f3f6 100644 --- a/1984/anonymous/Makefile +++ b/1984/anonymous/Makefile @@ -361,7 +361,7 @@ ARCH= # Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC # Include files that are needed to compile # From dae181be114d97bccd5b47ad53145d8999a820d1 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 15:22:51 -0800 Subject: [PATCH 19/50] fix 1984/decot/Makefile and README --- 1984/decot/Makefile | 72 ++++++++++++++++++++++++-------------------- 1984/decot/README.md | 2 +- 2 files changed, 41 insertions(+), 33 deletions(-) diff --git a/1984/decot/Makefile b/1984/decot/Makefile index cf3df28bd..74f036206 100644 --- a/1984/decot/Makefile +++ b/1984/decot/Makefile @@ -327,31 +327,27 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings -# -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra -CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -# Silence warnings that ${CWARN} would normally complain about +# Common C compiler warnings to silence # +#CSILENCE= CSILENCE= -Wno-array-bounds -Wno-error -Wno-implicit-function-declaration \ -Wno-keyword-macro -Wno-main-return-type -Wno-missing-field-initializers \ -Wno-unused-value -Wno-unused-variable -#CSILENCE= -Wno-implicit-int -# compiler standard +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # #CSTD= #CSTD= -ansi -CSTD= -std=gnu89 +CSTD= -std=gnu90 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -363,12 +359,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= #CDEFINE= -DIOCCC=26 -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -377,7 +373,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -390,7 +386,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -401,20 +397,32 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-format-nonliteral -Wno-missing-variable-declarations \ + -Wno-pedantic -Wno-poison-system-directories -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## @@ -444,7 +452,7 @@ all: ${DATA} ${TARGET} supernova deep_magic magic charon pluto ${PROG}: ${PROG}.c - @echo "NOTE: This entry uses non-standard args to main() that do not work with modern compilers." + @echo "NOTE: This entry may not compile when using modern compilers." ${CC} ${CFLAGS} $< -o $@ ${LIBS} # alternative executable diff --git a/1984/decot/README.md b/1984/decot/README.md index 332c92a71..4df2ea516 100644 --- a/1984/decot/README.md +++ b/1984/decot/README.md @@ -6,7 +6,7 @@ Dave Decot make all -NOTE: This entry uses non-standard args to main() that do not work with modern compilers. +NOTE: This entry may not compile when using modern compilers. ## Judges' comments: From 0b746d3161faecfd0595cee426eab218b2e0025e Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 15:26:15 -0800 Subject: [PATCH 20/50] improve 1984/laman/Makefile --- 1984/laman/Makefile | 70 +++++++++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 31 deletions(-) diff --git a/1984/laman/Makefile b/1984/laman/Makefile index c4f929316..9a04a3bbc 100644 --- a/1984/laman/Makefile +++ b/1984/laman/Makefile @@ -327,29 +327,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings +# Common C compiler warnings to silence # -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-implicit-int + +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} CWARN= -Wall -Wextra ${CSILENCE} #CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -# Silence warnings that ${CWARN} would normally complain about -# -CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-implicit-int -#CSILENCE= -Wno-implicit-int - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi -CSTD= -std=gnu11 +CSTD= -std=c11 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -361,12 +357,12 @@ CSTD= -std=gnu11 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -375,7 +371,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -388,7 +384,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -399,20 +395,32 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-missing-variable-declarations -Wno-pedantic \ + -Wno-poison-system-directories +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## From ed063facc6c62757f8794d71aa2acea82f6dbf6b Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 15:34:14 -0800 Subject: [PATCH 21/50] improve 1984/mullender/Makefile and 1984/Makefile --- 1984/Makefile | 2 +- 1984/mullender/Makefile | 69 +++++++++++++++++++++++------------------ 2 files changed, 39 insertions(+), 32 deletions(-) diff --git a/1984/Makefile b/1984/Makefile index 500c7b7c4..b84eb77ba 100644 --- a/1984/Makefile +++ b/1984/Makefile @@ -50,7 +50,7 @@ # tool locations ################ # -SHELL= /bin/bash +SHELL= bash MAKE= make diff --git a/1984/mullender/Makefile b/1984/mullender/Makefile index 1f891ebe2..022d61539 100644 --- a/1984/mullender/Makefile +++ b/1984/mullender/Makefile @@ -327,29 +327,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings -# -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra -#CWARN= -Wall -Wextra ${CSILENCE} -CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -# Silence warnings that ${CWARN} would normally complain about +# Common C compiler warnings to silence # +#CSILENCE= CSILENCE= -Wno-main -#CSILENCE= -Wno-implicit-int -# compiler standard +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -361,12 +357,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -375,7 +371,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -388,7 +384,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -399,20 +395,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-missing-variable-declarations -Wno-poison-system-directories +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## From 6626ebd0ba3d987a43634ba1ee6c80cf6efdd790 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 16:00:16 -0800 Subject: [PATCH 22/50] improve 1985 Makefiles --- 1985/Makefile | 2 +- 1985/applin/Makefile | 67 +++++++++++++++++++++----------------- 1985/august/Makefile | 70 ++++++++++++++++++++++------------------ 1985/lycklama/Makefile | 71 +++++++++++++++++++++++------------------ 1985/shapiro/Makefile | 69 +++++++++++++++++++++------------------ 1985/sicherman/Makefile | 67 +++++++++++++++++++++----------------- 6 files changed, 192 insertions(+), 154 deletions(-) diff --git a/1985/Makefile b/1985/Makefile index 59e870e5f..f1b83b9d8 100644 --- a/1985/Makefile +++ b/1985/Makefile @@ -50,7 +50,7 @@ # tool locations ################ # -SHELL= /bin/bash +SHELL= bash MAKE= make diff --git a/1985/applin/Makefile b/1985/applin/Makefile index cdab9e107..f691e3815 100644 --- a/1985/applin/Makefile +++ b/1985/applin/Makefile @@ -327,29 +327,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings +# Common C compiler warnings to silence # -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-logical-op-parentheses + +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} CWARN= -Wall -Wextra ${CSILENCE} #CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -# Silence warnings that ${CWARN} would normally complain about -# -CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-logical-op-parentheses -#CSILENCE= -Wno-implicit-int - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -361,12 +357,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -375,7 +371,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -388,7 +384,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -399,20 +395,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-pedantic -Wno-poison-system-directories +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1985/august/Makefile b/1985/august/Makefile index 1edb88e45..369fd653e 100644 --- a/1985/august/Makefile +++ b/1985/august/Makefile @@ -327,30 +327,26 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings -# -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra -CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -# Silence warnings that ${CWARN} would normally complain about +# Common C compiler warnings to silence # +#CSILENCE= CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-main \ -Wno-unused-parameter -Wno-unused-variable -#CSILENCE= -Wno-implicit-int -# compiler standard +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -362,12 +358,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -376,7 +372,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -389,7 +385,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -400,20 +396,32 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-missing-prototypes -Wno-padded -Wno-pedantic \ + -Wno-poison-system-directories -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1985/lycklama/Makefile b/1985/lycklama/Makefile index 682750269..8ab367ef8 100644 --- a/1985/lycklama/Makefile +++ b/1985/lycklama/Makefile @@ -327,29 +327,26 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings +# Common C compiler warnings to silence # -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra -#CWARN= -Wall -Wextra ${CSILENCE} -CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} +#CSILENCE= +CSILENCE= -Wno-implicit-int -Wno-unused-value -Wno-parentheses -Wno-error \ + -Wno-implicit-function-declaration -# Silence warnings that ${CWARN} would normally complain about +# Common C compiler warning flags # -CSILENCE= -Wno-implicit-int -Wno-unused-value -Wno-parentheses -#CSILENCE= -Wno-implicit-int +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -361,21 +358,21 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # -CINCLUDE=-include unistd.h +CINCLUDE= #CINCLUDE= -include stdlib.h #CINCLUDE= -include stdio.h #CINCLUDE= -include stdlib.h -include stdio.h #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -388,7 +385,7 @@ CINCLUDE=-include unistd.h #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -399,20 +396,32 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-implicit-int-conversion -Wno-poison-system-directories \ + -Wno-unused-macros +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1985/shapiro/Makefile b/1985/shapiro/Makefile index bcdf2321b..9c03f133a 100644 --- a/1985/shapiro/Makefile +++ b/1985/shapiro/Makefile @@ -327,30 +327,26 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings -# -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra -#CWARN= -Wall -Wextra ${CSILENCE} -CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -# Silence warnings that ${CWARN} would normally complain about +# Common C compiler warnings to silence # +#CSILENCE= CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-implicit-int \ -Wno-parentheses -Wno-string-plus-int -#CSILENCE= -Wno-implicit-int -# compiler standard +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -362,12 +358,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -376,7 +372,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -389,7 +385,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -400,20 +396,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-missing-variable-declarations -Wno-poison-system-directories +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1985/sicherman/Makefile b/1985/sicherman/Makefile index 901344f00..2551086b7 100644 --- a/1985/sicherman/Makefile +++ b/1985/sicherman/Makefile @@ -327,29 +327,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings +# Common C compiler warnings to silence # -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra +#CSILENCE= +CSILENCE= -Wno-comment + +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -# Silence warnings that ${CWARN} would normally complain about -# -CSILENCE= -Wno-comment -#CSILENCE= -Wno-implicit-int - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -361,12 +357,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -375,7 +371,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -388,7 +384,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -399,20 +395,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-poison-system-directories +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## From 1155c68fbb7857145fc337d5dfbc4116aa652f2d Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 16:36:26 -0800 Subject: [PATCH 23/50] improve 1986 Makefiles --- 1986/Makefile | 2 +- 1986/applin/Makefile | 69 +++++++++++++----------- 1986/august/Makefile | 69 +++++++++++++----------- 1986/bright/Makefile | 72 ++++++++++++++----------- 1986/hague/Makefile | 118 +++++++++++++++++++++++++++++++++++++++-- 1986/holloway/Makefile | 70 +++++++++++++----------- 1986/marshall/Makefile | 70 +++++++++++++----------- 1986/pawka/Makefile | 67 ++++++++++++----------- 1986/stein/Makefile | 68 +++++++++++++----------- 1986/wall/Makefile | 71 ++++++++++++++----------- 10 files changed, 426 insertions(+), 250 deletions(-) diff --git a/1986/Makefile b/1986/Makefile index ed2146601..004d0db49 100644 --- a/1986/Makefile +++ b/1986/Makefile @@ -50,7 +50,7 @@ # tool locations ################ # -SHELL= /bin/bash +SHELL= bash MAKE= make diff --git a/1986/applin/Makefile b/1986/applin/Makefile index 707b3d7e5..f4d1856ee 100644 --- a/1986/applin/Makefile +++ b/1986/applin/Makefile @@ -327,29 +327,26 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings +# Common C compiler warnings to silence # -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-error \ + -Wno-implicit-function-declaration -Wno-implicit-int + +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -# Silence warnings that ${CWARN} would normally complain about -# -CSILENCE= -Wno-error -Wno-implicit-function-declaration -#CSILENCE= -Wno-implicit-int - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -361,12 +358,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -375,7 +372,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -388,7 +385,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -399,20 +396,32 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-poison-system-directories -Wno-unknown-warning-option \ + -Wno-missing-variable-declarations +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1986/august/Makefile b/1986/august/Makefile index e73492e25..26ebe51fd 100644 --- a/1986/august/Makefile +++ b/1986/august/Makefile @@ -327,29 +327,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings +# Common C compiler warnings to silence # -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-implicit-int -Wno-return-type + +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -# Silence warnings that ${CWARN} would normally complain about -# -CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-implicit-int -Wno-return-type -#CSILENCE= -Wno-implicit-int - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -361,12 +357,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -375,7 +371,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -388,7 +384,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -399,20 +395,33 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-cast-align -Wno-comma -Wno-missing-prototypes \ + -Wno-missing-variable-declarations -Wno-padded \ + -Wno-poison-system-directories -Wno-sign-conversion -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1986/bright/Makefile b/1986/bright/Makefile index 22104440c..05d7cf72f 100644 --- a/1986/bright/Makefile +++ b/1986/bright/Makefile @@ -327,31 +327,27 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings -# -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra -CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -# Silence warnings that ${CWARN} would normally complain about +# Common C compiler warnings to silence # +#CSILENCE= CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-format-security \ -Wno-implicit-int -Wno-unknown-escape-sequence -Wno-unused-value \ -Wno-sign-compare -#CSILENCE= -Wno-implicit-int -# compiler standard +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -363,12 +359,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -377,7 +373,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -390,7 +386,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -401,20 +397,34 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-format-nonliteral -Wno-missing-prototypes \ + -Wno-missing-variable-declarations -Wno-pedantic \ + -Wno-poison-system-directories -Wno-shorten-64-to-32 -Wno-sign-conversion \ + -Wno-strict-prototypes -Wno-unreachable-code-return +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1986/hague/Makefile b/1986/hague/Makefile index 43c7e6d76..7fb57e657 100644 --- a/1986/hague/Makefile +++ b/1986/hague/Makefile @@ -344,13 +344,13 @@ CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-implicit-int \ -Wno-incompatible-library-redeclaration -Wno-return-type #CSILENCE= -Wno-implicit-int -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -362,12 +362,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= #CDEFINE= -DIOCCC=26 -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -376,7 +376,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -415,6 +415,114 @@ CC= cc #CC=clang MAY_NEED_GCC= gcc +# Set X11_LIBDIR to the directory where the X11 library resides +# +#X11_LIBDIR= /usr/X11R6/lib +#X11_LIBDIR= /usr/X11/lib +X11_LIBDIR= /opt/X11/lib + +# Set X11_INCLUDEDIR to the directory where the X11 include files reside +# +#X11_INCDIR= /usr/X11R6/include +#X11_INCDIR= /usr/X11/include +X11_INCDIR= /opt/X11/include + +# Common C compiler warnings to silence +# +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-implicit-int \ + -Wno-incompatible-library-redeclaration -Wno-return-type + +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard +# +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu89 + +# Compiler bit architecture +# +# Some entries require 32-bitness: +# ARCH= -m32 +# +# Some entries require 64-bitness: +# ARCH= -m64 +# +# By default we assume nothing: +# +ARCH= + +# Defines that are needed to compile +# +CDEFINE= +#CDEFINE= -DIOCCC + +# Include files that are needed to compile +# +CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 + +# Optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# Default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +LIBS= +#LIBS= -lm +#LIBS= -L ${X11_LIBDIR} -lX11 +#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL + +# C compiler to use +# +CC= cc +#CC=clang +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-missing-prototypes -Wno-missing-variable-declarations \ + -Wno-pedantic -Wno-poison-system-directories -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif + ############################## # Special flags for this entry diff --git a/1986/holloway/Makefile b/1986/holloway/Makefile index 9a569965c..5cede9fc7 100644 --- a/1986/holloway/Makefile +++ b/1986/holloway/Makefile @@ -327,30 +327,26 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings -# -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra -CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -# Silence warnings that ${CWARN} would normally complain about +# Common C compiler warnings to silence # +#CSILENCE= CSILENCE= -Wno-format-security -Wno-implicit-int -Wno-int-to-pointer-cast \ -Wno-pointer-to-int-cast -#CSILENCE= -Wno-implicit-int -# compiler standard +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -362,12 +358,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -376,7 +372,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -389,7 +385,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -400,20 +396,32 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-missing-variable-declarations -Wno-pedantic \ + -Wno-poison-system-directories -Wno-shadow +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1986/marshall/Makefile b/1986/marshall/Makefile index 698a39908..4e9f55cd8 100644 --- a/1986/marshall/Makefile +++ b/1986/marshall/Makefile @@ -327,31 +327,27 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings -# -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra -#CWARN= -Wall -Wextra ${CSILENCE} -CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -# Silence warnings that ${CWARN} would normally complain about +# Common C compiler warnings to silence # +#CSILENCE= CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-implicit-int \ -Wno-int-conversion -Wno-parentheses -Wno-shift-negative-value \ -Wno-string-compare -Wno-unsequenced -Wno-unused-value -#CSILENCE= -Wno-implicit-int -# compiler standard +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -363,12 +359,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -377,7 +373,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -390,7 +386,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -401,20 +397,32 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-missing-prototypes -Wno-missing-variable-declarations \ + -Wno-poison-system-directories -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1986/pawka/Makefile b/1986/pawka/Makefile index 1dee1a22f..044fe55a4 100644 --- a/1986/pawka/Makefile +++ b/1986/pawka/Makefile @@ -327,29 +327,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings +# Common C compiler warnings to silence # -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra +#CSILENCE= +CSILENCE= -Wno-non-literal-null-conversion -Wno-unused-value + +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -# Silence warnings that ${CWARN} would normally complain about -# -CSILENCE= -Wno-non-literal-null-conversion -Wno-unused-value -#CSILENCE= -Wno-implicit-int - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -361,12 +357,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -375,7 +371,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -388,7 +384,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -399,20 +395,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-missing-variable-declarations -Wno-poison-system-directories +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1986/stein/Makefile b/1986/stein/Makefile index a7df5a356..56b42afff 100644 --- a/1986/stein/Makefile +++ b/1986/stein/Makefile @@ -327,29 +327,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings +# Common C compiler warnings to silence # -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-implicit-int -Wno-int-conversion + +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} CWARN= -Wall -Wextra ${CSILENCE} #CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -# Silence warnings that ${CWARN} would normally complain about -# -CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-implicit-int -Wno-int-conversion -#CSILENCE= -Wno-implicit-int - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -361,12 +357,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -375,7 +371,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -388,7 +384,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -399,20 +395,32 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-missing-variable-declarations -Wno-pedantic \ + -Wno-poison-system-directories +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1986/wall/Makefile b/1986/wall/Makefile index 067d350b0..e5eafc68b 100644 --- a/1986/wall/Makefile +++ b/1986/wall/Makefile @@ -327,30 +327,26 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings -# -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra -#CWARN= -Wall -Wextra ${CSILENCE} -CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -# Silence warnings that ${CWARN} would normally complain about +# Common C compiler warnings to silence # +#CSILENCE= CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-implicit-int \ -Wno-macro-redefined -Wno-parentheses -Wno-c99-extensions -#CSILENCE= -Wno-implicit-int -# compiler standard +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -362,12 +358,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -376,7 +372,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -389,7 +385,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -400,20 +396,33 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-implicit-int-conversion -Wno-missing-prototypess \ + -Wno-missing-variable-declarations -Wno-poison-system-directories \ + -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## From 30d83d1c67f916f62c01cefa3b2801cbbc8a81d3 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 16:50:46 -0800 Subject: [PATCH 24/50] improve 1987 Makefiles --- 1987/Makefile | 2 +- 1987/biggar/Makefile | 67 +++++++++++++++++++++----------------- 1987/heckbert/Makefile | 70 ++++++++++++++++++++++------------------ 1987/hines/Makefile | 67 +++++++++++++++++++++----------------- 1987/korn/Makefile | 70 ++++++++++++++++++++++------------------ 1987/lievaart/Makefile | 69 ++++++++++++++++++++++----------------- 1987/wall/Makefile | 73 ++++++++++++++++++++++++------------------ 1987/westley/Makefile | 68 ++++++++++++++++++++++----------------- 8 files changed, 271 insertions(+), 215 deletions(-) diff --git a/1987/Makefile b/1987/Makefile index 5c8b77e94..1c5e1d577 100644 --- a/1987/Makefile +++ b/1987/Makefile @@ -50,7 +50,7 @@ # tool locations ################ # -SHELL= /bin/bash +SHELL= bash MAKE= make diff --git a/1987/biggar/Makefile b/1987/biggar/Makefile index 240b9533a..9b057eda9 100644 --- a/1987/biggar/Makefile +++ b/1987/biggar/Makefile @@ -327,29 +327,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings +# Common C compiler warnings to silence # -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-extra-semi + +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -# Silence warnings that ${CWARN} would normally complain about -# -CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-extra-semi -#CSILENCE= -Wno-implicit-int - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -361,12 +357,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -375,7 +371,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -388,7 +384,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -399,20 +395,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-implicit-int-conversion -Wno-poison-system-directories +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1987/heckbert/Makefile b/1987/heckbert/Makefile index 613c86c1f..880ce5d91 100644 --- a/1987/heckbert/Makefile +++ b/1987/heckbert/Makefile @@ -327,30 +327,26 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings -# -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra -CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -# Silence warnings that ${CWARN} would normally complain about +# Common C compiler warnings to silence # +#CSILENCE= CSILENCE= -Wno-empty-body -Wno-error -Wno-implicit-function-declaration -Wno-implicit-int \ -Wno-int-to-pointer-cast -Wno-logical-op-parentheses -#CSILENCE= -Wno-implicit-int -# compiler standard +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -362,12 +358,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -376,7 +372,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -389,7 +385,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -400,20 +396,32 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-missing-prototypes -Wno-missing-variable-declarations \ + -Wno-pedantic -Wno-poison-system-directories -Wno-shadow -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1987/hines/Makefile b/1987/hines/Makefile index 4d499aeac..8f51cacdb 100644 --- a/1987/hines/Makefile +++ b/1987/hines/Makefile @@ -327,29 +327,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings +# Common C compiler warnings to silence # -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration + +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -# Silence warnings that ${CWARN} would normally complain about -# -CSILENCE= -Wno-error -Wno-implicit-function-declaration -#CSILENCE= -Wno-implicit-int - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -361,12 +357,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -375,7 +371,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -388,7 +384,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -399,20 +395,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-poison-system-directories -Wno-shorten-64-to-32 +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1987/korn/Makefile b/1987/korn/Makefile index ab1698ae0..12a86f9d2 100644 --- a/1987/korn/Makefile +++ b/1987/korn/Makefile @@ -327,30 +327,26 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings -# -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra -#CWARN= -Wall -Wextra ${CSILENCE} -CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -# Silence warnings that ${CWARN} would normally complain about +# Common C compiler warnings to silence # +#CSILENCE= CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-implicit-int -Dunix=1 \ -Wno-string-plus-int -#CSILENCE= -Wno-implicit-int -# compiler standard +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -362,12 +358,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -376,7 +372,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -389,7 +385,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -400,20 +396,32 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-array-bounds-pointer-arithmetic -Wno-format-nonliteral \ + -Wno-poison-system-directories +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1987/lievaart/Makefile b/1987/lievaart/Makefile index 6cfe7ac51..c4a938e03 100644 --- a/1987/lievaart/Makefile +++ b/1987/lievaart/Makefile @@ -327,29 +327,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings +# Common C compiler warnings to silence # -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-implicit-int + +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} CWARN= -Wall -Wextra ${CSILENCE} #CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -# Silence warnings that ${CWARN} would normally complain about -# -CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-implicit-int -#CSILENCE= -Wno-implicit-int - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -361,12 +357,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -375,7 +371,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -388,7 +384,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -399,20 +395,33 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-conditional-uninitialized -Wno-missing-prototypes \ + -Wno-missing-variable-declarations -Wno-pedantic \ + -Wno-poison-system-directories -Wno-shadow -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1987/wall/Makefile b/1987/wall/Makefile index 9ec9eeb87..4e4d79b49 100644 --- a/1987/wall/Makefile +++ b/1987/wall/Makefile @@ -327,31 +327,27 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings -# -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra -CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -# Silence warnings that ${CWARN} would normally complain about +# Common C compiler warnings to silence # +#CSILENCE= CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \ -Wno-incompatible-library-redeclaration -Wno-return-type -Wno-string-plus-int \ - -Wno-unknown-escape-sequence -#CSILENCE= -Wno-implicit-int + -Wno-unknown-escape-sequence -Wno-deprecated-declarations -# compiler standard +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -363,12 +359,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -377,7 +373,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -390,7 +386,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -401,20 +397,33 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-format-nonliteral -Wno-implicit-int-conversion \ + -Wno-missing-prototypes -Wno-missing-variable-declarations -Wno-pedantic \ + -Wno-poison-system-directories -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1987/westley/Makefile b/1987/westley/Makefile index 3c3d11734..6490e1c9f 100644 --- a/1987/westley/Makefile +++ b/1987/westley/Makefile @@ -327,29 +327,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings +# Common C compiler warnings to silence # -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra +#CSILENCE= +CSILENCE= -Wno-for-loop-analysis -Wno-unused-value + +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -# Silence warnings that ${CWARN} would normally complain about -# -CSILENCE= -Wno-for-loop-analysis -Wno-unused-value -#CSILENCE= -Wno-implicit-int - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -361,12 +357,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -375,7 +371,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -388,7 +384,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -399,20 +395,32 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-missing-variable-declarations \ + -Wno-poison-system-directories -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## From eee80a1a1d1e7c940bdc509256a36adbe41f56d7 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 16:59:08 -0800 Subject: [PATCH 25/50] restore missing 1988/dale/dale.c --- 1988/dale/{dale.orig.c => dale.c} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename 1988/dale/{dale.orig.c => dale.c} (100%) diff --git a/1988/dale/dale.orig.c b/1988/dale/dale.c similarity index 100% rename from 1988/dale/dale.orig.c rename to 1988/dale/dale.c From 32b62040440c4c27728b322f8cded298b3b4b587 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 17:08:33 -0800 Subject: [PATCH 26/50] restore missing 1988/phillipps/phillipps.c --- 1988/phillipps/{phillipps.orig.c => phillipps.c} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename 1988/phillipps/{phillipps.orig.c => phillipps.c} (100%) diff --git a/1988/phillipps/phillipps.orig.c b/1988/phillipps/phillipps.c similarity index 100% rename from 1988/phillipps/phillipps.orig.c rename to 1988/phillipps/phillipps.c From 9194e0fa4dee396e42f9a631cf748ca1b0c3a643 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 17:18:13 -0800 Subject: [PATCH 27/50] fix of 1988/phillipps/phillipps.c to compile on modern C compilers --- 1988/phillipps/phillipps.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/1988/phillipps/phillipps.c b/1988/phillipps/phillipps.c index 7c48f19cb..d92718a86 100644 --- a/1988/phillipps/phillipps.c +++ b/1988/phillipps/phillipps.c @@ -1,7 +1,4 @@ -main(t,_,a ) -char -* -a; +main(int t,char **_,char **a) { return! @@ -9,7 +6,7 @@ a; t<3? main(-79,-13,a+ -main(-87,1-_, +main(-87,1-(int)_, main(-86, 0, a+1 ) From 4ac9b358958ae9b8b9f0d0b53a50904cc22824e5 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 17:44:32 -0800 Subject: [PATCH 28/50] improve 1988 Makefiles --- 1988/Makefile | 2 +- 1988/applin/Makefile | 67 ++++++++++++++++++--------------- 1988/dale/Makefile | 73 +++++++++++++++++++----------------- 1988/isaak/Makefile | 68 ++++++++++++++++++---------------- 1988/litmaath/Makefile | 67 ++++++++++++++++++--------------- 1988/phillipps/Makefile | 78 ++++++++++++++++++++------------------- 1988/reddy/Makefile | 70 +++++++++++++++++++---------------- 1988/robison/Makefile | 68 +++++++++++++++++++--------------- 1988/spinellis/.gitignore | 1 + 1988/spinellis/Makefile | 77 +++++++++++++++++++------------------- 1988/westley/Makefile | 68 +++++++++++++++++++--------------- 11 files changed, 347 insertions(+), 292 deletions(-) diff --git a/1988/Makefile b/1988/Makefile index 475d2ae8b..ce32ad66c 100644 --- a/1988/Makefile +++ b/1988/Makefile @@ -50,7 +50,7 @@ # tool locations ################ # -SHELL= /bin/bash +SHELL= bash MAKE= make diff --git a/1988/applin/Makefile b/1988/applin/Makefile index 503d427aa..b9b1b1cd3 100644 --- a/1988/applin/Makefile +++ b/1988/applin/Makefile @@ -327,29 +327,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings +# Common C compiler warnings to silence # -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra +#CSILENCE= +CSILENCE= -Wno-expansion-to-defined -Wno-implicit-int + +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -# Silence warnings that ${CWARN} would normally complain about -# -CSILENCE= -Wno-expansion-to-defined -Wno-implicit-int -#CSILENCE= -Wno-implicit-int - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -361,12 +357,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -375,7 +371,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -388,7 +384,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -399,20 +395,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-poison-system-directories +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1988/dale/Makefile b/1988/dale/Makefile index dc16e6336..f71ffcfcc 100644 --- a/1988/dale/Makefile +++ b/1988/dale/Makefile @@ -327,30 +327,26 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings -# -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra -CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -# Silence warnings that ${CWARN} would normally complain about +# Common C compiler warnings to silence # +#CSILENCE= CSILENCE= -Wno-implicit-function-declaration -Wno-implicit-int -Wno-keyword-macro \ -Wno-pointer-to-int-cast -Wno-return-type -Wno-unused-value -#CSILENCE= -Wno-implicit-int -# compiler standard +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -362,12 +358,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -376,7 +372,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -389,7 +385,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -400,20 +396,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-poison-system-directories +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## @@ -427,8 +434,8 @@ OBJ= ${PROG}.o DATA= TARGET= ${PROG} # -ALT_OBJ= ${PROG}.orig.o -ALT_TARGET= ${PROG}.orig +ALT_OBJ= +ALT_TARGET= ################# diff --git a/1988/isaak/Makefile b/1988/isaak/Makefile index 1f92b368f..f07fcba07 100644 --- a/1988/isaak/Makefile +++ b/1988/isaak/Makefile @@ -327,33 +327,29 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings -# -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra -CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -# Silence warnings that ${CWARN} would normally complain about +# Common C compiler warnings to silence # +#CSILENCE= CSILENCE= -Wno-comma -Wno-implicit-function-declaration -Wno-format-insufficient-args \ -Wno-implicit-int -Wno-incompatible-library-redeclaration -Wno-missing-prototypes \ -Wno-missing-variable-declarations -Wno-poison-system-directories -Wno-return-type \ -Wno-shadow -Wno-shift-op-parentheses -Wno-strict-prototypes -Wno-unreachable-code \ -Wno-unused-macros -#CSILENCE= -Wno-implicit-int -# compiler standard +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -365,13 +361,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # #CDEFINE= CDEFINE= -DI=B -DO=- -Dy -#CDEFINE= -DIOCCC=26 -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -380,7 +375,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -393,7 +388,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -404,20 +399,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-pedantic +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1988/litmaath/Makefile b/1988/litmaath/Makefile index ffd626c03..bec77b06b 100644 --- a/1988/litmaath/Makefile +++ b/1988/litmaath/Makefile @@ -327,29 +327,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings +# Common C compiler warnings to silence # -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-logical-op-parentheses + +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -# Silence warnings that ${CWARN} would normally complain about -# -CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-logical-op-parentheses -#CSILENCE= -Wno-implicit-int - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -361,12 +357,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -375,7 +371,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -388,7 +384,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -399,20 +395,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-poison-system-directories +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1988/phillipps/Makefile b/1988/phillipps/Makefile index 674a48aad..d51d54134 100644 --- a/1988/phillipps/Makefile +++ b/1988/phillipps/Makefile @@ -327,30 +327,27 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings +# Common C compiler warnings to silence # -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra +#CSILENCE= +CSILENCE= -Wno-pedantic -Wno-logical-not-parentheses -Wno-implicit-function-declaration \ + -Wno-incompatible-pointer-types -Wno-int-conversion -Wno-pointer-to-int-cast \ + -Wno-pointer-integer-compare -Wno-compare-distinct-pointer-types + +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -# Silence warnings that ${CWARN} would normally complain about -# -CSILENCE= -Wno-pedantic -Wno-logical-not-parentheses -Wno-implicit-function-declaration \ - -Wno-incompatible-pointer-types -Wno-int-conversion -Wno-pointer-to-int-cast -#CSILENCE= -Wno-implicit-int - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -362,12 +359,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -376,7 +373,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -389,7 +386,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -400,20 +397,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-poison-system-directories -Wno-comma +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## @@ -427,8 +435,8 @@ OBJ= ${PROG}.o DATA= TARGET= ${PROG} # -ALT_OBJ= ${PROG}.orig.o -ALT_TARGET= ${PROG}.orig +ALT_OBJ= +ALT_TARGET= ################# @@ -450,10 +458,6 @@ ${PROG}: ${PROG}.c alt: data ${ALT_TARGET} @${TRUE} -${PROG}.orig: ${PROG}.orig.c - @echo "NOTE: The original source may not compile using modern compilers." - ${CC} ${CFLAGS} $< -o $@ ${LIBS} - # data files # data: ${DATA} diff --git a/1988/reddy/Makefile b/1988/reddy/Makefile index 63f5ba8b0..a8c706e41 100644 --- a/1988/reddy/Makefile +++ b/1988/reddy/Makefile @@ -327,30 +327,26 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings +# Common C compiler warnings to silence # -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra +#CSILENCE= +CSILENCE= -Wno-pedantic -Wno-error -Wno-implicit-function-declaration -Wno-parentheses \ + -Wno-return-type -Wno-deprecated-declarations + +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -# Silence warnings that ${CWARN} would normally complain about -# -CSILENCE= -Wno-pedantic -Wno-error -Wno-implicit-function-declaration -Wno-parentheses \ - -Wno-return-type -#CSILENCE= -Wno-implicit-int - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -362,12 +358,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -376,7 +372,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -389,7 +385,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -400,20 +396,32 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-missing-prototypes -Wno-missing-variable-declarations \ + -Wno-poison-system-directories -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1988/robison/Makefile b/1988/robison/Makefile index 79642c1d1..c496d18dc 100644 --- a/1988/robison/Makefile +++ b/1988/robison/Makefile @@ -327,29 +327,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings +# Common C compiler warnings to silence # -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration + +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} CWARN= -Wall -Wextra ${CSILENCE} #CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -# Silence warnings that ${CWARN} would normally complain about -# -CSILENCE= -Wno-error -Wno-implicit-function-declaration -#CSILENCE= -Wno-implicit-int - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -361,12 +357,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -375,7 +371,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -388,7 +384,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -399,20 +395,32 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-implicit-int-conversion -Wno-missing-variable-declarations \ + -Wno-pedantic -Wno-poison-system-directories +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1988/spinellis/.gitignore b/1988/spinellis/.gitignore index 5cf5145a5..32df5de2c 100644 --- a/1988/spinellis/.gitignore +++ b/1988/spinellis/.gitignore @@ -1 +1,2 @@ +prog.c spinellis diff --git a/1988/spinellis/Makefile b/1988/spinellis/Makefile index 7cd5c2cd3..66262ac15 100644 --- a/1988/spinellis/Makefile +++ b/1988/spinellis/Makefile @@ -327,29 +327,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings +# Common C compiler warnings to silence # -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra +#CSILENCE= +CSILENCE= -Wno-empty-translation-unit + +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -# Silence warnings that ${CWARN} would normally complain about -# -CSILENCE= -#CSILENCE= -Wno-implicit-int - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -361,12 +357,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -375,7 +371,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -388,7 +384,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -399,20 +395,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-empty-translation-unit -Wno-poison-system-directories +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## @@ -443,15 +450,7 @@ all: data ${TARGET} ${PROG}: ${PROG}.c @echo "NOTE: This entry requires a non-standard K&R C compiler to compile." - ${RM} -f $@ - @echo 'On the command line, type in the following command and then' - @echo 'then type in a C program following by EOF (control D):' - @echo - @echo '${CPP} ${PROG}.c > prog.c' - @echo - @echo 'Then on the command line, type in the following command:' - @echo - @echo '${CC} prog.c -o ${PROG} ${LIBS}' + ${CC} ${CFLAGS} $< -o $@ ${LIBS} # alternative executable # diff --git a/1988/westley/Makefile b/1988/westley/Makefile index 669d3aefc..a1c30d7d6 100644 --- a/1988/westley/Makefile +++ b/1988/westley/Makefile @@ -327,29 +327,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings +# Common C compiler warnings to silence # -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-return-type + +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -# Silence warnings that ${CWARN} would normally complain about -# -CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-return-type -#CSILENCE= -Wno-implicit-int - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -361,12 +357,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -375,7 +371,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -388,7 +384,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -399,20 +395,32 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-missing-prototypes -Wno-missing-variable-declarations \ + -Wno-poison-system-directories -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## From 880172e2f4c7cd026a4a9441144def13bfe74a69 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 17:54:47 -0800 Subject: [PATCH 29/50] restore missing 1989/fubar/fubar.sh --- 1989/fubar/{fubar.orig.sh => fubar.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename 1989/fubar/{fubar.orig.sh => fubar.sh} (100%) diff --git a/1989/fubar/fubar.orig.sh b/1989/fubar/fubar.sh similarity index 100% rename from 1989/fubar/fubar.orig.sh rename to 1989/fubar/fubar.sh From 7c47ed381ba0c3f5f1d9ab690fc367fefdd4e923 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 17:57:32 -0800 Subject: [PATCH 30/50] fix 1989/fubar/fubar.sh, remove fubar.orig.c --- 1989/fubar/fubar.orig.c | 18 ------------------ 1989/fubar/fubar.sh | 4 ++-- 2 files changed, 2 insertions(+), 20 deletions(-) delete mode 100644 1989/fubar/fubar.orig.c mode change 100644 => 100755 1989/fubar/fubar.sh diff --git a/1989/fubar/fubar.orig.c b/1989/fubar/fubar.orig.c deleted file mode 100644 index d566c64ca..000000000 --- a/1989/fubar/fubar.orig.c +++ /dev/null @@ -1,18 +0,0 @@ -#include -#define QQ 1 -#define TT 1 -#define cc main(c,v) int c; char **v;{char tt[12],qq[7]; int q=0,o=1,l=1,m=1;struct {int c;} f; -#define incest qq[6]='\0';tt[11]='\0';if(QQ==atoi(v[1])+1){(void)fprintf(stderr,"%s factorial = %d\n",v[1], TT);exit(1);}o=c+f -#define x ;while(EOF!=(o=getchar())){if(l && q=='Q' && o=='Q'){l=0;(void)getchar();(void)fread(qq,6,1,stdin);(void)printf("Q %6d",atoi(qq)+1);}else -if(m && q=='T' && o=='T'){m=0;(void)fread(tt,11,1,stdin);(void)printf("T %9d\n",atoi(tt)*QQ);}else {q=o;(void)putchar(o);}}exit(0);} -cc incest.c -o x -#define zxc ;{/* -cat incest.c | x $1 >! x1 -if ($status != 0) then -exit -endif -mv x1 incest.c -chmod +x incest.c -exec incest.c $1 -exit -*/ diff --git a/1989/fubar/fubar.sh b/1989/fubar/fubar.sh old mode 100644 new mode 100755 index 52e1136e3..248fd09aa --- a/1989/fubar/fubar.sh +++ b/1989/fubar/fubar.sh @@ -1,4 +1,4 @@ -: +#!/usr/bin/env sh # to run fubar in the 'proper' way # parse args @@ -15,5 +15,5 @@ r fubar.c w ouroboros.c EOF chmod +x ouroboros.c -ouroboros.c $1 +./ouroboros.c $1 rm -f ouroboros.c x1 x From a44d8ac3ea889379c9e07ff0247ef16b8071a2e4 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 18:00:54 -0800 Subject: [PATCH 31/50] update 1989/fubar/README.md as per removal of fubar.orig.c --- 1989/fubar/README.md | 38 +++++++++++--------------------------- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/1989/fubar/README.md b/1989/fubar/README.md index aec2ed9c6..041b24763 100644 --- a/1989/fubar/README.md +++ b/1989/fubar/README.md @@ -1,4 +1,4 @@ -Best self-modifying program: +# Best self-modifying program: Jay Vosburgh Sequent Computer Systems, Inc @@ -7,38 +7,22 @@ Best self-modifying program: 97006 USA -Judges notes: +## To build: + + make all + +### To run + + ./fubar 2 + +## Judges' comments Run this with a single digit argument (or wait a long time). - There are 2 versions of this program, the one that was entered, - and one that was changed by the judges to be more portable. The - makefile runs the latter version by default. - The blank line at the beginning of the source is mandatory. Do you know why? - The shell script run by the makefile joins lines that may be - cut up by mailers. The file "fubar.orig.c", for example, needs - the 6th and 7th lines joined together (with a space between - them) to recreate the original entry. If you fix the file, you - will need to change the last 8 linnes of "fubar.orig.sh" to read: - - cp fubar.orig.c ouroboros.c - chmod +x ouroboros.c - csh ouroboros.c $1 - rm -f ouroboros.c x1 x - - The more portable version, "fubar.c", can be fixed by joining the - 7th and 8th lines in the same way. As well, if you fix "fubar.c" - you will need to also change the last 8 lines to "fubar.sh" to read: - - cp fubar.c ouroboros.c - chmod +x ouroboros.c - csh ouroboros.c $1 - rm -f ouroboros.c x1 x - -Selected notes from the author: +## Author's comments In a nutshell, this is probably the slowest and most obnoxious factorial program ever written. Unfortunately, From af56d1b5d8f83586f6d428687de748433cb425e8 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 18:09:34 -0800 Subject: [PATCH 32/50] fixed missing 1989/jar.2/jar.2.c --- 1989/fubar/.gitignore | 2 ++ 1989/jar.2/{jar.2.orig.c => jar.2.c} | 0 2 files changed, 2 insertions(+) rename 1989/jar.2/{jar.2.orig.c => jar.2.c} (100%) diff --git a/1989/fubar/.gitignore b/1989/fubar/.gitignore index d894f2906..f82486988 100644 --- a/1989/fubar/.gitignore +++ b/1989/fubar/.gitignore @@ -1 +1,3 @@ fubar +ouroboros +ouroboros.c diff --git a/1989/jar.2/jar.2.orig.c b/1989/jar.2/jar.2.c similarity index 100% rename from 1989/jar.2/jar.2.orig.c rename to 1989/jar.2/jar.2.c From 197d59a3cddb563b59997981fb7ba579a0ed47a7 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 18:15:21 -0800 Subject: [PATCH 33/50] fix missing 1989/ovdluhe/ovdluhe.c --- 1989/ovdluhe/{ovdluhe.orig.c => ovdluhe.c} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename 1989/ovdluhe/{ovdluhe.orig.c => ovdluhe.c} (100%) diff --git a/1989/ovdluhe/ovdluhe.orig.c b/1989/ovdluhe/ovdluhe.c similarity index 100% rename from 1989/ovdluhe/ovdluhe.orig.c rename to 1989/ovdluhe/ovdluhe.c From 9645d7594e34070119d1e9703c0d9fe2cb611123 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 18:26:55 -0800 Subject: [PATCH 34/50] fix 1989/ovdluhe/ovdluhe.c --- 1989/ovdluhe/ovdluhe.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/1989/ovdluhe/ovdluhe.c b/1989/ovdluhe/ovdluhe.c index a23ae84db..aaf0c3147 100644 --- a/1989/ovdluhe/ovdluhe.c +++ b/1989/ovdluhe/ovdluhe.c @@ -1,15 +1,14 @@ #include typedef char ape -#define D define -#D EA register -#D EP unsigned -#D A 1 -#D AP (A<>A) -#D APE {EA EP ape ea=AE;while(ea--) e[ea]=E;} +#define EA register +#define EP unsigned +#define A 1 +#define AP (A<>A) +#define APE {EA EP ape,ea=AE;while(ea--) e[ea]=E;} ;ape a[PE+A],ap,*ae,p[P+A],e[AE]; main(){ape pe,*ep=a;srand((EP)time((long)E)); while(((*(ep++)=getchar())!=-A)&&((ep-a) Date: Tue, 21 Feb 2023 18:38:23 -0800 Subject: [PATCH 35/50] improve 1989 Makefiles --- 1989/Makefile | 2 +- 1989/fubar/Makefile | 73 ++++++++++++++------------ 1989/jar.1/Makefile | 67 +++++++++++++----------- 1989/jar.2/Makefile | 69 +++++++++++++----------- 1989/ovdluhe/Makefile | 80 +++++++++++++++------------- 1989/paul/Makefile | 70 ++++++++++++++----------- 1989/robison/Makefile | 68 +++++++++++++----------- 1989/roemer/Makefile | 71 ++++++++++++++----------- 1989/tromp/Makefile | 118 ++++++++++++++++++++++++++++++++++++++++-- 1989/vanb/Makefile | 69 +++++++++++++----------- 1989/westley/Makefile | 70 ++++++++++++++----------- 11 files changed, 466 insertions(+), 291 deletions(-) diff --git a/1989/Makefile b/1989/Makefile index 59740ffc3..953449a18 100644 --- a/1989/Makefile +++ b/1989/Makefile @@ -50,7 +50,7 @@ # tool locations ################ # -SHELL= /bin/bash +SHELL= bash MAKE= make diff --git a/1989/fubar/Makefile b/1989/fubar/Makefile index 2295a232f..3ae32df95 100644 --- a/1989/fubar/Makefile +++ b/1989/fubar/Makefile @@ -327,29 +327,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings +# Common C compiler warnings to silence # -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra +#CSILENCE= +CSILENCE= -Wno-implicit-function-declaration -Wno-incompatible-library-redeclaration + +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -# Silence warnings that ${CWARN} would normally complain about -# -CSILENCE= -Wno-implicit-function-declaration -Wno-incompatible-library-redeclaration -#CSILENCE= -Wno-implicit-int - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -361,12 +357,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -375,7 +371,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -388,7 +384,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -399,20 +395,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +#CSILENCE+= +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## @@ -423,11 +430,11 @@ ENTRY= fubar PROG= ${ENTRY} # OBJ= ${PROG}.o -DATA= fubar.sh fubar.orig.sh +DATA= fubar.sh TARGET= ${PROG} # -ALT_OBJ= ${PROG}.orig.o -ALT_TARGET= ${PROG}.orig +ALT_OBJ= +ALT_TARGET= ################# diff --git a/1989/jar.1/Makefile b/1989/jar.1/Makefile index 67d24cc15..8464ccd4c 100644 --- a/1989/jar.1/Makefile +++ b/1989/jar.1/Makefile @@ -327,29 +327,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings -# -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra -#CWARN= -Wall -Wextra ${CSILENCE} -CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -# Silence warnings that ${CWARN} would normally complain about +# Common C compiler warnings to silence # CSILENCE= #CSILENCE= -Wno-implicit-int -# compiler standard +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -361,12 +357,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -375,7 +371,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -388,7 +384,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -399,20 +395,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +#CSILENCE+= +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1989/jar.2/Makefile b/1989/jar.2/Makefile index db2d8da90..154a11592 100644 --- a/1989/jar.2/Makefile +++ b/1989/jar.2/Makefile @@ -327,29 +327,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings -# -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra -CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -# Silence warnings that ${CWARN} would normally complain about +# Common C compiler warnings to silence # +#CSILENCE= CSILENCE= -Wno-implicit-function-declaration -Wno-missing-braces -Wno-parentheses -#CSILENCE= -Wno-implicit-int -# compiler standard +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -361,12 +357,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -375,7 +371,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -388,7 +384,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -399,20 +395,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +#CSILENCE+= +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1989/ovdluhe/Makefile b/1989/ovdluhe/Makefile index 5345a25f7..aa28e69ab 100644 --- a/1989/ovdluhe/Makefile +++ b/1989/ovdluhe/Makefile @@ -327,30 +327,27 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings +# Common C compiler warnings to silence # -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra +#CSILENCE= +CSILENCE= -Wno-char-subscripts -Wno-constant-conversion -Wno-empty-body \ + -Wno-implicit-function-declaration -Wno-parentheses -Wno-unsequenced \ + -Wno-unused-variable + +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -# Silence warnings that ${CWARN} would normally complain about -# -CSILENCE= -Wno-char-subscripts -Wno-constant-conversion -Wno-empty-body \ - -Wno-implicit-function-declaration -Wno-parentheses -Wno-unsequenced -#CSILENCE= -Wno-implicit-int - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -362,12 +359,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -376,7 +373,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -389,7 +386,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -400,20 +397,33 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-implicit-int-conversion -Wno-missing-prototypes \ + -Wno-missing-variable-declarations -Wno-poison-system-directories + -Wno-sign-conversion -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## @@ -427,8 +437,8 @@ OBJ= ${PROG}.o DATA= TARGET= ${PROG} # -ALT_OBJ= ${PROG}.orig.o -ALT_TARGET= ${PROG}.orig +ALT_OBJ= +ALT_TARGET= ################# @@ -451,10 +461,6 @@ ${PROG}: ${PROG}.c alt: data ${ALT_TARGET} @${TRUE} -${PROG}.orig: ${PROG}.orig.c - @echo "NOTE: The original source may not compile using modern compilers." - ${CC} ${CFLAGS} $< -o $@ ${LIBS} - # data files # data: ${DATA} diff --git a/1989/paul/Makefile b/1989/paul/Makefile index d8503a226..570cf962c 100644 --- a/1989/paul/Makefile +++ b/1989/paul/Makefile @@ -327,31 +327,27 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings -# -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra -CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -# Silence warnings that ${CWARN} would normally complain about +# Common C compiler warnings to silence # +#CSILENCE= CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-format-security \ -Wno-incompatible-library-redeclaration -Wno-int-to-pointer-cast \ -Wno-pointer-to-int-cast -Wno-return-type -#CSILENCE= -Wno-implicit-int -# compiler standard +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -363,12 +359,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -377,7 +373,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -390,7 +386,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -401,20 +397,32 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-cast-align -Wno-missing-prototypes -Wno-pedantic \ + -Wno-poison-system-directories -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1989/robison/Makefile b/1989/robison/Makefile index eab91fb95..dc5bde980 100644 --- a/1989/robison/Makefile +++ b/1989/robison/Makefile @@ -327,29 +327,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings +# Common C compiler warnings to silence # -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra +#CSILENCE= +CSILENCE= -Wno-unused-parameter + +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -# Silence warnings that ${CWARN} would normally complain about -# -CSILENCE= -Wno-unused-parameter -#CSILENCE= -Wno-implicit-int - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -361,12 +357,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -375,7 +371,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -388,7 +384,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -399,20 +395,32 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-missing-prototypes -Wno-poison-system-directories \ + -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1989/roemer/Makefile b/1989/roemer/Makefile index 770abb687..048d30bef 100644 --- a/1989/roemer/Makefile +++ b/1989/roemer/Makefile @@ -327,30 +327,26 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings -# -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra -#CWARN= -Wall -Wextra ${CSILENCE} -CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -# Silence warnings that ${CWARN} would normally complain about +# Common C compiler warnings to silence # +#CSILENCE= CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \ -Wno-string-plus-int -Wno-unused-value -#CSILENCE= -Wno-implicit-int -# compiler standard +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -362,12 +358,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -376,7 +372,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -389,7 +385,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -400,20 +396,33 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-array-bounds-pointer-arithmetic -Wno-comma \ + -Wno-implicit-int-conversion -Wno-missing-variable-declarations \ + -Wno-poison-system-directories +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1989/tromp/Makefile b/1989/tromp/Makefile index 7122e751f..18d0eea92 100644 --- a/1989/tromp/Makefile +++ b/1989/tromp/Makefile @@ -345,13 +345,13 @@ CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-pointer-to-int-cast -Wno-string-plus-int -Wno-return-type -Wno-unknown-warning-option #CSILENCE= -Wno-implicit-int -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -363,12 +363,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= #CDEFINE= -DIOCCC=26 -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -377,7 +377,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -416,6 +416,114 @@ CC= cc #CC=clang MAY_NEED_GCC= gcc +# Set X11_LIBDIR to the directory where the X11 library resides +# +#X11_LIBDIR= /usr/X11R6/lib +#X11_LIBDIR= /usr/X11/lib +X11_LIBDIR= /opt/X11/lib + +# Set X11_INCLUDEDIR to the directory where the X11 include files reside +# +#X11_INCDIR= /usr/X11R6/include +#X11_INCDIR= /usr/X11/include +X11_INCDIR= /opt/X11/include + +# Common C compiler warnings to silence +# +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-pointer-to-int-cast \ + -Wno-no-return-type -Wno-builtin-requires-header -Wno-empty-body \ + -Wno-string-plus-int -Wno-return-type -Wno-unknown-warning-option + +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard +# +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu89 + +# Compiler bit architecture +# +# Some entries require 32-bitness: +# ARCH= -m32 +# +# Some entries require 64-bitness: +# ARCH= -m64 +# +# By default we assume nothing: +# +ARCH= + +# Defines that are needed to compile +# +CDEFINE= +#CDEFINE= -DIOCCC + +# Include files that are needed to compile +# +CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 + +# Optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# Default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +LIBS= +#LIBS= -lm +#LIBS= -L ${X11_LIBDIR} -lX11 +#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL + +# C compiler to use +# +CC= cc +#CC=clang +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +#CSILENCE+= +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif + ############################## # Special flags for this entry diff --git a/1989/vanb/Makefile b/1989/vanb/Makefile index 7c375cc73..9a106df6c 100644 --- a/1989/vanb/Makefile +++ b/1989/vanb/Makefile @@ -327,29 +327,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings -# -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra -#CWARN= -Wall -Wextra ${CSILENCE} -CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -# Silence warnings that ${CWARN} would normally complain about +# Common C compiler warnings to silence # +#CSILENCE= CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration -Wno-pedantic -#CSILENCE= -Wno-implicit-int -# compiler standard +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -361,12 +357,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -375,7 +371,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -388,7 +384,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -399,20 +395,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-poison-system-directories +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1989/westley/Makefile b/1989/westley/Makefile index c687f9c63..caa49fd3e 100644 --- a/1989/westley/Makefile +++ b/1989/westley/Makefile @@ -327,30 +327,26 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# Compiler warnings -# -#CWARN= -#CWARN= -Wall -#CWARN= -Wall -Wextra -#CWARN= -Wall -Wextra ${CSILENCE} -CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -#CWARN= -Wall -Wextra -Weverything -pedantic -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -# Silence warnings that ${CWARN} would normally complain about +# Common C compiler warnings to silence # +#CSILENCE= CSILENCE= -Wno-comment -Wno-error -Wno-implicit-function-declaration \ -Wno-logical-op-parentheses -#CSILENCE= -Wno-implicit-int -# compiler standard +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu89 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -362,12 +358,12 @@ CSTD= -std=gnu89 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # +#CDEFINE= CDEFINE= -Dtrgpune=putchar -#CDEFINE= -DIOCCC=26 -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -376,7 +372,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -389,7 +385,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -400,20 +396,32 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-missing-prototypes -Wno-pedantic -Wno-poison-system-directories \ + -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## From fca5a7864585c2757bc38409607a4fd297440b22 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 19:05:12 -0800 Subject: [PATCH 36/50] improve 1990 Makefiles --- 1990/Makefile | 2 +- 1990/baruch/Makefile | 88 +++++++++++------------------- 1990/cmills/Makefile | 89 ++++++++++++------------------ 1990/dds/Makefile | 90 +++++++++++-------------------- 1990/dg/Makefile | 92 ++++++++++++------------------- 1990/dg/dg.c | 122 +++++++++++++++++++++--------------------- 1990/jaw/Makefile | 93 ++++++++++++-------------------- 1990/pjr/Makefile | 87 +++++++++++------------------- 1990/scjones/Makefile | 86 +++++++++++------------------ 1990/stig/Makefile | 86 +++++++++++------------------ 1990/tbr/Makefile | 89 +++++++++++------------------- 1990/theorem/Makefile | 95 ++++++++++++-------------------- 1990/westley/Makefile | 88 +++++++++++------------------- 13 files changed, 415 insertions(+), 692 deletions(-) diff --git a/1990/Makefile b/1990/Makefile index 8aeb36b66..9529d7883 100644 --- a/1990/Makefile +++ b/1990/Makefile @@ -50,7 +50,7 @@ # tool locations ################ # -SHELL= /bin/bash +SHELL= bash MAKE= make diff --git a/1990/baruch/Makefile b/1990/baruch/Makefile index beb78f4ad..7002cc38e 100644 --- a/1990/baruch/Makefile +++ b/1990/baruch/Makefile @@ -328,63 +328,26 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# CWARN - Silence warnings that ${CWARN} would normally complain about -# CSILENCE -Compiler warnings -# -ifeq ($(CC),clang) - -# clang CSILENCE and CWARN +# Common C compiler warnings to silence # #CSILENCE= CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-logical-op-parentheses \ -Wno-string-plus-int -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -else -ifeq ($(CC),gcc) - -# gcc CSILENCE and CWARN -# -#CSILENCE= -CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-logical-op-parentheses \ - -Wno-string-plus-int +# Common C compiler warning flags # #CWARN= ${CSILENCE} #CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -else - -# default CSILENCE and WARN -# -#CSILENCE= -CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-logical-op-parentheses \ - -Wno-string-plus-int -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -endif -endif - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu90 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -396,12 +359,12 @@ CSTD= -std=gnu90 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -410,7 +373,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -423,7 +386,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -434,20 +397,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-missing-variable-declarations -Wno-format-nonliteral -Wno-poison-system-directories +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1990/cmills/Makefile b/1990/cmills/Makefile index 2d84c4ec9..c5a9dfbde 100644 --- a/1990/cmills/Makefile +++ b/1990/cmills/Makefile @@ -328,63 +328,26 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# CWARN - Silence warnings that ${CWARN} would normally complain about -# CSILENCE -Compiler warnings -# -ifeq ($(CC),clang) - -# clang CSILENCE and CWARN +# Common C compiler warnings to silence # #CSILENCE= CSILENCE= -Wno-deprecated-declarations -Wno-parentheses -Wno-error -Wno-implicit-function-declaration \ -Wno-format-security -Wno-return-type -Wno-unused-value -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -else -ifeq ($(CC),gcc) - -# gcc CSILENCE and CWARN -# -#CSILENCE= -CSILENCE= -Wno-deprecated-declarations -Wno-parentheses -Wno-error -Wno-implicit-function-declaration \ - -Wno-format-security -Wno-return-type -Wno-unused-value +# Common C compiler warning flags # #CWARN= ${CSILENCE} #CWARN= -Wall ${CSILENCE} CWARN= -Wall -Wextra ${CSILENCE} #CWARN= -Wall -Wextra -pedantic ${CSILENCE} -else - -# default CSILENCE and WARN -# -#CSILENCE= -CSILENCE= -Wno-deprecated-declarations -Wno-parentheses -Wno-error -Wno-implicit-function-declaration \ - -Wno-format-security -Wno-return-type -Wno-unused-value -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -endif -endif - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu90 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -396,12 +359,12 @@ CSTD= -std=gnu90 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # #CDEFINE= CDEFINE= -DM=500 -DN=52 -DX="srand((int)time(0L))" -DV=void -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -410,7 +373,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -423,7 +386,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -434,20 +397,34 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-missing-prototypes -Wno-missing-variable-declarations -Wno-pedantic \ + -Wno-poison-system-directories -Wno-shadow -Wno-strict-prototypes \ + -Wno-comma -Wno-format-nonliteral -Wno-implicit-int-conversion \ + -Wno-shorten-64-to-32 +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1990/dds/Makefile b/1990/dds/Makefile index ad597ffb3..bd065d178 100644 --- a/1990/dds/Makefile +++ b/1990/dds/Makefile @@ -328,66 +328,27 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# CWARN - Silence warnings that ${CWARN} would normally complain about -# CSILENCE -Compiler warnings -# -ifeq ($(CC),clang) - -# clang CSILENCE and CWARN +# Common C compiler warnings to silence # #CSILENCE= CSILENCE= -Wno-builtin-requires-header -Wno-char-subscripts -Wno-conditional-type-mismatch \ -Wno-empty-body -Wno-error -Wno-implicit-function-declaration \ -Wno-incompatible-library-redeclaration -Wno-parentheses -Wno-implicit-int -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -else -ifeq ($(CC),gcc) - -# gcc CSILENCE and CWARN -# -#CSILENCE= -CSILENCE= -Wno-builtin-requires-header -Wno-char-subscripts -Wno-conditional-type-mismatch \ - -Wno-empty-body -Wno-error -Wno-implicit-function-declaration \ - -Wno-incompatible-library-redeclaration -Wno-parentheses -Wno-implicit-int +# Common C compiler warning flags # #CWARN= ${CSILENCE} #CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -else - -# default CSILENCE and WARN -# -#CSILENCE= -CSILENCE= -Wno-builtin-requires-header -Wno-char-subscripts -Wno-conditional-type-mismatch \ - -Wno-empty-body -Wno-error -Wno-implicit-function-declaration \ - -Wno-incompatible-library-redeclaration -Wno-parentheses -Wno-implicit-int -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -endif -endif - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu90 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -399,12 +360,12 @@ CSTD= -std=gnu90 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -413,7 +374,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -426,7 +387,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -437,20 +398,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +#CSILENCE+= +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1990/dg/Makefile b/1990/dg/Makefile index 1c5d9cc12..f23a1d889 100644 --- a/1990/dg/Makefile +++ b/1990/dg/Makefile @@ -328,60 +328,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# CWARN - Silence warnings that ${CWARN} would normally complain about -# CSILENCE -Compiler warnings +# Common C compiler warnings to silence # -ifeq ($(CC),clang) +#CSILENCE= +CSILENCE= -Wno-invalid-pp-token -# clang CSILENCE and CWARN -# -CSILENCE= -#CSILENCE= -Wno-implicit-int -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -else -ifeq ($(CC),gcc) - -# gcc CSILENCE and CWARN -# -CSILENCE= -#CSILENCE= -Wno-implicit-int +# Common C compiler warning flags # #CWARN= ${CSILENCE} #CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -else - -# default CSILENCE and WARN -# -CSILENCE= -#CSILENCE= -Wno-implicit-int -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -endif -endif - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu90 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -393,12 +358,12 @@ CSTD= -std=gnu90 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # -#CDEFINE= -CDEFINE= -Dindex=strchr +CDEFINE= +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -407,7 +372,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -420,7 +385,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -431,20 +396,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-poison-system-directories -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1990/dg/dg.c b/1990/dg/dg.c index 348efd2e8..a8943aef5 100644 --- a/1990/dg/dg.c +++ b/1990/dg/dg.c @@ -1,67 +1,65 @@ #include -#define d define - -#d b12(x) 12 x -#d a13(x) x 13 -#d a16(x) x 16 -#d a32(x) x 32 -#d acb(x) x] -#d acc(x) x} -#d aco(x) x: -#d bco(x) :x -#d acp(x) x) -#d bef(x) EOF x -#d aeq(x) x= -#d afo(x) x for -#d age(x) x fgetc -#d asi(x) x stdin -#d aso(x) x stdout -#d bgt(x) >x -#d ai(x) x i -#d aj(x) x j -#d al(x) x l -#d ami(x) x- -#d bne(x) !=x -#d aob(x) x[ -#d aop(x) x( -#d apl(x) x+ -#d bpu(x) fputc x -#d bqm(x) ?x -#d aqm(x) x? -#d aqu(x) x' -#d ase(x) x; -#d awh(x) x while -#d axo(x) x^ -#d a0(x) x 0 -#d b13(x) 13 x -#d b16(x) 16 x -#d b19(x) 19 x -#d b48(x) 48 x -#d a64(x) x 64 -#d b66(x) 66 x -#d bcb(x) ]x -#d bch(x) char x -#d bcm(x) ,x -#d acm(x) x, -#d bcp(x) )x -#d beq(x) =x -#d bex(x) extern x -#d bi(x) i x -#d bin(x) int x -#d bix(x) index x -#d bj(x) j x -#d bl(x) l x -#d alt(x) x< -#d bma(x) main x -#d bob(x) [x -#d boc(x) {x -#d bop(x) (x -#d bpl(x) +x -#d app(x) x++ -#d bqu(x) 'x -#d bse(x) ;x -#d bst(x) *x +#define b12(x) 12 x +#define a13(x) x 13 +#define a16(x) x 16 +#define a32(x) x 32 +#define acb(x) x] +#define acc(x) x} +#define aco(x) x: +#define bco(x) :x +#define acp(x) x) +#define bef(x) EOF x +#define aeq(x) x= +#define afo(x) x for +#define age(x) x fgetc +#define asi(x) x stdin +#define aso(x) x stdout +#define bgt(x) >x +#define ai(x) x i +#define aj(x) x j +#define al(x) x l +#define ami(x) x- +#define bne(x) !=x +#define aob(x) x[ +#define aop(x) x( +#define apl(x) x+ +#define bpu(x) fputc x +#define bqm(x) ?x +#define aqm(x) x? +#define aqu(x) x' +#define ase(x) x; +#define awh(x) x while +#define axo(x) x^ +#define a0(x) x 0 +#define b13(x) 13 x +#define b16(x) 16 x +#define b19(x) 19 x +#define b48(x) 48 x +#define a64(x) x 64 +#define b66(x) 66 x +#define bcb(x) ]x +#define bch(x) char x +#define bcm(x) ,x +#define acm(x) x, +#define bcp(x) )x +#define beq(x) =x +#define bex(x) extern x +#define bi(x) i x +#define bin(x) int x +#define bix(x) index x +#define bj(x) j x +#define bl(x) l x +#define alt(x) x< +#define bma(x) main x +#define bob(x) [x +#define boc(x) {x +#define bop(x) (x +#define bpl(x) +x +#define app(x) x++ +#define bqu(x) 'x +#define bse(x) ;x +#define bst(x) *x bma(acp(bop(app(bcp(ai(boc(ase(bch(a16(bl(alt(bob(ai(b66(ase(bcb(a0(bcm(aeq(bst(acb(bj(a64(bse(aob(bin(al(bi(aeq(bse(ai(bex(aop(bch(afo(bst(ase(bix(()))))))))))))))))))))))))))))))))))))))) bl(ai(bob(aob(bi(al(bcb(aop(beq(apl(b13(a13(bpl(aeq(bop(acb(bl(bob(a32(bi(bpl(apl(b16(bcb(ai(beq(b19(aob(bpl(bop(l)))))))))))))))))))))))))))))) diff --git a/1990/jaw/Makefile b/1990/jaw/Makefile index 24721bbaa..1e0cb51bc 100644 --- a/1990/jaw/Makefile +++ b/1990/jaw/Makefile @@ -328,66 +328,27 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# CWARN - Silence warnings that ${CWARN} would normally complain about -# CSILENCE -Compiler warnings -# -ifeq ($(CC),clang) - -# clang CSILENCE and CWARN +# Common C compiler warnings to silence # #CSILENCE= CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \ -Wno-logical-op-parentheses -Wno-parentheses -Wno-return-type \ -Wno-shift-op-parentheses -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -else -ifeq ($(CC),gcc) - -# gcc CSILENCE and CWARN -# -#CSILENCE= -CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \ - -Wno-logical-op-parentheses -Wno-parentheses -Wno-return-type \ - -Wno-shift-op-parentheses +# Common C compiler warning flags # #CWARN= ${CSILENCE} #CWARN= -Wall ${CSILENCE} CWARN= -Wall -Wextra ${CSILENCE} #CWARN= -Wall -Wextra -pedantic ${CSILENCE} -else - -# default CSILENCE and WARN -# -#CSILENCE= -CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \ - -Wno-logical-op-parentheses -Wno-parentheses -Wno-return-type \ - -Wno-shift-op-parentheses -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -endif -endif - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu90 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -399,12 +360,12 @@ CSTD= -std=gnu90 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -413,7 +374,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -426,7 +387,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -437,20 +398,34 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-implicit-int-conversion -Wno-missing-prototypes \ + -Wno-missing-variable-declarations -Wno-pedantic \ + -Wno-poison-system-directories -Wno-shorten-64-to-32 -Wno-sign-conversion \ + -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1990/pjr/Makefile b/1990/pjr/Makefile index c64e1aa16..737cea687 100644 --- a/1990/pjr/Makefile +++ b/1990/pjr/Makefile @@ -328,60 +328,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# CWARN - Silence warnings that ${CWARN} would normally complain about -# CSILENCE -Compiler warnings -# -ifeq ($(CC),clang) - -# clang CSILENCE and CWARN +# Common C compiler warnings to silence # CSILENCE= #CSILENCE= -Wno-implicit-int -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -else -ifeq ($(CC),gcc) - -# gcc CSILENCE and CWARN -# -CSILENCE= -#CSILENCE= -Wno-implicit-int +# Common C compiler warning flags # #CWARN= ${CSILENCE} #CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -else - -# default CSILENCE and WARN -# -CSILENCE= -#CSILENCE= -Wno-implicit-int -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -endif -endif - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu90 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -393,12 +358,12 @@ CSTD= -std=gnu90 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -407,7 +372,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -420,7 +385,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -431,20 +396,32 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-missing-prototypes -Wno-missing-variable-declarations \ + -Wno-poison-system-directories -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1990/scjones/Makefile b/1990/scjones/Makefile index f5b1a9768..1441a2fe0 100644 --- a/1990/scjones/Makefile +++ b/1990/scjones/Makefile @@ -328,60 +328,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# CWARN - Silence warnings that ${CWARN} would normally complain about -# CSILENCE -Compiler warnings -# -ifeq ($(CC),clang) - -# clang CSILENCE and CWARN +# Common C compiler warnings to silence # #CSILENCE= CSILENCE= -Wno-invalid-pp-token -Wno-trigraphs -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -else -ifeq ($(CC),gcc) - -# gcc CSILENCE and CWARN -# -#CSILENCE= -CSILENCE= -Wno-invalid-pp-token -Wno-trigraphs +# Common C compiler warning flags # #CWARN= ${CSILENCE} #CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -else - -# default CSILENCE and WARN -# -#CSILENCE= -CSILENCE= -Wno-invalid-pp-token -Wno-trigraphs -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -endif -endif - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu90 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -393,12 +358,12 @@ CSTD= -std=gnu90 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -407,7 +372,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -420,7 +385,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -431,20 +396,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-missing-variable-declarations -Wno-poison-system-directories +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1990/stig/Makefile b/1990/stig/Makefile index 37122caa4..55e1c7821 100644 --- a/1990/stig/Makefile +++ b/1990/stig/Makefile @@ -328,60 +328,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# CWARN - Silence warnings that ${CWARN} would normally complain about -# CSILENCE -Compiler warnings -# -ifeq ($(CC),clang) - -# clang CSILENCE and CWARN +# Common C compiler warnings to silence # CSILENCE= #CSILENCE= -Wno-implicit-int -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -else -ifeq ($(CC),gcc) - -# gcc CSILENCE and CWARN -# -CSILENCE= -#CSILENCE= -Wno-implicit-int +# Common C compiler warning flags # #CWARN= ${CSILENCE} #CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -else - -# default CSILENCE and WARN -# -CSILENCE= -#CSILENCE= -Wno-implicit-int -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -endif -endif - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu90 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -393,12 +358,12 @@ CSTD= -std=gnu90 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -407,7 +372,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -420,7 +385,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -431,20 +396,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +#CSILENCE+= +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1990/tbr/Makefile b/1990/tbr/Makefile index a8448c2e1..321421cb6 100644 --- a/1990/tbr/Makefile +++ b/1990/tbr/Makefile @@ -328,63 +328,26 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# CWARN - Silence warnings that ${CWARN} would normally complain about -# CSILENCE -Compiler warnings -# -ifeq ($(CC),clang) - -# clang CSILENCE and CWARN +# Common C compiler warnings to silence # #CSILENCE= CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \ -Wno-unused-value -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -else -ifeq ($(CC),gcc) - -# gcc CSILENCE and CWARN -# -#CSILENCE= -CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \ - -Wno-unused-value +# Common C compiler warning flags # #CWARN= ${CSILENCE} #CWARN= -Wall ${CSILENCE} CWARN= -Wall -Wextra ${CSILENCE} #CWARN= -Wall -Wextra -pedantic ${CSILENCE} -else - -# default CSILENCE and WARN -# -#CSILENCE= -CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \ - -Wno-unused-value -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -endif -endif - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu90 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -396,12 +359,12 @@ CSTD= -std=gnu90 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -410,7 +373,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -423,7 +386,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -434,20 +397,32 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-missing-prototypes -Wno-missing-variable-declarations \ + -Wno-pedantic -Wno-poison-system-directories -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1990/theorem/Makefile b/1990/theorem/Makefile index 84277ac52..0c817ff18 100644 --- a/1990/theorem/Makefile +++ b/1990/theorem/Makefile @@ -328,69 +328,28 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# CWARN - Silence warnings that ${CWARN} would normally complain about -# CSILENCE -Compiler warnings -# -ifeq ($(CC),clang) - -# clang CSILENCE and CWARN +# Common C compiler warnings to silence # #CSILENCE= CSILENCE= -Wno-deprecated-declarations -Wno-empty-body -Wno-error -Wno-unused-value \ -Wno-implicit-function-declaration -Wno-incompatible-pointer-types \ -Wno-macro-redefined -Wno-parentheses -Wno-return-type -Wno-unused-parameter \ -Wno-empty-translation-unit -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -else -ifeq ($(CC),gcc) - -# gcc CSILENCE and CWARN -# -#CSILENCE= -CSILENCE= -Wno-deprecated-declarations -Wno-empty-body -Wno-error -Wno-unused-value \ - -Wno-implicit-function-declaration -Wno-incompatible-pointer-types \ - -Wno-macro-redefined -Wno-parentheses -Wno-return-type -Wno-unused-parameter \ - -Wno-empty-translation-unit +# Common C compiler warning flags # #CWARN= ${CSILENCE} #CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -else - -# default CSILENCE and WARN -# -#CSILENCE= -CSILENCE= -Wno-deprecated-declarations -Wno-empty-body -Wno-error -Wno-unused-value \ - -Wno-implicit-function-declaration -Wno-incompatible-pointer-types \ - -Wno-macro-redefined -Wno-parentheses -Wno-return-type -Wno-unused-parameter \ - -Wno-empty-translation-unit -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -endif -endif - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu90 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -402,12 +361,12 @@ CSTD= -std=gnu90 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -416,7 +375,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -429,7 +388,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -440,20 +399,34 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-double-promotion -Wno-float-conversion \ + -Wno-missing-prototypes -Wno-missing-variable-declarations \ + -Wno-poison-system-directories -Wno-shadow -Wno-strict-prototypes \ + -Wno-unreachable-code -Wno-unused-macros +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1990/westley/Makefile b/1990/westley/Makefile index 91ab84f06..27c352e2d 100644 --- a/1990/westley/Makefile +++ b/1990/westley/Makefile @@ -328,63 +328,26 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# CWARN - Silence warnings that ${CWARN} would normally complain about -# CSILENCE -Compiler warnings -# -ifeq ($(CC),clang) - -# clang CSILENCE and CWARN +# Common C compiler warnings to silence # #CSILENCE= CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \ -Wno-unused-value -Wno-unused-variable -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -else -ifeq ($(CC),gcc) - -# gcc CSILENCE and CWARN -# -#CSILENCE= -CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \ - -Wno-unused-value -Wno-unused-variable +# Common C compiler warning flags # #CWARN= ${CSILENCE} #CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -else - -# default CSILENCE and WARN -# -#CSILENCE= -CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \ - -Wno-unused-value -Wno-unused-variable -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -endif -endif - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu90 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -396,12 +359,12 @@ CSTD= -std=gnu90 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -410,7 +373,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -423,7 +386,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -434,20 +397,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +#CSILENCE+= +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## From 496b1f40b893be4303b25859dd3e1c8a427652b7 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 20:26:18 -0800 Subject: [PATCH 37/50] update 1989/ovdluhe/README.md as per previous mod --- 1989/ovdluhe/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/1989/ovdluhe/README.md b/1989/ovdluhe/README.md index 2e402d284..0d110e5ae 100644 --- a/1989/ovdluhe/README.md +++ b/1989/ovdluhe/README.md @@ -19,6 +19,9 @@ Judges notes: The program stops when it reaches the end of the template buffer by chance or is killed. + To have a chance to compile under a modern CPP, we had to + replace `#D` with `#define`. + Selected notes from the author: This program implements an "Eddington ape" - it generates From 1c9005ec32ced2d346d5e6cda406a79b727c70ed Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 20:28:05 -0800 Subject: [PATCH 38/50] update 1989/jar.2/README.md as per previous mod --- 1989/jar.2/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/1989/jar.2/README.md b/1989/jar.2/README.md index 7dea4eb46..297a10940 100644 --- a/1989/jar.2/README.md +++ b/1989/jar.2/README.md @@ -15,6 +15,9 @@ Judges notes: all this functionality in such a small, densely packed program, is impressive enough to win the Best of show award. + To have a chance to compile under a modern CPP, we had to + replace `#D` with `#define`. + Selected notes from the author: This program implements a Lisp interpreter in 1465 bytes of source. From 536f5ea156f1598311258da64542df7bfe120481 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 20:33:47 -0800 Subject: [PATCH 39/50] replace 1991/brnstnd/brnstnd_ansi with brnstnd_ansi.c --- 1991/brnstnd/brnstnd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1991/brnstnd/brnstnd.c b/1991/brnstnd/brnstnd.c index 7a0044ebf..712ea195d 100644 --- a/1991/brnstnd/brnstnd.c +++ b/1991/brnstnd/brnstnd.c @@ -28,7 +28,7 @@ #define w [256] #define V f(k>o||p>o||q>o)v 2; R I="I'd love ta win: the most useful !$>%`/#<&*|^ _OBFUSCATED_ utility. Pleez?";U(y,x)R y;R*j*x)+L(y)+1);sprintf(r,"%s%s",*x,y);*x=r;}R T(x)R j x)+1);strcpy(r,x);v -r;}R(i w);static R(Z w);K w;main(a,A)int a;R*A;{int s w,p=0,q=0,n=0,c,k=0;W{V +r;}R(i w);static R(Z w);int K w;main(a,A)int a;R*A;{int s w,p=0,q=0,n=0,c,k=0;W{V f(c>='0'&&c<='9'){f(!n)N=0;n=1;e=10*e+(c-'0')h}n=0;J(39,m sprintf(d=M(13),"%d",e)) J(37,q&&puts(g))J(34,q&&printf("%s",g))J(27,H(p,_,s))O('[',']')J(56,f(p){c=e;N=c;})J(2,m--p)J(10,N=a)J(4,f(q){N=L(g);X(S--]);})J(1,f(q){S+1]=T(g);++q;})J(53,m From 5552243c7bea5116ec6a3411e3298787b096b0e8 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 20:52:22 -0800 Subject: [PATCH 40/50] improve 1991 Makefiles --- 1991/Makefile | 2 +- 1991/ant/Makefile | 89 +++++++++++++---------------------- 1991/brnstnd/Makefile | 88 +++++++++++++--------------------- 1991/brnstnd/brnstnd_ansi.c | 42 ----------------- 1991/buzzard/Makefile | 92 +++++++++++++----------------------- 1991/cdupont/Makefile | 88 +++++++++++++--------------------- 1991/davidguy/Makefile | 94 ++++++++++++++----------------------- 1991/dds/Makefile | 89 +++++++++++++---------------------- 1991/fine/Makefile | 92 +++++++++++++----------------------- 1991/rince/Makefile | 87 +++++++++++++--------------------- 1991/westley/Makefile | 88 +++++++++++++--------------------- 11 files changed, 296 insertions(+), 555 deletions(-) delete mode 100644 1991/brnstnd/brnstnd_ansi.c diff --git a/1991/Makefile b/1991/Makefile index 997adfc3f..b60716539 100644 --- a/1991/Makefile +++ b/1991/Makefile @@ -50,7 +50,7 @@ # tool locations ################ # -SHELL= /bin/bash +SHELL= bash MAKE= make diff --git a/1991/ant/Makefile b/1991/ant/Makefile index a324cf0c0..cec6237fe 100644 --- a/1991/ant/Makefile +++ b/1991/ant/Makefile @@ -328,63 +328,26 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# CWARN - Silence warnings that ${CWARN} would normally complain about -# CSILENCE -Compiler warnings -# -ifeq ($(CC),clang) - -# clang CSILENCE and CWARN +# Common C compiler warnings to silence # #CSILENCE= CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-empty-body \ -Wno-implicit-function-declaration -Wno-return-type -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -else -ifeq ($(CC),gcc) - -# gcc CSILENCE and CWARN -# -#CSILENCE= -CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-empty-body \ - -Wno-implicit-function-declaration -Wno-return-type +# Common C compiler warning flags # #CWARN= ${CSILENCE} #CWARN= -Wall ${CSILENCE} CWARN= -Wall -Wextra ${CSILENCE} #CWARN= -Wall -Wextra -pedantic ${CSILENCE} -else - -# default CSILENCE and WARN -# -#CSILENCE= -CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-empty-body \ - -Wno-implicit-function-declaration -Wno-return-type -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -endif -endif - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu90 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -396,12 +359,12 @@ CSTD= -std=gnu90 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # #CDEFINE= CDEFINE= -DMODE=0600 -DBUF=32767 -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -410,7 +373,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -423,7 +386,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -434,20 +397,34 @@ LIBS= -lcurses -ltermcap #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-implicit-int-conversion -Wno-missing-prototypes \ + -Wno-missing-variable-declarations -Wno-pedantic \ + -Wno-poison-system-directories -Wno-shadow -Wno-shorten-64-to-32 \ + -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1991/brnstnd/Makefile b/1991/brnstnd/Makefile index 3623b7788..7ccc552d7 100644 --- a/1991/brnstnd/Makefile +++ b/1991/brnstnd/Makefile @@ -328,63 +328,26 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# CWARN - Silence warnings that ${CWARN} would normally complain about -# CSILENCE -Compiler warnings -# -ifeq ($(CC),clang) - -# clang CSILENCE and CWARN +# Common C compiler warnings to silence # #CSILENCE= CSILENCE= -Wno-c99-extensions -Wno-error -Wno-implicit-function-declaration \ -Wno-parentheses -Wno-return-type -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -else -ifeq ($(CC),gcc) - -# gcc CSILENCE and CWARN -# -#CSILENCE= -CSILENCE= -Wno-c99-extensions -Wno-error -Wno-implicit-function-declaration \ - -Wno-parentheses -Wno-return-type +# Common C compiler warning flags # #CWARN= ${CSILENCE} #CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -else - -# default CSILENCE and WARN -# -#CSILENCE= -CSILENCE= -Wno-c99-extensions -Wno-error -Wno-implicit-function-declaration \ - -Wno-parentheses -Wno-return-type -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -endif -endif - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu90 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -396,12 +359,12 @@ CSTD= -std=gnu90 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # #CDEFINE= CDEFINE= -DM=malloc -DX=free -Do=250 -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -410,7 +373,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -423,7 +386,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -434,20 +397,33 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-implicit-int-conversion -Wno-missing-prototypes \ + -Wno-missing-variable-declarations -Wno-poison-system-directories \ + -Wno-shorten-64-to-32 -Wno-sign-conversion -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1991/brnstnd/brnstnd_ansi.c b/1991/brnstnd/brnstnd_ansi.c deleted file mode 100644 index 712ea195d..000000000 --- a/1991/brnstnd/brnstnd_ansi.c +++ /dev/null @@ -1,42 +0,0 @@ -#include -#define H(x,y,z) f(p){--p;c=x-_+1];f(c>0){y+1]=z[c];z[c]=y];y]=y+1];}} -#define O(x,y) F(x,int U;int T=0;d=M(U=1);W{f(c==y)b g[T++]=c;f(T==U)g=realloc(g,U<<=1);}g[T]=0;) -#define W Y((c=k?K[--k]:getchar())-EOF) -#define S i[q -#define F(w,z) f(c==w){z h} -#define f if -#define P p>1&&(c=u, -#define _ s[p -#define C =G -#define g S] -#define J(x,y) F(I[x],y) -#define Q P e -#define Y while -#define b break; -#define u _--] -#define m p&& -#define R char* -#define l Z[c] -#define L strlen -#define d i[++q] -#define G c) -#define h ;continue; -#define N s[++p] -#define e _] -#define j x;{R r=M(L( -#define v return -#define w [256] -#define V f(k>o||p>o||q>o)v 2; -R I="I'd love ta win: the most useful !$>%`/#<&*|^ _OBFUSCATED_ utility. Pleez?";U(y,x)R y;R*j*x)+L(y)+1);sprintf(r,"%s%s",*x,y);*x=r;}R T(x)R j x)+1);strcpy(r,x);v -r;}R(i w);static R(Z w);int K w;main(a,A)int a;R*A;{int s w,p=0,q=0,n=0,c,k=0;W{V -f(c>='0'&&c<='9'){f(!n)N=0;n=1;e=10*e+(c-'0')h}n=0;J(39,m -sprintf(d=M(13),"%d",e)) -J(37,q&&puts(g))J(34,q&&printf("%s",g))J(27,H(p,_,s))O('[',']')J(56,f(p){c=e;N=c;})J(2,m--p)J(10,N=a)J(4,f(q){N=L(g);X(S--]);})J(1,f(q){S+1]=T(g);++q;})J(53,m -e>=0&&e1&&(--q,U(S+1],i+q)))J(5,q&&p>1&&(_-1]=open(g,_-1],e),--p,X(S--])))J(47,m -close(u)) -J(26,m(e=dup(e)))O('"','"')J(51,H(q,S,i))J(49,N=fork())J(12,wait(&N)+1||(e=-1))J(68,{++p;pipe(s+p++)==-1&&(e=-1);})F('q',v -0) -F('=',W{R x;f(m u)f(x=l){k+=n=L(x);V;Y(*x)K[--k]=*x++;k+=n;n=0;}b})J(15,f(q)W{l&&X(l);l=T(g);b})J(33,f(c=q){*i=g;g=0;Y(--q&&**(i+q))g++;f(q){N=execvp(*i,i+q+1);q=c;}})J(38,P -c&&(e/C)) -J(35,Q=e>G)F('+',Q+C)J(42,Q*C)J(41,Q=~(e&G))J(57,m(e=-e))J(3,)F('\n',)putchar(c);puts(73+I);}} diff --git a/1991/buzzard/Makefile b/1991/buzzard/Makefile index 039a32e55..f4b249389 100644 --- a/1991/buzzard/Makefile +++ b/1991/buzzard/Makefile @@ -328,66 +328,27 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# CWARN - Silence warnings that ${CWARN} would normally complain about -# CSILENCE -Compiler warnings -# -ifeq ($(CC),clang) - -# clang CSILENCE and CWARN +# Common C compiler warnings to silence # #CSILENCE= CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \ -Wno-int-conversion -Wno-logical-op-parentheses -Wno-pedantic \ -Wno-return-type -Wno-unknown-escape-sequence -Wno-unused-value -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -else -ifeq ($(CC),gcc) - -# gcc CSILENCE and CWARN -# -#CSILENCE= -CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \ - -Wno-int-conversion -Wno-logical-op-parentheses -Wno-pedantic \ - -Wno-return-type -Wno-unknown-escape-sequence -Wno-unused-value +# Common C compiler warning flags # #CWARN= ${CSILENCE} #CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -else - -# default CSILENCE and WARN -# -#CSILENCE= -CSILENCE= -Wno-char-subscripts -Wno-error -Wno-implicit-function-declaration \ - -Wno-int-conversion -Wno-logical-op-parentheses -Wno-pedantic \ - -Wno-return-type -Wno-unknown-escape-sequence -Wno-unused-value -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -endif -endif - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu90 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -399,12 +360,12 @@ CSTD= -std=gnu90 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -413,7 +374,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -426,7 +387,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -437,20 +398,33 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-implicit-int-conversion -Wno-missing-prototypes \ + -Wno-missing-variable-declarations -Wno-poison-system-directories \ + -Wno-shadow -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1991/cdupont/Makefile b/1991/cdupont/Makefile index 76b480857..4d92bf6d2 100644 --- a/1991/cdupont/Makefile +++ b/1991/cdupont/Makefile @@ -328,60 +328,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# CWARN - Silence warnings that ${CWARN} would normally complain about -# CSILENCE -Compiler warnings +# Common C compiler warnings to silence # -ifeq ($(CC),clang) +#CSILENCE= +CSILENCE= -Wno-unused-label -# clang CSILENCE and CWARN -# -CSILENCE= -#CSILENCE= -Wno-implicit-int -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -else -ifeq ($(CC),gcc) - -# gcc CSILENCE and CWARN -# -CSILENCE= -#CSILENCE= -Wno-implicit-int +# Common C compiler warning flags # #CWARN= ${CSILENCE} #CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -else - -# default CSILENCE and WARN -# -CSILENCE= -#CSILENCE= -Wno-implicit-int -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -endif -endif - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu90 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -393,12 +358,12 @@ CSTD= -std=gnu90 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # #CDEFINE= CDEFINE= -Ds=\"cdupont.c\" -Dt=\"r\" -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -407,7 +372,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -420,7 +385,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -431,20 +396,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-poison-system-directories +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1991/davidguy/Makefile b/1991/davidguy/Makefile index 0eb09efb0..1de80b14f 100644 --- a/1991/davidguy/Makefile +++ b/1991/davidguy/Makefile @@ -328,63 +328,26 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# CWARN - Silence warnings that ${CWARN} would normally complain about -# CSILENCE -Compiler warnings -# -ifeq ($(CC),clang) - -# clang CSILENCE and CWARN +# Common C compiler warnings to silence # #CSILENCE= CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \ -Wno-int-to-pointer-cast -Wno-return-type -Wno-sign-compare -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -else -ifeq ($(CC),gcc) - -# gcc CSILENCE and CWARN -# -#CSILENCE= -CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \ - -Wno-int-to-pointer-cast -Wno-return-type -Wno-sign-compare +# Common C compiler warning flags # #CWARN= ${CSILENCE} #CWARN= -Wall ${CSILENCE} CWARN= -Wall -Wextra ${CSILENCE} #CWARN= -Wall -Wextra -pedantic ${CSILENCE} -else - -# default CSILENCE and WARN -# -#CSILENCE= -CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \ - -Wno-int-to-pointer-cast -Wno-return-type -Wno-sign-compare -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -endif -endif - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu90 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -396,12 +359,12 @@ CSTD= -std=gnu90 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -410,7 +373,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -423,31 +386,46 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} # Libraries needed to build # LIBS= -#LIBS= -lsocket -lnsl +#LIBS= -lm #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-bad-function-cast -Wno-conditional-uninitialized \ + -Wno-implicit-int-conversion -Wno-missing-prototypes \ + -Wno-missing-variable-declarations -Wno-pedantic \ + -Wno-poison-system-directories -Wno-shadow -Wno-shift-sign-overflow \ + -Wno-sign-conversion -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1991/dds/Makefile b/1991/dds/Makefile index eb855ba34..06dae359f 100644 --- a/1991/dds/Makefile +++ b/1991/dds/Makefile @@ -328,63 +328,26 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# CWARN - Silence warnings that ${CWARN} would normally complain about -# CSILENCE -Compiler warnings -# -ifeq ($(CC),clang) - -# clang CSILENCE and CWARN +# Common C compiler warnings to silence # #CSILENCE= CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-overlength-strings \ -Wno-unused-parameter -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -else -ifeq ($(CC),gcc) - -# gcc CSILENCE and CWARN -# -#CSILENCE= -CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-overlength-strings \ - -Wno-unused-parameter +# Common C compiler warning flags # #CWARN= ${CSILENCE} #CWARN= -Wall ${CSILENCE} CWARN= -Wall -Wextra ${CSILENCE} #CWARN= -Wall -Wextra -pedantic ${CSILENCE} -else - -# default CSILENCE and WARN -# -#CSILENCE= -CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-overlength-strings \ - -Wno-unused-parameter -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -endif -endif - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu90 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -396,12 +359,12 @@ CSTD= -std=gnu90 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -410,7 +373,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -423,7 +386,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -434,20 +397,32 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-implicit-int-conversion -Wno-missing-variable-declarations + -Wno-pedantic -Wno-poison-system-directorie +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1991/fine/Makefile b/1991/fine/Makefile index 2db9474f1..a0e787eff 100644 --- a/1991/fine/Makefile +++ b/1991/fine/Makefile @@ -328,63 +328,26 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# CWARN - Silence warnings that ${CWARN} would normally complain about -# CSILENCE -Compiler warnings -# -ifeq ($(CC),clang) - -# clang CSILENCE and CWARN +# Common C compiler warnings to silence # #CSILENCE= CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \ -Wno-int-conversion -Wno-pointer-to-int-cast + +# Common C compiler warning flags # #CWARN= ${CSILENCE} #CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} -else -ifeq ($(CC),gcc) - -# gcc CSILENCE and CWARN -# -#CSILENCE= -CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \ - -Wno-int-conversion -Wno-pointer-to-int-cast -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} - -else - -# default CSILENCE and WARN -# -#CSILENCE= -CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \ - -Wno-int-conversion -Wno-pointer-to-int-cast -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -endif -endif - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu90 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -396,12 +359,12 @@ CSTD= -std=gnu90 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -410,7 +373,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -423,7 +386,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -434,20 +397,31 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-poison-system-directories +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1991/rince/Makefile b/1991/rince/Makefile index 4944bde93..9ca33e43d 100644 --- a/1991/rince/Makefile +++ b/1991/rince/Makefile @@ -328,60 +328,25 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# CWARN - Silence warnings that ${CWARN} would normally complain about -# CSILENCE -Compiler warnings -# -ifeq ($(CC),clang) - -# clang CSILENCE and CWARN +# Common C compiler warnings to silence # #CSILENCE= CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-parentheses -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -else -ifeq ($(CC),gcc) - -# gcc CSILENCE and CWARN -# -#CSILENCE= -CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-parentheses +# Common C compiler warning flags # #CWARN= ${CSILENCE} #CWARN= -Wall ${CSILENCE} #CWARN= -Wall -Wextra ${CSILENCE} CWARN= -Wall -Wextra -pedantic ${CSILENCE} -else - -# default CSILENCE and WARN -# -#CSILENCE= -CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-parentheses -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -endif -endif - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu90 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -393,12 +358,12 @@ CSTD= -std=gnu90 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # CDEFINE= -#CDEFINE= -DIOCCC=26 +#CDEFINE= -DIOCCC -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -407,7 +372,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -420,7 +385,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -431,20 +396,32 @@ LIBS= -lcurses -ltermcap #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-missing-variable-declarations \ + -Wno-poison-system-directories -Wno-shorten-64-to-32 +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## diff --git a/1991/westley/Makefile b/1991/westley/Makefile index 0834f1006..d16183877 100644 --- a/1991/westley/Makefile +++ b/1991/westley/Makefile @@ -328,63 +328,26 @@ X11_LIBDIR= /opt/X11/lib #X11_INCDIR= /usr/X11/include X11_INCDIR= /opt/X11/include -# CWARN - Silence warnings that ${CWARN} would normally complain about -# CSILENCE -Compiler warnings -# -ifeq ($(CC),clang) - -# clang CSILENCE and CWARN +# Common C compiler warnings to silence # #CSILENCE= CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-parentheses \ -Wno-shift-op-parentheses -Wno-return-type -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -#CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} -else -ifeq ($(CC),gcc) - -# gcc CSILENCE and CWARN -# -#CSILENCE= -CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-parentheses \ - -Wno-shift-op-parentheses -Wno-return-type +# Common C compiler warning flags # #CWARN= ${CSILENCE} #CWARN= -Wall ${CSILENCE} CWARN= -Wall -Wextra ${CSILENCE} #CWARN= -Wall -Wextra -pedantic ${CSILENCE} -else - -# default CSILENCE and WARN -# -#CSILENCE= -CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-parentheses \ - -Wno-shift-op-parentheses -Wno-return-type -# -#CWARN= ${CSILENCE} -#CWARN= -Wall ${CSILENCE} -CWARN= -Wall -Wextra ${CSILENCE} -#CWARN= -Wall -Wextra -pedantic ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything ${CSILENCE} -#CWARN= -Wall -Wextra -Weverything -pedantic ${CSILENCE} - -endif -endif - -# compiler standard +# Compiler standard # #CSTD= #CSTD= -ansi CSTD= -std=gnu90 -# compiler bit architecture +# Compiler bit architecture # # Some entries require 32-bitness: # ARCH= -m32 @@ -396,14 +359,14 @@ CSTD= -std=gnu90 # ARCH= -# defines that are needed to compile +# Defines that are needed to compile # #CDEFINE= CDEFINE= -DP=putchar -DN="P(10)" -DQ="P(34)" -DF="S(&X)" \ -DJ=z[4] -DK=J[14] \ -DH="w[]={146,7,292,73,448,56,84,273,325,297,108,324,22,40,48,40,17,325}" -# include files that are needed to compile +# Include files that are needed to compile # CINCLUDE= #CINCLUDE= -include stdlib.h @@ -412,7 +375,7 @@ CINCLUDE= #CINCLUDE= -I ${X11_INCDIR} #CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 -# optimization +# Optimization # # Most compiles will safely use -O2. Some can use only -O1 or -O. # A few compilers have broken optimizers or this entry make break @@ -425,7 +388,7 @@ CINCLUDE= #OPT= -O2 OPT= -O3 -# default flags for ANSI C compilation +# Default flags for ANSI C compilation # CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} @@ -436,20 +399,33 @@ LIBS= #LIBS= -L ${X11_LIBDIR} -lX11 #LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL -# ANSI compiler -# -# Set CC to the name of your ANSI compiler. -# -# Some entries seem to need gcc. If you have gcc, set -# both CC and MAY_NEED_GCC to gcc. -# -# If you do not have gcc, set CC to the name of your ANSI compiler, and -# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just : -# to disable such programs. +# C compiler to use # CC= cc #CC=clang -MAY_NEED_GCC= gcc +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-implicit-int-conversion -Wno-missing-prototypes \ + -Wno-missing-variable-declarations -Wno-pedantic \ + -Wno-poison-system-directories -Wno-shadow -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif ############################## From b449cb503c5618cc68d0a4d75d9cace831143db5 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 22:16:49 -0800 Subject: [PATCH 41/50] update year level README files Move copyright notice to the end. Add a standard comment about the newly added `README.md` files. Clean up trailing whitespace. Fixed a few minor typos. --- 1984/README | 8 +++ 1985/README | 10 +++- 1986/README | 20 ++++--- 1987/README | 18 +++++-- 1988/README | 22 +++++--- 1989/README | 25 +++++---- 1990/README | 24 ++++----- 1991/README | 42 ++++++++------- 1992/README | 35 ++++++------ 1993/README | 27 +++++----- 1994/README | 28 +++++----- 1995/README | 33 ++++++------ 1996/README | 32 +++++------ 1998/README | 26 ++++----- 2000/README | 27 +++++----- 2001/README | 26 ++++----- 2004/README | 26 ++++----- 2005/README.md | 26 +++++---- 2006/README.md | 26 +++++---- 2011/README.md | 26 +++++---- 2012/README.html | 135 ----------------------------------------------- 2012/README.md | 30 ++++------- 2013/README.html | 121 ------------------------------------------ 2013/README.md | 32 +++++------ 2019/README.html | 105 ------------------------------------ 2019/README.md | 31 +++++------ 2020/README.md | 28 ++++------ 27 files changed, 338 insertions(+), 651 deletions(-) delete mode 100644 2012/README.html delete mode 100644 2013/README.html delete mode 100644 2019/README.html diff --git a/1984/README b/1984/README index a3877917c..f0277d631 100644 --- a/1984/README +++ b/1984/README @@ -1,10 +1,18 @@ In 1984, the first contest was held. The name of the contest was simply ``Obfuscated C Code Contest''. + +Look at the README.md file for the given winner for information +on how to compile the winner and how to run the winning program. +Look at the winning source and try to figure how it does what it does! +You may then wish to look at the Author's comments for even more details. + Restrictions against machine dependent code were not in the rules in 1984. The source file size restriction was only 512 bytes. Rules and results were posted to net.lang.c and net.unix-wizards. +=-= + Copyright (c) 1984, Landon Curt Noll. All Rights Reserved. Permission for personal, educational or non-profit use is granted provided this this copyright and notice are included in its entirety diff --git a/1985/README b/1985/README index 586b3376b..237056b75 100644 --- a/1985/README +++ b/1985/README @@ -1,4 +1,10 @@ -185 marked the second year of the Obfuscated C Code Contest. +1985 marked the second year of the Obfuscated C Code Contest. + + +Look at the README.md file for the given winner for information +on how to compile the winner and how to run the winning program. +Look at the winning source and try to figure how it does what it does! +You may then wish to look at the Author's comments for even more details. Hints against machine dependent code were added to the rules to avoid another 1984 style winner. Rules and results were posted to net.lang.c @@ -6,6 +12,8 @@ and net.unix-wizards. Larry Bassel was invited to help in the judging. Awards were given to 5 classes of programs since we were unable to select only the best 4. +=-= + Copyright (c) 1985, Landon Curt Noll & Larry Bassel. All Rights Reserved. Permission for personal, educational or non-profit use is granted provided this this copyright and notice are included in its entirety diff --git a/1986/README b/1986/README index 25a232ac4..59b1d7005 100644 --- a/1986/README +++ b/1986/README @@ -1,20 +1,28 @@ The 1986 contest was named: "The Third International Obfuscated C Code Contest" -Copyright (c) 1986, Landon Curt Noll & Larry Bassel. -All Rights Reserved. Permission for personal, educational or non-profit use is -granted provided this this copyright and notice are included in its entirety -and remains unaltered. All other uses must receive prior permission in writing -from both Landon Curt Noll and Larry Bassel. + +Look at the README.md file for the given winner for information +on how to compile the winner and how to run the winning program. +Look at the winning source and try to figure how it does what it does! +You may then wish to look at the Author's comments for even more details. The rules for 1986 suggested categories due to the success of the 1985 judging method. The maximum size was increased from 512 to 1024 bytes. Larry Bassel joined as the second official judge. A poll was taken for the worst code for BSD and System V program. -The Bourne Shell (/bin/sh) won for both systems. The BSD finger +The Bourne Shell (/bin/sh) won for both systems. The BSD finger program took third place. Rules and results were posted to net.lang.c and net.unix-wizards. Micro/Systems Journal published started regular publishing of the winners. The practice of making first announcement of the winners at the Summer Usenix BOF started this year. A notice was posted to net.announce. + +=-= + +Copyright (c) 1986, Landon Curt Noll & Larry Bassel. +All Rights Reserved. Permission for personal, educational or non-profit use is +granted provided this this copyright and notice are included in its entirety +and remains unaltered. All other uses must receive prior permission in writing +from both Landon Curt Noll and Larry Bassel. diff --git a/1987/README b/1987/README index 672af5387..bca360a5f 100644 --- a/1987/README +++ b/1987/README @@ -1,10 +1,10 @@ 1987 marked the "The Fourth International Obfuscated C Code Contest" -Copyright (c) 1987, Landon Curt Noll & Larry Bassel. -All Rights Reserved. Permission for personal, educational or non-profit use is -granted provided this this copyright and notice are included in its entirety -and remains unaltered. All other uses must receive prior permission in writing -from both Landon Curt Noll and Larry Bassel. + +Look at the README.md file for the given winner for information +on how to compile the winner and how to run the winning program. +Look at the winning source and try to figure how it does what it does! +You may then wish to look at the Author's comments for even more details. The rules for 1987 suggested even more categories than in 1986. Hints for what to do and not to do were also given in the rules. For @@ -19,3 +19,11 @@ published the 1987 winners. Mark Horton included a version of the 1987 winners in an appendix of his C book. The first announcement of winners at the Summer 87 Usenix was helped by a small fly that danced all over the foils. + +=-= + +Copyright (c) 1987, Landon Curt Noll & Larry Bassel. +All Rights Reserved. Permission for personal, educational or non-profit use is +granted provided this this copyright and notice are included in its entirety +and remains unaltered. All other uses must receive prior permission in writing +from both Landon Curt Noll and Larry Bassel. diff --git a/1988/README b/1988/README index 06a6287b7..53e9bd4eb 100644 --- a/1988/README +++ b/1988/README @@ -1,10 +1,10 @@ 1988 marked the "The Fifth International Obfuscated C Code Contest" -Copyright (c) 1988, Landon Curt Noll & Larry Bassel. -All Rights Reserved. Permission for personal, educational or non-profit use is -granted provided this this copyright and notice are included in its entirety -and remains unaltered. All other uses must receive prior permission in writing -from both Landon Curt Noll and Larry Bassel. + +Look at the README.md file for the given winner for information +on how to compile the winner and how to run the winning program. +Look at the winning source and try to figure how it does what it does! +You may then wish to look at the Author's comments for even more details. The maximum size of entries was raised from 1024 to 1536 bytes, however smaller entries were encouraged. Due to the "Best Abuse of the Rules" @@ -14,10 +14,18 @@ This year, the Grand Prize was given to the most unusual entry and best abuse of the C Preprocessor rather than the most well rounded entry. Rules and results were posted to comp.lang.c, comp.sources.unix and -alt.sources. The 1988 winners will be published in the Micro/Systems -Journal. +alt.sources. The 1988 winners will be published in the Micro/Systems +Journal. Winning entries for previous years were repackaged with each year being in its own directory. Make files and hints were also provided. The package was posted to the: comp.sources.unix newsgroup. They are also available on a wide number of Usenet archive sites. + +=-= + +Copyright (c) 1988, Landon Curt Noll & Larry Bassel. +All Rights Reserved. Permission for personal, educational or non-profit use is +granted provided this this copyright and notice are included in its entirety +and remains unaltered. All other uses must receive prior permission in writing +from both Landon Curt Noll and Larry Bassel. diff --git a/1989/README b/1989/README index d71136be8..a300b75b1 100644 --- a/1989/README +++ b/1989/README @@ -1,16 +1,14 @@ 1989 marked the "The Sixth International Obfuscated C Code Contest" -Copyright (c) 1989, Landon Curt Noll & Larry Bassel. -All Rights Reserved. Permission for personal, educational or non-profit use is -granted provided this this copyright and notice are included in its entirety -and remains unaltered. All other uses must receive prior permission in writing -from both Landon Curt Noll and Larry Bassel. + +Look at the README.md file for the given winner for information +on how to compile the winner and how to run the winning program. +Look at the winning source and try to figure how it does what it does! +You may then wish to look at the Author's comments for even more details. Instructions for use: Run make to compile entries (it is possible that on System V or non-unix systems the makefile needs to be -changed). Look at the source and try to figure out what the programs -do, and run them with various inputs. If you want to, look at the -hints files for (minor) spoilers. +changed). This year, the Grand Prize was given to the most useful program. @@ -18,8 +16,7 @@ The "Strangest abuse of the rules" award was given this year to stress the fact that starting in 1990, compiling entries must result an executable regular file. -In two other cases, we included System V portable versions of winning -programs. The makefile always uses the portable version of the "Best +The makefile always uses the portable version of the "Best self modifying program" because there as no loss of functionality in using it. In the case of the "Best game" winner, however, some functionality is lost in the portable version and so the makefile uses @@ -30,3 +27,11 @@ Rules and results were posted to comp.lang.c, comp.sources.unix, and alt.sources. They have been made available on a wide number of Usenet archive sites such as uunet. The 1989 winners will be published in the Micro/Systems Journal. + +=-= + +Copyright (c) 1989, Landon Curt Noll & Larry Bassel. +All Rights Reserved. Permission for personal, educational or non-profit use is +granted provided this this copyright and notice are included in its entirety +and remains unaltered. All other uses must receive prior permission in writing +from both Landon Curt Noll and Larry Bassel. diff --git a/1990/README b/1990/README index 1cf585dd9..43bf87136 100644 --- a/1990/README +++ b/1990/README @@ -1,18 +1,10 @@ 1990 marked the "The Seventh International Obfuscated C Code Contest" -Copyright (c) 1990, Landon Curt Noll & Larry Bassel. -All Rights Reserved. Permission for personal, educational or non-profit use is -granted provided this this copyright and notice are included in its entirety -and remains unaltered. All other uses must receive prior permission in writing -from both Landon Curt Noll and Larry Bassel. -Instructions for use: Run make to compile entries (it is possible that -on System V or non-unix systems the makefile needs to be changed). The -ansi.mk may need to be changed if your ANSI C compiler is not gcc. - -Look at the source and try to figure out what the programs do, and run -them with various inputs. If you want to, look at the hints files for -(minor) spoilers. +Look at the README.md file for the given winner for information +on how to compile the winner and how to run the winning program. +Look at the winning source and try to figure how it does what it does! +You may then wish to look at the Author's comments for even more details. This year, the Grand Prize won a standing ovation at USENIX. @@ -31,3 +23,11 @@ some of the contest entries were appreciated. Rules and results were posted to comp.lang.c, comp.sources.unix, and alt.sources. They have been made available on a wide number of Usenet archive sites such as uunet. + +=-= + +Copyright (c) 1990, Landon Curt Noll & Larry Bassel. +All Rights Reserved. Permission for personal, educational or non-profit use is +granted provided this this copyright and notice are included in its entirety +and remains unaltered. All other uses must receive prior permission in writing +from both Landon Curt Noll and Larry Bassel. diff --git a/1991/README b/1991/README index df2d624c4..62732a4cd 100644 --- a/1991/README +++ b/1991/README @@ -1,20 +1,16 @@ 1991 marked the "The Eighth International Obfuscated C Code Contest" -Copyright (c) 1991, Landon Curt Noll & Larry Bassel. -All Rights Reserved. Permission for personal, educational or non-profit use is -granted provided this this copyright and notice are included in its entirety -and remains unaltered. All other uses must receive prior permission in writing -from both Landon Curt Noll and Larry Bassel. + +Look at the README.md file for the given winner for information +on how to compile the winner and how to run the winning program. +Look at the winning source and try to figure how it does what it does! +You may then wish to look at the Author's comments for even more details. Instructions for use: Run make to compile entries. It is possible that on BSD or non-unix systems the makefile needs to be changed. -Look at the source and try to figure out what the programs do, and run -them with various inputs. If you want to, look at the hints files for -(minor) spoilers. - This year, we did not single out an entry that was better than all of -the rest. We selected 3 entries that were, in our opinion, went beyond +the rest. We selected 3 entries that were, in our opinion, went beyond all of the other entries this year: Grand Prize by Brian Westley @@ -47,17 +43,17 @@ reject entries of this type. However we provided more portable versions so that more people could compile these programs. This year we received entries that made use of the X Window System. -This functionality is now available on many systems, we feel that -programs that use these are now portable enough to be valid entries. +This functionality is now available on many systems, we feel that +programs that use these are now portable enough to be valid entries. -We may allow programs to make use of the X Window System libs and include -files, provided that they can operate with a system running at the level +We may allow programs to make use of the X Window System libs and include +files, provided that they can operate with a system running at the level of at least X11r4. Requiring the use of imake, a specific window manager, -specific display hardware, or a specific user interface (Openl**k, -M*tif, ...) is likely not to be allowed. We will provide a more detailed +specific display hardware, or a specific user interface (Openl**k, +M*tif, ...) is likely not to be allowed. We will provide a more detailed explanation of our viewpoint in next year's rules. -In order to encourage more 'normal' looking C programs, we are considering +In order to encourage more 'normal' looking C programs, we are considering the following change to the maximum size rule: Your source, not counting any , , and a character, @@ -70,7 +66,7 @@ is not likely to happen soon. We are waiting until c++ compilers become common place on a wide number of systems. We also need time to brace ourselves for what obfuscation c++ could wield! -Be sure to wait until the 1992 rules are posted before submitting entries. +Be sure to wait until the 1992 rules are posted before submitting entries. We may fine tune the rules to reflect the some ideas above. Please send us comments and suggestions what we have expressed above. @@ -83,6 +79,14 @@ Send such email to: Credits: -We would like to thank Barbara Frezza for her role as official chef +We would like to thank Barbara Frezza for her role as official chef of the contest. Landon Noll appreciated the opportunity to serve as assistant pizza chef. Larry Bassel was official taste tester. Yummo! + +=-= + +Copyright (c) 1991, Landon Curt Noll & Larry Bassel. +All Rights Reserved. Permission for personal, educational or non-profit use is +granted provided this this copyright and notice are included in its entirety +and remains unaltered. All other uses must receive prior permission in writing +from both Landon Curt Noll and Larry Bassel. diff --git a/1992/README b/1992/README index 75236b4bf..0c3c35a5a 100644 --- a/1992/README +++ b/1992/README @@ -1,24 +1,19 @@ 1992 marked the "The Ninth International Obfuscated C Code Contest" -Copyright (c) 1992, Landon Curt Noll & Larry Bassel. -All Rights Reserved. Permission for personal, educational or non-profit use is -granted provided this this copyright and notice are included in its entirety -and remains unaltered. All other uses must receive prior permission in writing -from both Landon Curt Noll and Larry Bassel. + +Look at the README.md file for the given winner for information +on how to compile the winner and how to run the winning program. +Look at the winning source and try to figure how it does what it does! +You may then wish to look at the Author's comments for even more details. Use make to compile entries. It is possible that on BSD or non-unix systems the makefile needs to be changed. See the Makefile for details. -Look at the source and try to figure out what the programs do, and run -them with various inputs. If you want to, look at the hints files for -spoilers - this year we included most of the information included -by the submitters. - Read over the makefile for compile/build issues. Your system may require certain changes (add or remove a library, add or remove a #define). A number of compilers had problems optimizing certain entries. Some compilers do optimize, but the resulting program -does not work. By default we have left off -O from compile lines. +does not work. By default we have left off -O from compile lines. You might want to add -O back, or add it back for certain entries where performance is important. @@ -30,9 +25,9 @@ years. The new size rules size probably contributed to the overall high quality. FYI: By tradition, we do not record the count the number entries, - nor do we give our our guess as to the number of entries - received. For folks who wonder, we can say that we consumed - about 2000 pages of output (printing between 2 and 4 normal + nor do we give our our guess as to the number of entries + received. For folks who wonder, we can say that we consumed + about 2000 pages of output (printing between 2 and 4 normal pages per side) during the judging process this year. The new instructions for submitting entries worked well - we were @@ -57,14 +52,14 @@ deserving entries. These categories have not been eliminated. We will likely be awarding them in future years. We received a few entries whose instructions were rot13'd. While -nothing was said about this in the rules, we found that it made the +nothing was said about this in the rules, we found that it made the judging process a little harder, so we may request that this not be done this in the future. Some thought has been given to a separate obfuscated perl contest. Watch comp.lang.perl for details! -Be sure to wait until the 1993 rules are posted before submitting entries. +Be sure to wait until the 1993 rules are posted before submitting entries. We may fine tune the rules to reflect the some ideas above. Please send us comments and suggestions what we have expressed above. @@ -86,3 +81,11 @@ Credits: We would like to thank Barbara Frezza for her role as official chef of the contest. Landon Noll and Larry Bassel appreciated the opportunity to serve as official taste testers. Yummo! + +=-= + +Copyright (c) 1992, Landon Curt Noll & Larry Bassel. +All Rights Reserved. Permission for personal, educational or non-profit use is +granted provided this this copyright and notice are included in its entirety +and remains unaltered. All other uses must receive prior permission in writing +from both Landon Curt Noll and Larry Bassel. diff --git a/1993/README b/1993/README index eabacfc33..d2806ca62 100644 --- a/1993/README +++ b/1993/README @@ -1,19 +1,14 @@ 1993 marked the "The Tenth International Obfuscated C Code Contest" -Copyright (c) 1993, Landon Curt Noll & Larry Bassel. -All Rights Reserved. Permission for personal, educational or non-profit use is -granted provided this this copyright and notice are included in its entirety -and remains unaltered. All other uses must receive prior permission in writing -from both Landon Curt Noll and Larry Bassel. + +Look at the README.md file for the given winner for information +on how to compile the winner and how to run the winning program. +Look at the winning source and try to figure how it does what it does! +You may then wish to look at the Author's comments for even more details. Use make to compile entries. It is possible that on BSD or non-unix systems the makefile needs to be changed. See the Makefile for details. -Look at the source and try to figure out what the programs do, and run -them with various inputs. If you want to, look at the hints files for -spoilers - this year we included most of the information included -by the submitters. - Read over the makefile for compile/build issues. Your system may require certain changes (add or remove a library, add or remove a #define). @@ -29,7 +24,7 @@ not be able to compile the winners, sorry! A few notes regarding future contests: -Be sure to wait until the 1994 rules are posted before submitting entries. +Be sure to wait until the 1994 rules are posted before submitting entries. Rules differ from year to year, sometimes in significant ways. In 1994, we will retract the guideline that discouraged the use of C @@ -54,6 +49,14 @@ email the fix (patch file or the entire changed file) to the above address. Credits: -We would like to thank Barbara Frezza for her role as official chef +We would like to thank Barbara Frezza for her role as official chef of the contest. Landon Noll and Larry Bassel appreciated the opportunity to serve as official taste testers. And as usual, the food was excellent. + +=-= + +Copyright (c) 1993, Landon Curt Noll & Larry Bassel. +All Rights Reserved. Permission for personal, educational or non-profit use is +granted provided this this copyright and notice are included in its entirety +and remains unaltered. All other uses must receive prior permission in writing +from both Landon Curt Noll and Larry Bassel. diff --git a/1994/README b/1994/README index b97a2f3ad..a09e18efc 100644 --- a/1994/README +++ b/1994/README @@ -1,20 +1,14 @@ 1994 marked the "The Eleventh International Obfuscated C Code Contest" -Copyright (c) 1994, Landon Curt Noll & Larry Bassel. -All Rights Reserved. Permission for personal, educational or non-profit use is -granted provided this this copyright and notice are included in its entirety -and remains unaltered. All other uses must receive prior permission in writing -from both Landon Curt Noll and Larry Bassel. +Look at the README.md file for the given winner for information +on how to compile the winner and how to run the winning program. +Look at the winning source and try to figure how it does what it does! +You may then wish to look at the Author's comments for even more details. Use make to compile entries. It is possible that on BSD or non-unix systems the makefile needs to be changed. See the Makefile for details. -Look at the source and try to figure out what the programs do, and run -them with various inputs. If you want to, look at the hints files for -spoilers - this year we included most of the information included -by the submitters. - Read over the makefile for compile/build issues. Your system may require certain changes (add or remove a library, add or remove a #define). @@ -98,13 +92,13 @@ A few notes regarding future contests Due to changes in the Usenix conference calendar, the 1995 contest will be delayed. Because there will be no Summer 1995 Usenix conference, the 1995 IOCCC winners will be announced at the Jan 1996 Usenix conference. - + The 1995 contest will not open until late October 1995, and will close sometime around the end of December 1995. The rules for the 1995 contest have not been formed at this time and are not expected to be ready for distribution until late October 1995. -Be sure to wait until the 1995 rules are posted before submitting entries. +Be sure to wait until the 1995 rules are posted before submitting entries. Rules differ from year to year, sometimes in significant ways. Please send us comments and suggestions what we have expressed above. @@ -124,7 +118,7 @@ email the fix (patch file or the entire changed file) to the above address. Credits ------- -We would like to thank Barbara Frezza for her role as official chef +We would like to thank Barbara Frezza for her role as official chef of the contest. Landon Noll and Larry Bassel appreciated the opportunity to serve as official taste testers. And as usual, the food was excellent. The official menu of the 1994 Obfuscated C Contest dinner: @@ -136,3 +130,11 @@ Pasta: Linguine with wild mushrooms and Reggiano Parmesan Seafood: Salmon in cream sauce or lobster claws Vegetable: Zucchini Dessert: Homemade chocolate/pecan brownies, fruit + +=-= + +Copyright (c) 1994, Landon Curt Noll & Larry Bassel. +All Rights Reserved. Permission for personal, educational or non-profit use is +granted provided this this copyright and notice are included in its entirety +and remains unaltered. All other uses must receive prior permission in writing +from both Landon Curt Noll and Larry Bassel. diff --git a/1995/README b/1995/README index c50ee2e74..eca897864 100644 --- a/1995/README +++ b/1995/README @@ -1,11 +1,10 @@ 1995 marked the "The Twelfth International Obfuscated C Code Contest" -Copyright (c) 1996, Landon Curt Noll, Larry Bassel & Sriram Srinivasan. -All Rights Reserved. Permission for personal, educational or non-profit use is -granted provided this this copyright and notice are included in its entirety -and remains unaltered. All other uses must receive prior permission in writing -from Landon Curt Noll, Larry Bassel and Sriram Srinivasan. +Look at the README.md file for the given winner for information +on how to compile the winner and how to run the winning program. +Look at the winning source and try to figure how it does what it does! +You may then wish to look at the Author's comments for even more details. The IOCCC has an official home page: @@ -17,11 +16,6 @@ announcements and much more. Use make to compile entries. It is possible that on BSD or non-unix systems the makefile needs to be changed. See the Makefile for details. -Look at the source and try to figure out what the programs do, and run -them with various inputs. If you want to, look at the hints files for -spoilers - this year we included most of the information included -by the submitters. - Read over the makefile for compile/build issues. Your system may require certain changes (add or remove a library, add or remove a #define). @@ -30,7 +24,7 @@ This year Sriram Srinivasan joined the judging. The moderator of comp.unix.wizards did not feel that the IOCCC was "wizardly" enough to be posted to comp.unix.wizards - we will no longer post the -winners to this newsgroup - we'll let you the reader decide for yourself the +winners to this newsgroup - we'll let you the reader decide for yourself the wizardlyness of these entries. This year there were several people who won more than once @@ -55,7 +49,7 @@ close sometime around the end of December 1996. The rules for the 1996 contest have not been formed at this time and are not expected to be ready for distribution until late September 1996. -Be sure to wait until the 1996 rules are posted before submitting entries. +Be sure to wait until the 1996 rules are posted before submitting entries. Rules differ from year to year, sometimes in significant ways. Please send us comments and suggestions what we have expressed above. @@ -85,7 +79,7 @@ Session One: Antipasti: Crudites, olive selection, pickles, cheese selection Soup: Homemade mushroom and green onion soup -Salad: artichoke, red bell peppers, Italian onions, cucumbers +Salad: artichoke, red bell peppers, Italian onions, cucumbers and Greek olives with mustard vinaigrette Main Course: Pizzas, with a variety of toppings Dessert: Chocolate torte @@ -97,11 +91,11 @@ Salad: Mixed greens with vinaigrette Main Course: Spaghetti with tomato sauce containing mushrooms and black olives selection of hot and mild Italian sausages Bread: Fresh French bread -Dessert: Cookie selection, featuring chocolate chocolate chip cookies and +Dessert: Cookie selection, featuring chocolate chocolate chip cookies and chocolate butter cookies -Session Three +Session Three Antipasti: Crudites, olive selection Salad: Mixed greens with mustard vinaigrette @@ -131,7 +125,7 @@ Dessert: Flourless chocolate torte Session Six: -Antipasti: Carrot and celery sticks with cheese spread, olive selection, +Antipasti: Carrot and celery sticks with cheese spread, olive selection, pickles Bread: Focaccia with black olives and mozzarella cheeses Salad: Mixed spring greens with flowers and mustard vinaigrette @@ -140,3 +134,10 @@ Main Course: Cracked dungeness crab with lemon mayonnaise, broccoli, mixture of white and brown rice Dessert: Key lime pie +=-= + +Copyright (c) 1996, Landon Curt Noll, Larry Bassel & Sriram Srinivasan. +All Rights Reserved. Permission for personal, educational or non-profit use is +granted provided this this copyright and notice are included in its entirety +and remains unaltered. All other uses must receive prior permission in writing +from Landon Curt Noll, Larry Bassel and Sriram Srinivasan. diff --git a/1996/README b/1996/README index 176e434c4..6ed0a8e0d 100644 --- a/1996/README +++ b/1996/README @@ -1,15 +1,14 @@ 1996 marked the "The Thirteenth International Obfuscated C Code Contest" -Copyright (c) 1997, Landon Curt Noll & Sriram Srinivasan. -All Rights Reserved. Permission for personal, educational or non-profit use is -granted provided this this copyright and notice are included in its entirety -and remains unaltered. All other uses must receive prior permission in writing -from Landon Curt Noll and Sriram Srinivasan. - Standard IOCCC stuff -------------------- +Look at the README.md file for the given winner for information +on how to compile the winner and how to run the winning program. +Look at the winning source and try to figure how it does what it does! +You may then wish to look at the Author's comments for even more details. + The IOCCC has an official home page: http://www.ioccc.org @@ -20,11 +19,6 @@ announcements and much more. Use make to compile entries. It is possible that on BSD or non-unix systems the makefile needs to be changed. See the Makefile for details. -Look at the source and try to figure out what the programs do, and run -them with various inputs. If you want to, look at the hints files for -spoilers - this year we included most of the information included -by the submitters. - Read over the makefile for compile/build issues. Your system may require certain changes (add or remove a library, add or remove a #define). @@ -56,7 +50,7 @@ Remarks on some of the entries This year, Jens Schweikhardt won 3 times ... a new IOCCC record. Meanwhile, Brian Westley came up with his 8th winning entry, twice the number of the next highest count. But with people like Schweikhardt -around, this lead could fall fast. +around, this lead could fall fast. As we state in the guidelines, the names of the winners are as much news to us as they are to you because we keep authorship separate from @@ -75,13 +69,13 @@ There is no 1997 contest. The next contest will not open until sometime in March 1998, and will close sometime around the end of May 1998. The rules for the 1998 contest have not been formed at this time and are not expected to be -ready for distribution until late February 1998. +ready for distribution until late February 1998. -So what happened to 1997? Well the next USENIX Technical Conference +So what happened to 1997? Well the next USENIX Technical Conference will be held Jun 15-19, 1998 (in New Orleans, USA). The 18 month span between conferences will cause the IOCCC to skip over 1997. -Be sure to wait until the 1998 rules are posted before submitting entries. +Be sure to wait until the 1998 rules are posted before submitting entries. Rules differ from year to year, sometimes in significant ways. Please send us comments and suggestions what we have expressed above. @@ -95,3 +89,11 @@ us a line. We enjoy seeing who, where and how the contest is used. If you have problems with any of the entries, AND YOU HAVE A FIX, please email the fix (patch file or the entire changed file) to the above address. + +=-= + +Copyright (c) 1997, Landon Curt Noll & Sriram Srinivasan. +All Rights Reserved. Permission for personal, educational or non-profit use is +granted provided this this copyright and notice are included in its entirety +and remains unaltered. All other uses must receive prior permission in writing +from Landon Curt Noll and Sriram Srinivasan. diff --git a/1998/README b/1998/README index 173e3380f..903bbd5ed 100644 --- a/1998/README +++ b/1998/README @@ -1,16 +1,14 @@ 1998 marked the "The Fourteenth International Obfuscated C Code Contest" -Copyright (c) Landon Curt Noll, Jeremy Horn, Peter Seebach -and Leonid A. Broukhis, 1999. -All Rights Reserved. Permission for personal, educational or non-profit -use is granted provided this this copyright and notice are included in its -entirety and remains unaltered. All other uses must receive prior permission -from the contest judges. - Standard IOCCC stuff -------------------- +Look at the README.md file for the given winner for information +on how to compile the winner and how to run the winning program. +Look at the winning source and try to figure how it does what it does! +You may then wish to look at the Author's comments for even more details. + The IOCCC has its own domain. The IOCCC has an official home page is now: http://www.ioccc.org @@ -18,11 +16,6 @@ The IOCCC has its own domain. The IOCCC has an official home page is now: Use make to compile entries. It is possible that on BSD or non-unix systems the makefile needs to be changed. See the Makefile for details. -Look at the source and try to figure out what the programs do, and run -them with various inputs. If you want to, look at the hints files for -spoilers - this year we included most of the information included -by the submitters. - Read over the makefile for compile/build issues. Your system may require certain changes (add or remove a library, add or remove a #define). @@ -131,3 +124,12 @@ The next IOCCC is planned to start towards the end of 1999. Watch: http://www.ioccc.org for news of the next contest. + +=-= + +Copyright (c) Landon Curt Noll, Jeremy Horn, Peter Seebach +and Leonid A. Broukhis, 1999. +All Rights Reserved. Permission for personal, educational or non-profit +use is granted provided this this copyright and notice are included in its +entirety and remains unaltered. All other uses must receive prior permission +from the contest judges. diff --git a/2000/README b/2000/README index 702335db2..26e23d859 100644 --- a/2000/README +++ b/2000/README @@ -1,23 +1,16 @@ 2000 marked the "The Fifteenth International Obfuscated C Code Contest" -Copyright (C) Landon Curt Noll, Simon Cooper, Peter Seebach -and Leonid A. Broukhis, 2000. -All Rights Reserved. Permission for personal, educational or non-profit -use is granted provided this copyright and notice are included in its -entirety and remains unaltered. All other uses must receive prior permission -from the contest judges. - Standard IOCCC stuff -------------------- -Use make to compile entries. It is possible that on non-Un*x / non-Linux -systems the makefile needs to be changed. See the Makefile for details. +Look at the README.md file for the given winner for information +on how to compile the winner and how to run the winning program. +Look at the winning source and try to figure how it does what it does! +You may then wish to look at the Author's comments for even more details. -Look at the source and try to figure out what the programs do, and run -them with various inputs. If you want to, look at the hints files for -spoilers - this year we included most of the information included -by the submitters. +Use make to compile entries. It is possible that on non-Un\*x / non-Linux +systems the makefile needs to be changed. See the Makefile for details. Read over the makefile for compile/build issues. Your system may require certain changes (add or remove a library, add or remove a @@ -118,3 +111,11 @@ p.s. The has been mentioned in an Amici Curiae for the DeCSS case. See: and seach on the word ioccc (twice). +=-= + +Copyright (C) Landon Curt Noll, Simon Cooper, Peter Seebach +and Leonid A. Broukhis, 2000. +All Rights Reserved. Permission for personal, educational or non-profit +use is granted provided this copyright and notice are included in its +entirety and remains unaltered. All other uses must receive prior permission +from the contest judges. diff --git a/2001/README b/2001/README index 2f6429da5..47b5e500b 100644 --- a/2001/README +++ b/2001/README @@ -1,29 +1,22 @@ 2001 marked the "The Sixteenth International Obfuscated C Code Contest" -Copyright (C) Landon Curt Noll, Simon Cooper, Peter Seebach -and Leonid A. Broukhis, 2001-2002. -All Rights Reserved. Permission for personal, educational or non-profit -use is granted provided this copyright and notice are included in its -entirety and remains unaltered. All other uses must receive prior permission -from the contest judges. - Standard IOCCC stuff -------------------- +Look at the README.md file for the given winner for information +on how to compile the winner and how to run the winning program. +Look at the winning source and try to figure how it does what it does! +You may then wish to look at the Author's comments for even more details. + The IOCCC has a web site and now has a number of international mirrors. The primary site can be found at, http://www.ioccc.org -Use make to compile entries. It is possible that on non-Un*x / non-Linux +Use make to compile entries. It is possible that on non-Un\*x / non-Linux systems the makefile needs to be changed. See the Makefile for details. -Look at the source and try to figure out what the programs do, and run -them with various inputs. If you want to, look at the hints files for -spoilers - this year we included most of the information included -by the submitters. - Read over the makefile for compile/build issues. Your system may require certain changes (add or remove a library, add or remove a #define). @@ -95,3 +88,10 @@ Watch: for news of the next contest. =-= + +Copyright (C) Landon Curt Noll, Simon Cooper, Peter Seebach +and Leonid A. Broukhis, 2001-2002. +All Rights Reserved. Permission for personal, educational or non-profit +use is granted provided this copyright and notice are included in its +entirety and remains unaltered. All other uses must receive prior permission +from the contest judges. diff --git a/2004/README b/2004/README index 562eb110b..c9e4631dd 100644 --- a/2004/README +++ b/2004/README @@ -1,28 +1,22 @@ 2004 marked the "The Seventeenth International Obfuscated C Code Contest" -Copyright (C) 2001-2004, Landon Curt Noll, Simon Cooper, Peter Seebach -and Leonid A. Broukhis. All Rights Reserved. Permission for personal, -educational or non-profit use is granted provided this copyright and -notice are included in its entirety and remains unaltered. All other -uses must receive prior permission from the contest judges. - Standard IOCCC stuff -------------------- +Look at the README.md file for the given winner for information +on how to compile the winner and how to run the winning program. +Look at the winning source and try to figure how it does what it does! +You may then wish to look at the Author's comments for even more details. + The IOCCC has a web site and now has a number of international mirrors. The primary site can be found at, http://www.ioccc.org/ -Use make to compile entries. It is possible that on non-Un*x / non-Linux +Use make to compile entries. It is possible that on non-Un\*x / non-Linux systems the makefile needs to be changed. See the Makefile for details. -Look at the source and try to figure out what the programs do, and run -them with various inputs. If you want to, look at the hints files for -spoilers - this year we included most of the information included -by the submitters. - Read over the makefile for compile/build issues. Your system may require certain changes (add or remove a library, add or remove a #define). @@ -84,3 +78,11 @@ Watch: http://www.ioccc.org/ for news of the next contest. + +=-= + +Copyright (C) 2001-2004, Landon Curt Noll, Simon Cooper, Peter Seebach +and Leonid A. Broukhis. All Rights Reserved. Permission for personal, +educational or non-profit use is granted provided this copyright and +notice are included in its entirety and remains unaltered. All other +uses must receive prior permission from the contest judges. diff --git a/2005/README.md b/2005/README.md index 8f0c32a58..2075ff9a9 100644 --- a/2005/README.md +++ b/2005/README.md @@ -1,28 +1,25 @@ 2005 marked the "The Eighteenth International Obfuscated C Code Contest" ======================================================================== -Copyright (C) 2005, Landon Curt Noll, Simon Cooper, and Leonid A. -Broukhis. All Rights Reserved. Permission for personal, educational -or non-profit use is granted provided this copyright and notice are -included in its entirety and remains unaltered. All other uses -must receive prior permission from the contest judges. - Standard IOCCC stuff -------------------- +Look at the README.md file for the given winner for information +on how to compile the winner and how to run the winning program. +Look at the winning source and try to figure how it does what it does! +You may then wish to look at the Author's comments for even more details. + The IOCCC has a web site and now has a number of international mirrors. The primary site can be found at, > -Use make to compile entries. It is possible that on `non-Un*x` / non-Linux +Use make to compile entries. It is possible that on non-Un\*x / non-Linux systems the makefile needs to be changed. See the Makefile for details. -Look at the source and try to figure out what the programs do, and run -them with various inputs. If you want to, look at the hints files for -spoilers - this year we included most of the information included -by the submitters. +This year we included most of the information included by the submitters +in the README.md files. Read over the makefile for compile/build issues. Your system may require certain changes (add or remove a library, add or remove a #define). @@ -108,3 +105,10 @@ For news of the next contest watch: > +=-= + +Copyright (C) 2005, Landon Curt Noll, Simon Cooper, and Leonid A. +Broukhis. All Rights Reserved. Permission for personal, educational +or non-profit use is granted provided this copyright and notice are +included in its entirety and remains unaltered. All other uses +must receive prior permission from the contest judges. diff --git a/2006/README.md b/2006/README.md index 5e7be9c8a..fbdff35b0 100644 --- a/2006/README.md +++ b/2006/README.md @@ -1,28 +1,25 @@ 2006 marked the "The Nineteenth International Obfuscated C Code Contest" ======================================================================== -Copyright (C) 2006, Landon Curt Noll, Simon Cooper, and Leonid A. -Broukhis. All Rights Reserved. Permission for personal, educational -or non-profit use is granted provided this copyright and notice are -included in its entirety and remains unaltered. All other uses -must receive prior permission from the contest judges. - Standard IOCCC stuff -------------------- +Look at the README.md file for the given winner for information +on how to compile the winner and how to run the winning program. +Look at the winning source and try to figure how it does what it does! +You may then wish to look at the Author's comments for even more details. + The IOCCC has a web site and now has a number of international mirrors. The primary site can be found at, > -Use make to compile entries. It is possible that on non-Un*x / non-Linux +Use make to compile entries. It is possible that on non-Un\*x / non-Linux systems the makefile needs to be changed. See the Makefile for details. -Look at the source and try to figure out what the programs do, and run -them with various inputs. If you want to, look at the hints files for -spoilers - this year we included most of the information included -by the submitters. +This year we included most of the information included by the submitters +in the README.md files. Read over the makefile for compile/build issues. Your system may require certain changes (add or remove a library, add or remove a #define). @@ -79,3 +76,10 @@ For news of the next contest watch: > +=-= + +Copyright (C) 2006, Landon Curt Noll, Simon Cooper, and Leonid A. +Broukhis. All Rights Reserved. Permission for personal, educational +or non-profit use is granted provided this copyright and notice are +included in its entirety and remains unaltered. All other uses +must receive prior permission from the contest judges. diff --git a/2011/README.md b/2011/README.md index 71847b7e4..7d67a986a 100644 --- a/2011/README.md +++ b/2011/README.md @@ -1,28 +1,25 @@ 2011 marked the "The Twentieth International Obfuscated C Code Contest" ======================================================================== -Copyright (C) 2012, Landon Curt Noll, Simon Cooper, and Leonid A. -Broukhis. All Rights Reserved. Permission for personal, educational -or non-profit use is granted provided this copyright and notice are -included in its entirety and remains unaltered. All other uses -must receive prior permission from the contest judges. - Standard IOCCC stuff -------------------- +Look at the README.md file for the given winner for information +on how to compile the winner and how to run the winning program. +Look at the winning source and try to figure how it does what it does! +You may then wish to look at the Author's comments for even more details. + The IOCCC has a web site and now has a number of international mirrors. The primary site can be found at, > -Use make to compile entries. It is possible that on non-Un*x / non-Linux +Use make to compile entries. It is possible that on non-Un\*x / non-Linux systems the makefile needs to be changed. See the Makefile for details. -Look at the source and try to figure out what the programs do, and run -them with various inputs. If you want to, look at the hints files for -spoilers - this year we included most of the information included -by the submitters. +This year we included most of the information included by the submitters +in the README.md files. Read over the makefile for compile/build issues. Your system may require certain changes (add or remove a library, add or remove a #define). @@ -77,3 +74,10 @@ For news of the next contest watch: > +=-= + +Copyright (C) 2012, Landon Curt Noll, Simon Cooper, and Leonid A. +Broukhis. All Rights Reserved. Permission for personal, educational +or non-profit use is granted provided this copyright and notice are +included in its entirety and remains unaltered. All other uses +must receive prior permission from the contest judges. diff --git a/2012/README.html b/2012/README.html deleted file mode 100644 index 5d4aeefc7..000000000 --- a/2012/README.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - README - - -

2012 marked the “The Twenty First International Obfuscated C Code Contest”

- -

Copyright © 2012, Landon Curt Noll, Simon Cooper, and Leonid A. -Broukhis. All Rights Reserved. Permission for personal, educational -or non-profit use is granted provided this copyright and notice are -included in its entirety and remains unaltered. All other uses -must receive prior permission from the contest judges.

- -

Standard IOCCC stuff

- -

The IOCCC has a web site and now has a number of international mirrors. -The primary site can be found at www.ioccc.org. - -

Use make to compile entries. It is possible that on non-Un*x / non-Linux -systems the makefile needs to be changed. See the Makefile for details.

- -

Look at the source and try to figure out what the programs do, and run -them with various inputs. If you want to, look at the hints files for -spoilers - this year we included most of the information included -by the submitter.

- -

Read over the makefile for compile/build issues. Your system may require -certain changes (add or remove a library, add or remove a #define).

- -

Some ANSI C compilers are not quite as good as they should be. If -yours is lacking, you may need to compile using gcc instead of your -local compiler.

- -

Remarks on some of the entries

- -

We believe you will be impressed with this year’s winners. We had -a very difficult time picking a single best from among the other winners -because the overall quality of the winners were so high.

- -

This year we selected the top 4 entries for particularly high honors:

- -
    -
  • Gold award - Balanced use of obfuscation

    - -

    A very extremely subtle and twisted piece of source code! -Even if you start with the zeitak_deobfucate.c source, -you will still have a very challenging time to understand it!

  • -
  • Silver award - Most elementary use of C

    - -

    A fun program that could also have won “Best abuse of -Ghostscript” because it managed to create some PDF files -that Ghostscript could not read.

  • -
  • Bronze award - Best use of cocoa

    - -

    A picture within a picture is worth more than a -thousand (4 byte) words. :-)

  • -
  • Honorable mention - Most complex ASCII fluid

    - -

    When you see this program in action, you too will -very likely say wow as we did!

  • -
- - -

But don’t ignore the other winners! There are games, utilities, -eye candy, calculators and graphical tools to explore.

- -

This year, Yusuke Endoh won with two entries, one of which (endoh1) -won the special Honorable mention award. Eight of the winning entries -were from people who won in previous years.

- -

This year we had a number of winners from Asia. We saw our second -winner from China and first from Korea. We are pleased to see -outstanding entries from areas of the world that have not been -active in past contests. Will we see an upswing of entries -from South America, Africa and Antarctica next year? :-)

- -

Please note that judging is done completely anonymously. Please -do NOT reveal your identity in your source code. In the future we -may disqualify entries that reveal the identity of the submitter!

- -

There were some outstanding entries that did not win. Unfortunately -some very good entries lost because they:

- -
    -
  • would take years to execute

  • -
  • were way way oversize and didn’t even attempt to justify their -excess by a clever abuse of the rules

  • -
  • obfuscate themselves by simply invoking a complex -state machine

  • -
  • depend on a single obfuscation trick

  • -
  • could only be run on a particular vendor’s platform

  • -
  • were very similar to previous winners

  • -
  • were based on an overused theme such as yet another -fractal display program

  • -
  • didn’t work as documented

  • -
- - -

We hope the authors of some of those entries will fix and re-submit -them for the next IOCCC.

- -

There is a risk in submitting an entry that is similar to a well -used theme by previous winners. Previous winners set a very high -bar. A new winner must not only compete against other submissions -form the current year, they must also excel over similar winners -in some particularly impressive way.

- -

Final Comments

- -

Please feel free to send us comments and suggestions about the -competition, this README or anything else that you would like to see in -future contests.

- -

If you use, distribute or publish these entries in some way, please drop -us a line. We enjoy seeing who, where and how the contest is used.

- -

If you have problems with any of the entries, AND YOU HAVE A FIX, please -send us the fix (patch file or the entire changed file).

- - - - - -
Creative Commons License

© Copyright 1984-2012, -Leo Broukhis, Simon Cooper, Landon Curt Noll -- All rights reserved
-This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

 
- - diff --git a/2012/README.md b/2012/README.md index a4d44b4e6..d46f6b60f 100644 --- a/2012/README.md +++ b/2012/README.md @@ -1,16 +1,15 @@ 2012 marked the "The Twenty First International Obfuscated C Code Contest" ======================================================================== -Copyright (C) 2012, Landon Curt Noll, Simon Cooper, and Leonid A. -Broukhis. All Rights Reserved. Permission for personal, educational -or non-profit use is granted provided this copyright and notice are -included in its entirety and remains unaltered. All other uses -must receive prior permission from the contest judges. - Standard IOCCC stuff -------------------- +Look at the README.md file for the given winner for information +on how to compile the winner and how to run the winning program. +Look at the winning source and try to figure how it does what it does! +You may then wish to look at the Author's comments for even more details. + The IOCCC has a web site and now has a number of international mirrors. The primary site can be found at, @@ -19,11 +18,6 @@ The primary site can be found at, Use make to compile entries. It is possible that on non-Un\*x / non-Linux systems the makefile needs to be changed. See the Makefile for details. -Look at the source and try to figure out what the programs do, and run -them with various inputs. If you want to, look at the hints files for -spoilers - this year we included most of the information included -by the submitter. - Read over the makefile for compile/build issues. Your system may require certain changes (add or remove a library, add or remove a #define). @@ -132,12 +126,10 @@ For news of the next contest watch: > +=-= --------------------------------------------------------------------------------- - +Copyright (C) 2012, Landon Curt Noll, Simon Cooper, and Leonid A. +Broukhis. All Rights Reserved. Permission for personal, educational +or non-profit use is granted provided this copyright and notice are +included in its entirety and remains unaltered. All other uses +must receive prior permission from the contest judges. diff --git a/2013/README.html b/2013/README.html deleted file mode 100644 index ceb51c8a1..000000000 --- a/2013/README.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - README - - -

2013 marked the “The Twenty Second International Obfuscated C Code Contest”

- -

Copyright © 2013, Landon Curt Noll, Simon Cooper, and Leonid A. -Broukhis. All Rights Reserved. Permission for personal, educational -or non-profit use is granted provided this copyright and notice are -included in its entirety and remains unaltered. All other uses -must receive prior permission from the contest judges.

- -

Standard IOCCC stuff

- -

The IOCCC has a web site and now has a number of international mirrors. -The primary site can be found at www.ioccc.org. - -

Use make to compile entries. It is possible that on non-Un*x / non-Linux -systems the makefile needs to be changed. See the Makefile for details.

- -

Look at the source and try to figure out what the programs do, and run -them with various inputs. If you want to, look at the hints files for -spoilers - this year we included most of the information included -by the submitter.

- -

Read over the makefile for compile/build issues. Your system may require -certain changes (add or remove a library, add or remove a #define).

- -

Some ANSI C compilers are not quite as good as they should be. If -yours is lacking, you may need to compile using gcc instead of your -local compiler.

- -

Remarks on some of the entries

- -

We believe you will again be impressed with this year’s winners.

- -

This year, several 8 people won 9 people won 15 awards. For the -first time in the history of the contest, one person, Yusuke Endoh, -won 4 times while Adrian Cable won 3 times! It is also worth noting -that Chris Mills previous win was in 1993. Welcome back Chris!

- -

We, the judges, were very surprised by this as many of the multiple -winners submitted very different styles of entries.

- -

This year was the first time the IOCCC size tool was used. Entries -had to print a value 2053 or less when the -i flag was used.

- -

Several people discovered an undocumented feature in that -certain comments such as:

- -
///*
-
- -

or:

- -
*\
-/
-
- -

were not correctly parsed by the tool. The guidelines stated:

- -
In cases where the above summary and the algorithm implemented by
-the IOCCC size tool source code conflict, the algorithm implemented
-by the IOCCC size tool source code is preferred by the judges.
-
- -

so this abuse was allowed (and encouraged). The judges hope that -the IOCCC size tool author will patch the tool to block this kind -of size abuse in future contests.

- -

There were some outstanding entries that did not win. Unfortunately -some very good entries lost because they:

- -
    -
  • were way way oversize and didn’t even attempt to justify their -excess by a clever abuse of the rules

  • -
  • depend on a single obfuscation trick

  • -
  • could only be run on a particular vendor’s platform

  • -
  • were very similar to previous winners

  • -
  • didn’t work as documented

  • -
- - -

We hope the authors of some of those entries will fix and re-submit -them for the next IOCCC.

- -

There is a risk in submitting an entry that is similar to a well -used theme by previous winners. Previous winners set a very high -bar. A new winner must not only compete against other submissions -from the current year, they must also excel over similar winners -in some particularly impressive way.

- -

Final Comments

- -

Please feel free to send us comments and suggestions about the -competition, this README or anything else that you would like to see in -future contests.

- -

If you use, distribute or publish these entries in some way, please drop -us a line. We enjoy seeing who, where and how the contest is used.

- -

If you have problems with any of the entries, AND YOU HAVE A FIX, please -send us the fix (patch file or the entire changed file).

- - - - - -
Creative Commons License

© Copyright 1984-2013, -Leo Broukhis, Simon Cooper, Landon Curt Noll -- All rights reserved
-This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

 
- - diff --git a/2013/README.md b/2013/README.md index 4b6958532..d9f58198b 100644 --- a/2013/README.md +++ b/2013/README.md @@ -1,16 +1,15 @@ 2013 marked the "The Twenty Second International Obfuscated C Code Contest" =========================================================================== -Copyright (C) 2013, Landon Curt Noll, Simon Cooper, and Leonid A. -Broukhis. All Rights Reserved. Permission for personal, educational -or non-profit use is granted provided this copyright and notice are -included in its entirety and remains unaltered. All other uses -must receive prior permission from the contest judges. - Standard IOCCC stuff -------------------- +Look at the README.md file for the given winner for information +on how to compile the winner and how to run the winning program. +Look at the winning source and try to figure how it does what it does! +You may then wish to look at the Author's comments for even more details. + The IOCCC has a web site and now has a number of international mirrors. The primary site can be found at, @@ -19,11 +18,6 @@ The primary site can be found at, Use make to compile entries. It is possible that on non-Un\*x / non-Linux systems the makefile needs to be changed. See the Makefile for details. -Look at the source and try to figure out what the programs do, and run -them with various inputs. If you want to, look at the hints files for -spoilers - this year we included most of the information included -by the submitter. - Read over the makefile for compile/build issues. Your system may require certain changes (add or remove a library, add or remove a #define). @@ -35,7 +29,7 @@ local compiler. Remarks on some of the entries ------------------------------ -We believe you will again be impressed with this year's winners. +We believe you will again be impressed with this year's winners. This year, several 8 people won 9 people won 15 awards. For the first time in the history of the contest, one person, Yusuke Endoh, @@ -112,12 +106,10 @@ For news of the next contest watch: > +=-= --------------------------------------------------------------------------------- - +Copyright (C) 2013, Landon Curt Noll, Simon Cooper, and Leonid A. +Broukhis. All Rights Reserved. Permission for personal, educational +or non-profit use is granted provided this copyright and notice are +included in its entirety and remains unaltered. All other uses +must receive prior permission from the contest judges. diff --git a/2019/README.html b/2019/README.html deleted file mode 100644 index 127395ce4..000000000 --- a/2019/README.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - README - - -

2016 marked the “The Twenty Sixth International Obfuscated C Code Contest”

- -

Copyright © 2019, Landon Curt Noll, Simon Cooper, and Leonid A. -Broukhis. All Rights Reserved. Permission for personal, educational -or non-profit use is granted provided this copyright and notice are -included in its entirety and remains unaltered. All other uses -must receive prior permission from the contest judges.

- -

Standard IOCCC stuff

- -The primary site can be found at www.ioccc.org. - -

Use make to compile entries. It is possible that on non-Un*x / non-Linux -systems the makefile needs to be changed. See the Makefile for details.

- -

Look at the source and try to figure out what the programs do, and run -them with various inputs. If you want to, look at the hints files for -spoilers - this year we included most of the information included -by the submitter.

- -

Read over the makefile for compile/build issues. Your system may require -certain changes (add or remove a library, add or remove a #define).

- -

Some C compilers are not quite as good as they should be. If yours is -lacking, you may need to compile using clang or gcc instead of your local -compiler.

- -

Remarks on some of the winners

- -

This year’s winners are impressive!

- -

The “Most in need of debugging” (endoh) is very inventive in a way it produces its own text!

- -

The “Most likely to be awarded” (ciura) has an amazing vocabulary!

- -

There are again nods to winners of the years:

- -
[1991/davidguy](http://ioccc.org/years.html#1991_davidguy)
-[2011/blakely](http://ioccc.org/years.html#2011_blakely)
-
- -

These nods to not run afoul of the guideline:

- -
We tend to dislike programs that:
-...
-are rather similar to previous winners
-
- -

because the entry (dogon) appropriately pays homage to past winners -without blatantly reusing their code.

- -

…We’ll stop spouting spoilers now. Have fun exploring all the entries!

- -

Remarks on some of submissions that did not win

- -

Some entries tried to get around the size limit by submitting a data -file that was really C code and then blindly including code in prog.c.

- -

Quite a few entries suffered from undefined behavior like accessing -uninitialized locals and/or reading-writing below the stack. -We advise running your entry through valgrind to make sure those mistakes -are avoided.

- -

Using extra arguments to main, or arguments of wrong types as a quick and dirty -way of declaring variables is now passé. Clang, for example, rejects them outright.

- -

We hope the authors of some of those entries will fix and re-submit -them for the next IOCCC.

- -

Some entries seemed to have a good idea, but the implementation of -the idea was limited in scope.

- -

Final Comments

- -

Please feel free to send us comments and suggestions about the -competition, this README or anything else that you would like to see in -future contests.

- -

If you use, distribute or publish these entries in some way, please drop -us a line. We enjoy seeing who, where and how the contest is used.

- -

If you have problems with any of the entries, AND YOU HAVE A FIX, please -send us the fix (patch file or the entire changed file).

- - - - - -
Creative Commons License

© Copyright 1984-2019, -Leo Broukhis, Simon Cooper, Landon Curt Noll -- All rights reserved
-This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

 
- - diff --git a/2019/README.md b/2019/README.md index a6713d37d..d5175b1a6 100644 --- a/2019/README.md +++ b/2019/README.md @@ -1,16 +1,15 @@ 2016 marked the "The Twenty Sixth International Obfuscated C Code Contest" ========================================================================== -Copyright (C) 2019, Landon Curt Noll, Simon Cooper, and Leonid A. -Broukhis. All Rights Reserved. Permission for personal, educational -or non-profit use is granted provided this copyright and notice are -included in its entirety and remains unaltered. All other uses -must receive prior permission from the contest judges. - Standard IOCCC stuff -------------------- +Look at the README.md file for the given winner for information +on how to compile the winner and how to run the winning program. +Look at the winning source and try to figure how it does what it does! +You may then wish to look at the Author's comments for even more details. + The primary IOCCC web site can be found at, > @@ -18,11 +17,6 @@ The primary IOCCC web site can be found at, Use make to compile entries. It is possible that on non-Un\*x / non-Linux systems the makefile needs to be changed. See the Makefile for details. -Look at the source and try to figure out what the programs do, and run -them with various inputs. If you want to, look at the hints files for -spoilers - this year we included most of the information included -by the submitter. - Read over the makefile for compile/build issues. Your system may require certain changes (add or remove a library, add or remove a #define). @@ -64,7 +58,7 @@ Some entries tried to get around the size limit by submitting a data file that was really C code and then blindly including code in prog.c. Quite a few entries suffered from undefined behavior like accessing -uninitialized locals and/or reading-writing below the stack. +uninitialized locals and/or reading-writing below the stack. We advise running your entry through valgrind to make sure those mistakes are avoided. @@ -99,11 +93,10 @@ For news of the next contest watch: > --------------------------------------------------------------------------------- - +Copyright (C) 2019, Landon Curt Noll, Simon Cooper, and Leonid A. +Broukhis. All Rights Reserved. Permission for personal, educational +or non-profit use is granted provided this copyright and notice are +included in its entirety and remains unaltered. All other uses +must receive prior permission from the contest judges. diff --git a/2020/README.md b/2020/README.md index e5d85bf7d..c1f471e82 100644 --- a/2020/README.md +++ b/2020/README.md @@ -1,14 +1,13 @@ ## 2020 marked the "The Twenty Seventh International Obfuscated C Code Contest" -Copyright (C) 2020, Landon Curt Noll, Simon Cooper, and Leonid A. -Broukhis. All Rights Reserved. Permission for personal, educational -or non-profit use is granted provided this copyright and notice are -included in its entirety and remains unaltered. All other uses -must receive prior permission from the contest judges. - ## Standard IOCCC stuff +Look at the README.md file for the given winner for information +on how to compile the winner and how to run the winning program. +Look at the winning source and try to figure how it does what it does! +You may then wish to look at the Author's comments for even more details. + The primary IOCCC web site can be found at, > @@ -16,11 +15,6 @@ The primary IOCCC web site can be found at, Use make to compile entries. It is possible that on non-Un\*x / non-Linux systems the makefile needs to be changed. See the Makefile for details. -Look at the source and try to figure out what the programs do, and run -them with various inputs. If you want to, look at the hints files for -spoilers - this year we included most of the information included -by the submitter. - Read over the makefile for compile/build issues. Your system may require certain changes (add or remove a library, add or remove a #define). @@ -88,10 +82,10 @@ For news of the next contest watch: > ------------------------------------------------------------------------------------------------------ -(c) Copyright 1984-2020, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved -This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License][cc]. +=-= -[judges]: http://www.ioccc.org/judges.html -[cc]: http://creativecommons.org/licenses/by-sa/3.0/ ------------------------------------------------------------------------------------------------------ +Copyright (C) 2020, Landon Curt Noll, Simon Cooper, and Leonid A. +Broukhis. All Rights Reserved. Permission for personal, educational +or non-profit use is granted provided this copyright and notice are +included in its entirety and remains unaltered. All other uses +must receive prior permission from the contest judges. From 75e4b492bab6624417b25fa336d839ad43f0028f Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 22:47:27 -0800 Subject: [PATCH 42/50] remove old 1992/adrian/adrian.orig.c --- 1992/adrian/adrian.orig.c | 113 -------------------------------------- 1 file changed, 113 deletions(-) delete mode 100644 1992/adrian/adrian.orig.c diff --git a/1992/adrian/adrian.orig.c b/1992/adrian/adrian.orig.c deleted file mode 100644 index 37ea85729..000000000 --- a/1992/adrian/adrian.orig.c +++ /dev/null @@ -1,113 +0,0 @@ -/* . wc . */ -#include/* Wht majr flwchrt? */ -#include/* That mjr flwchrt! */ -#define P 257 -#define G 17 -#define z 8 -#define v(jr) jr -int W ,head; -#define S(W,b,f) strncpy(W,b,f),W[f]=0\ - - -char *wcs=" \t\n"; -struct{ char X[z+1]; - char f ; - int e ; - struct{ char g[z+1]; - int b ; - } w[ G]; - } o[ P]; -int L=0,j= -28; - - -void E(int i, int m,char*c) -{ - for(; i<43; i+=3) - putc(i["}|uutsrq`_^bji`[Zkediml[PO]a_M__]ISOYIRGTNR"]+i-9,stderr); - fprintf(stderr,"(%d): %s\n" ,m,c); - exit(1); -} - - - -int N(int m, char *t) -{ - int i ; - if (strlen ( - t)>z) t[z ]=0; - for(i= 0; i< L ; i++) if( - !strcmp (o[ i] . X - , t))return i; - if( L== P) - E(0, m, t); - S (o[ L] . X , t - ,z); - head; W = .1* head; - o[L ].f = !( strchr( t,']' )== 0 ); - o[L ++ ] . e = 0; - return L -1 ; } - -#define v(x ) - -int A(char *R) -{ - int c=0, i; - while(* R) { - i = -1; - while(j){ - if( ++ i==o[ c].e ) return 0; - if(o[ - c] .w[i ] .g[0 ] - =='.' ||strchr (o[ c].w[i] .g ,* R)){ - c= - o[ c ] .w[i].b; break;/* -main(int sl,char *j[]){ - sleep (~~~~~~~~atoi(j[1])) ;/* . sl - sl s l . sl - l l ] - sl */ } - } - R++; - } - return o[ c].f; -} - - - main(int wc,char *V[]){char Y[999],*s;FILE*W;int m=0,echo,jr,q,wcl=0,wcw=0,wcc=0; - v(s = V[1]; if (*V=strrchr(s,'/'))s=*V+1; if(( !strncmp( s + (jr=strlen(s)) - - (q=strlen(V[2]) ),V[2],q))&&jr!=q) s[jr-q] = 0; puts(s); ) - int e,p,C,Q ,basename; - W= fopen(wc>= 2 ? V[1] : "adgrep.c","rt"); -echo| m^ e| 5| (int) .8| echo| -wc |C ==o[o[C] .e] . -e| e==+p,p; s[o[C] .e ] -; -while( fgets(Y,998,W)) { wcc += strlen(Y); m++; - if( s = strtok(Y,wcs)) wcw++; - else continue ; - C= - basename= j +j+*"* . basename" - +j+*"* r ] " + N(m,s) ; -while( s = strtok(0,wcs)) { - if( o[ C ] . e == - G) E(1 ,m,o[C] .X) ; - S(o[C - ] .w[o[C ] .e].g,s, z); - Q= C ; - if(! ( s =strtok ( 0 ,wcs )))wcw -- - ,E( 2 , m, o[C] - . w[ o[ Q ] .e] . g ); - e - = o[C ] .w[o[C ] .e++ ] .b= N(m,s) - ; wcw += 2; } - 0&& - W && wcl++ - < 10 && printf((W,Y)); } - if(j+28) { { - ; } printf("%7u%7u%7u\n", wcl , wcw , wcc); } - while( gets(Y) ) if(A(Y)) puts(Y); - W, jr; } - -O(int wc,char**V) { ---wc && (printf("%s ",*++V), main(wc,V), 1) || printf("\n"); } - From d01a02490af2e05a32c7a11509ca80735a3dab74 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 22:49:24 -0800 Subject: [PATCH 43/50] remove old 1992/albert/albert.orig.c --- 1992/albert/albert.orig.c | 152 -------------------------------------- 1 file changed, 152 deletions(-) delete mode 100644 1992/albert/albert.orig.c diff --git a/1992/albert/albert.orig.c b/1992/albert/albert.orig.c deleted file mode 100644 index 489f27cdf..000000000 --- a/1992/albert/albert.orig.c +++ /dev/null @@ -1,152 +0,0 @@ -#include -#include -#include -#include -#define new(PP) (PP *) malloc(sizeof(PP)) -typedef struct q { - jmp_buf ppp; - long qq; - struct q *P; - struct q *p; -} -PP; - -PP *P; -int aaaaaa=2; -int aaaaaaa=1; - -long qqq; - - -aaAaaa(aa,aaa) -char *aa; -char *aaa; -{ - char aaaa = 0; - if ((((( aaa ))))) - { - aaaa = *aa; - *aa=0; - aa+=strlen(aa+1); - P =new(PP); - P->P=P; - P->p=P; - } - - if ((((( !setjmp(P->ppp) ))))) - { - if ((((( !isdigit(*aa) ))))) - longjmp(P->ppp,aaaaaaa); - else { - P->p->P = new(PP); - P->p->P->P = P; - P->p->P->p = P->p; - P->p = P->p->P; - - P->qq = *aa--; - P = P->p; - aaAaaa(aa,0); - } - } else { - if ( !aaaa&&!*aa ) - longjmp(P->p->ppp,aaaaaaa); - - if ((((( (P->qq=aaaa)<10 &&! - (isdigit(aaaa)) ||! - (isdigit(*aa) ||! - *aa )))))) - { - fprintf(stderr,"Usage %c%s \n", - (aaa[0]?7:aaaa),aaa+!aaa[0]); - exit(1); - } - } -} - - -ppPppp(pp,ppp) -PP **pp, *ppp; -{ - int aa; - if ((((( !(aa=setjmp(ppp->ppp))||aa==aaaaaa ))))) - { - if ((((( *pp==ppp ))))) - { - ppp = (*pp)->p; - - if ( qqq<47 ) return; - if ( ppp->qq!=48 ) return; - - while ( ppp->qq==48 ) - { - printf("%ld\n",qqq-45); - *pp = ppp; - ppp = ppp->p; - } - qqq -= 1; - longjmp(ppp->ppp,aaaaaaa); - } else { - PP *p; - - ppPppp(pp,ppp->p); - for (p=ppp;p!=*pp;p=p->p) - { - int qq=4; - if ((((( qqq<47 && - (qq=0,p->qq+=p->p->qq-96)>=48-qqq || - qqq>46 && - (p->qq-=p->p->qq)<0 ))))) - { - p->qq += qqq+qq; - if ( p->p==P && qqq<=46 ) - { - P->p->P = new(PP); - P->p->P->P = P; - P->p->P->p = P->p; - *pp = P = P->p = P->p->P; - P->qq = 48; - } - - p->p->qq+=qq==0; - p->p->qq-=qq!=0; - } - else - { - p->qq += 48; - } - } - if ( ppp->P==P ) longjmp(ppp->ppp,aaaaaaa); - } - } - else - { - qqq += 1; - - while (48==P->qq ) - { - P->P->p = P->p; - P = P->p->P = P->P; - - } - - if (ppp!=ppp->p->p ) - longjmp(ppp->ppp,aaaaaa); - else - { - printf("At most one remains\n"); - exit(0); - } - } -} - - -main(aaa,aaaa) -int aaa; -char **aaaa; -{ - aaAaaa(aaa==aaaaaaa?aaaa[0]:aaaa[1],aaaa[0]); - qqq = 39; - ppPppp(&P,P->p); -} - - From 36efb7cfa70ad5e5b26f76b42e50bd72b5766b66 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Tue, 21 Feb 2023 22:55:55 -0800 Subject: [PATCH 44/50] fix 1992/albert/albert.c based on albert.fix.c --- 1992/albert/albert.c | 170 ++++++--------------------------------- 1992/albert/albert.fix.c | 34 -------- 2 files changed, 26 insertions(+), 178 deletions(-) delete mode 100644 1992/albert/albert.fix.c diff --git a/1992/albert/albert.c b/1992/albert/albert.c index 05f4c8472..d40c72c2b 100644 --- a/1992/albert/albert.c +++ b/1992/albert/albert.c @@ -1,152 +1,34 @@ #include -#include -#include -#include -#define new(PP) (PP *) malloc(sizeof(PP)) -typedef struct q { - jmp_buf ppp; - long qq; - struct q *P; - struct q *p; -} -PP; -PP *P; -int aaaaaa=2; -int aaaaaaa=1; - -long qqq; - - -aaAaaa(aa,aaa) -char *aa; -char *aaa; +main(argc,argv) +int argc; +char **argv; { - char aaaa = 0; - if ((((( aaa ))))) - { - aaaa = *aa; - *aa=0; - aa+=strlen(aa+1); - P =new(PP); - P->P=P; - P->p=P; - } + long arg[100]; + int i,j; + int base = 10; + int start = 0; + int end= strlen(argv[1]); - if ((((( !setjmp(P->ppp) ))))) + + for (i=0;i 2 ) { - if ((((( !isdigit(*aa) ))))) - longjmp(P->ppp,aaaaaaa); - else { - P->p->P = new(PP); - P->p->P->P = P; - P->p->P->p = P->p; - P->p = P->p->P; + while ( arg[end-1] == 0 ) { + printf("%d\n",base); + end--; + } + while ( arg[start] == 0 ) start +=1; + base += 1; - P->qq = *aa--; - P = P->p; - aaAaaa(aa,0); + for (i=start+1;istart;j--) + if ( (arg[j]-=arg[j-1])<0 ) + { + arg[j]+=base; + arg[j-1] -= 1; + } } - } else { - if ( !aaaa&&!*aa ) - longjmp(P->p->ppp,aaaaaaa); - - if ((((( (P->qq=aaaa)<10 &&! - (isdigit(aaaa)) ||! - (isdigit(*aa) ||! - *aa )))))) - { - fprintf(stderr,"Usage %c%s \n", - (aaa[0]?7:aaaa),aaa+!aaa[0]); - exit(1); - } - } } - - -ppPppp(pp,ppp) -PP **pp, *ppp; -{ - int aa; - if ((((( !(aa=setjmp(ppp->ppp))||aa==aaaaaa ))))) - { - if ((((( *pp==ppp ))))) - { - ppp = (*pp)->p; - - if ( qqq<47 ) return; - if ( ppp->qq!=48 ) return; - - while ( ppp->qq==48 ) - { - printf("%ld\n",qqq-45); - *pp = ppp; - ppp = ppp->p; - } - qqq -= 1; - longjmp(ppp->ppp,aaaaaaa); - } else { - PP *p; - - ppPppp(pp,ppp->p); - for (p=ppp;p!=*pp;p=p->p) - { - int qq=4; - if ((((( qqq<47 && - (qq=0,p->qq+=p->p->qq-96)>=48-qqq || - qqq>46 && - (p->qq-=p->p->qq)<0 ))))) - { - p->qq += qqq+qq; - if ( p->p==P && qqq<=46 ) - { - P->p->P = new(PP); - P->p->P->P = P; - P->p->P->p = P->p; - *pp = P = P->p = P->p->P; - P->qq = 48; - } - - p->p->qq+=qq==0; - p->p->qq-=qq!=0; - } - else - { - p->qq += 48; - } - } - if ( ppp->P==P ) longjmp(ppp->ppp,aaaaaaa); - } - } - else - { - qqq += 1; - - while (48==P->qq ) - { - P->P->p = P->p; - P = P->p->P = P->P; - - } - - if ( ppp!=ppp->p->p || qqq<47 ) - longjmp(ppp->ppp,aaaaaa); - else - { - printf("At most one remains\n"); - exit(0); - } - } -} - - -main(aaa,aaaa) -int aaa; -char **aaaa; -{ - aaAaaa(aaa==aaaaaaa?aaaa[0]:aaaa[1],aaaa[0]); - qqq = 39; - ppPppp(&P,P->p); -} - - diff --git a/1992/albert/albert.fix.c b/1992/albert/albert.fix.c deleted file mode 100644 index d40c72c2b..000000000 --- a/1992/albert/albert.fix.c +++ /dev/null @@ -1,34 +0,0 @@ -#include - -main(argc,argv) -int argc; -char **argv; -{ - long arg[100]; - int i,j; - int base = 10; - int start = 0; - int end= strlen(argv[1]); - - - for (i=0;i 2 ) - { - while ( arg[end-1] == 0 ) { - printf("%d\n",base); - end--; - } - while ( arg[start] == 0 ) start +=1; - base += 1; - - for (i=start+1;istart;j--) - if ( (arg[j]-=arg[j-1])<0 ) - { - arg[j]+=base; - arg[j-1] -= 1; - } - } -} From dcd128427bcebeb68bd81258c70db63019a36237 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Wed, 22 Feb 2023 00:39:56 -0800 Subject: [PATCH 45/50] remove old 1992/kivinen/kivinen.orig.c 1992/kivinen/imc.orig.c --- 1992/imc/imc.orig.c | 54 ------------------------------------- 1992/kivinen/kivinen.orig.c | 38 -------------------------- 2 files changed, 92 deletions(-) delete mode 100644 1992/imc/imc.orig.c delete mode 100644 1992/kivinen/kivinen.orig.c diff --git a/1992/imc/imc.orig.c b/1992/imc/imc.orig.c deleted file mode 100644 index f85f23212..000000000 --- a/1992/imc/imc.orig.c +++ /dev/null @@ -1,54 +0,0 @@ -#include -#include -#define I " .:\';+++q&&L(v[q],O,&B)!=1&&--q -#define F(U,S,C,A) t=0,*++J&&(t=L(J,U,&C,&A)),(!t&&c>++q&&!(t=L(v[q],U,\ - &C,&A)))?--q:(t<2&&c>++q&&!(t=L(v[q],S,&A))&&--q -#define T(E) (s("%d",E),E||(fputs(n,i),r)) -#define d(C,c) (F("%lg,%lg","%lg",C,c))) -#define O (F("%d,%d","%d",N,U),(N&&U)||(fputs(n,i),r))) -#define D (s("%lg",f)) -#define E putc - C - G=0, - R - =0,Q,H - ,M,P,z,S - =0,x=0 - , f=0;l b,j=0, k - =128,K=1,V,B=0,Y,m=128,p=0,N - =768,U=768,h[]={0x59A66A95,256 - ,192,1,6912,1,0,0},t,A=0,W=0,Z=63,X=23 - ;o*J,_;main(c,v)l c;o**v;{l q=1;for(;;q< - c ?(((J=v[q])[0]&&J[0]<48&&J++,((_= *J)<99|| - _/2== '2'||(_-1)/3=='\"'||_==107||_/05*2==','||_ - >0x074)?( fprintf(i,a,v[q]),r):_>0152?(_/4>27?(_&1?( - O,Z=N,X=U): (W++,N=Z,U=X)):_&1?T(K):T(k)):_>103?(d(G, - R ),j=1):_&1? d(S,x):D,q++),q--,main(c-q,v+q)):A==0?(A= - 1,f||(f=N/4.),b=(((N-1)&017)<8),q=(((N+7)>>3)+b)*U,(J=malloc(q) - )||(perror("malloc"),r),S-=(N/2)/f,x+=(U/2)/f):A==1?(B>=1)||/*/ - (m=128,u--),A==6?exit(1):B -# define X( x,v,y) XMoveWindow(d,s[x],(v)*z,(y)*z) -# define _ ButtonPressMask|ButtonReleaseMask -# define I( x,y) XSelectInput(d,s[x],y) -# define N( v) (XMapWindow(d,s[v]),v) -# define V VisibilityChangeMask -# define A XCreateSimpleWindow -# define D DefaultScreen(d) -# define E r.xbutton.button -# define R BlackPixel(d,D) -# define S r.xvisibility - - int main(a)int a;{Window s[53];int w,u,i,c,y,l=0 - ,q,e=32,t,k,j=~0,z=(a+1)/2,x=a&1,v=z&1;XEvent r;Display* - d=XOpenDisplay("");s[0]=A(d,DefaultRootWindow(d),200,200,(x& - v?330:120)*z,215*z,2,R,R);I(N(c=0),_);for(;c<(x?32:52);c++){s[ - c+1]=A(d,s[0],x ?c*20*z:(c-1)%10 *12*z,x?-20*z:( - c-1)/10*12*z,x ?z*(c^31?10: 2):z*10*(c?1:2 - ), x& v?z*10: (c &&!x?10:1+ x) *z,k =q=1, R, - WhitePixel(d ,D));I (N(c+1), V);}X( N(1),y=(x&v) - *115+50,x*70+ 60 ); X(N(c-- )+ 1,x?-10:(i=y) - ,u=!x*130-20); while(c &&e< 160){if(x){if( - v){l=!(e &32)*9; for(w=30; w--;){ if(s[w+2]){ k=w% - 10;l=e&32?k>l?k:l:k300?e++:0)):(q--,q+l<10?e++:0); } u>140? - exit(c):u>-20?X(32,i,u-=(v?5:-1)):(!v?(u =5,srandom(time(0)),i= - random()%88+6):0); } else{k>0?i+=(i>105?k= -k:k):(i+=(i<1?k= -k: - k)); j>0?u +=(u>140?exit(++c):j):(u+=(u <1?j= -j:j - )); X( 52,i,u);}XSync(d,0); while( - XCheckMaskEvent(d ,_|V,&r))if(!(r. type==ButtonPress - ?(E&1||!x||!v?t=E*4-8 :u<0?i=y+4,u=122:1):r - .type==ButtonRelease&&E?t=0,1:r.type^VisibilityNotify|S.state^1) - )for(x&v?(u= -15),w++:(w=0);++w <52-x*20;)if - (s[w] ==S.window)x&&v|| w ^1? - XUnmapWindow (d,s[w]) ,s[w]=0,c--: - 0,l=1; if(!x&&l)j= -j,l=0; if(l&x&&!v - )u=~19,c--,l=0;t=(!x||!v) &&(y<5&&t<0||y>95&&t>0)?0 - :t;s[1]?X(1,y+=x&v?t:t/(x+1),130):exit(++c);};return(c);} From 65192357d8b84177d2f1bdc7c370299e1be84901 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Wed, 22 Feb 2023 00:41:41 -0800 Subject: [PATCH 46/50] remove old 1992/lush/lush.orig.c --- 1992/lush/lush.orig.c | 167 ------------------------------------------ 1 file changed, 167 deletions(-) delete mode 100644 1992/lush/lush.orig.c diff --git a/1992/lush/lush.orig.c b/1992/lush/lush.orig.c deleted file mode 100644 index d88d71ce3..000000000 --- a/1992/lush/lush.orig.c +++ /dev/null @@ -1,167 +0,0 @@ -#define f 000: - char - *s,* - t,v; - char - _ [ - 999] - ,x [ - 999] - ,*p= - x ; - char - *av[ - ]= { - "W", - "H", - "o", - "l", - "N", - "e", - " ", - "r", - "d", - ".", - "m", - "s", - "g", - "!", - "*", - "\n" - } ; - int - n= 0 - ;int - __ = - 0,i= - 000; - main - () { -#define f 001: -#define F 042: -#define f 100: - i--[ -#define f 126: -#define f 132: -#define f 103: -#define f 202: -#define f 666: -#define f 77:: -#define f 101: - _]=0 -#define f 232: -#define f 151: - ;if( -#define f 256: - !i){ - puts - ("I" - "BM" - " S" - "UX" - );;; - ;;;} - ;for - ( ; - gets - (_); - ) { - for( -#define f 301: - t=_, -#define f 700: -#define f 999: - s=t, -#define f 77 : -#define f 300: - s=t; -#define f s=t; -#define f 123: -#define f 127: - *t&& - !(!( - *t < - '0' - ||*t - >'9' - )&&! - ((t[ - 1] ^ - ':') - &&(t - [1]^ - '.') - )) ; - t++) -#define f 137: -#define f 133: - ;if( -#define f 111: -#define f 220: - v^*t - &&*t - ){v= - *t;; - n=n* - 2+(1 - &*t) - ;__= - (__+ - 1)&3 - ; __ - ||(( - n<15 - &&(* - p= * - av[n - ] ), -#define f 2+2: - p++) - ,n=0 - );}} -#define f ==4: - ;*p= - '\0' - ;;;; -#define f puts - puts - (x); - s=t; -#define f s=5; - s=t; -#define f s=5: - s=t; -#define f 445: -#define f 113: -#define f 900: - s=t; -#define f n22: -#define f n40: - s=t; -#define f nn6: - s=t; -#define f nn1: -#define f 0:-- - s=t; -#define f 19:- -#define f x2:x - s=t; -#define f x1:x - s=t; -#define f y2:x -#define f y7:y - s=t; -#define f 1::: - s=t; -#define f @3:@ -#define f 10:0 -#define f x+1: - s=t; -#define f 2::: -#define f 3::: -#define x 7::: -#define y 3::: -#define z 990: -#define Z 47:: - ;;;} - From eac560e38051992b85072bf59682d3b366b5872b Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Wed, 22 Feb 2023 00:59:44 -0800 Subject: [PATCH 47/50] remove old 1992/marangon/marangon.orig.c --- 1992/marangon/marangon.orig.c | 77 ----------------------------------- 1 file changed, 77 deletions(-) delete mode 100644 1992/marangon/marangon.orig.c diff --git a/1992/marangon/marangon.orig.c b/1992/marangon/marangon.orig.c deleted file mode 100644 index f40631a7a..000000000 --- a/1992/marangon/marangon.orig.c +++ /dev/null @@ -1,77 +0,0 @@ -#include -#include - -#define ST strchr -#define SRD srand48 -#define RD lrand48 - -#define Q return -#define W wrefresh(r) -typedef int i; - -#define Z(d,a) (RD()%((a)-(d)+1)+(d)) -i f[3][3] = {15,52,36,20,-39,48,60,0,-25}; - -char z[6][6]; -#define Y(x) (4*(x)+3) -#define X(x) (2*(x)+1) -#define I for -WINDOW *r=NULL; -#define K endwin() - -char *g ="\ -Use l-h-k-j for move.\nUse + for increment. Use - for decrement.\nUse Q to quit."; - -i (*d())(); -nt() -{ -long time(); -SRD(time((i *)0)); -memset(z,5,36); -initscr(); -cbreak(); -noecho(); -nonl(); -if (COLS<80||LINES<24) -K,exit(1); -if (!(r=newwin(X(6),Y(6), -(LINES-X(6))/2,(COLS-Y(6))/2))) -K,exit(1); -mvaddstr(LINES-5,0,g); -refresh(); -} -i ci() -{ -i x,y=0; -I (;y<6;++y) -I(x=0;x<6;++x) -mvwaddch(r,X(y),Y(x),z[x][y]+'0'); Q(0); -} -void main() -{ -char *ST(); -i a=0,b=0,c,q,t,s,x,sc=0; -i(*(*p)())()=(nt(),d); -I(x=0 ; x++<20; )d(Z(0,5),Z(0,5),Z(1,2)); -I(t=Z(0,2),q=s=0; q<3; s+=f[q][t]*f[q++][t]); -I(box(r,'|','-'),ci(),wmove(r,X(a),Y(b)), -W; (ST ("+-Qlkjh",(char)(c=wgetch(r))))&& -((i)((i)(q^=s%=Y(q),s/=2)!=(i)(s^=q)&&c&64&&(!(c&7|0)&&--b<0&& -(b=q^s)&0|| c&4&&++b==6&&c&4<(~b&23?q^=s,b^=b -:b&12?b=3:b|2)||c&2&&~c&1&&++a==++q/2+1&&c&16>( -!a|12?a=7,a&=~a:a|4?a=2:a&2)||~c&4&&c& -1&&--a<0&&(a+=6)&0)||~c&64&&(**p(b,a,~c))()|| -c&16)?K,exit(0):1)||c; sc==36?ci(),W,K,exit(0):wmove(r,X(a),Y(b)), -W) -I(t=Z(0,2),q=s=0; q<3; s+=f[q][t]*f[q++][t]) -I(sc=0; sc<36&&*((char *)z+sc++)==5; ); -} -i (*d(a,b,c))()i a,b,c; -{ -i x,y; -I(x=a>0?a-1:0; x<=(a<5?a+1:5); ++x) -I(y=b>0?b-1:0; y<=(b<5?b+1:5); ++y) -if(x==a&&y==b&&z[x][y]==(c&2?1:9)||z[x][y]==(c&2?9:1)&&(x!=a||y!=b))Q(ci); -I(x=a>0?a-1:0; x<=(a<5?a+1:5); x++) -I(y=b>0?b-1:0; y<=(b<5?b+1:5)&&(x==a&&y==b&&(z[x][y]+=(c&2?-1:1))||(z[x][y]+=(c&2?1:-1))); y++); Q(ci); -} From 2f425d38e6a409c4d16e9b356c7c628dbf7e3b4b Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Wed, 22 Feb 2023 01:06:08 -0800 Subject: [PATCH 48/50] remove old 1992/vern/vern.orig.c --- 1992/vern/vern.orig.c | 210 ------------------------------------------ 1 file changed, 210 deletions(-) delete mode 100644 1992/vern/vern.orig.c diff --git a/1992/vern/vern.orig.c b/1992/vern/vern.orig.c deleted file mode 100644 index 2bcfc2340..000000000 --- a/1992/vern/vern.orig.c +++ /dev/null @@ -1,210 +0,0 @@ -#include -; m(x)(x<0?-1:!!x) -; g tj()-J -; a(x)(x<0?-x:x) -; h(x)((x)<=K?x:N-(x)) -; f 9999 -; A return -; H printf{ -; R double -; U int -; V for -; b else -; u while -; B if -U v,w,Y} -1,W,J,p,F,o} f,M,N,K,X,YY,_,P[f],s{ } ; -typedef U{ *L} { } ; -L q[f]; -tj{ } { -U S} m{ v} +{ m{ w} <1||w-Y||!q[J]:{ w-Y&&{ w-Y*2||q[W+Y*{ N+1} ]|| - { J>>K} -K+{ Y-1} / 2} } ||q[J]; -} -z{ } { -_} 5; -A v*w||g; -} -e{ } { -_} -2; -A{ v*v*v-v||w*w*w-w} &&{ J-W-2||{ W&N} -4||{ W>>K!} { Y-1?N:0} } || - q[W+1]||q[W+2]||q[W+K]!} z||P[W+K]*Y<0} ; -} -R VR{ } { -int PZ} 0x7fff; -A{ R} { rand{ } &PZ} /{ R} PZ; -} -l{ } { -_} K+1; -A{ v*w&&a{ v} -a{ w} } ||g; -} -R UC{ } { -R { } 0,d; -u{ { { +} d} VR{ } } <1.0} ; -A d; -} -c{ } { -_} -11; -A a{ v} -a{ w} ||g; -} -I{ ur,n,x} { -W} ur; -J} n; -B{ P[W]!} Y||P[J]} } Y} A J+1; -v} { J&N} -{ W&N} ; -w} { J>>K} -{ W>>K} ; -A q[W]{ } ||{ x&&QL{ W,J,s} } ; -} -TT{ W} { -v} w} 0; -A q[W]{ } +K; -} -s{ } { -U j} -1,{ ; -Y} -Y; -V{ { } 0; { } 0&&!I{ { ,j,0} } A Y} -Y; -} -A!{ Y} -Y} ; -} -bb{ } { -_} 1; -A a{ v*w} -2; -} -uv{ } { -V{ v} 0; v>K} } } 0} { -U S} h{ v&N} ; -q[v]} !S?z:{ S} } 1?bb:{ S} } 2?c:{ v&N>K?l:e} } } ; -} -b B{ h{ v>>K} } } 1} q[v]} k; -b q[v]} 0; -P[v]} !!q[v]*{ 28-v} ; -} -} -y{ } { -U G} Y,{ ; -J} 0; -V{ { } 0; { >K} } } 0} q[J]} l; -B{ q[W]} } e} B{ J-W} } 2} O{ J+1,J-1} ; -b B{ W-J} } 2} O{ W-1,W+1} ; -P[J]} P[W]; -q[W]} 0; -P[W]} 0; -} -QL{ W,J,D} L D; -{ -U HQ} P[J],YX; -L AJ} q[J],XY} q[W]; -O{ W,J} ; -YX} D{ } ; -O{ J,W} ; -q[J]} AJ; -q[W]} XY; -P[J]} HQ; -A YX; -} -C{ } { -U { ,j,BZ} 0; -V{ { } 0; { >K} +h{ { &N} ,G} Y, - S} Z} } z?88:{ Z} } k?11+r+{ P[{ ]<0?N-{ { >>K} :{ { >>K} } : -{ Z} } l?124-{ { YY<8&&{ { { &N} !} K|| - { { >>K} !} { P[{ ]>0?0:N} } } ?M:0} : -{ Z} } c?41+r:{ Z} } e?f-r-r:36+r+r} } } } ; -Y} P[{ ]; -V{ j} 0; j>K+K,{ &M-1,1} } { -Y} -Y; -o} -E; -t} -QL{ { >>K+K,{ &M-1,PX} ; -Y} -Y; -B{ t>E} { -++XP; -Q} { ; -E} t; -B{ E>} S} -A++F,E; -} -} -B{ !XP} E} s{ } ?-f+1:0; -p} Q; -A++F,E; -} -RZ{ } { -U { ,j,T} 0; -V{ ; ; } { -y{ } ; -o} f; -do{ -H"\n%d %d %d %s ",X,T,C{ } ,s{ } ?"!":">"} ; -fflush{ stdout} ; -} -u{ scanf{ "%o%o",&{ ,&j} !} 2||I{ { ,j,1} } ; -O{ { ,j} ; -y{ } ; -X} 0; -++YY; -Y} -Y; -T} PX{ } ; -{ } p>>{ K<<1} ; -j} p&{ M-1} ; -B{ I{ { ,j,1} } { -H"Rats!\n"} ; -A; -} -O{ { ,j} ; -Y} -Y; -B{ T>M*M} H"\nHar har.\n"} ; -} -} -main{ ac,av} char**av; -{ -long time{ } ,j} time{ &j} ; -R { } 0; -srand{ { U} j} ; -V{ M} 0; M<} f; ++M} { +} UC{ } ; -M} { /100; -B{ M&3} ++M; -B{ M&1} --M; -V{ N} 1; N*N1?atoi{ av[1]} :2; -uv{ } ; -RZ{ } ; -} From 79c7f3d1a04dc9b356cc017a3e25244201071010 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Wed, 22 Feb 2023 01:24:18 -0800 Subject: [PATCH 49/50] fix 1992 Makefiles and update README.md files --- 1992/Makefile | 2 +- 1992/adrian/.gitignore | 11 + 1992/adrian/Makefile | 799 ++++++++++++++++++++++++++++---------- 1992/adrian/README.md | 23 +- 1992/albert/Makefile | 753 +++++++++++++++++++++++++---------- 1992/albert/README.md | 16 +- 1992/ant/.gitignore | 2 + 1992/ant/Makefile | 765 ++++++++++++++++++++++++++---------- 1992/ant/README.md | 23 +- 1992/buzzard.1/.gitignore | 3 + 1992/buzzard.1/Makefile | 789 +++++++++++++++++++++++++++---------- 1992/buzzard.1/README.md | 24 +- 1992/buzzard.2/.gitignore | 1 + 1992/buzzard.2/Makefile | 760 ++++++++++++++++++++++++++---------- 1992/buzzard.2/README.md | 36 +- 1992/gson/.gitignore | 1 + 1992/gson/Makefile | 763 ++++++++++++++++++++++++++---------- 1992/gson/README.md | 39 +- 1992/imc/Makefile | 755 +++++++++++++++++++++++++---------- 1992/imc/README.md | 16 +- 1992/imc/imc.c | 3 +- 1992/kivinen/Makefile | 755 +++++++++++++++++++++++++---------- 1992/lush/Makefile | 760 ++++++++++++++++++++++++++---------- 1992/lush/README.md | 22 +- 1992/marangon/Makefile | 757 ++++++++++++++++++++++++++---------- 1992/marangon/README.md | 14 +- 1992/nathan/Makefile | 753 +++++++++++++++++++++++++---------- 1992/nathan/README.md | 17 +- 1992/vern/.gitignore | 1 + 1992/vern/Makefile | 763 ++++++++++++++++++++++++++---------- 1992/vern/README.md | 22 +- 1992/westley/Makefile | 760 ++++++++++++++++++++++++++---------- 1992/westley/README.md | 20 +- 33 files changed, 7477 insertions(+), 2751 deletions(-) diff --git a/1992/Makefile b/1992/Makefile index 3e87e677d..1aee26224 100644 --- a/1992/Makefile +++ b/1992/Makefile @@ -50,7 +50,7 @@ # tool locations ################ # -SHELL= /bin/bash +SHELL= bash MAKE= make diff --git a/1992/adrian/.gitignore b/1992/adrian/.gitignore index b1b4723da..4450cfb5f 100644 --- a/1992/adrian/.gitignore +++ b/1992/adrian/.gitignore @@ -1 +1,12 @@ +adbasename +adbasename.c +adecho +adecho.c +adgrep +adhead +adhead.c adrian +adsleep +adsleep.c +adwc +adwc.c diff --git a/1992/adrian/Makefile b/1992/adrian/Makefile index 2eb115d13..32e4c820f 100644 --- a/1992/adrian/Makefile +++ b/1992/adrian/Makefile @@ -1,244 +1,621 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1992 makefile +# IOCCC 1992 winning entry - adrian + +################################################################################ # -# Copyright (c) 1992, Landon Curt Noll & Larry Bassel. -# All Rights Reserved. Permission for personal, educational or non-profit -# use is granted provided this this copyright and notice are included in its -# entirety and remains unaltered. All other uses must receive prior permission -# from Landon Curt Noll and Larry Bassel. +# An Historical Makefile NOTE: +# +# The orig.Makefile, if it exits, is the original Makefile before this IOCCC +# year directory was reworked so that entries are in separate directories. +# This also applies to any orig.ansi.mk and orig.common.mk files. +# +# Several Makefiles were modified / formed in 2022, and as such it may have +# elements that are not historically compatible with way entries were built. +# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile. +# +# Regarding individual entries: +# +# IOCCC winning entry code may not work on your system. Even with standards, +# conditions and build environments change, especially when it comes to more +# extreme code such you might find in an IOCCC winner. Moreover, what was +# allowed and liked in one IOCCC contest may no longer be liked/allowed in +# later IOCCC years. +# +# Corrections on winning author and fixing typos in remarks are VERY WELCOME. +# +# GitHub pull requests are welcome: +# +# If you have a patch that might make running an entry work in modern Unix-like +# environments, please create a GitHub pull request for the IOCCC judges to +# consider. +# +# Suggestions and corrections regarding Makefiles, winning author information, +# fixing typos in remarks, and code patches are welcome via opening a GitHub +# issue or better yet, by creating a GitHub pull request for the IOCCC judges +# to consider. To form a GitHub issue or GitHub pull, please visit: +# +# https://github.com/ioccc-src/winner +# +################################################################################ + +# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under: +# +# Creative Commons Attribution-ShareAlike 3.0 Unported License. +# +# See: http://creativecommons.org/licenses/by-sa/3.0/ -SHELL=/bin/sh -CHMOD=chmod -CP=cp -RM=rm -SED=sed -LN=ln -UNIQ=uniq -CB=cb -GREP=grep -# set this to where your C Processor resides +############################# +# shell used by this Makefile +############################# # -# On some systems: -# CPP=/lib/cpp -# -CPP=/usr/ccs/lib/acpp +SHELL= bash -# flags for ansi compiles +####################### +# common tool locations +####################### # -# NOTE: Some ANSI compilers make use of -Xa to turn on ANSI mode, -# others such as gcc may want -ansi, others may want nothing -# at all. Adjust the CFLAGS line as needed. -# -# NOTE: Some compilers cannot optimize, or optimize some entries -# entries incorrectly. You might want need to turn on -O -# to see if your compiler can handle them. -# -#CFLAGS=-O -Xa -CFLAGS=-Xa -CC=cc +A2P= a2p +AR= ar +ASA= asa +AT= at +ATQ= atq +ATRM= atrm +AWK= awk +BANNER= banner +BASE64= base64 +BASENAME= basename +BATCH= batch +BC= bc +BINHEX= binhex +BISON= bison +BUNZIP2= bunzip2 +BZCAT= bzcat +BZCMP= bzcmp +BZDIFF= bzdiff +BZEGREP= bzegrep +BZFGREP= bzfgrep +BZGREP= bzgrep +BZIP2= bzip2 +BZLESS= bzless +BZMORE= bzmore +C2PH= c2ph +C89= c89 +C99= c99 +CAL= cal +CALC= calc +CAT= cat +CD= cd +CHFLAGS= chflags +CHGRP= chgrp +CHMOD= chmod +CKSUM= cksum +CLANG= clang +CLANG_PLUSPLUS= clang++ +CLEAR= clear +CMP= cmp +COL= col +COLLDEF= colldef +COLRM= colrm +COLUMN= column +COMPRESS= compress +CP= cp +CPIO= cpio +CPP= cpp +CRC32= crc32 +CSH= csh +CSPLIT= csplit +CURL= curl +CUT= cut +C_PLUSPLUS= c++ +C_PLUSPLUS_FILT= c++filt +DATE= date +DC= dc +DD= dd +DF= df +DIFF3= diff3 +DIFF= diff +DIG= dig +DIRNAME= dirname +ED= ed +EGREP= egrep +ENV= env +EQN= eqn +ETAGS= etags +EXPECT= expect +EXPR= expr +FALSE= false +FGREP= fgrep +FILE= file +FIND2PERL= find2perl +FIND= find +FLEX= flex +FLEX_PLUSPLUS= flex++ +FMT= fmt +FOLD= fold +FS_USAGE= fs_usage +FUNZIP= funzip +FUSER= fuser +GCC= gcc +GDIFFMK= gdiffmk +GENCAT= gencat +GENSTRINGS= genstrings +GETOPT= getopt +GETOPTS= getopts +GINDENT= gindent +GNUMAKE= gnumake +GREP= grep +GROFF= groff +GROFFER= groffer +GROG= grog +GROPS= grops +GROTTY= grotty +GUNZIP= gunzip +GVIM= gvim +GZCAT= gzcat +GZEXE= gzexe +GZIP_PROG= gzip +G_PLUSPLUS= g++ +H2PH= h2ph +H2XS= h2xs +HASH= hash +HEAD= head +HOSTNAME_PROG= hostname +ICONV= iconv +ID= id +INDENT= indent +INFO= info +JOT= jot +KILL= kill +KSH= ksh +LAST= last +LD= ld +LESSECHO= lessecho +LEX= len +LINK= link +LN= ln +LS= ls +M4= m4 +MAKE= make +MAN= man +MKDIR= mkdir +MKFIFO= mkfifo +MKTEMP= mktemp +MV= mv +NANO= nano +NASM= nasm +NEQN= neqn +NICE= nice +NL= nl +NM= nm +NOHUP= nohup +NROFF= nroff +NSLOOKUP= nslookup +OD= od +OPENSSL= openssl +PASTE= paste +PATCH= patch +PATHCHK= pathchk +PAX= pax +PERL= perl +PICO= pico +PR= pr +PRINTENV= printenv +PS= ps +PTAR= ptar +PTARDIFF= ptardiff +PTARGREP= ptargrep +PWD= pwd +PYDOC= pydoc +PYTHON= python +PYTHONW= pythonw +READLINK= readlink +RENICE= renice +RESET= reset +REV= rev +RI= ri +RM= rm +RMDIR= rmdir +RSYNC= rsync +RUBY= ruby +RVIM= rvim +SAY= say +SCP= scp +SCREEN= screen +SCRIPT= script +SDIFF= sdiff +SED= sed +SEQ= seq +SFTP= sftp +SH= sh +SHA1= sha1 +SHA= sha +SHAR= shar +SHASUM5_18= shasum5.18 +SHASUM= shasum +SIZE= size +SLEEP= sleep +SORT= sort +SSH= ssh +STAT= stat +STRIP= strip +STTY= stty +SUM= sum +SYNC= sync +TABS= tabs +TAIL= tail +TAR= tar +TEE= tee +TEST= test +TFTP= tftp +TIDY= tidy +TIME= time +TOP= top +TOUCH= touch +TPUT= tout +TPUT= tput +TR= tr +TROFF= troff +TRUE= true +TSET= tset +TSORT= tsort +UL= ul +UNAME= uname +UNCOMPRESS= uncompress +UNEXPAND= unexpand +UNIFDEF= unifdef +UNIFDEFALL= unifdefall +UNIQ= uniq +UNITS= units +UNLINK= unlink +UNZIP= unzip +UNZIPSFX= unzipsfx +UPTIME= uptime +UUDECODE= uudecode +UUENCODE= uuencode +UUIDGEN= uuidgen +VI= vi +VIEW= view +VIM= vim +VIMDIFF= vimdiff +W= w +WAIT4PATH= wait4path +WAIT= wait +WC= wc +WGET= wget +WHAT= what +WHATIS= whatis +WHICH= which +WHO= who +WHOAMI= whoami +WHOIS= whois +WRTIE= write +XAR= xar +XARGS= xargs +XATTR= xattr +XXD= xxd +YACC= yacc +YES= yes +ZCAT= zcat +ZCMP= zcmp +ZDIFF= zdiff +ZEGREP= zegrep +ZFGREP= zfgrep +ZFORCE= zforce +ZGREP= zgrep +ZIP= zip +ZIPCLOAK= zipcloak +ZIPGREp= zipgrep +ZIPINFo= zipinfo +ZIPNOTE= zipnote +ZIPSPLIT= zipsplit +ZLESS= zless +ZMORE= zmore +ZNEW= znew +ZPRINT= zprint +ZSH= zsh -# misc shell babble +# Set X11_LIBDIR to the directory where the X11 library resides # -NOINCLUDE=$(SED) -e 's/^.\([ ]*\)include/%include/' -SPACECLEAN=$(SED) -e 's/\([^ ]\)\([ ]\)[ ][ ]*/\1\2/g' -CPPCLEAN=$(GREP) -v '^. [0-9][0-9]*' +#X11_LIBDIR= /usr/X11R6/lib +#X11_LIBDIR= /usr/X11/lib +X11_LIBDIR= /opt/X11/lib -# winners that compile under ANSI C +# Set X11_INCLUDEDIR to the directory where the X11 include files reside # -WINNERS= adrian albert ant buzzard.1 buzzard.2 gson kivinen imc \ - lush marangon nathan vern westley -ALT_NAMES= adgrep am babble first ag whereami +#X11_INCDIR= /usr/X11R6/include +#X11_INCDIR= /usr/X11/include +X11_INCDIR= /opt/X11/include -all: $(WINNERS) $(ALT_NAMES) +# Common C compiler warnings to silence +# +#CSILENCE= +CSILENCE= -Wno-bitwise-op-parentheses -Wno-comment -Wno-deprecated-declarations \ + -Wno-error -Wno-implicit-function-declaration -Wno-format-security \ + -Wno-logical-op-parentheses -Wno-macro-redefined -Wno-parentheses \ + -Wno-return-type -Wno-uninitialized -Wno-unused-value -Wno-unused-variable \ + -Wno-unused-but-set-variable -Wno-unsequenced -Wno-unused-parameter -adrian: adrian.c - $(CC) $(CFLAGS) adrian.c -o adrian - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c - $(SED) '1s/\..*\./. wc ./' adrian.c > ad.temp +# Common C compiler warning flags +# +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard +# +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu90 + +# Compiler bit architecture +# +# Some entries require 32-bitness: +# ARCH= -m32 +# +# Some entries require 64-bitness: +# ARCH= -m64 +# +# By default we assume nothing: +# +ARCH= + +# Defines that are needed to compile +# +CDEFINE= +#CDEFINE= -DIOCCC + +# Include files that are needed to compile +# +CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 + +# Optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# Default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +LIBS= +#LIBS= -lm +#LIBS= -L ${X11_LIBDIR} -lX11 +#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL + +# C compiler to use +# +CC= cc +#CC=clang +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-float-conversion -Wno-missing-noreturn \ + -Wno-missing-prototypes -Wno-missing-variable-declarations -Wno-padded \ + -Wno-poison-system-directories -Wno-shadow -Wno-unreachable-code \ + -Wno-unused-macros +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif + + +############################## +# Special flags for this entry +############################## +# +ENTRY= adrian +PROG= ${ENTRY} +# +OBJ= ${PROG}.o +DATA= +TARGET= ${PROG} +# +ALT_OBJ= +ALT_TARGET= + + +################# +# build the entry +################# +# +all: data ${TARGET} + @${TRUE} + +.PHONY: all alt data everything clean clobber install \ + love haste waste maker easter_egg sandwich \ + supernova deep_magic magic charon pluto + +${PROG}: ${PROG}.c + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + ${RM} -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c + ${SED} '1s/\..*\./. wc ./' adrian.c > ad.temp -./adrian ad.temp adwc.c - $(CC) -o adwc adwc.c - $(SED) '1s/\..*\./. basename ./' adrian.c > ad.temp + ${CC} ${CFLAGS} -o adwc adwc.c + ${SED} '1s/\..*\./. basename ./' adrian.c > ad.temp -./adrian ad.temp adbasename.c - $(CC) -o adbasename adbasename.c - $(SED) '1s/\..*\./. echo| ./' adrian.c > ad.temp + ${CC} ${CFLAGS} -o adbasename adbasename.c + ${SED} '1s/\..*\./. echo| ./' adrian.c > ad.temp -./adrian ad.temp adecho.c - $(CC) -o adecho adecho.c - $(SED) '1s/\..*\./. head; ./' adrian.c > ad.temp + ${CC} ${CFLAGS} -o adecho adecho.c + ${SED} '1s/\..*\./. head; ./' adrian.c > ad.temp -./adrian ad.temp adhead.c - $(CC) -o adhead adhead.c - $(SED) '1s/\..*\./. sleep ./' adrian.c > ad.temp + ${CC} ${CFLAGS} -o adhead adhead.c + ${SED} '1s/\..*\./. sleep ./' adrian.c > ad.temp -./adrian ad.temp adsleep.c - $(CC) -o adsleep adsleep.c - $(RM) -f ad.temp + ${CC} ${CFLAGS} -o adsleep adsleep.c + ${RM} -f ad.temp -# NOTE: this is the original source that won +adgrep: ${PROG} + ${RM} -f $@ + ${LN} $< $@ + +# alternative executable # -adrian.orig: adrian.orig.c - $(CC) $(CFLAGS) adrian.orig.c -o adrian.orig +alt: data ${ALT_TARGET} + @${TRUE} -albert: albert.c - $(CC) $(CFLAGS) albert.c -o albert - -# NOTE: this is the original source that won +# data files # -albert.orig: albert.orig.c - $(CC) $(CFLAGS) albert.orig.c -o albert.orig +data: ${DATA} + @${TRUE} -ant: ant.c - $(CC) $(CFLAGS) ant.c -o ant - -buzzard.1: buzzard.1.c - $(CC) $(CFLAGS) buzzard.1.c -o buzzard.1 - -babble.cppcb: buzzard.1.c - $(NOINCLUDE) buzzard.1.c | \ - $(CPP) $(CPPFLAGS) | \ - $(CPPCLEAN) | \ - $(CB) $(CBFLAGS) | \ - $(UNIQ) | \ - $(SPACECLEAN) > babble.cppcb 2>&1 - -buzzard.2: buzzard.2.c - $(CC) $(CFLAGS) buzzard.2.c -o buzzard.2 - -# NOTE: this is the original source that won +# both all and alt # -buzzard.2.orig: buzzard.2.orig.c - $(CC) $(CFLAGS) buzzard.2.orig.c -o buzzard.2.orig +everything: all alt -gson: gson.c - $(CC) $(CFLAGS) gson.c -o gson -# NOTE: some systems may only need: +############### +# utility rules +############### # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 -# -kivinen: kivinen.c - $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 -lsocket -lresolv -lnsl - -# NOTE: this is the original program that won -# -# NOTE: some systems may only need: -# -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 -# -kivinen.orig: kivinen.orig.c - $(CC) $(CFLAGS) kivinen.orig.c -o kivinen.orig -lX11 \ - -lsocket -lresolv -lnsl - -imc: imc.c - $(CC) $(CFLAGS) imc.c -o imc - -# NOTE: this is the original program that won -# -imc.orig: imc.orig.c - $(CC) $(CFLAGS) imc.orig.c -o imc.orig - -lush: lush.c - $(CC) $(CFLAGS) lush.c -o lush - -lush.again: lush.c - $(CC) $(CFLAGS) lush.c -o lush.again - $(RM) -f lush.again - -# NOTE: this is the original program that won -# -lush.orig: lush.orig.c - $(CC) $(CFLAGS) lush.orig.c -o lush.orig - -# NOTE: some systems may need: -# -# $(CC) $(CFLAGS) marangon.c -o marangon -lcurses -ltermcap -# -marangon: marangon.c - $(CC) $(CFLAGS) marangon.c -o marangon -lcurses - -# NOTE: this is the original program that won -# -# NOTE: some systems may need: -# -# $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses -ltermcap -# -marangon.orig: marangon.orig.c - $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses - -nathan: nathan.c - $(CC) $(CFLAGS) nathan.c -o nathan - -# NOTE: this is the original program that won -# -nathan.orig: nathan.orig.c - $(CC) $(CFLAGS) nathan.orig.c -o nathan.orig - -vern: vern.tmp.c - $(CC) $(CFLAGS) vern.tmp.c -o vern - -vern.tmp.c: vern.c - $(RM) -f vern.tmp.c - $(SED) vern.tmp.c - -# NOTE: this is the original program that won -# -vern.orig: vern.orig.tmp.c - $(CC) $(CFLAGS) vern.orig.tmp.c -o vern.orig - -vern.orig.tmp.c: vern.orig.c - $(RM) -f vern.orig.tmp.c - $(SED) vern.orig.tmp.c - -westley: westley.c - $(CC) $(CFLAGS) westley.c -o westley - -# alternate names for selected entries -# -adgrep: adrian - $(RM) -f adgrep - $(LN) adrian adgrep -am: ant - $(RM) -f am - $(LN) ant am -babble: buzzard.1 - $(RM) -f babble - $(LN) buzzard.1 babble -first: buzzard.2 - $(RM) -f first - $(LN) buzzard.2 first -ag: gson - $(RM) -f ag - $(LN) gson ag -whereami: westley - $(RM) -f whereami - $(LN) westley whereami - clean: - $(RM) -f *.o a.out core - $(RM) -f vern.tmp.c lush.again babble.cppcb vern.orig.tmp.c - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + echo ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi clobber: clean - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig + ${RM} -f ${TARGET} ${ALT_TARGET} + @-if [ -e sandwich ]; then \ + ${RM} -f sandwich; \ + echo 'ate sandwich'; \ + fi -am_clobber: clean am - $(RM) -f am.safe - $(CP) am am.safe - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig - $(CP) am.safe am - $(RM) -f am.safe +install: + @echo "Dr. Spock says that is not logical!" + @${TRUE} -nuke: clobber - @true +# you may be able to misunderstand the source by reading indent.c +# +indent.c: ${PROG}.c + @if which "${GINDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${GINDENT} < $< > $@"; \ + ${GINDENT} < $< > $@; \ + elif which "${INDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${INDENT} < $< > $@"; \ + ${INDENT} < $< > $@; \ + else \ + echo "no intent tool found, ident $< yourself, sorry"; \ + echo "exit 1"; \ + exit 1; \ + fi -install: all - cat $(WINNERS) > /dev/null + +################## +# 133t hacker rulz +################## +# +love: + @echo 'not war?' + @${TRUE} + +haste: + $(MAKE) waste + @${TRUE} + +waste: + @echo 'haste' + @${TRUE} + +maker: + @echo 'Participate in a maker faire' + @${TRUE} + +easter_egg: + @echo "you expected to often misunderstand this $${RANDOM} magic" + @echo "chongo '' /\\oo/\\" + @echo "Eggy" + +sandwich: easter_egg + @if [ `id -u` -eq 0 ]; then \ + echo 'Okay.'; \ + echo "$${RANDOM}`date +%s`$${RANDOM}" > $@; \ + else \ + echo 'What? Make it yourself.'; \ + exit 1; \ + fi + +# Understand the history of the Homebrew Computer Club +# as well as the West Coast Computer Faire and +# you might be confused different. :-) +# +supernova: sandwich + @-if [ -r .code_anal ]; then \ + ${RM} -f .code_anal_v6; \ + else \ + echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \ + fi + @echo "A $@ helps ${MAKE} the elements that help form planets" + @${TRUE} + +deep_magic: supernova + @-if [ -r .code_anal ]; then \ + ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 \ + --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + fi + @${TRUE} + +magic: deep_magic + @-if [ -r .code_anal ]; then \ + ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "If you don't eat yer meat, you can't have any pudding!"; \ + echo "How can you have any pudding if you don't eat yer meat?!"; \ + fi + @${TRUE} + +# The IOCCC resident astronomer states +# +charon: magic + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore IAU, $@ is a planet" + +pluto: charon + ${MAKE} charon + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore, $@ is a planet" + @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" diff --git a/1992/adrian/README.md b/1992/adrian/README.md index 56ac4acc4..e57b2691a 100644 --- a/1992/adrian/README.md +++ b/1992/adrian/README.md @@ -1,4 +1,4 @@ -Most Educational: +# Most Educational: Adrian Mariano University of Washington @@ -6,25 +6,26 @@ Most Educational: Mercer Island, WA 98040 USA +## To build: -Judges' comments: + make all - To build: - make adrian +### To run - Try: - adrian adrian.grep.try < adrian.hint - - For the slow minded, try: - adsleep 32767 + ./adrian adrian.grep.try < adrian.hint + + For the slow minded, try: + + ./adsleep 32767 + +## Judges' comments Once you get past the obfuscation, you have an opportunity to learn about regular expressions and state machines. NOTE: Some compilers have had trouble optimizing this entry. - -Selected notes from the author: +## Author's comments ADrian's GREP (adgrep) diff --git a/1992/albert/Makefile b/1992/albert/Makefile index 2eb115d13..391713ff9 100644 --- a/1992/albert/Makefile +++ b/1992/albert/Makefile @@ -1,244 +1,593 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1992 makefile +# IOCCC 1992 winning entry - albert + +################################################################################ # -# Copyright (c) 1992, Landon Curt Noll & Larry Bassel. -# All Rights Reserved. Permission for personal, educational or non-profit -# use is granted provided this this copyright and notice are included in its -# entirety and remains unaltered. All other uses must receive prior permission -# from Landon Curt Noll and Larry Bassel. - - -SHELL=/bin/sh -CHMOD=chmod -CP=cp -RM=rm -SED=sed -LN=ln -UNIQ=uniq -CB=cb -GREP=grep -# set this to where your C Processor resides +# An Historical Makefile NOTE: # -# On some systems: -# CPP=/lib/cpp +# The orig.Makefile, if it exits, is the original Makefile before this IOCCC +# year directory was reworked so that entries are in separate directories. +# This also applies to any orig.ansi.mk and orig.common.mk files. # -CPP=/usr/ccs/lib/acpp - -# flags for ansi compiles +# Several Makefiles were modified / formed in 2022, and as such it may have +# elements that are not historically compatible with way entries were built. +# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile. # -# NOTE: Some ANSI compilers make use of -Xa to turn on ANSI mode, -# others such as gcc may want -ansi, others may want nothing -# at all. Adjust the CFLAGS line as needed. +# Regarding individual entries: # -# NOTE: Some compilers cannot optimize, or optimize some entries -# entries incorrectly. You might want need to turn on -O -# to see if your compiler can handle them. +# IOCCC winning entry code may not work on your system. Even with standards, +# conditions and build environments change, especially when it comes to more +# extreme code such you might find in an IOCCC winner. Moreover, what was +# allowed and liked in one IOCCC contest may no longer be liked/allowed in +# later IOCCC years. # -#CFLAGS=-O -Xa -CFLAGS=-Xa -CC=cc - -# misc shell babble +# Corrections on winning author and fixing typos in remarks are VERY WELCOME. # -NOINCLUDE=$(SED) -e 's/^.\([ ]*\)include/%include/' -SPACECLEAN=$(SED) -e 's/\([^ ]\)\([ ]\)[ ][ ]*/\1\2/g' -CPPCLEAN=$(GREP) -v '^. [0-9][0-9]*' - -# winners that compile under ANSI C +# GitHub pull requests are welcome: # -WINNERS= adrian albert ant buzzard.1 buzzard.2 gson kivinen imc \ - lush marangon nathan vern westley -ALT_NAMES= adgrep am babble first ag whereami - -all: $(WINNERS) $(ALT_NAMES) - -adrian: adrian.c - $(CC) $(CFLAGS) adrian.c -o adrian - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c - $(SED) '1s/\..*\./. wc ./' adrian.c > ad.temp - -./adrian ad.temp adwc.c - $(CC) -o adwc adwc.c - $(SED) '1s/\..*\./. basename ./' adrian.c > ad.temp - -./adrian ad.temp adbasename.c - $(CC) -o adbasename adbasename.c - $(SED) '1s/\..*\./. echo| ./' adrian.c > ad.temp - -./adrian ad.temp adecho.c - $(CC) -o adecho adecho.c - $(SED) '1s/\..*\./. head; ./' adrian.c > ad.temp - -./adrian ad.temp adhead.c - $(CC) -o adhead adhead.c - $(SED) '1s/\..*\./. sleep ./' adrian.c > ad.temp - -./adrian ad.temp adsleep.c - $(CC) -o adsleep adsleep.c - $(RM) -f ad.temp - -# NOTE: this is the original source that won +# If you have a patch that might make running an entry work in modern Unix-like +# environments, please create a GitHub pull request for the IOCCC judges to +# consider. # -adrian.orig: adrian.orig.c - $(CC) $(CFLAGS) adrian.orig.c -o adrian.orig - -albert: albert.c - $(CC) $(CFLAGS) albert.c -o albert - -# NOTE: this is the original source that won +# Suggestions and corrections regarding Makefiles, winning author information, +# fixing typos in remarks, and code patches are welcome via opening a GitHub +# issue or better yet, by creating a GitHub pull request for the IOCCC judges +# to consider. To form a GitHub issue or GitHub pull, please visit: # -albert.orig: albert.orig.c - $(CC) $(CFLAGS) albert.orig.c -o albert.orig - -ant: ant.c - $(CC) $(CFLAGS) ant.c -o ant - -buzzard.1: buzzard.1.c - $(CC) $(CFLAGS) buzzard.1.c -o buzzard.1 - -babble.cppcb: buzzard.1.c - $(NOINCLUDE) buzzard.1.c | \ - $(CPP) $(CPPFLAGS) | \ - $(CPPCLEAN) | \ - $(CB) $(CBFLAGS) | \ - $(UNIQ) | \ - $(SPACECLEAN) > babble.cppcb 2>&1 - -buzzard.2: buzzard.2.c - $(CC) $(CFLAGS) buzzard.2.c -o buzzard.2 - -# NOTE: this is the original source that won +# https://github.com/ioccc-src/winner # -buzzard.2.orig: buzzard.2.orig.c - $(CC) $(CFLAGS) buzzard.2.orig.c -o buzzard.2.orig +################################################################################ -gson: gson.c - $(CC) $(CFLAGS) gson.c -o gson - -# NOTE: some systems may only need: +# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under: # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 +# Creative Commons Attribution-ShareAlike 3.0 Unported License. # -kivinen: kivinen.c - $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 -lsocket -lresolv -lnsl +# See: http://creativecommons.org/licenses/by-sa/3.0/ -# NOTE: this is the original program that won + +############################# +# shell used by this Makefile +############################# # -# NOTE: some systems may only need: +SHELL= bash + +####################### +# common tool locations +####################### # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 +A2P= a2p +AR= ar +ASA= asa +AT= at +ATQ= atq +ATRM= atrm +AWK= awk +BANNER= banner +BASE64= base64 +BASENAME= basename +BATCH= batch +BC= bc +BINHEX= binhex +BISON= bison +BUNZIP2= bunzip2 +BZCAT= bzcat +BZCMP= bzcmp +BZDIFF= bzdiff +BZEGREP= bzegrep +BZFGREP= bzfgrep +BZGREP= bzgrep +BZIP2= bzip2 +BZLESS= bzless +BZMORE= bzmore +C2PH= c2ph +C89= c89 +C99= c99 +CAL= cal +CALC= calc +CAT= cat +CD= cd +CHFLAGS= chflags +CHGRP= chgrp +CHMOD= chmod +CKSUM= cksum +CLANG= clang +CLANG_PLUSPLUS= clang++ +CLEAR= clear +CMP= cmp +COL= col +COLLDEF= colldef +COLRM= colrm +COLUMN= column +COMPRESS= compress +CP= cp +CPIO= cpio +CPP= cpp +CRC32= crc32 +CSH= csh +CSPLIT= csplit +CURL= curl +CUT= cut +C_PLUSPLUS= c++ +C_PLUSPLUS_FILT= c++filt +DATE= date +DC= dc +DD= dd +DF= df +DIFF3= diff3 +DIFF= diff +DIG= dig +DIRNAME= dirname +ED= ed +EGREP= egrep +ENV= env +EQN= eqn +ETAGS= etags +EXPECT= expect +EXPR= expr +FALSE= false +FGREP= fgrep +FILE= file +FIND2PERL= find2perl +FIND= find +FLEX= flex +FLEX_PLUSPLUS= flex++ +FMT= fmt +FOLD= fold +FS_USAGE= fs_usage +FUNZIP= funzip +FUSER= fuser +GCC= gcc +GDIFFMK= gdiffmk +GENCAT= gencat +GENSTRINGS= genstrings +GETOPT= getopt +GETOPTS= getopts +GINDENT= gindent +GNUMAKE= gnumake +GREP= grep +GROFF= groff +GROFFER= groffer +GROG= grog +GROPS= grops +GROTTY= grotty +GUNZIP= gunzip +GVIM= gvim +GZCAT= gzcat +GZEXE= gzexe +GZIP_PROG= gzip +G_PLUSPLUS= g++ +H2PH= h2ph +H2XS= h2xs +HASH= hash +HEAD= head +HOSTNAME_PROG= hostname +ICONV= iconv +ID= id +INDENT= indent +INFO= info +JOT= jot +KILL= kill +KSH= ksh +LAST= last +LD= ld +LESSECHO= lessecho +LEX= len +LINK= link +LN= ln +LS= ls +M4= m4 +MAKE= make +MAN= man +MKDIR= mkdir +MKFIFO= mkfifo +MKTEMP= mktemp +MV= mv +NANO= nano +NASM= nasm +NEQN= neqn +NICE= nice +NL= nl +NM= nm +NOHUP= nohup +NROFF= nroff +NSLOOKUP= nslookup +OD= od +OPENSSL= openssl +PASTE= paste +PATCH= patch +PATHCHK= pathchk +PAX= pax +PERL= perl +PICO= pico +PR= pr +PRINTENV= printenv +PS= ps +PTAR= ptar +PTARDIFF= ptardiff +PTARGREP= ptargrep +PWD= pwd +PYDOC= pydoc +PYTHON= python +PYTHONW= pythonw +READLINK= readlink +RENICE= renice +RESET= reset +REV= rev +RI= ri +RM= rm +RMDIR= rmdir +RSYNC= rsync +RUBY= ruby +RVIM= rvim +SAY= say +SCP= scp +SCREEN= screen +SCRIPT= script +SDIFF= sdiff +SED= sed +SEQ= seq +SFTP= sftp +SH= sh +SHA1= sha1 +SHA= sha +SHAR= shar +SHASUM5_18= shasum5.18 +SHASUM= shasum +SIZE= size +SLEEP= sleep +SORT= sort +SSH= ssh +STAT= stat +STRIP= strip +STTY= stty +SUM= sum +SYNC= sync +TABS= tabs +TAIL= tail +TAR= tar +TEE= tee +TEST= test +TFTP= tftp +TIDY= tidy +TIME= time +TOP= top +TOUCH= touch +TPUT= tout +TPUT= tput +TR= tr +TROFF= troff +TRUE= true +TSET= tset +TSORT= tsort +UL= ul +UNAME= uname +UNCOMPRESS= uncompress +UNEXPAND= unexpand +UNIFDEF= unifdef +UNIFDEFALL= unifdefall +UNIQ= uniq +UNITS= units +UNLINK= unlink +UNZIP= unzip +UNZIPSFX= unzipsfx +UPTIME= uptime +UUDECODE= uudecode +UUENCODE= uuencode +UUIDGEN= uuidgen +VI= vi +VIEW= view +VIM= vim +VIMDIFF= vimdiff +W= w +WAIT4PATH= wait4path +WAIT= wait +WC= wc +WGET= wget +WHAT= what +WHATIS= whatis +WHICH= which +WHO= who +WHOAMI= whoami +WHOIS= whois +WRTIE= write +XAR= xar +XARGS= xargs +XATTR= xattr +XXD= xxd +YACC= yacc +YES= yes +ZCAT= zcat +ZCMP= zcmp +ZDIFF= zdiff +ZEGREP= zegrep +ZFGREP= zfgrep +ZFORCE= zforce +ZGREP= zgrep +ZIP= zip +ZIPCLOAK= zipcloak +ZIPGREp= zipgrep +ZIPINFo= zipinfo +ZIPNOTE= zipnote +ZIPSPLIT= zipsplit +ZLESS= zless +ZMORE= zmore +ZNEW= znew +ZPRINT= zprint +ZSH= zsh + +# Set X11_LIBDIR to the directory where the X11 library resides # -kivinen.orig: kivinen.orig.c - $(CC) $(CFLAGS) kivinen.orig.c -o kivinen.orig -lX11 \ - -lsocket -lresolv -lnsl +#X11_LIBDIR= /usr/X11R6/lib +#X11_LIBDIR= /usr/X11/lib +X11_LIBDIR= /opt/X11/lib -imc: imc.c - $(CC) $(CFLAGS) imc.c -o imc - -# NOTE: this is the original program that won +# Set X11_INCLUDEDIR to the directory where the X11 include files reside # -imc.orig: imc.orig.c - $(CC) $(CFLAGS) imc.orig.c -o imc.orig +#X11_INCDIR= /usr/X11R6/include +#X11_INCDIR= /usr/X11/include +X11_INCDIR= /opt/X11/include -lush: lush.c - $(CC) $(CFLAGS) lush.c -o lush - -lush.again: lush.c - $(CC) $(CFLAGS) lush.c -o lush.again - $(RM) -f lush.again - -# NOTE: this is the original program that won +# Common C compiler warnings to silence # -lush.orig: lush.orig.c - $(CC) $(CFLAGS) lush.orig.c -o lush.orig +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-unused-parameter -# NOTE: some systems may need: +# Common C compiler warning flags # -# $(CC) $(CFLAGS) marangon.c -o marangon -lcurses -ltermcap +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # -marangon: marangon.c - $(CC) $(CFLAGS) marangon.c -o marangon -lcurses +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu90 -# NOTE: this is the original program that won +# Compiler bit architecture # -# NOTE: some systems may need: +# Some entries require 32-bitness: +# ARCH= -m32 # -# $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses -ltermcap +# Some entries require 64-bitness: +# ARCH= -m64 # -marangon.orig: marangon.orig.c - $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses - -nathan: nathan.c - $(CC) $(CFLAGS) nathan.c -o nathan - -# NOTE: this is the original program that won +# By default we assume nothing: # -nathan.orig: nathan.orig.c - $(CC) $(CFLAGS) nathan.orig.c -o nathan.orig +ARCH= -vern: vern.tmp.c - $(CC) $(CFLAGS) vern.tmp.c -o vern - -vern.tmp.c: vern.c - $(RM) -f vern.tmp.c - $(SED) vern.tmp.c - -# NOTE: this is the original program that won +# Defines that are needed to compile # -vern.orig: vern.orig.tmp.c - $(CC) $(CFLAGS) vern.orig.tmp.c -o vern.orig +CDEFINE= +#CDEFINE= -DIOCCC -vern.orig.tmp.c: vern.orig.c - $(RM) -f vern.orig.tmp.c - $(SED) vern.orig.tmp.c - -westley: westley.c - $(CC) $(CFLAGS) westley.c -o westley - -# alternate names for selected entries +# Include files that are needed to compile # -adgrep: adrian - $(RM) -f adgrep - $(LN) adrian adgrep -am: ant - $(RM) -f am - $(LN) ant am -babble: buzzard.1 - $(RM) -f babble - $(LN) buzzard.1 babble -first: buzzard.2 - $(RM) -f first - $(LN) buzzard.2 first -ag: gson - $(RM) -f ag - $(LN) gson ag -whereami: westley - $(RM) -f whereami - $(LN) westley whereami +CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 +# Optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# Default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +LIBS= +#LIBS= -lm +#LIBS= -L ${X11_LIBDIR} -lX11 +#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL + +# C compiler to use +# +CC= cc +#CC=clang +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-poison-system-directories -Wno-shorten-64-to-32 +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif + + +############################## +# Special flags for this entry +############################## +# +ENTRY= albert +PROG= ${ENTRY} +# +OBJ= ${PROG}.o +DATA= +TARGET= ${PROG} +# +ALT_OBJ= +ALT_TARGET= + + +################# +# build the entry +################# +# +all: data ${TARGET} + @${TRUE} + +.PHONY: all alt data everything clean clobber install \ + love haste waste maker easter_egg sandwich \ + supernova deep_magic magic charon pluto + +${PROG}: ${PROG}.c + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + +# alternative executable +# +alt: data ${ALT_TARGET} + @${TRUE} + +# data files +# +data: ${DATA} + @${TRUE} + +# both all and alt +# +everything: all alt + + +############### +# utility rules +############### +# clean: - $(RM) -f *.o a.out core - $(RM) -f vern.tmp.c lush.again babble.cppcb vern.orig.tmp.c - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + echo ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi clobber: clean - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig + ${RM} -f ${TARGET} ${ALT_TARGET} + @-if [ -e sandwich ]; then \ + ${RM} -f sandwich; \ + echo 'ate sandwich'; \ + fi -am_clobber: clean am - $(RM) -f am.safe - $(CP) am am.safe - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig - $(CP) am.safe am - $(RM) -f am.safe +install: + @echo "Dr. Spock says that is not logical!" + @${TRUE} -nuke: clobber - @true +# you may be able to misunderstand the source by reading indent.c +# +indent.c: ${PROG}.c + @if which "${GINDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${GINDENT} < $< > $@"; \ + ${GINDENT} < $< > $@; \ + elif which "${INDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${INDENT} < $< > $@"; \ + ${INDENT} < $< > $@; \ + else \ + echo "no intent tool found, ident $< yourself, sorry"; \ + echo "exit 1"; \ + exit 1; \ + fi -install: all - cat $(WINNERS) > /dev/null + +################## +# 133t hacker rulz +################## +# +love: + @echo 'not war?' + @${TRUE} + +haste: + $(MAKE) waste + @${TRUE} + +waste: + @echo 'haste' + @${TRUE} + +maker: + @echo 'Participate in a maker faire' + @${TRUE} + +easter_egg: + @echo "you expected to often misunderstand this $${RANDOM} magic" + @echo "chongo '' /\\oo/\\" + @echo "Eggy" + +sandwich: easter_egg + @if [ `id -u` -eq 0 ]; then \ + echo 'Okay.'; \ + echo "$${RANDOM}`date +%s`$${RANDOM}" > $@; \ + else \ + echo 'What? Make it yourself.'; \ + exit 1; \ + fi + +# Understand the history of the Homebrew Computer Club +# as well as the West Coast Computer Faire and +# you might be confused different. :-) +# +supernova: sandwich + @-if [ -r .code_anal ]; then \ + ${RM} -f .code_anal_v6; \ + else \ + echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \ + fi + @echo "A $@ helps ${MAKE} the elements that help form planets" + @${TRUE} + +deep_magic: supernova + @-if [ -r .code_anal ]; then \ + ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 \ + --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + fi + @${TRUE} + +magic: deep_magic + @-if [ -r .code_anal ]; then \ + ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "If you don't eat yer meat, you can't have any pudding!"; \ + echo "How can you have any pudding if you don't eat yer meat?!"; \ + fi + @${TRUE} + +# The IOCCC resident astronomer states +# +charon: magic + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore IAU, $@ is a planet" + +pluto: charon + ${MAKE} charon + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore, $@ is a planet" + @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" diff --git a/1992/albert/README.md b/1992/albert/README.md index 68c0bd2ac..c78f16702 100644 --- a/1992/albert/README.md +++ b/1992/albert/README.md @@ -1,4 +1,4 @@ -Most Useful Program: +# Most Useful Program: Albert van der Horst S P&A R&C @@ -6,19 +6,21 @@ Most Useful Program: 3511 RA UTRECHT The Netherlands +## To build: -Judges' comments: + make all - For a canned example: - make albert - albert 1234567890123456789 +### To run + + ./albert 1234567890123456789 + +## Judges' comments We were impressed with the speed at which it was able to factor arbitrarily large numbers consisting of factors that fit into a long. - -Selected notes from the author: +## Author's comments The Obfuscated version of the Horst algorithm. diff --git a/1992/ant/.gitignore b/1992/ant/.gitignore index 59b09c9c8..67f925559 100644 --- a/1992/ant/.gitignore +++ b/1992/ant/.gitignore @@ -1 +1,3 @@ +am +am.safe ant diff --git a/1992/ant/Makefile b/1992/ant/Makefile index 2eb115d13..395157b4e 100644 --- a/1992/ant/Makefile +++ b/1992/ant/Makefile @@ -1,244 +1,607 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1992 makefile +# IOCCC 1992 winning entry - ant + +################################################################################ # -# Copyright (c) 1992, Landon Curt Noll & Larry Bassel. -# All Rights Reserved. Permission for personal, educational or non-profit -# use is granted provided this this copyright and notice are included in its -# entirety and remains unaltered. All other uses must receive prior permission -# from Landon Curt Noll and Larry Bassel. - - -SHELL=/bin/sh -CHMOD=chmod -CP=cp -RM=rm -SED=sed -LN=ln -UNIQ=uniq -CB=cb -GREP=grep -# set this to where your C Processor resides +# An Historical Makefile NOTE: # -# On some systems: -# CPP=/lib/cpp +# The orig.Makefile, if it exits, is the original Makefile before this IOCCC +# year directory was reworked so that entries are in separate directories. +# This also applies to any orig.ansi.mk and orig.common.mk files. # -CPP=/usr/ccs/lib/acpp - -# flags for ansi compiles +# Several Makefiles were modified / formed in 2022, and as such it may have +# elements that are not historically compatible with way entries were built. +# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile. # -# NOTE: Some ANSI compilers make use of -Xa to turn on ANSI mode, -# others such as gcc may want -ansi, others may want nothing -# at all. Adjust the CFLAGS line as needed. +# Regarding individual entries: # -# NOTE: Some compilers cannot optimize, or optimize some entries -# entries incorrectly. You might want need to turn on -O -# to see if your compiler can handle them. +# IOCCC winning entry code may not work on your system. Even with standards, +# conditions and build environments change, especially when it comes to more +# extreme code such you might find in an IOCCC winner. Moreover, what was +# allowed and liked in one IOCCC contest may no longer be liked/allowed in +# later IOCCC years. # -#CFLAGS=-O -Xa -CFLAGS=-Xa -CC=cc - -# misc shell babble +# Corrections on winning author and fixing typos in remarks are VERY WELCOME. # -NOINCLUDE=$(SED) -e 's/^.\([ ]*\)include/%include/' -SPACECLEAN=$(SED) -e 's/\([^ ]\)\([ ]\)[ ][ ]*/\1\2/g' -CPPCLEAN=$(GREP) -v '^. [0-9][0-9]*' - -# winners that compile under ANSI C +# GitHub pull requests are welcome: # -WINNERS= adrian albert ant buzzard.1 buzzard.2 gson kivinen imc \ - lush marangon nathan vern westley -ALT_NAMES= adgrep am babble first ag whereami - -all: $(WINNERS) $(ALT_NAMES) - -adrian: adrian.c - $(CC) $(CFLAGS) adrian.c -o adrian - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c - $(SED) '1s/\..*\./. wc ./' adrian.c > ad.temp - -./adrian ad.temp adwc.c - $(CC) -o adwc adwc.c - $(SED) '1s/\..*\./. basename ./' adrian.c > ad.temp - -./adrian ad.temp adbasename.c - $(CC) -o adbasename adbasename.c - $(SED) '1s/\..*\./. echo| ./' adrian.c > ad.temp - -./adrian ad.temp adecho.c - $(CC) -o adecho adecho.c - $(SED) '1s/\..*\./. head; ./' adrian.c > ad.temp - -./adrian ad.temp adhead.c - $(CC) -o adhead adhead.c - $(SED) '1s/\..*\./. sleep ./' adrian.c > ad.temp - -./adrian ad.temp adsleep.c - $(CC) -o adsleep adsleep.c - $(RM) -f ad.temp - -# NOTE: this is the original source that won +# If you have a patch that might make running an entry work in modern Unix-like +# environments, please create a GitHub pull request for the IOCCC judges to +# consider. # -adrian.orig: adrian.orig.c - $(CC) $(CFLAGS) adrian.orig.c -o adrian.orig - -albert: albert.c - $(CC) $(CFLAGS) albert.c -o albert - -# NOTE: this is the original source that won +# Suggestions and corrections regarding Makefiles, winning author information, +# fixing typos in remarks, and code patches are welcome via opening a GitHub +# issue or better yet, by creating a GitHub pull request for the IOCCC judges +# to consider. To form a GitHub issue or GitHub pull, please visit: # -albert.orig: albert.orig.c - $(CC) $(CFLAGS) albert.orig.c -o albert.orig - -ant: ant.c - $(CC) $(CFLAGS) ant.c -o ant - -buzzard.1: buzzard.1.c - $(CC) $(CFLAGS) buzzard.1.c -o buzzard.1 - -babble.cppcb: buzzard.1.c - $(NOINCLUDE) buzzard.1.c | \ - $(CPP) $(CPPFLAGS) | \ - $(CPPCLEAN) | \ - $(CB) $(CBFLAGS) | \ - $(UNIQ) | \ - $(SPACECLEAN) > babble.cppcb 2>&1 - -buzzard.2: buzzard.2.c - $(CC) $(CFLAGS) buzzard.2.c -o buzzard.2 - -# NOTE: this is the original source that won +# https://github.com/ioccc-src/winner # -buzzard.2.orig: buzzard.2.orig.c - $(CC) $(CFLAGS) buzzard.2.orig.c -o buzzard.2.orig +################################################################################ -gson: gson.c - $(CC) $(CFLAGS) gson.c -o gson - -# NOTE: some systems may only need: +# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under: # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 +# Creative Commons Attribution-ShareAlike 3.0 Unported License. # -kivinen: kivinen.c - $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 -lsocket -lresolv -lnsl +# See: http://creativecommons.org/licenses/by-sa/3.0/ -# NOTE: this is the original program that won + +############################# +# shell used by this Makefile +############################# # -# NOTE: some systems may only need: +SHELL= bash + +####################### +# common tool locations +####################### # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 +A2P= a2p +AR= ar +ASA= asa +AT= at +ATQ= atq +ATRM= atrm +AWK= awk +BANNER= banner +BASE64= base64 +BASENAME= basename +BATCH= batch +BC= bc +BINHEX= binhex +BISON= bison +BUNZIP2= bunzip2 +BZCAT= bzcat +BZCMP= bzcmp +BZDIFF= bzdiff +BZEGREP= bzegrep +BZFGREP= bzfgrep +BZGREP= bzgrep +BZIP2= bzip2 +BZLESS= bzless +BZMORE= bzmore +C2PH= c2ph +C89= c89 +C99= c99 +CAL= cal +CALC= calc +CAT= cat +CD= cd +CHFLAGS= chflags +CHGRP= chgrp +CHMOD= chmod +CKSUM= cksum +CLANG= clang +CLANG_PLUSPLUS= clang++ +CLEAR= clear +CMP= cmp +COL= col +COLLDEF= colldef +COLRM= colrm +COLUMN= column +COMPRESS= compress +CP= cp +CPIO= cpio +CPP= cpp +CRC32= crc32 +CSH= csh +CSPLIT= csplit +CURL= curl +CUT= cut +C_PLUSPLUS= c++ +C_PLUSPLUS_FILT= c++filt +DATE= date +DC= dc +DD= dd +DF= df +DIFF3= diff3 +DIFF= diff +DIG= dig +DIRNAME= dirname +ED= ed +EGREP= egrep +ENV= env +EQN= eqn +ETAGS= etags +EXPECT= expect +EXPR= expr +FALSE= false +FGREP= fgrep +FILE= file +FIND2PERL= find2perl +FIND= find +FLEX= flex +FLEX_PLUSPLUS= flex++ +FMT= fmt +FOLD= fold +FS_USAGE= fs_usage +FUNZIP= funzip +FUSER= fuser +GCC= gcc +GDIFFMK= gdiffmk +GENCAT= gencat +GENSTRINGS= genstrings +GETOPT= getopt +GETOPTS= getopts +GINDENT= gindent +GNUMAKE= gnumake +GREP= grep +GROFF= groff +GROFFER= groffer +GROG= grog +GROPS= grops +GROTTY= grotty +GUNZIP= gunzip +GVIM= gvim +GZCAT= gzcat +GZEXE= gzexe +GZIP_PROG= gzip +G_PLUSPLUS= g++ +H2PH= h2ph +H2XS= h2xs +HASH= hash +HEAD= head +HOSTNAME_PROG= hostname +ICONV= iconv +ID= id +INDENT= indent +INFO= info +JOT= jot +KILL= kill +KSH= ksh +LAST= last +LD= ld +LESSECHO= lessecho +LEX= len +LINK= link +LN= ln +LS= ls +M4= m4 +MAKE= make +MAN= man +MKDIR= mkdir +MKFIFO= mkfifo +MKTEMP= mktemp +MV= mv +NANO= nano +NASM= nasm +NEQN= neqn +NICE= nice +NL= nl +NM= nm +NOHUP= nohup +NROFF= nroff +NSLOOKUP= nslookup +OD= od +OPENSSL= openssl +PASTE= paste +PATCH= patch +PATHCHK= pathchk +PAX= pax +PERL= perl +PICO= pico +PR= pr +PRINTENV= printenv +PS= ps +PTAR= ptar +PTARDIFF= ptardiff +PTARGREP= ptargrep +PWD= pwd +PYDOC= pydoc +PYTHON= python +PYTHONW= pythonw +READLINK= readlink +RENICE= renice +RESET= reset +REV= rev +RI= ri +RM= rm +RMDIR= rmdir +RSYNC= rsync +RUBY= ruby +RVIM= rvim +SAY= say +SCP= scp +SCREEN= screen +SCRIPT= script +SDIFF= sdiff +SED= sed +SEQ= seq +SFTP= sftp +SH= sh +SHA1= sha1 +SHA= sha +SHAR= shar +SHASUM5_18= shasum5.18 +SHASUM= shasum +SIZE= size +SLEEP= sleep +SORT= sort +SSH= ssh +STAT= stat +STRIP= strip +STTY= stty +SUM= sum +SYNC= sync +TABS= tabs +TAIL= tail +TAR= tar +TEE= tee +TEST= test +TFTP= tftp +TIDY= tidy +TIME= time +TOP= top +TOUCH= touch +TPUT= tout +TPUT= tput +TR= tr +TROFF= troff +TRUE= true +TSET= tset +TSORT= tsort +UL= ul +UNAME= uname +UNCOMPRESS= uncompress +UNEXPAND= unexpand +UNIFDEF= unifdef +UNIFDEFALL= unifdefall +UNIQ= uniq +UNITS= units +UNLINK= unlink +UNZIP= unzip +UNZIPSFX= unzipsfx +UPTIME= uptime +UUDECODE= uudecode +UUENCODE= uuencode +UUIDGEN= uuidgen +VI= vi +VIEW= view +VIM= vim +VIMDIFF= vimdiff +W= w +WAIT4PATH= wait4path +WAIT= wait +WC= wc +WGET= wget +WHAT= what +WHATIS= whatis +WHICH= which +WHO= who +WHOAMI= whoami +WHOIS= whois +WRTIE= write +XAR= xar +XARGS= xargs +XATTR= xattr +XXD= xxd +YACC= yacc +YES= yes +ZCAT= zcat +ZCMP= zcmp +ZDIFF= zdiff +ZEGREP= zegrep +ZFGREP= zfgrep +ZFORCE= zforce +ZGREP= zgrep +ZIP= zip +ZIPCLOAK= zipcloak +ZIPGREp= zipgrep +ZIPINFo= zipinfo +ZIPNOTE= zipnote +ZIPSPLIT= zipsplit +ZLESS= zless +ZMORE= zmore +ZNEW= znew +ZPRINT= zprint +ZSH= zsh + +# Set X11_LIBDIR to the directory where the X11 library resides # -kivinen.orig: kivinen.orig.c - $(CC) $(CFLAGS) kivinen.orig.c -o kivinen.orig -lX11 \ - -lsocket -lresolv -lnsl +#X11_LIBDIR= /usr/X11R6/lib +#X11_LIBDIR= /usr/X11/lib +X11_LIBDIR= /opt/X11/lib -imc: imc.c - $(CC) $(CFLAGS) imc.c -o imc - -# NOTE: this is the original program that won +# Set X11_INCLUDEDIR to the directory where the X11 include files reside # -imc.orig: imc.orig.c - $(CC) $(CFLAGS) imc.orig.c -o imc.orig +#X11_INCDIR= /usr/X11R6/include +#X11_INCDIR= /usr/X11/include +X11_INCDIR= /opt/X11/include -lush: lush.c - $(CC) $(CFLAGS) lush.c -o lush - -lush.again: lush.c - $(CC) $(CFLAGS) lush.c -o lush.again - $(RM) -f lush.again - -# NOTE: this is the original program that won +# Common C compiler warnings to silence # -lush.orig: lush.orig.c - $(CC) $(CFLAGS) lush.orig.c -o lush.orig +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-unsequenced -# NOTE: some systems may need: +# Common C compiler warning flags # -# $(CC) $(CFLAGS) marangon.c -o marangon -lcurses -ltermcap +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # -marangon: marangon.c - $(CC) $(CFLAGS) marangon.c -o marangon -lcurses +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu90 -# NOTE: this is the original program that won +# Compiler bit architecture # -# NOTE: some systems may need: +# Some entries require 32-bitness: +# ARCH= -m32 # -# $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses -ltermcap +# Some entries require 64-bitness: +# ARCH= -m64 # -marangon.orig: marangon.orig.c - $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses - -nathan: nathan.c - $(CC) $(CFLAGS) nathan.c -o nathan - -# NOTE: this is the original program that won +# By default we assume nothing: # -nathan.orig: nathan.orig.c - $(CC) $(CFLAGS) nathan.orig.c -o nathan.orig +ARCH= -vern: vern.tmp.c - $(CC) $(CFLAGS) vern.tmp.c -o vern - -vern.tmp.c: vern.c - $(RM) -f vern.tmp.c - $(SED) vern.tmp.c - -# NOTE: this is the original program that won +# Defines that are needed to compile # -vern.orig: vern.orig.tmp.c - $(CC) $(CFLAGS) vern.orig.tmp.c -o vern.orig +CDEFINE= +#CDEFINE= -DIOCCC -vern.orig.tmp.c: vern.orig.c - $(RM) -f vern.orig.tmp.c - $(SED) vern.orig.tmp.c - -westley: westley.c - $(CC) $(CFLAGS) westley.c -o westley - -# alternate names for selected entries +# Include files that are needed to compile # -adgrep: adrian - $(RM) -f adgrep - $(LN) adrian adgrep -am: ant - $(RM) -f am - $(LN) ant am -babble: buzzard.1 - $(RM) -f babble - $(LN) buzzard.1 babble -first: buzzard.2 - $(RM) -f first - $(LN) buzzard.2 first -ag: gson - $(RM) -f ag - $(LN) gson ag -whereami: westley - $(RM) -f whereami - $(LN) westley whereami +CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 +# Optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# Default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +LIBS= +#LIBS= -lm +#LIBS= -L ${X11_LIBDIR} -lX11 +#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL + +# C compiler to use +# +CC= cc +#CC=clang +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-conditional-uninitialized -Wno-implicit-int-conversion \ + -Wno-missing-prototypes -Wno-missing-variable-declarations \ + -Wno-poison-system-directories -Wno-shadow -Wno-shorten-64-to-32 \ + -Wno-sign-conversion -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif + + +############################## +# Special flags for this entry +############################## +# +ENTRY= ant +PROG= ${ENTRY} +# +OBJ= ${PROG}.o +DATA= +TARGET= ${PROG} +# +ALT_OBJ= +ALT_TARGET= + + +################# +# build the entry +################# +# +all: data ${TARGET} + @${TRUE} + +.PHONY: all alt data everything clean clobber install \ + love haste waste maker easter_egg sandwich \ + am am_clobber \ + supernova deep_magic magic charon pluto + +${PROG}: ${PROG}.c + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + +am: ${PROG} + ${RM} -f $@ + ${LN} $< $@ + +# alternative executable +# +alt: data ${ALT_TARGET} + @${TRUE} + +# data files +# +data: ${DATA} + @${TRUE} + +# both all and alt +# +everything: all alt + + +############### +# utility rules +############### +# clean: - $(RM) -f *.o a.out core - $(RM) -f vern.tmp.c lush.again babble.cppcb vern.orig.tmp.c - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + echo ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi clobber: clean - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig + ${RM} -f ${TARGET} ${ALT_TARGET} + @-if [ -e sandwich ]; then \ + ${RM} -f sandwich; \ + echo 'ate sandwich'; \ + fi am_clobber: clean am - $(RM) -f am.safe - $(CP) am am.safe - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig - $(CP) am.safe am - $(RM) -f am.safe + ${RM} -f am.safe + ${CP} am am.safe + ${CP} am.safe am + ${RM} -f am.safe -nuke: clobber - @true +install: + @echo "Dr. Spock says that is not logical!" + @${TRUE} -install: all - cat $(WINNERS) > /dev/null +# you may be able to misunderstand the source by reading indent.c +# +indent.c: ${PROG}.c + @if which "${GINDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${GINDENT} < $< > $@"; \ + ${GINDENT} < $< > $@; \ + elif which "${INDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${INDENT} < $< > $@"; \ + ${INDENT} < $< > $@; \ + else \ + echo "no intent tool found, ident $< yourself, sorry"; \ + echo "exit 1"; \ + exit 1; \ + fi + + +################## +# 133t hacker rulz +################## +# +love: + @echo 'not war?' + @${TRUE} + +haste: + $(MAKE) waste + @${TRUE} + +waste: + @echo 'haste' + @${TRUE} + +maker: + @echo 'Participate in a maker faire' + @${TRUE} + +easter_egg: + @echo "you expected to often misunderstand this $${RANDOM} magic" + @echo "chongo '' /\\oo/\\" + @echo "Eggy" + +sandwich: easter_egg + @if [ `id -u` -eq 0 ]; then \ + echo 'Okay.'; \ + echo "$${RANDOM}`date +%s`$${RANDOM}" > $@; \ + else \ + echo 'What? Make it yourself.'; \ + exit 1; \ + fi + +# Understand the history of the Homebrew Computer Club +# as well as the West Coast Computer Faire and +# you might be confused different. :-) +# +supernova: sandwich + @-if [ -r .code_anal ]; then \ + ${RM} -f .code_anal_v6; \ + else \ + echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \ + fi + @echo "A $@ helps ${MAKE} the elements that help form planets" + @${TRUE} + +deep_magic: supernova + @-if [ -r .code_anal ]; then \ + ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 \ + --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + fi + @${TRUE} + +magic: deep_magic + @-if [ -r .code_anal ]; then \ + ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "If you don't eat yer meat, you can't have any pudding!"; \ + echo "How can you have any pudding if you don't eat yer meat?!"; \ + fi + @${TRUE} + +# The IOCCC resident astronomer states +# +charon: magic + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore IAU, $@ is a planet" + +pluto: charon + ${MAKE} charon + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore, $@ is a planet" + @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" diff --git a/1992/ant/README.md b/1992/ant/README.md index 42c5d78f2..9c8be6cfb 100644 --- a/1992/ant/README.md +++ b/1992/ant/README.md @@ -1,4 +1,4 @@ -Best Utility: +# Best Utility: Anthony C Howe Mortice Kern Systems Inc. @@ -7,13 +7,16 @@ Best Utility: N2J 3G4 Canada +## To build: -Judges' comments: + make all + +### To run + + ./am ant.test.mk + +## Judges' comments - To use: - make am - am ant.test.mk - Like much of Posix, obfuscation has its place. Your task is to figure out where. @@ -22,12 +25,12 @@ Judges' comments: P1003 sub-committee. We also suggest that you try: + make am - am Makefile am_clobber <-- clobber everything except am - am Makefile all + ./am Makefile am_clobber # clobber everything except am + ./am Makefile all - -Selected notes from the author: +## Author's comments See the file ant.README. diff --git a/1992/buzzard.1/.gitignore b/1992/buzzard.1/.gitignore index ea60d3e25..e5ab81324 100644 --- a/1992/buzzard.1/.gitignore +++ b/1992/buzzard.1/.gitignore @@ -1 +1,4 @@ +babble +babble.cppcb buzzard.1 +tmp diff --git a/1992/buzzard.1/Makefile b/1992/buzzard.1/Makefile index 2eb115d13..3a0072612 100644 --- a/1992/buzzard.1/Makefile +++ b/1992/buzzard.1/Makefile @@ -1,244 +1,629 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1992 makefile +# IOCCC 1992 winning entry - buzzard.1 + +################################################################################ # -# Copyright (c) 1992, Landon Curt Noll & Larry Bassel. -# All Rights Reserved. Permission for personal, educational or non-profit -# use is granted provided this this copyright and notice are included in its -# entirety and remains unaltered. All other uses must receive prior permission -# from Landon Curt Noll and Larry Bassel. - - -SHELL=/bin/sh -CHMOD=chmod -CP=cp -RM=rm -SED=sed -LN=ln -UNIQ=uniq -CB=cb -GREP=grep -# set this to where your C Processor resides +# An Historical Makefile NOTE: # -# On some systems: -# CPP=/lib/cpp +# The orig.Makefile, if it exits, is the original Makefile before this IOCCC +# year directory was reworked so that entries are in separate directories. +# This also applies to any orig.ansi.mk and orig.common.mk files. # -CPP=/usr/ccs/lib/acpp - -# flags for ansi compiles +# Several Makefiles were modified / formed in 2022, and as such it may have +# elements that are not historically compatible with way entries were built. +# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile. # -# NOTE: Some ANSI compilers make use of -Xa to turn on ANSI mode, -# others such as gcc may want -ansi, others may want nothing -# at all. Adjust the CFLAGS line as needed. +# Regarding individual entries: # -# NOTE: Some compilers cannot optimize, or optimize some entries -# entries incorrectly. You might want need to turn on -O -# to see if your compiler can handle them. +# IOCCC winning entry code may not work on your system. Even with standards, +# conditions and build environments change, especially when it comes to more +# extreme code such you might find in an IOCCC winner. Moreover, what was +# allowed and liked in one IOCCC contest may no longer be liked/allowed in +# later IOCCC years. # -#CFLAGS=-O -Xa -CFLAGS=-Xa -CC=cc - -# misc shell babble +# Corrections on winning author and fixing typos in remarks are VERY WELCOME. # -NOINCLUDE=$(SED) -e 's/^.\([ ]*\)include/%include/' -SPACECLEAN=$(SED) -e 's/\([^ ]\)\([ ]\)[ ][ ]*/\1\2/g' -CPPCLEAN=$(GREP) -v '^. [0-9][0-9]*' - -# winners that compile under ANSI C +# GitHub pull requests are welcome: # -WINNERS= adrian albert ant buzzard.1 buzzard.2 gson kivinen imc \ - lush marangon nathan vern westley -ALT_NAMES= adgrep am babble first ag whereami - -all: $(WINNERS) $(ALT_NAMES) - -adrian: adrian.c - $(CC) $(CFLAGS) adrian.c -o adrian - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c - $(SED) '1s/\..*\./. wc ./' adrian.c > ad.temp - -./adrian ad.temp adwc.c - $(CC) -o adwc adwc.c - $(SED) '1s/\..*\./. basename ./' adrian.c > ad.temp - -./adrian ad.temp adbasename.c - $(CC) -o adbasename adbasename.c - $(SED) '1s/\..*\./. echo| ./' adrian.c > ad.temp - -./adrian ad.temp adecho.c - $(CC) -o adecho adecho.c - $(SED) '1s/\..*\./. head; ./' adrian.c > ad.temp - -./adrian ad.temp adhead.c - $(CC) -o adhead adhead.c - $(SED) '1s/\..*\./. sleep ./' adrian.c > ad.temp - -./adrian ad.temp adsleep.c - $(CC) -o adsleep adsleep.c - $(RM) -f ad.temp - -# NOTE: this is the original source that won +# If you have a patch that might make running an entry work in modern Unix-like +# environments, please create a GitHub pull request for the IOCCC judges to +# consider. # -adrian.orig: adrian.orig.c - $(CC) $(CFLAGS) adrian.orig.c -o adrian.orig - -albert: albert.c - $(CC) $(CFLAGS) albert.c -o albert - -# NOTE: this is the original source that won +# Suggestions and corrections regarding Makefiles, winning author information, +# fixing typos in remarks, and code patches are welcome via opening a GitHub +# issue or better yet, by creating a GitHub pull request for the IOCCC judges +# to consider. To form a GitHub issue or GitHub pull, please visit: # -albert.orig: albert.orig.c - $(CC) $(CFLAGS) albert.orig.c -o albert.orig - -ant: ant.c - $(CC) $(CFLAGS) ant.c -o ant - -buzzard.1: buzzard.1.c - $(CC) $(CFLAGS) buzzard.1.c -o buzzard.1 - -babble.cppcb: buzzard.1.c - $(NOINCLUDE) buzzard.1.c | \ - $(CPP) $(CPPFLAGS) | \ - $(CPPCLEAN) | \ - $(CB) $(CBFLAGS) | \ - $(UNIQ) | \ - $(SPACECLEAN) > babble.cppcb 2>&1 - -buzzard.2: buzzard.2.c - $(CC) $(CFLAGS) buzzard.2.c -o buzzard.2 - -# NOTE: this is the original source that won +# https://github.com/ioccc-src/winner # -buzzard.2.orig: buzzard.2.orig.c - $(CC) $(CFLAGS) buzzard.2.orig.c -o buzzard.2.orig +################################################################################ -gson: gson.c - $(CC) $(CFLAGS) gson.c -o gson - -# NOTE: some systems may only need: +# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under: # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 +# Creative Commons Attribution-ShareAlike 3.0 Unported License. # -kivinen: kivinen.c - $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 -lsocket -lresolv -lnsl +# See: http://creativecommons.org/licenses/by-sa/3.0/ -# NOTE: this is the original program that won + +############################# +# shell used by this Makefile +############################# # -# NOTE: some systems may only need: +SHELL= bash + +####################### +# common tool locations +####################### # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 +A2P= a2p +AR= ar +ASA= asa +AT= at +ATQ= atq +ATRM= atrm +AWK= awk +BANNER= banner +BASE64= base64 +BASENAME= basename +BATCH= batch +BC= bc +BINHEX= binhex +BISON= bison +BUNZIP2= bunzip2 +BZCAT= bzcat +BZCMP= bzcmp +BZDIFF= bzdiff +BZEGREP= bzegrep +BZFGREP= bzfgrep +BZGREP= bzgrep +BZIP2= bzip2 +BZLESS= bzless +BZMORE= bzmore +C2PH= c2ph +C89= c89 +C99= c99 +CAL= cal +CALC= calc +CAT= cat +CD= cd +CHFLAGS= chflags +CHGRP= chgrp +CHMOD= chmod +CKSUM= cksum +CLANG= clang +CLANG_PLUSPLUS= clang++ +CLEAR= clear +CMP= cmp +COL= col +COLLDEF= colldef +COLRM= colrm +COLUMN= column +COMPRESS= compress +CP= cp +CPIO= cpio +CPP= cpp +CRC32= crc32 +CSH= csh +CSPLIT= csplit +CURL= curl +CUT= cut +C_PLUSPLUS= c++ +C_PLUSPLUS_FILT= c++filt +DATE= date +DC= dc +DD= dd +DF= df +DIFF3= diff3 +DIFF= diff +DIG= dig +DIRNAME= dirname +ED= ed +EGREP= egrep +ENV= env +EQN= eqn +ETAGS= etags +EXPECT= expect +EXPR= expr +FALSE= false +FGREP= fgrep +FILE= file +FIND2PERL= find2perl +FIND= find +FLEX= flex +FLEX_PLUSPLUS= flex++ +FMT= fmt +FOLD= fold +FS_USAGE= fs_usage +FUNZIP= funzip +FUSER= fuser +GCC= gcc +GDIFFMK= gdiffmk +GENCAT= gencat +GENSTRINGS= genstrings +GETOPT= getopt +GETOPTS= getopts +GINDENT= gindent +GNUMAKE= gnumake +GREP= grep +GROFF= groff +GROFFER= groffer +GROG= grog +GROPS= grops +GROTTY= grotty +GUNZIP= gunzip +GVIM= gvim +GZCAT= gzcat +GZEXE= gzexe +GZIP_PROG= gzip +G_PLUSPLUS= g++ +H2PH= h2ph +H2XS= h2xs +HASH= hash +HEAD= head +HOSTNAME_PROG= hostname +ICONV= iconv +ID= id +INDENT= indent +INFO= info +JOT= jot +KILL= kill +KSH= ksh +LAST= last +LD= ld +LESSECHO= lessecho +LEX= len +LINK= link +LN= ln +LS= ls +M4= m4 +MAKE= make +MAN= man +MKDIR= mkdir +MKFIFO= mkfifo +MKTEMP= mktemp +MV= mv +NANO= nano +NASM= nasm +NEQN= neqn +NICE= nice +NL= nl +NM= nm +NOHUP= nohup +NROFF= nroff +NSLOOKUP= nslookup +OD= od +OPENSSL= openssl +PASTE= paste +PATCH= patch +PATHCHK= pathchk +PAX= pax +PERL= perl +PICO= pico +PR= pr +PRINTENV= printenv +PS= ps +PTAR= ptar +PTARDIFF= ptardiff +PTARGREP= ptargrep +PWD= pwd +PYDOC= pydoc +PYTHON= python +PYTHONW= pythonw +READLINK= readlink +RENICE= renice +RESET= reset +REV= rev +RI= ri +RM= rm +RMDIR= rmdir +RSYNC= rsync +RUBY= ruby +RVIM= rvim +SAY= say +SCP= scp +SCREEN= screen +SCRIPT= script +SDIFF= sdiff +SED= sed +SEQ= seq +SFTP= sftp +SH= sh +SHA1= sha1 +SHA= sha +SHAR= shar +SHASUM5_18= shasum5.18 +SHASUM= shasum +SIZE= size +SLEEP= sleep +SORT= sort +SSH= ssh +STAT= stat +STRIP= strip +STTY= stty +SUM= sum +SYNC= sync +TABS= tabs +TAIL= tail +TAR= tar +TEE= tee +TEST= test +TFTP= tftp +TIDY= tidy +TIME= time +TOP= top +TOUCH= touch +TPUT= tout +TPUT= tput +TR= tr +TROFF= troff +TRUE= true +TSET= tset +TSORT= tsort +UL= ul +UNAME= uname +UNCOMPRESS= uncompress +UNEXPAND= unexpand +UNIFDEF= unifdef +UNIFDEFALL= unifdefall +UNIQ= uniq +UNITS= units +UNLINK= unlink +UNZIP= unzip +UNZIPSFX= unzipsfx +UPTIME= uptime +UUDECODE= uudecode +UUENCODE= uuencode +UUIDGEN= uuidgen +VI= vi +VIEW= view +VIM= vim +VIMDIFF= vimdiff +W= w +WAIT4PATH= wait4path +WAIT= wait +WC= wc +WGET= wget +WHAT= what +WHATIS= whatis +WHICH= which +WHO= who +WHOAMI= whoami +WHOIS= whois +WRTIE= write +XAR= xar +XARGS= xargs +XATTR= xattr +XXD= xxd +YACC= yacc +YES= yes +ZCAT= zcat +ZCMP= zcmp +ZDIFF= zdiff +ZEGREP= zegrep +ZFGREP= zfgrep +ZFORCE= zforce +ZGREP= zgrep +ZIP= zip +ZIPCLOAK= zipcloak +ZIPGREp= zipgrep +ZIPINFo= zipinfo +ZIPNOTE= zipnote +ZIPSPLIT= zipsplit +ZLESS= zless +ZMORE= zmore +ZNEW= znew +ZPRINT= zprint +ZSH= zsh + +# Set X11_LIBDIR to the directory where the X11 library resides # -kivinen.orig: kivinen.orig.c - $(CC) $(CFLAGS) kivinen.orig.c -o kivinen.orig -lX11 \ - -lsocket -lresolv -lnsl +#X11_LIBDIR= /usr/X11R6/lib +#X11_LIBDIR= /usr/X11/lib +X11_LIBDIR= /opt/X11/lib -imc: imc.c - $(CC) $(CFLAGS) imc.c -o imc - -# NOTE: this is the original program that won +# Set X11_INCLUDEDIR to the directory where the X11 include files reside # -imc.orig: imc.orig.c - $(CC) $(CFLAGS) imc.orig.c -o imc.orig +#X11_INCDIR= /usr/X11R6/include +#X11_INCDIR= /usr/X11/include +X11_INCDIR= /opt/X11/include -lush: lush.c - $(CC) $(CFLAGS) lush.c -o lush - -lush.again: lush.c - $(CC) $(CFLAGS) lush.c -o lush.again - $(RM) -f lush.again - -# NOTE: this is the original program that won +# Common C compiler warnings to silence # -lush.orig: lush.orig.c - $(CC) $(CFLAGS) lush.orig.c -o lush.orig +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-pedantic \ + -Wno-unused-parameter -# NOTE: some systems may need: +# Common C compiler warning flags # -# $(CC) $(CFLAGS) marangon.c -o marangon -lcurses -ltermcap +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +CWARN= -Wall -Wextra ${CSILENCE} +#CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # -marangon: marangon.c - $(CC) $(CFLAGS) marangon.c -o marangon -lcurses +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu90 -# NOTE: this is the original program that won +# Compiler bit architecture # -# NOTE: some systems may need: +# Some entries require 32-bitness: +# ARCH= -m32 # -# $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses -ltermcap +# Some entries require 64-bitness: +# ARCH= -m64 # -marangon.orig: marangon.orig.c - $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses - -nathan: nathan.c - $(CC) $(CFLAGS) nathan.c -o nathan - -# NOTE: this is the original program that won +# By default we assume nothing: # -nathan.orig: nathan.orig.c - $(CC) $(CFLAGS) nathan.orig.c -o nathan.orig +ARCH= -vern: vern.tmp.c - $(CC) $(CFLAGS) vern.tmp.c -o vern - -vern.tmp.c: vern.c - $(RM) -f vern.tmp.c - $(SED) vern.tmp.c - -# NOTE: this is the original program that won +# Defines that are needed to compile # -vern.orig: vern.orig.tmp.c - $(CC) $(CFLAGS) vern.orig.tmp.c -o vern.orig +CDEFINE= +#CDEFINE= -DIOCCC -vern.orig.tmp.c: vern.orig.c - $(RM) -f vern.orig.tmp.c - $(SED) vern.orig.tmp.c - -westley: westley.c - $(CC) $(CFLAGS) westley.c -o westley - -# alternate names for selected entries +# Include files that are needed to compile # -adgrep: adrian - $(RM) -f adgrep - $(LN) adrian adgrep -am: ant - $(RM) -f am - $(LN) ant am -babble: buzzard.1 - $(RM) -f babble - $(LN) buzzard.1 babble -first: buzzard.2 - $(RM) -f first - $(LN) buzzard.2 first -ag: gson - $(RM) -f ag - $(LN) gson ag -whereami: westley - $(RM) -f whereami - $(LN) westley whereami +CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 +# Optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# Default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +LIBS= +#LIBS= -lm +#LIBS= -L ${X11_LIBDIR} -lX11 +#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL + +# C compiler to use +# +CC= cc +#CC=clang +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-missing-variable-declarations -Wno-poison-system-directories \ + -Wno-unused-macros +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif + + +############################## +# Special flags for this entry +############################## +# +ENTRY= buzzard.1 +PROG= ${ENTRY} +# +OBJ= ${PROG}.o +DATA= +TARGET= ${PROG} +# +ALT_OBJ= +ALT_TARGET= + +NOINCLUDE= ${SED} -e 's/^.\([ ]*\)include/%include/' +SPACECLEAN= ${SED} -e 's/\([^ ]\)\([ ]\)[ ][ ]*/\1\2/g' +CPPCLEAN= ${GREP} -v '^. [0-9][0-9]*' + + +################# +# build the entry +################# +# +all: data ${TARGET} + @${TRUE} + +.PHONY: all alt data everything clean clobber install \ + love haste waste maker easter_egg sandwich \ + supernova deep_magic magic charon pluto + +${PROG}: ${PROG}.c + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + +# alternative executable +# +alt: data ${ALT_TARGET} + @${TRUE} + +babble.cppcb: ${PROG}.c + ${RM} -f tmp + ${NOINCLUDE} ${PROG}.c | \ + ${CPP} ${CPPFLAGS} | \ + ${CPPCLEAN} | \ + ${UNIQ} | \ + ${SPACECLEAN} > tmp 2>&1 + @if which "${GINDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${GINDENT} < tmp > $@"; \ + ${GINDENT} < tmp > $@; \ + elif which "${INDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${INDENT} < $< > $@"; \ + ${INDENT} < tmp > $@; \ + else \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${MV} -f tmpbabble.cppcb $@"; \ + ${MV} -f tmp $@; \ + fi + ${RM} -f tmp + +babble: ${PROG} + ${RM} -f $@ + ${LN} $< $@ + +# data files +# +data: ${DATA} + @${TRUE} + +# both all and alt +# +everything: all alt + + +############### +# utility rules +############### +# clean: - $(RM) -f *.o a.out core - $(RM) -f vern.tmp.c lush.again babble.cppcb vern.orig.tmp.c - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + echo ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi clobber: clean - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig + ${RM} -f ${TARGET} ${ALT_TARGET} + ${RM} -f babble.cppcb babble + @-if [ -e sandwich ]; then \ + ${RM} -f sandwich; \ + echo 'ate sandwich'; \ + fi -am_clobber: clean am - $(RM) -f am.safe - $(CP) am am.safe - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig - $(CP) am.safe am - $(RM) -f am.safe +install: + @echo "Dr. Spock says that is not logical!" + @${TRUE} -nuke: clobber - @true +# you may be able to misunderstand the source by reading indent.c +# +indent.c: ${PROG}.c + @if which "${GINDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${GINDENT} < $< > $@"; \ + ${GINDENT} < $< > $@; \ + elif which "${INDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${INDENT} < $< > $@"; \ + ${INDENT} < $< > $@; \ + else \ + echo "no intent tool found, ident $< yourself, sorry"; \ + echo "exit 1"; \ + exit 1; \ + fi -install: all - cat $(WINNERS) > /dev/null + +################## +# 133t hacker rulz +################## +# +love: + @echo 'not war?' + @${TRUE} + +haste: + $(MAKE) waste + @${TRUE} + +waste: + @echo 'haste' + @${TRUE} + +maker: + @echo 'Participate in a maker faire' + @${TRUE} + +easter_egg: + @echo "you expected to often misunderstand this $${RANDOM} magic" + @echo "chongo '' /\\oo/\\" + @echo "Eggy" + +sandwich: easter_egg + @if [ `id -u` -eq 0 ]; then \ + echo 'Okay.'; \ + echo "$${RANDOM}`date +%s`$${RANDOM}" > $@; \ + else \ + echo 'What? Make it yourself.'; \ + exit 1; \ + fi + +# Understand the history of the Homebrew Computer Club +# as well as the West Coast Computer Faire and +# you might be confused different. :-) +# +supernova: sandwich + @-if [ -r .code_anal ]; then \ + ${RM} -f .code_anal_v6; \ + else \ + echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \ + fi + @echo "A $@ helps ${MAKE} the elements that help form planets" + @${TRUE} + +deep_magic: supernova + @-if [ -r .code_anal ]; then \ + ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 \ + --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + fi + @${TRUE} + +magic: deep_magic + @-if [ -r .code_anal ]; then \ + ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "If you don't eat yer meat, you can't have any pudding!"; \ + echo "How can you have any pudding if you don't eat yer meat?!"; \ + fi + @${TRUE} + +# The IOCCC resident astronomer states +# +charon: magic + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore IAU, $@ is a planet" + +pluto: charon + ${MAKE} charon + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore, $@ is a planet" + @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" diff --git a/1992/buzzard.1/README.md b/1992/buzzard.1/README.md index 0160ecc2e..dc72bddc5 100644 --- a/1992/buzzard.1/README.md +++ b/1992/buzzard.1/README.md @@ -7,24 +7,26 @@ Most Obfuscated Algorithm: USA -Judges' comments: +## To build: + + make all + +### To run + + ./babble 0 10 + ./babble 56 720 + ./babble 1 521 + +## Judges' comments - To see clearly why this won an award: - make babble - - Try: - babble 0 10 - babble 56 720 - babble 1 521 - To see good C Preprocessor babble, try: + make babble.cppcb cat babble.cppcb Notice how many statements it takes to do anything useful? - -Selected notes from the author: +## Author's comments What you shouldn't think about babble: diff --git a/1992/buzzard.2/.gitignore b/1992/buzzard.2/.gitignore index d970c21aa..4daf52b2f 100644 --- a/1992/buzzard.2/.gitignore +++ b/1992/buzzard.2/.gitignore @@ -1 +1,2 @@ buzzard.2 +first diff --git a/1992/buzzard.2/Makefile b/1992/buzzard.2/Makefile index 2eb115d13..a56f27b6b 100644 --- a/1992/buzzard.2/Makefile +++ b/1992/buzzard.2/Makefile @@ -1,244 +1,600 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1992 makefile +# IOCCC 1992 winning entry - buzzard.2 + +################################################################################ # -# Copyright (c) 1992, Landon Curt Noll & Larry Bassel. -# All Rights Reserved. Permission for personal, educational or non-profit -# use is granted provided this this copyright and notice are included in its -# entirety and remains unaltered. All other uses must receive prior permission -# from Landon Curt Noll and Larry Bassel. - - -SHELL=/bin/sh -CHMOD=chmod -CP=cp -RM=rm -SED=sed -LN=ln -UNIQ=uniq -CB=cb -GREP=grep -# set this to where your C Processor resides +# An Historical Makefile NOTE: # -# On some systems: -# CPP=/lib/cpp +# The orig.Makefile, if it exits, is the original Makefile before this IOCCC +# year directory was reworked so that entries are in separate directories. +# This also applies to any orig.ansi.mk and orig.common.mk files. # -CPP=/usr/ccs/lib/acpp - -# flags for ansi compiles +# Several Makefiles were modified / formed in 2022, and as such it may have +# elements that are not historically compatible with way entries were built. +# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile. # -# NOTE: Some ANSI compilers make use of -Xa to turn on ANSI mode, -# others such as gcc may want -ansi, others may want nothing -# at all. Adjust the CFLAGS line as needed. +# Regarding individual entries: # -# NOTE: Some compilers cannot optimize, or optimize some entries -# entries incorrectly. You might want need to turn on -O -# to see if your compiler can handle them. +# IOCCC winning entry code may not work on your system. Even with standards, +# conditions and build environments change, especially when it comes to more +# extreme code such you might find in an IOCCC winner. Moreover, what was +# allowed and liked in one IOCCC contest may no longer be liked/allowed in +# later IOCCC years. # -#CFLAGS=-O -Xa -CFLAGS=-Xa -CC=cc - -# misc shell babble +# Corrections on winning author and fixing typos in remarks are VERY WELCOME. # -NOINCLUDE=$(SED) -e 's/^.\([ ]*\)include/%include/' -SPACECLEAN=$(SED) -e 's/\([^ ]\)\([ ]\)[ ][ ]*/\1\2/g' -CPPCLEAN=$(GREP) -v '^. [0-9][0-9]*' - -# winners that compile under ANSI C +# GitHub pull requests are welcome: # -WINNERS= adrian albert ant buzzard.1 buzzard.2 gson kivinen imc \ - lush marangon nathan vern westley -ALT_NAMES= adgrep am babble first ag whereami - -all: $(WINNERS) $(ALT_NAMES) - -adrian: adrian.c - $(CC) $(CFLAGS) adrian.c -o adrian - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c - $(SED) '1s/\..*\./. wc ./' adrian.c > ad.temp - -./adrian ad.temp adwc.c - $(CC) -o adwc adwc.c - $(SED) '1s/\..*\./. basename ./' adrian.c > ad.temp - -./adrian ad.temp adbasename.c - $(CC) -o adbasename adbasename.c - $(SED) '1s/\..*\./. echo| ./' adrian.c > ad.temp - -./adrian ad.temp adecho.c - $(CC) -o adecho adecho.c - $(SED) '1s/\..*\./. head; ./' adrian.c > ad.temp - -./adrian ad.temp adhead.c - $(CC) -o adhead adhead.c - $(SED) '1s/\..*\./. sleep ./' adrian.c > ad.temp - -./adrian ad.temp adsleep.c - $(CC) -o adsleep adsleep.c - $(RM) -f ad.temp - -# NOTE: this is the original source that won +# If you have a patch that might make running an entry work in modern Unix-like +# environments, please create a GitHub pull request for the IOCCC judges to +# consider. # -adrian.orig: adrian.orig.c - $(CC) $(CFLAGS) adrian.orig.c -o adrian.orig - -albert: albert.c - $(CC) $(CFLAGS) albert.c -o albert - -# NOTE: this is the original source that won +# Suggestions and corrections regarding Makefiles, winning author information, +# fixing typos in remarks, and code patches are welcome via opening a GitHub +# issue or better yet, by creating a GitHub pull request for the IOCCC judges +# to consider. To form a GitHub issue or GitHub pull, please visit: # -albert.orig: albert.orig.c - $(CC) $(CFLAGS) albert.orig.c -o albert.orig - -ant: ant.c - $(CC) $(CFLAGS) ant.c -o ant - -buzzard.1: buzzard.1.c - $(CC) $(CFLAGS) buzzard.1.c -o buzzard.1 - -babble.cppcb: buzzard.1.c - $(NOINCLUDE) buzzard.1.c | \ - $(CPP) $(CPPFLAGS) | \ - $(CPPCLEAN) | \ - $(CB) $(CBFLAGS) | \ - $(UNIQ) | \ - $(SPACECLEAN) > babble.cppcb 2>&1 - -buzzard.2: buzzard.2.c - $(CC) $(CFLAGS) buzzard.2.c -o buzzard.2 - -# NOTE: this is the original source that won +# https://github.com/ioccc-src/winner # -buzzard.2.orig: buzzard.2.orig.c - $(CC) $(CFLAGS) buzzard.2.orig.c -o buzzard.2.orig +################################################################################ -gson: gson.c - $(CC) $(CFLAGS) gson.c -o gson - -# NOTE: some systems may only need: +# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under: # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 +# Creative Commons Attribution-ShareAlike 3.0 Unported License. # -kivinen: kivinen.c - $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 -lsocket -lresolv -lnsl +# See: http://creativecommons.org/licenses/by-sa/3.0/ -# NOTE: this is the original program that won + +############################# +# shell used by this Makefile +############################# # -# NOTE: some systems may only need: +SHELL= bash + +####################### +# common tool locations +####################### # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 +A2P= a2p +AR= ar +ASA= asa +AT= at +ATQ= atq +ATRM= atrm +AWK= awk +BANNER= banner +BASE64= base64 +BASENAME= basename +BATCH= batch +BC= bc +BINHEX= binhex +BISON= bison +BUNZIP2= bunzip2 +BZCAT= bzcat +BZCMP= bzcmp +BZDIFF= bzdiff +BZEGREP= bzegrep +BZFGREP= bzfgrep +BZGREP= bzgrep +BZIP2= bzip2 +BZLESS= bzless +BZMORE= bzmore +C2PH= c2ph +C89= c89 +C99= c99 +CAL= cal +CALC= calc +CAT= cat +CD= cd +CHFLAGS= chflags +CHGRP= chgrp +CHMOD= chmod +CKSUM= cksum +CLANG= clang +CLANG_PLUSPLUS= clang++ +CLEAR= clear +CMP= cmp +COL= col +COLLDEF= colldef +COLRM= colrm +COLUMN= column +COMPRESS= compress +CP= cp +CPIO= cpio +CPP= cpp +CRC32= crc32 +CSH= csh +CSPLIT= csplit +CURL= curl +CUT= cut +C_PLUSPLUS= c++ +C_PLUSPLUS_FILT= c++filt +DATE= date +DC= dc +DD= dd +DF= df +DIFF3= diff3 +DIFF= diff +DIG= dig +DIRNAME= dirname +ED= ed +EGREP= egrep +ENV= env +EQN= eqn +ETAGS= etags +EXPECT= expect +EXPR= expr +FALSE= false +FGREP= fgrep +FILE= file +FIND2PERL= find2perl +FIND= find +FLEX= flex +FLEX_PLUSPLUS= flex++ +FMT= fmt +FOLD= fold +FS_USAGE= fs_usage +FUNZIP= funzip +FUSER= fuser +GCC= gcc +GDIFFMK= gdiffmk +GENCAT= gencat +GENSTRINGS= genstrings +GETOPT= getopt +GETOPTS= getopts +GINDENT= gindent +GNUMAKE= gnumake +GREP= grep +GROFF= groff +GROFFER= groffer +GROG= grog +GROPS= grops +GROTTY= grotty +GUNZIP= gunzip +GVIM= gvim +GZCAT= gzcat +GZEXE= gzexe +GZIP_PROG= gzip +G_PLUSPLUS= g++ +H2PH= h2ph +H2XS= h2xs +HASH= hash +HEAD= head +HOSTNAME_PROG= hostname +ICONV= iconv +ID= id +INDENT= indent +INFO= info +JOT= jot +KILL= kill +KSH= ksh +LAST= last +LD= ld +LESSECHO= lessecho +LEX= len +LINK= link +LN= ln +LS= ls +M4= m4 +MAKE= make +MAN= man +MKDIR= mkdir +MKFIFO= mkfifo +MKTEMP= mktemp +MV= mv +NANO= nano +NASM= nasm +NEQN= neqn +NICE= nice +NL= nl +NM= nm +NOHUP= nohup +NROFF= nroff +NSLOOKUP= nslookup +OD= od +OPENSSL= openssl +PASTE= paste +PATCH= patch +PATHCHK= pathchk +PAX= pax +PERL= perl +PICO= pico +PR= pr +PRINTENV= printenv +PS= ps +PTAR= ptar +PTARDIFF= ptardiff +PTARGREP= ptargrep +PWD= pwd +PYDOC= pydoc +PYTHON= python +PYTHONW= pythonw +READLINK= readlink +RENICE= renice +RESET= reset +REV= rev +RI= ri +RM= rm +RMDIR= rmdir +RSYNC= rsync +RUBY= ruby +RVIM= rvim +SAY= say +SCP= scp +SCREEN= screen +SCRIPT= script +SDIFF= sdiff +SED= sed +SEQ= seq +SFTP= sftp +SH= sh +SHA1= sha1 +SHA= sha +SHAR= shar +SHASUM5_18= shasum5.18 +SHASUM= shasum +SIZE= size +SLEEP= sleep +SORT= sort +SSH= ssh +STAT= stat +STRIP= strip +STTY= stty +SUM= sum +SYNC= sync +TABS= tabs +TAIL= tail +TAR= tar +TEE= tee +TEST= test +TFTP= tftp +TIDY= tidy +TIME= time +TOP= top +TOUCH= touch +TPUT= tout +TPUT= tput +TR= tr +TROFF= troff +TRUE= true +TSET= tset +TSORT= tsort +UL= ul +UNAME= uname +UNCOMPRESS= uncompress +UNEXPAND= unexpand +UNIFDEF= unifdef +UNIFDEFALL= unifdefall +UNIQ= uniq +UNITS= units +UNLINK= unlink +UNZIP= unzip +UNZIPSFX= unzipsfx +UPTIME= uptime +UUDECODE= uudecode +UUENCODE= uuencode +UUIDGEN= uuidgen +VI= vi +VIEW= view +VIM= vim +VIMDIFF= vimdiff +W= w +WAIT4PATH= wait4path +WAIT= wait +WC= wc +WGET= wget +WHAT= what +WHATIS= whatis +WHICH= which +WHO= who +WHOAMI= whoami +WHOIS= whois +WRTIE= write +XAR= xar +XARGS= xargs +XATTR= xattr +XXD= xxd +YACC= yacc +YES= yes +ZCAT= zcat +ZCMP= zcmp +ZDIFF= zdiff +ZEGREP= zegrep +ZFGREP= zfgrep +ZFORCE= zforce +ZGREP= zgrep +ZIP= zip +ZIPCLOAK= zipcloak +ZIPGREp= zipgrep +ZIPINFo= zipinfo +ZIPNOTE= zipnote +ZIPSPLIT= zipsplit +ZLESS= zless +ZMORE= zmore +ZNEW= znew +ZPRINT= zprint +ZSH= zsh + +# Set X11_LIBDIR to the directory where the X11 library resides # -kivinen.orig: kivinen.orig.c - $(CC) $(CFLAGS) kivinen.orig.c -o kivinen.orig -lX11 \ - -lsocket -lresolv -lnsl +#X11_LIBDIR= /usr/X11R6/lib +#X11_LIBDIR= /usr/X11/lib +X11_LIBDIR= /opt/X11/lib -imc: imc.c - $(CC) $(CFLAGS) imc.c -o imc - -# NOTE: this is the original program that won +# Set X11_INCLUDEDIR to the directory where the X11 include files reside # -imc.orig: imc.orig.c - $(CC) $(CFLAGS) imc.orig.c -o imc.orig +#X11_INCDIR= /usr/X11R6/include +#X11_INCDIR= /usr/X11/include +X11_INCDIR= /opt/X11/include -lush: lush.c - $(CC) $(CFLAGS) lush.c -o lush - -lush.again: lush.c - $(CC) $(CFLAGS) lush.c -o lush.again - $(RM) -f lush.again - -# NOTE: this is the original program that won +# Common C compiler warnings to silence # -lush.orig: lush.orig.c - $(CC) $(CFLAGS) lush.orig.c -o lush.orig +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-pedantic \ + -Wno-return-type -# NOTE: some systems may need: +# Common C compiler warning flags # -# $(CC) $(CFLAGS) marangon.c -o marangon -lcurses -ltermcap +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # -marangon: marangon.c - $(CC) $(CFLAGS) marangon.c -o marangon -lcurses +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu90 -# NOTE: this is the original program that won +# Compiler bit architecture # -# NOTE: some systems may need: +# Some entries require 32-bitness: +# ARCH= -m32 # -# $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses -ltermcap +# Some entries require 64-bitness: +# ARCH= -m64 # -marangon.orig: marangon.orig.c - $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses - -nathan: nathan.c - $(CC) $(CFLAGS) nathan.c -o nathan - -# NOTE: this is the original program that won +# By default we assume nothing: # -nathan.orig: nathan.orig.c - $(CC) $(CFLAGS) nathan.orig.c -o nathan.orig +ARCH= -vern: vern.tmp.c - $(CC) $(CFLAGS) vern.tmp.c -o vern - -vern.tmp.c: vern.c - $(RM) -f vern.tmp.c - $(SED) vern.tmp.c - -# NOTE: this is the original program that won +# Defines that are needed to compile # -vern.orig: vern.orig.tmp.c - $(CC) $(CFLAGS) vern.orig.tmp.c -o vern.orig +CDEFINE= +#CDEFINE= -DIOCCC -vern.orig.tmp.c: vern.orig.c - $(RM) -f vern.orig.tmp.c - $(SED) vern.orig.tmp.c - -westley: westley.c - $(CC) $(CFLAGS) westley.c -o westley - -# alternate names for selected entries +# Include files that are needed to compile # -adgrep: adrian - $(RM) -f adgrep - $(LN) adrian adgrep -am: ant - $(RM) -f am - $(LN) ant am -babble: buzzard.1 - $(RM) -f babble - $(LN) buzzard.1 babble -first: buzzard.2 - $(RM) -f first - $(LN) buzzard.2 first -ag: gson - $(RM) -f ag - $(LN) gson ag -whereami: westley - $(RM) -f whereami - $(LN) westley whereami +CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 +# Optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# Default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +LIBS= +#LIBS= -lm +#LIBS= -L ${X11_LIBDIR} -lX11 +#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL + +# C compiler to use +# +CC= cc +#CC=clang +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-missing-prototypes -Wno-missing-variable-declarations \ + -Wno-poison-system-directories -Wno-strict-prototypes -Wno-unreachable-code +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif + + +############################## +# Special flags for this entry +############################## +# +ENTRY= buzzard.2 +PROG= ${ENTRY} +# +OBJ= ${PROG}.o +DATA= +TARGET= ${PROG} +# +ALT_OBJ= +ALT_TARGET= + + +################# +# build the entry +################# +# +all: data ${TARGET} + @${TRUE} + +.PHONY: all alt data everything clean clobber install \ + love haste waste maker easter_egg sandwich \ + supernova deep_magic magic charon pluto + +${PROG}: ${PROG}.c + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + +first: ${PROG} + ${RM} -f $@ + ${LN} $< $@ + +# alternative executable +# +alt: data ${ALT_TARGET} + @${TRUE} + +# data files +# +data: ${DATA} + @${TRUE} + +# both all and alt +# +everything: all alt + + +############### +# utility rules +############### +# clean: - $(RM) -f *.o a.out core - $(RM) -f vern.tmp.c lush.again babble.cppcb vern.orig.tmp.c - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + echo ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi clobber: clean - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig + ${RM} -f ${TARGET} ${ALT_TARGET} + ${RM} -f first + @-if [ -e sandwich ]; then \ + ${RM} -f sandwich; \ + echo 'ate sandwich'; \ + fi -am_clobber: clean am - $(RM) -f am.safe - $(CP) am am.safe - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig - $(CP) am.safe am - $(RM) -f am.safe +install: + @echo "Dr. Spock says that is not logical!" + @${TRUE} -nuke: clobber - @true +# you may be able to misunderstand the source by reading indent.c +# +indent.c: ${PROG}.c + @if which "${GINDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${GINDENT} < $< > $@"; \ + ${GINDENT} < $< > $@; \ + elif which "${INDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${INDENT} < $< > $@"; \ + ${INDENT} < $< > $@; \ + else \ + echo "no intent tool found, ident $< yourself, sorry"; \ + echo "exit 1"; \ + exit 1; \ + fi -install: all - cat $(WINNERS) > /dev/null + +################## +# 133t hacker rulz +################## +# +love: + @echo 'not war?' + @${TRUE} + +haste: + $(MAKE) waste + @${TRUE} + +waste: + @echo 'haste' + @${TRUE} + +maker: + @echo 'Participate in a maker faire' + @${TRUE} + +easter_egg: + @echo "you expected to often misunderstand this $${RANDOM} magic" + @echo "chongo '' /\\oo/\\" + @echo "Eggy" + +sandwich: easter_egg + @if [ `id -u` -eq 0 ]; then \ + echo 'Okay.'; \ + echo "$${RANDOM}`date +%s`$${RANDOM}" > $@; \ + else \ + echo 'What? Make it yourself.'; \ + exit 1; \ + fi + +# Understand the history of the Homebrew Computer Club +# as well as the West Coast Computer Faire and +# you might be confused different. :-) +# +supernova: sandwich + @-if [ -r .code_anal ]; then \ + ${RM} -f .code_anal_v6; \ + else \ + echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \ + fi + @echo "A $@ helps ${MAKE} the elements that help form planets" + @${TRUE} + +deep_magic: supernova + @-if [ -r .code_anal ]; then \ + ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 \ + --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + fi + @${TRUE} + +magic: deep_magic + @-if [ -r .code_anal ]; then \ + ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "If you don't eat yer meat, you can't have any pudding!"; \ + echo "How can you have any pudding if you don't eat yer meat?!"; \ + fi + @${TRUE} + +# The IOCCC resident astronomer states +# +charon: magic + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore IAU, $@ is a planet" + +pluto: charon + ${MAKE} charon + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore, $@ is a planet" + @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" diff --git a/1992/buzzard.2/README.md b/1992/buzzard.2/README.md index b0fe22b04..8fb6cf9f3 100644 --- a/1992/buzzard.2/README.md +++ b/1992/buzzard.2/README.md @@ -1,4 +1,4 @@ -Best Language Tool: +# Best Language Tool: Sean Barrett Software Construction Company @@ -6,27 +6,37 @@ Best Language Tool: College Station, TX 77840 USA +## To build: -Judges' comments: + make all + +### To run First: - make first - - Second: - echo help | cat third help.th - | first - cat third demo5.th | first - - Third: - cat third help.th - | first - Wait until Ok is printed and the type: + make first + + Second: + + echo help | cat third help.th - | ./first + cat third demo5.th | ./first + + Third: + + cat third help.th - | ./first + + NOTE: Wait until Ok is printed and the type: 2 3 + . cr <-- yes you should really type the 2 letters: cr Forth: + Sorry, this is third! +## Judges' comments -Selected notes from the author: + Have fun! + +## Author's comments What it does: @@ -116,7 +126,7 @@ Selected notes from the author: it also obfuscates the code. (Unfortunately, the top of stack is a global variable and neither gcc nor most bundled compilers seem to register allocate it.) - + More significant are the design obfuscations. m[0] is the "dictionary pointer", used when compiling words, and m[1] is the return stack index. Both are used as integer offsets into diff --git a/1992/gson/.gitignore b/1992/gson/.gitignore index 17752ddd6..0c62d5021 100644 --- a/1992/gson/.gitignore +++ b/1992/gson/.gitignore @@ -1 +1,2 @@ gson +og diff --git a/1992/gson/Makefile b/1992/gson/Makefile index 2eb115d13..794e49dbc 100644 --- a/1992/gson/Makefile +++ b/1992/gson/Makefile @@ -1,244 +1,603 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1992 makefile +# IOCCC 1992 winning entry - gson + +################################################################################ # -# Copyright (c) 1992, Landon Curt Noll & Larry Bassel. -# All Rights Reserved. Permission for personal, educational or non-profit -# use is granted provided this this copyright and notice are included in its -# entirety and remains unaltered. All other uses must receive prior permission -# from Landon Curt Noll and Larry Bassel. - - -SHELL=/bin/sh -CHMOD=chmod -CP=cp -RM=rm -SED=sed -LN=ln -UNIQ=uniq -CB=cb -GREP=grep -# set this to where your C Processor resides +# An Historical Makefile NOTE: # -# On some systems: -# CPP=/lib/cpp +# The orig.Makefile, if it exits, is the original Makefile before this IOCCC +# year directory was reworked so that entries are in separate directories. +# This also applies to any orig.ansi.mk and orig.common.mk files. # -CPP=/usr/ccs/lib/acpp - -# flags for ansi compiles +# Several Makefiles were modified / formed in 2022, and as such it may have +# elements that are not historically compatible with way entries were built. +# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile. # -# NOTE: Some ANSI compilers make use of -Xa to turn on ANSI mode, -# others such as gcc may want -ansi, others may want nothing -# at all. Adjust the CFLAGS line as needed. +# Regarding individual entries: # -# NOTE: Some compilers cannot optimize, or optimize some entries -# entries incorrectly. You might want need to turn on -O -# to see if your compiler can handle them. +# IOCCC winning entry code may not work on your system. Even with standards, +# conditions and build environments change, especially when it comes to more +# extreme code such you might find in an IOCCC winner. Moreover, what was +# allowed and liked in one IOCCC contest may no longer be liked/allowed in +# later IOCCC years. # -#CFLAGS=-O -Xa -CFLAGS=-Xa -CC=cc - -# misc shell babble +# Corrections on winning author and fixing typos in remarks are VERY WELCOME. # -NOINCLUDE=$(SED) -e 's/^.\([ ]*\)include/%include/' -SPACECLEAN=$(SED) -e 's/\([^ ]\)\([ ]\)[ ][ ]*/\1\2/g' -CPPCLEAN=$(GREP) -v '^. [0-9][0-9]*' - -# winners that compile under ANSI C +# GitHub pull requests are welcome: # -WINNERS= adrian albert ant buzzard.1 buzzard.2 gson kivinen imc \ - lush marangon nathan vern westley -ALT_NAMES= adgrep am babble first ag whereami - -all: $(WINNERS) $(ALT_NAMES) - -adrian: adrian.c - $(CC) $(CFLAGS) adrian.c -o adrian - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c - $(SED) '1s/\..*\./. wc ./' adrian.c > ad.temp - -./adrian ad.temp adwc.c - $(CC) -o adwc adwc.c - $(SED) '1s/\..*\./. basename ./' adrian.c > ad.temp - -./adrian ad.temp adbasename.c - $(CC) -o adbasename adbasename.c - $(SED) '1s/\..*\./. echo| ./' adrian.c > ad.temp - -./adrian ad.temp adecho.c - $(CC) -o adecho adecho.c - $(SED) '1s/\..*\./. head; ./' adrian.c > ad.temp - -./adrian ad.temp adhead.c - $(CC) -o adhead adhead.c - $(SED) '1s/\..*\./. sleep ./' adrian.c > ad.temp - -./adrian ad.temp adsleep.c - $(CC) -o adsleep adsleep.c - $(RM) -f ad.temp - -# NOTE: this is the original source that won +# If you have a patch that might make running an entry work in modern Unix-like +# environments, please create a GitHub pull request for the IOCCC judges to +# consider. # -adrian.orig: adrian.orig.c - $(CC) $(CFLAGS) adrian.orig.c -o adrian.orig - -albert: albert.c - $(CC) $(CFLAGS) albert.c -o albert - -# NOTE: this is the original source that won +# Suggestions and corrections regarding Makefiles, winning author information, +# fixing typos in remarks, and code patches are welcome via opening a GitHub +# issue or better yet, by creating a GitHub pull request for the IOCCC judges +# to consider. To form a GitHub issue or GitHub pull, please visit: # -albert.orig: albert.orig.c - $(CC) $(CFLAGS) albert.orig.c -o albert.orig - -ant: ant.c - $(CC) $(CFLAGS) ant.c -o ant - -buzzard.1: buzzard.1.c - $(CC) $(CFLAGS) buzzard.1.c -o buzzard.1 - -babble.cppcb: buzzard.1.c - $(NOINCLUDE) buzzard.1.c | \ - $(CPP) $(CPPFLAGS) | \ - $(CPPCLEAN) | \ - $(CB) $(CBFLAGS) | \ - $(UNIQ) | \ - $(SPACECLEAN) > babble.cppcb 2>&1 - -buzzard.2: buzzard.2.c - $(CC) $(CFLAGS) buzzard.2.c -o buzzard.2 - -# NOTE: this is the original source that won +# https://github.com/ioccc-src/winner # -buzzard.2.orig: buzzard.2.orig.c - $(CC) $(CFLAGS) buzzard.2.orig.c -o buzzard.2.orig +################################################################################ -gson: gson.c - $(CC) $(CFLAGS) gson.c -o gson - -# NOTE: some systems may only need: +# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under: # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 +# Creative Commons Attribution-ShareAlike 3.0 Unported License. # -kivinen: kivinen.c - $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 -lsocket -lresolv -lnsl +# See: http://creativecommons.org/licenses/by-sa/3.0/ -# NOTE: this is the original program that won + +############################# +# shell used by this Makefile +############################# # -# NOTE: some systems may only need: +SHELL= bash + +####################### +# common tool locations +####################### # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 +A2P= a2p +AR= ar +ASA= asa +AT= at +ATQ= atq +ATRM= atrm +AWK= awk +BANNER= banner +BASE64= base64 +BASENAME= basename +BATCH= batch +BC= bc +BINHEX= binhex +BISON= bison +BUNZIP2= bunzip2 +BZCAT= bzcat +BZCMP= bzcmp +BZDIFF= bzdiff +BZEGREP= bzegrep +BZFGREP= bzfgrep +BZGREP= bzgrep +BZIP2= bzip2 +BZLESS= bzless +BZMORE= bzmore +C2PH= c2ph +C89= c89 +C99= c99 +CAL= cal +CALC= calc +CAT= cat +CD= cd +CHFLAGS= chflags +CHGRP= chgrp +CHMOD= chmod +CKSUM= cksum +CLANG= clang +CLANG_PLUSPLUS= clang++ +CLEAR= clear +CMP= cmp +COL= col +COLLDEF= colldef +COLRM= colrm +COLUMN= column +COMPRESS= compress +CP= cp +CPIO= cpio +CPP= cpp +CRC32= crc32 +CSH= csh +CSPLIT= csplit +CURL= curl +CUT= cut +C_PLUSPLUS= c++ +C_PLUSPLUS_FILT= c++filt +DATE= date +DC= dc +DD= dd +DF= df +DIFF3= diff3 +DIFF= diff +DIG= dig +DIRNAME= dirname +ED= ed +EGREP= egrep +ENV= env +EQN= eqn +ETAGS= etags +EXPECT= expect +EXPR= expr +FALSE= false +FGREP= fgrep +FILE= file +FIND2PERL= find2perl +FIND= find +FLEX= flex +FLEX_PLUSPLUS= flex++ +FMT= fmt +FOLD= fold +FS_USAGE= fs_usage +FUNZIP= funzip +FUSER= fuser +GCC= gcc +GDIFFMK= gdiffmk +GENCAT= gencat +GENSTRINGS= genstrings +GETOPT= getopt +GETOPTS= getopts +GINDENT= gindent +GNUMAKE= gnumake +GREP= grep +GROFF= groff +GROFFER= groffer +GROG= grog +GROPS= grops +GROTTY= grotty +GUNZIP= gunzip +GVIM= gvim +GZCAT= gzcat +GZEXE= gzexe +GZIP_PROG= gzip +G_PLUSPLUS= g++ +H2PH= h2ph +H2XS= h2xs +HASH= hash +HEAD= head +HOSTNAME_PROG= hostname +ICONV= iconv +ID= id +INDENT= indent +INFO= info +JOT= jot +KILL= kill +KSH= ksh +LAST= last +LD= ld +LESSECHO= lessecho +LEX= len +LINK= link +LN= ln +LS= ls +M4= m4 +MAKE= make +MAN= man +MKDIR= mkdir +MKFIFO= mkfifo +MKTEMP= mktemp +MV= mv +NANO= nano +NASM= nasm +NEQN= neqn +NICE= nice +NL= nl +NM= nm +NOHUP= nohup +NROFF= nroff +NSLOOKUP= nslookup +OD= od +OPENSSL= openssl +PASTE= paste +PATCH= patch +PATHCHK= pathchk +PAX= pax +PERL= perl +PICO= pico +PR= pr +PRINTENV= printenv +PS= ps +PTAR= ptar +PTARDIFF= ptardiff +PTARGREP= ptargrep +PWD= pwd +PYDOC= pydoc +PYTHON= python +PYTHONW= pythonw +READLINK= readlink +RENICE= renice +RESET= reset +REV= rev +RI= ri +RM= rm +RMDIR= rmdir +RSYNC= rsync +RUBY= ruby +RVIM= rvim +SAY= say +SCP= scp +SCREEN= screen +SCRIPT= script +SDIFF= sdiff +SED= sed +SEQ= seq +SFTP= sftp +SH= sh +SHA1= sha1 +SHA= sha +SHAR= shar +SHASUM5_18= shasum5.18 +SHASUM= shasum +SIZE= size +SLEEP= sleep +SORT= sort +SSH= ssh +STAT= stat +STRIP= strip +STTY= stty +SUM= sum +SYNC= sync +TABS= tabs +TAIL= tail +TAR= tar +TEE= tee +TEST= test +TFTP= tftp +TIDY= tidy +TIME= time +TOP= top +TOUCH= touch +TPUT= tout +TPUT= tput +TR= tr +TROFF= troff +TRUE= true +TSET= tset +TSORT= tsort +UL= ul +UNAME= uname +UNCOMPRESS= uncompress +UNEXPAND= unexpand +UNIFDEF= unifdef +UNIFDEFALL= unifdefall +UNIQ= uniq +UNITS= units +UNLINK= unlink +UNZIP= unzip +UNZIPSFX= unzipsfx +UPTIME= uptime +UUDECODE= uudecode +UUENCODE= uuencode +UUIDGEN= uuidgen +VI= vi +VIEW= view +VIM= vim +VIMDIFF= vimdiff +W= w +WAIT4PATH= wait4path +WAIT= wait +WC= wc +WGET= wget +WHAT= what +WHATIS= whatis +WHICH= which +WHO= who +WHOAMI= whoami +WHOIS= whois +WRTIE= write +XAR= xar +XARGS= xargs +XATTR= xattr +XXD= xxd +YACC= yacc +YES= yes +ZCAT= zcat +ZCMP= zcmp +ZDIFF= zdiff +ZEGREP= zegrep +ZFGREP= zfgrep +ZFORCE= zforce +ZGREP= zgrep +ZIP= zip +ZIPCLOAK= zipcloak +ZIPGREp= zipgrep +ZIPINFo= zipinfo +ZIPNOTE= zipnote +ZIPSPLIT= zipsplit +ZLESS= zless +ZMORE= zmore +ZNEW= znew +ZPRINT= zprint +ZSH= zsh + +# Set X11_LIBDIR to the directory where the X11 library resides # -kivinen.orig: kivinen.orig.c - $(CC) $(CFLAGS) kivinen.orig.c -o kivinen.orig -lX11 \ - -lsocket -lresolv -lnsl +#X11_LIBDIR= /usr/X11R6/lib +#X11_LIBDIR= /usr/X11/lib +X11_LIBDIR= /opt/X11/lib -imc: imc.c - $(CC) $(CFLAGS) imc.c -o imc - -# NOTE: this is the original program that won +# Set X11_INCLUDEDIR to the directory where the X11 include files reside # -imc.orig: imc.orig.c - $(CC) $(CFLAGS) imc.orig.c -o imc.orig +#X11_INCDIR= /usr/X11R6/include +#X11_INCDIR= /usr/X11/include +X11_INCDIR= /opt/X11/include -lush: lush.c - $(CC) $(CFLAGS) lush.c -o lush - -lush.again: lush.c - $(CC) $(CFLAGS) lush.c -o lush.again - $(RM) -f lush.again - -# NOTE: this is the original program that won +# Common C compiler warnings to silence # -lush.orig: lush.orig.c - $(CC) $(CFLAGS) lush.orig.c -o lush.orig +#CSILENCE= +CSILENCE= -Wno-bitwise-op-parentheses -Wno-char-subscripts \ + -Wno-deprecated-declarations -Wno-empty-body -Wno-error \ + -Wno-implicit-function-declaration -Wno-parentheses -Wno-pedantic \ + -Wno-return-type -Wno-unused-parameter -Wno-unused-value -# NOTE: some systems may need: +# Common C compiler warning flags # -# $(CC) $(CFLAGS) marangon.c -o marangon -lcurses -ltermcap +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # -marangon: marangon.c - $(CC) $(CFLAGS) marangon.c -o marangon -lcurses +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu90 -# NOTE: this is the original program that won +# Compiler bit architecture # -# NOTE: some systems may need: +# Some entries require 32-bitness: +# ARCH= -m32 # -# $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses -ltermcap +# Some entries require 64-bitness: +# ARCH= -m64 # -marangon.orig: marangon.orig.c - $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses - -nathan: nathan.c - $(CC) $(CFLAGS) nathan.c -o nathan - -# NOTE: this is the original program that won +# By default we assume nothing: # -nathan.orig: nathan.orig.c - $(CC) $(CFLAGS) nathan.orig.c -o nathan.orig +ARCH= -vern: vern.tmp.c - $(CC) $(CFLAGS) vern.tmp.c -o vern - -vern.tmp.c: vern.c - $(RM) -f vern.tmp.c - $(SED) vern.tmp.c - -# NOTE: this is the original program that won +# Defines that are needed to compile # -vern.orig: vern.orig.tmp.c - $(CC) $(CFLAGS) vern.orig.tmp.c -o vern.orig +CDEFINE= +#CDEFINE= -DIOCCC -vern.orig.tmp.c: vern.orig.c - $(RM) -f vern.orig.tmp.c - $(SED) vern.orig.tmp.c - -westley: westley.c - $(CC) $(CFLAGS) westley.c -o westley - -# alternate names for selected entries +# Include files that are needed to compile # -adgrep: adrian - $(RM) -f adgrep - $(LN) adrian adgrep -am: ant - $(RM) -f am - $(LN) ant am -babble: buzzard.1 - $(RM) -f babble - $(LN) buzzard.1 babble -first: buzzard.2 - $(RM) -f first - $(LN) buzzard.2 first -ag: gson - $(RM) -f ag - $(LN) gson ag -whereami: westley - $(RM) -f whereami - $(LN) westley whereami +CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 +# Optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# Default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +LIBS= +#LIBS= -lm +#LIBS= -L ${X11_LIBDIR} -lX11 +#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL + +# C compiler to use +# +CC= cc +#CC=clang +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-implicit-int-conversion -Wno-missing-prototypes \ + -Wno-missing-variable-declarations -Wno-poison-system-directories \ + -Wno-shorten-64-to-32 -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif + + +############################## +# Special flags for this entry +############################## +# +ENTRY= gson +PROG= ${ENTRY} +# +OBJ= ${PROG}.o +DATA= +TARGET= ${PROG} og +# +ALT_OBJ= +ALT_TARGET= + + +################# +# build the entry +################# +# +all: data ${TARGET} + @${TRUE} + +.PHONY: all alt data everything clean clobber install \ + love haste waste maker easter_egg sandwich \ + supernova deep_magic magic charon pluto + +${PROG}: ${PROG}.c + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + +og: ${PROG} + ${RM} -f $@ + ${LN} $< $@ + +# alternative executable +# +alt: data ${ALT_TARGET} + @${TRUE} + +# data files +# +data: ${DATA} + @${TRUE} + +# both all and alt +# +everything: all alt + + +############### +# utility rules +############### +# clean: - $(RM) -f *.o a.out core - $(RM) -f vern.tmp.c lush.again babble.cppcb vern.orig.tmp.c - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + echo ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi clobber: clean - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig + ${RM} -f ${TARGET} ${ALT_TARGET} + ${RM} -f og + @-if [ -e sandwich ]; then \ + ${RM} -f sandwich; \ + echo 'ate sandwich'; \ + fi -am_clobber: clean am - $(RM) -f am.safe - $(CP) am am.safe - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig - $(CP) am.safe am - $(RM) -f am.safe +install: + @echo "Dr. Spock says that is not logical!" + @${TRUE} -nuke: clobber - @true +# you may be able to misunderstand the source by reading indent.c +# +indent.c: ${PROG}.c + @if which "${GINDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${GINDENT} < $< > $@"; \ + ${GINDENT} < $< > $@; \ + elif which "${INDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${INDENT} < $< > $@"; \ + ${INDENT} < $< > $@; \ + else \ + echo "no intent tool found, ident $< yourself, sorry"; \ + echo "exit 1"; \ + exit 1; \ + fi -install: all - cat $(WINNERS) > /dev/null + +################## +# 133t hacker rulz +################## +# +love: + @echo 'not war?' + @${TRUE} + +haste: + $(MAKE) waste + @${TRUE} + +waste: + @echo 'haste' + @${TRUE} + +maker: + @echo 'Participate in a maker faire' + @${TRUE} + +easter_egg: + @echo "you expected to often misunderstand this $${RANDOM} magic" + @echo "chongo '' /\\oo/\\" + @echo "Eggy" + +sandwich: easter_egg + @if [ `id -u` -eq 0 ]; then \ + echo 'Okay.'; \ + echo "$${RANDOM}`date +%s`$${RANDOM}" > $@; \ + else \ + echo 'What? Make it yourself.'; \ + exit 1; \ + fi + +# Understand the history of the Homebrew Computer Club +# as well as the West Coast Computer Faire and +# you might be confused different. :-) +# +supernova: sandwich + @-if [ -r .code_anal ]; then \ + ${RM} -f .code_anal_v6; \ + else \ + echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \ + fi + @echo "A $@ helps ${MAKE} the elements that help form planets" + @${TRUE} + +deep_magic: supernova + @-if [ -r .code_anal ]; then \ + ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 \ + --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + fi + @${TRUE} + +magic: deep_magic + @-if [ -r .code_anal ]; then \ + ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "If you don't eat yer meat, you can't have any pudding!"; \ + echo "How can you have any pudding if you don't eat yer meat?!"; \ + fi + @${TRUE} + +# The IOCCC resident astronomer states +# +charon: magic + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore IAU, $@ is a planet" + +pluto: charon + ${MAKE} charon + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore, $@ is a planet" + @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" diff --git a/1992/gson/README.md b/1992/gson/README.md index 5063e39c8..5a4084b41 100644 --- a/1992/gson/README.md +++ b/1992/gson/README.md @@ -1,4 +1,4 @@ -Most Humorous Output: +# Most Humorous Output: Andreas Gustafsson Helsinki University of Technology @@ -6,36 +6,39 @@ Most Humorous Output: 00410 Helsinki FINLAND +## To build: -Judges' comments: + make all + +### To run + + ./og word word2 word3 < /path/to/dictionary + +## Judges' comment - To make: - make ag - Determine where your system dictionary is located. You may find it located in one of the following places: - /usr/dict/words - /usr/share/lib/spell/words - /usr/ucblib/dict/words - /dev/null <-- for machines with nothing to say + /usr/share/dict/words + /usr/share/lib/spell/words + /usr/ucblib/dict/words + /dev/null # <-- for machines with nothing to say Then using the proper dictionary: - ag free software foundation < /usr/dict/words - ag obfuscated c contest < /usr/dict/words - ag unix international < /usr/dict/words - ag george bush < /usr/dict/words - ag bill clinton < /usr/dict/words - ag ross perot < /usr/dict/words - ag paul e tsongas < /usr/dict/words + ./ag free software foundation < /usr/share/dict/words + ./ag obfuscated c contest < /usr/share/dict/words + ./ag unix international < /usr/share/dict/words + ./ag george bush < /usr/share/dict/words + ./ag bill clinton < /usr/share/dict/words + ./ag ross perot < /usr/share/dict/words + ./ag paul e tsongas < /usr/share/dict/words Recently some newspapers printed amusing anagrams of one of the names listed above. Run this program to find the anagrams they weren't allowed to print! - -Selected notes from the author: +## Author's comments The name of the game: diff --git a/1992/imc/Makefile b/1992/imc/Makefile index 2eb115d13..050e42f06 100644 --- a/1992/imc/Makefile +++ b/1992/imc/Makefile @@ -1,244 +1,595 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1992 makefile +# IOCCC 1992 winning entry - imc + +################################################################################ # -# Copyright (c) 1992, Landon Curt Noll & Larry Bassel. -# All Rights Reserved. Permission for personal, educational or non-profit -# use is granted provided this this copyright and notice are included in its -# entirety and remains unaltered. All other uses must receive prior permission -# from Landon Curt Noll and Larry Bassel. - - -SHELL=/bin/sh -CHMOD=chmod -CP=cp -RM=rm -SED=sed -LN=ln -UNIQ=uniq -CB=cb -GREP=grep -# set this to where your C Processor resides +# An Historical Makefile NOTE: # -# On some systems: -# CPP=/lib/cpp +# The orig.Makefile, if it exits, is the original Makefile before this IOCCC +# year directory was reworked so that entries are in separate directories. +# This also applies to any orig.ansi.mk and orig.common.mk files. # -CPP=/usr/ccs/lib/acpp - -# flags for ansi compiles +# Several Makefiles were modified / formed in 2022, and as such it may have +# elements that are not historically compatible with way entries were built. +# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile. # -# NOTE: Some ANSI compilers make use of -Xa to turn on ANSI mode, -# others such as gcc may want -ansi, others may want nothing -# at all. Adjust the CFLAGS line as needed. +# Regarding individual entries: # -# NOTE: Some compilers cannot optimize, or optimize some entries -# entries incorrectly. You might want need to turn on -O -# to see if your compiler can handle them. +# IOCCC winning entry code may not work on your system. Even with standards, +# conditions and build environments change, especially when it comes to more +# extreme code such you might find in an IOCCC winner. Moreover, what was +# allowed and liked in one IOCCC contest may no longer be liked/allowed in +# later IOCCC years. # -#CFLAGS=-O -Xa -CFLAGS=-Xa -CC=cc - -# misc shell babble +# Corrections on winning author and fixing typos in remarks are VERY WELCOME. # -NOINCLUDE=$(SED) -e 's/^.\([ ]*\)include/%include/' -SPACECLEAN=$(SED) -e 's/\([^ ]\)\([ ]\)[ ][ ]*/\1\2/g' -CPPCLEAN=$(GREP) -v '^. [0-9][0-9]*' - -# winners that compile under ANSI C +# GitHub pull requests are welcome: # -WINNERS= adrian albert ant buzzard.1 buzzard.2 gson kivinen imc \ - lush marangon nathan vern westley -ALT_NAMES= adgrep am babble first ag whereami - -all: $(WINNERS) $(ALT_NAMES) - -adrian: adrian.c - $(CC) $(CFLAGS) adrian.c -o adrian - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c - $(SED) '1s/\..*\./. wc ./' adrian.c > ad.temp - -./adrian ad.temp adwc.c - $(CC) -o adwc adwc.c - $(SED) '1s/\..*\./. basename ./' adrian.c > ad.temp - -./adrian ad.temp adbasename.c - $(CC) -o adbasename adbasename.c - $(SED) '1s/\..*\./. echo| ./' adrian.c > ad.temp - -./adrian ad.temp adecho.c - $(CC) -o adecho adecho.c - $(SED) '1s/\..*\./. head; ./' adrian.c > ad.temp - -./adrian ad.temp adhead.c - $(CC) -o adhead adhead.c - $(SED) '1s/\..*\./. sleep ./' adrian.c > ad.temp - -./adrian ad.temp adsleep.c - $(CC) -o adsleep adsleep.c - $(RM) -f ad.temp - -# NOTE: this is the original source that won +# If you have a patch that might make running an entry work in modern Unix-like +# environments, please create a GitHub pull request for the IOCCC judges to +# consider. # -adrian.orig: adrian.orig.c - $(CC) $(CFLAGS) adrian.orig.c -o adrian.orig - -albert: albert.c - $(CC) $(CFLAGS) albert.c -o albert - -# NOTE: this is the original source that won +# Suggestions and corrections regarding Makefiles, winning author information, +# fixing typos in remarks, and code patches are welcome via opening a GitHub +# issue or better yet, by creating a GitHub pull request for the IOCCC judges +# to consider. To form a GitHub issue or GitHub pull, please visit: # -albert.orig: albert.orig.c - $(CC) $(CFLAGS) albert.orig.c -o albert.orig - -ant: ant.c - $(CC) $(CFLAGS) ant.c -o ant - -buzzard.1: buzzard.1.c - $(CC) $(CFLAGS) buzzard.1.c -o buzzard.1 - -babble.cppcb: buzzard.1.c - $(NOINCLUDE) buzzard.1.c | \ - $(CPP) $(CPPFLAGS) | \ - $(CPPCLEAN) | \ - $(CB) $(CBFLAGS) | \ - $(UNIQ) | \ - $(SPACECLEAN) > babble.cppcb 2>&1 - -buzzard.2: buzzard.2.c - $(CC) $(CFLAGS) buzzard.2.c -o buzzard.2 - -# NOTE: this is the original source that won +# https://github.com/ioccc-src/winner # -buzzard.2.orig: buzzard.2.orig.c - $(CC) $(CFLAGS) buzzard.2.orig.c -o buzzard.2.orig +################################################################################ -gson: gson.c - $(CC) $(CFLAGS) gson.c -o gson - -# NOTE: some systems may only need: +# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under: # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 +# Creative Commons Attribution-ShareAlike 3.0 Unported License. # -kivinen: kivinen.c - $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 -lsocket -lresolv -lnsl +# See: http://creativecommons.org/licenses/by-sa/3.0/ -# NOTE: this is the original program that won + +############################# +# shell used by this Makefile +############################# # -# NOTE: some systems may only need: +SHELL= bash + +####################### +# common tool locations +####################### # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 +A2P= a2p +AR= ar +ASA= asa +AT= at +ATQ= atq +ATRM= atrm +AWK= awk +BANNER= banner +BASE64= base64 +BASENAME= basename +BATCH= batch +BC= bc +BINHEX= binhex +BISON= bison +BUNZIP2= bunzip2 +BZCAT= bzcat +BZCMP= bzcmp +BZDIFF= bzdiff +BZEGREP= bzegrep +BZFGREP= bzfgrep +BZGREP= bzgrep +BZIP2= bzip2 +BZLESS= bzless +BZMORE= bzmore +C2PH= c2ph +C89= c89 +C99= c99 +CAL= cal +CALC= calc +CAT= cat +CD= cd +CHFLAGS= chflags +CHGRP= chgrp +CHMOD= chmod +CKSUM= cksum +CLANG= clang +CLANG_PLUSPLUS= clang++ +CLEAR= clear +CMP= cmp +COL= col +COLLDEF= colldef +COLRM= colrm +COLUMN= column +COMPRESS= compress +CP= cp +CPIO= cpio +CPP= cpp +CRC32= crc32 +CSH= csh +CSPLIT= csplit +CURL= curl +CUT= cut +C_PLUSPLUS= c++ +C_PLUSPLUS_FILT= c++filt +DATE= date +DC= dc +DD= dd +DF= df +DIFF3= diff3 +DIFF= diff +DIG= dig +DIRNAME= dirname +ED= ed +EGREP= egrep +ENV= env +EQN= eqn +ETAGS= etags +EXPECT= expect +EXPR= expr +FALSE= false +FGREP= fgrep +FILE= file +FIND2PERL= find2perl +FIND= find +FLEX= flex +FLEX_PLUSPLUS= flex++ +FMT= fmt +FOLD= fold +FS_USAGE= fs_usage +FUNZIP= funzip +FUSER= fuser +GCC= gcc +GDIFFMK= gdiffmk +GENCAT= gencat +GENSTRINGS= genstrings +GETOPT= getopt +GETOPTS= getopts +GINDENT= gindent +GNUMAKE= gnumake +GREP= grep +GROFF= groff +GROFFER= groffer +GROG= grog +GROPS= grops +GROTTY= grotty +GUNZIP= gunzip +GVIM= gvim +GZCAT= gzcat +GZEXE= gzexe +GZIP_PROG= gzip +G_PLUSPLUS= g++ +H2PH= h2ph +H2XS= h2xs +HASH= hash +HEAD= head +HOSTNAME_PROG= hostname +ICONV= iconv +ID= id +INDENT= indent +INFO= info +JOT= jot +KILL= kill +KSH= ksh +LAST= last +LD= ld +LESSECHO= lessecho +LEX= len +LINK= link +LN= ln +LS= ls +M4= m4 +MAKE= make +MAN= man +MKDIR= mkdir +MKFIFO= mkfifo +MKTEMP= mktemp +MV= mv +NANO= nano +NASM= nasm +NEQN= neqn +NICE= nice +NL= nl +NM= nm +NOHUP= nohup +NROFF= nroff +NSLOOKUP= nslookup +OD= od +OPENSSL= openssl +PASTE= paste +PATCH= patch +PATHCHK= pathchk +PAX= pax +PERL= perl +PICO= pico +PR= pr +PRINTENV= printenv +PS= ps +PTAR= ptar +PTARDIFF= ptardiff +PTARGREP= ptargrep +PWD= pwd +PYDOC= pydoc +PYTHON= python +PYTHONW= pythonw +READLINK= readlink +RENICE= renice +RESET= reset +REV= rev +RI= ri +RM= rm +RMDIR= rmdir +RSYNC= rsync +RUBY= ruby +RVIM= rvim +SAY= say +SCP= scp +SCREEN= screen +SCRIPT= script +SDIFF= sdiff +SED= sed +SEQ= seq +SFTP= sftp +SH= sh +SHA1= sha1 +SHA= sha +SHAR= shar +SHASUM5_18= shasum5.18 +SHASUM= shasum +SIZE= size +SLEEP= sleep +SORT= sort +SSH= ssh +STAT= stat +STRIP= strip +STTY= stty +SUM= sum +SYNC= sync +TABS= tabs +TAIL= tail +TAR= tar +TEE= tee +TEST= test +TFTP= tftp +TIDY= tidy +TIME= time +TOP= top +TOUCH= touch +TPUT= tout +TPUT= tput +TR= tr +TROFF= troff +TRUE= true +TSET= tset +TSORT= tsort +UL= ul +UNAME= uname +UNCOMPRESS= uncompress +UNEXPAND= unexpand +UNIFDEF= unifdef +UNIFDEFALL= unifdefall +UNIQ= uniq +UNITS= units +UNLINK= unlink +UNZIP= unzip +UNZIPSFX= unzipsfx +UPTIME= uptime +UUDECODE= uudecode +UUENCODE= uuencode +UUIDGEN= uuidgen +VI= vi +VIEW= view +VIM= vim +VIMDIFF= vimdiff +W= w +WAIT4PATH= wait4path +WAIT= wait +WC= wc +WGET= wget +WHAT= what +WHATIS= whatis +WHICH= which +WHO= who +WHOAMI= whoami +WHOIS= whois +WRTIE= write +XAR= xar +XARGS= xargs +XATTR= xattr +XXD= xxd +YACC= yacc +YES= yes +ZCAT= zcat +ZCMP= zcmp +ZDIFF= zdiff +ZEGREP= zegrep +ZFGREP= zfgrep +ZFORCE= zforce +ZGREP= zgrep +ZIP= zip +ZIPCLOAK= zipcloak +ZIPGREp= zipgrep +ZIPINFo= zipinfo +ZIPNOTE= zipnote +ZIPSPLIT= zipsplit +ZLESS= zless +ZMORE= zmore +ZNEW= znew +ZPRINT= zprint +ZSH= zsh + +# Set X11_LIBDIR to the directory where the X11 library resides # -kivinen.orig: kivinen.orig.c - $(CC) $(CFLAGS) kivinen.orig.c -o kivinen.orig -lX11 \ - -lsocket -lresolv -lnsl +#X11_LIBDIR= /usr/X11R6/lib +#X11_LIBDIR= /usr/X11/lib +X11_LIBDIR= /opt/X11/lib -imc: imc.c - $(CC) $(CFLAGS) imc.c -o imc - -# NOTE: this is the original program that won +# Set X11_INCLUDEDIR to the directory where the X11 include files reside # -imc.orig: imc.orig.c - $(CC) $(CFLAGS) imc.orig.c -o imc.orig +#X11_INCDIR= /usr/X11R6/include +#X11_INCDIR= /usr/X11/include +X11_INCDIR= /opt/X11/include -lush: lush.c - $(CC) $(CFLAGS) lush.c -o lush - -lush.again: lush.c - $(CC) $(CFLAGS) lush.c -o lush.again - $(RM) -f lush.again - -# NOTE: this is the original program that won +# Common C compiler warnings to silence # -lush.orig: lush.orig.c - $(CC) $(CFLAGS) lush.orig.c -o lush.orig +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-format -# NOTE: some systems may need: +# Common C compiler warning flags # -# $(CC) $(CFLAGS) marangon.c -o marangon -lcurses -ltermcap +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # -marangon: marangon.c - $(CC) $(CFLAGS) marangon.c -o marangon -lcurses +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu90 -# NOTE: this is the original program that won +# Compiler bit architecture # -# NOTE: some systems may need: +# Some entries require 32-bitness: +# ARCH= -m32 # -# $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses -ltermcap +# Some entries require 64-bitness: +# ARCH= -m64 # -marangon.orig: marangon.orig.c - $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses - -nathan: nathan.c - $(CC) $(CFLAGS) nathan.c -o nathan - -# NOTE: this is the original program that won +# By default we assume nothing: # -nathan.orig: nathan.orig.c - $(CC) $(CFLAGS) nathan.orig.c -o nathan.orig +ARCH= -vern: vern.tmp.c - $(CC) $(CFLAGS) vern.tmp.c -o vern - -vern.tmp.c: vern.c - $(RM) -f vern.tmp.c - $(SED) vern.tmp.c - -# NOTE: this is the original program that won +# Defines that are needed to compile # -vern.orig: vern.orig.tmp.c - $(CC) $(CFLAGS) vern.orig.tmp.c -o vern.orig +CDEFINE= +#CDEFINE= -DIOCCC -vern.orig.tmp.c: vern.orig.c - $(RM) -f vern.orig.tmp.c - $(SED) vern.orig.tmp.c - -westley: westley.c - $(CC) $(CFLAGS) westley.c -o westley - -# alternate names for selected entries +# Include files that are needed to compile # -adgrep: adrian - $(RM) -f adgrep - $(LN) adrian adgrep -am: ant - $(RM) -f am - $(LN) ant am -babble: buzzard.1 - $(RM) -f babble - $(LN) buzzard.1 babble -first: buzzard.2 - $(RM) -f first - $(LN) buzzard.2 first -ag: gson - $(RM) -f ag - $(LN) gson ag -whereami: westley - $(RM) -f whereami - $(LN) westley whereami +CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 +# Optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# Default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +LIBS= +#LIBS= -lm +#LIBS= -L ${X11_LIBDIR} -lX11 +#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL + +# C compiler to use +# +CC= cc +#CC=clang +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-error -Wno-implicit-function-declaration -Wno-format \ + -Wno-missing-variable-declarations -Wno-poison-system-directorie \ + -Wno-poison-system-directories -Wno-unknown-warning-option +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif + + +############################## +# Special flags for this entry +############################## +# +ENTRY= imc +PROG= ${ENTRY} +# +OBJ= ${PROG}.o +DATA= +TARGET= ${PROG} +# +ALT_OBJ= +ALT_TARGET= + + +################# +# build the entry +################# +# +all: data ${TARGET} + @${TRUE} + +.PHONY: all alt data everything clean clobber install \ + love haste waste maker easter_egg sandwich \ + supernova deep_magic magic charon pluto + +${PROG}: ${PROG}.c + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + +# alternative executable +# +alt: data ${ALT_TARGET} + @${TRUE} + +# data files +# +data: ${DATA} + @${TRUE} + +# both all and alt +# +everything: all alt + + +############### +# utility rules +############### +# clean: - $(RM) -f *.o a.out core - $(RM) -f vern.tmp.c lush.again babble.cppcb vern.orig.tmp.c - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + echo ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi clobber: clean - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig + ${RM} -f ${TARGET} ${ALT_TARGET} + @-if [ -e sandwich ]; then \ + ${RM} -f sandwich; \ + echo 'ate sandwich'; \ + fi -am_clobber: clean am - $(RM) -f am.safe - $(CP) am am.safe - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig - $(CP) am.safe am - $(RM) -f am.safe +install: + @echo "Dr. Spock says that is not logical!" + @${TRUE} -nuke: clobber - @true +# you may be able to misunderstand the source by reading indent.c +# +indent.c: ${PROG}.c + @if which "${GINDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${GINDENT} < $< > $@"; \ + ${GINDENT} < $< > $@; \ + elif which "${INDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${INDENT} < $< > $@"; \ + ${INDENT} < $< > $@; \ + else \ + echo "no intent tool found, ident $< yourself, sorry"; \ + echo "exit 1"; \ + exit 1; \ + fi -install: all - cat $(WINNERS) > /dev/null + +################## +# 133t hacker rulz +################## +# +love: + @echo 'not war?' + @${TRUE} + +haste: + $(MAKE) waste + @${TRUE} + +waste: + @echo 'haste' + @${TRUE} + +maker: + @echo 'Participate in a maker faire' + @${TRUE} + +easter_egg: + @echo "you expected to often misunderstand this $${RANDOM} magic" + @echo "chongo '' /\\oo/\\" + @echo "Eggy" + +sandwich: easter_egg + @if [ `id -u` -eq 0 ]; then \ + echo 'Okay.'; \ + echo "$${RANDOM}`date +%s`$${RANDOM}" > $@; \ + else \ + echo 'What? Make it yourself.'; \ + exit 1; \ + fi + +# Understand the history of the Homebrew Computer Club +# as well as the West Coast Computer Faire and +# you might be confused different. :-) +# +supernova: sandwich + @-if [ -r .code_anal ]; then \ + ${RM} -f .code_anal_v6; \ + else \ + echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \ + fi + @echo "A $@ helps ${MAKE} the elements that help form planets" + @${TRUE} + +deep_magic: supernova + @-if [ -r .code_anal ]; then \ + ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 \ + --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + fi + @${TRUE} + +magic: deep_magic + @-if [ -r .code_anal ]; then \ + ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "If you don't eat yer meat, you can't have any pudding!"; \ + echo "How can you have any pudding if you don't eat yer meat?!"; \ + fi + @${TRUE} + +# The IOCCC resident astronomer states +# +charon: magic + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore IAU, $@ is a planet" + +pluto: charon + ${MAKE} charon + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore, $@ is a planet" + @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" diff --git a/1992/imc/README.md b/1992/imc/README.md index 23f5b4ab7..c4a534ccd 100644 --- a/1992/imc/README.md +++ b/1992/imc/README.md @@ -1,4 +1,4 @@ -Best Output: +$ Best Output: Ian Collier Oxford University @@ -8,10 +8,13 @@ Best Output: OX1 4AW ENGLAND +## To build: -Judges' comments: + make all - Make and run. +### To run + +## Judges' comments The program is more interesting to run on workstations that can make use of a Sun raster file. Others can make use of the -text @@ -19,13 +22,12 @@ Judges' comments: Of course, the source (layout) is self-documenting! :-) - NOTE: The original winning source imc.orig.c assumed that + NOTE: The original winning source assumed that exit returned a value which cause problems for some systems where exit returned a void. The file imc.c - avoids this problem. + has been modified to avoid this problem. - -Selected notes from the author: +## Author's comments Portability diff --git a/1992/imc/imc.c b/1992/imc/imc.c index b049f2c5a..078c3416e 100644 --- a/1992/imc/imc.c +++ b/1992/imc/imc.c @@ -1,5 +1,4 @@ #include -#include #define ext(a) (exit(a),0) #define I " .:\';+0x074)?( fprintf(i,a,v[q]),r):_>0152?(_/4>27?(_&1?( diff --git a/1992/kivinen/Makefile b/1992/kivinen/Makefile index 2eb115d13..d625c0708 100644 --- a/1992/kivinen/Makefile +++ b/1992/kivinen/Makefile @@ -1,244 +1,595 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1992 makefile +# IOCCC 1992 winning entry - kivinen + +################################################################################ # -# Copyright (c) 1992, Landon Curt Noll & Larry Bassel. -# All Rights Reserved. Permission for personal, educational or non-profit -# use is granted provided this this copyright and notice are included in its -# entirety and remains unaltered. All other uses must receive prior permission -# from Landon Curt Noll and Larry Bassel. - - -SHELL=/bin/sh -CHMOD=chmod -CP=cp -RM=rm -SED=sed -LN=ln -UNIQ=uniq -CB=cb -GREP=grep -# set this to where your C Processor resides +# An Historical Makefile NOTE: # -# On some systems: -# CPP=/lib/cpp +# The orig.Makefile, if it exits, is the original Makefile before this IOCCC +# year directory was reworked so that entries are in separate directories. +# This also applies to any orig.ansi.mk and orig.common.mk files. # -CPP=/usr/ccs/lib/acpp - -# flags for ansi compiles +# Several Makefiles were modified / formed in 2022, and as such it may have +# elements that are not historically compatible with way entries were built. +# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile. # -# NOTE: Some ANSI compilers make use of -Xa to turn on ANSI mode, -# others such as gcc may want -ansi, others may want nothing -# at all. Adjust the CFLAGS line as needed. +# Regarding individual entries: # -# NOTE: Some compilers cannot optimize, or optimize some entries -# entries incorrectly. You might want need to turn on -O -# to see if your compiler can handle them. +# IOCCC winning entry code may not work on your system. Even with standards, +# conditions and build environments change, especially when it comes to more +# extreme code such you might find in an IOCCC winner. Moreover, what was +# allowed and liked in one IOCCC contest may no longer be liked/allowed in +# later IOCCC years. # -#CFLAGS=-O -Xa -CFLAGS=-Xa -CC=cc - -# misc shell babble +# Corrections on winning author and fixing typos in remarks are VERY WELCOME. # -NOINCLUDE=$(SED) -e 's/^.\([ ]*\)include/%include/' -SPACECLEAN=$(SED) -e 's/\([^ ]\)\([ ]\)[ ][ ]*/\1\2/g' -CPPCLEAN=$(GREP) -v '^. [0-9][0-9]*' - -# winners that compile under ANSI C +# GitHub pull requests are welcome: # -WINNERS= adrian albert ant buzzard.1 buzzard.2 gson kivinen imc \ - lush marangon nathan vern westley -ALT_NAMES= adgrep am babble first ag whereami - -all: $(WINNERS) $(ALT_NAMES) - -adrian: adrian.c - $(CC) $(CFLAGS) adrian.c -o adrian - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c - $(SED) '1s/\..*\./. wc ./' adrian.c > ad.temp - -./adrian ad.temp adwc.c - $(CC) -o adwc adwc.c - $(SED) '1s/\..*\./. basename ./' adrian.c > ad.temp - -./adrian ad.temp adbasename.c - $(CC) -o adbasename adbasename.c - $(SED) '1s/\..*\./. echo| ./' adrian.c > ad.temp - -./adrian ad.temp adecho.c - $(CC) -o adecho adecho.c - $(SED) '1s/\..*\./. head; ./' adrian.c > ad.temp - -./adrian ad.temp adhead.c - $(CC) -o adhead adhead.c - $(SED) '1s/\..*\./. sleep ./' adrian.c > ad.temp - -./adrian ad.temp adsleep.c - $(CC) -o adsleep adsleep.c - $(RM) -f ad.temp - -# NOTE: this is the original source that won +# If you have a patch that might make running an entry work in modern Unix-like +# environments, please create a GitHub pull request for the IOCCC judges to +# consider. # -adrian.orig: adrian.orig.c - $(CC) $(CFLAGS) adrian.orig.c -o adrian.orig - -albert: albert.c - $(CC) $(CFLAGS) albert.c -o albert - -# NOTE: this is the original source that won +# Suggestions and corrections regarding Makefiles, winning author information, +# fixing typos in remarks, and code patches are welcome via opening a GitHub +# issue or better yet, by creating a GitHub pull request for the IOCCC judges +# to consider. To form a GitHub issue or GitHub pull, please visit: # -albert.orig: albert.orig.c - $(CC) $(CFLAGS) albert.orig.c -o albert.orig - -ant: ant.c - $(CC) $(CFLAGS) ant.c -o ant - -buzzard.1: buzzard.1.c - $(CC) $(CFLAGS) buzzard.1.c -o buzzard.1 - -babble.cppcb: buzzard.1.c - $(NOINCLUDE) buzzard.1.c | \ - $(CPP) $(CPPFLAGS) | \ - $(CPPCLEAN) | \ - $(CB) $(CBFLAGS) | \ - $(UNIQ) | \ - $(SPACECLEAN) > babble.cppcb 2>&1 - -buzzard.2: buzzard.2.c - $(CC) $(CFLAGS) buzzard.2.c -o buzzard.2 - -# NOTE: this is the original source that won +# https://github.com/ioccc-src/winner # -buzzard.2.orig: buzzard.2.orig.c - $(CC) $(CFLAGS) buzzard.2.orig.c -o buzzard.2.orig +################################################################################ -gson: gson.c - $(CC) $(CFLAGS) gson.c -o gson - -# NOTE: some systems may only need: +# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under: # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 +# Creative Commons Attribution-ShareAlike 3.0 Unported License. # -kivinen: kivinen.c - $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 -lsocket -lresolv -lnsl +# See: http://creativecommons.org/licenses/by-sa/3.0/ -# NOTE: this is the original program that won + +############################# +# shell used by this Makefile +############################# # -# NOTE: some systems may only need: +SHELL= bash + +####################### +# common tool locations +####################### # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 +A2P= a2p +AR= ar +ASA= asa +AT= at +ATQ= atq +ATRM= atrm +AWK= awk +BANNER= banner +BASE64= base64 +BASENAME= basename +BATCH= batch +BC= bc +BINHEX= binhex +BISON= bison +BUNZIP2= bunzip2 +BZCAT= bzcat +BZCMP= bzcmp +BZDIFF= bzdiff +BZEGREP= bzegrep +BZFGREP= bzfgrep +BZGREP= bzgrep +BZIP2= bzip2 +BZLESS= bzless +BZMORE= bzmore +C2PH= c2ph +C89= c89 +C99= c99 +CAL= cal +CALC= calc +CAT= cat +CD= cd +CHFLAGS= chflags +CHGRP= chgrp +CHMOD= chmod +CKSUM= cksum +CLANG= clang +CLANG_PLUSPLUS= clang++ +CLEAR= clear +CMP= cmp +COL= col +COLLDEF= colldef +COLRM= colrm +COLUMN= column +COMPRESS= compress +CP= cp +CPIO= cpio +CPP= cpp +CRC32= crc32 +CSH= csh +CSPLIT= csplit +CURL= curl +CUT= cut +C_PLUSPLUS= c++ +C_PLUSPLUS_FILT= c++filt +DATE= date +DC= dc +DD= dd +DF= df +DIFF3= diff3 +DIFF= diff +DIG= dig +DIRNAME= dirname +ED= ed +EGREP= egrep +ENV= env +EQN= eqn +ETAGS= etags +EXPECT= expect +EXPR= expr +FALSE= false +FGREP= fgrep +FILE= file +FIND2PERL= find2perl +FIND= find +FLEX= flex +FLEX_PLUSPLUS= flex++ +FMT= fmt +FOLD= fold +FS_USAGE= fs_usage +FUNZIP= funzip +FUSER= fuser +GCC= gcc +GDIFFMK= gdiffmk +GENCAT= gencat +GENSTRINGS= genstrings +GETOPT= getopt +GETOPTS= getopts +GINDENT= gindent +GNUMAKE= gnumake +GREP= grep +GROFF= groff +GROFFER= groffer +GROG= grog +GROPS= grops +GROTTY= grotty +GUNZIP= gunzip +GVIM= gvim +GZCAT= gzcat +GZEXE= gzexe +GZIP_PROG= gzip +G_PLUSPLUS= g++ +H2PH= h2ph +H2XS= h2xs +HASH= hash +HEAD= head +HOSTNAME_PROG= hostname +ICONV= iconv +ID= id +INDENT= indent +INFO= info +JOT= jot +KILL= kill +KSH= ksh +LAST= last +LD= ld +LESSECHO= lessecho +LEX= len +LINK= link +LN= ln +LS= ls +M4= m4 +MAKE= make +MAN= man +MKDIR= mkdir +MKFIFO= mkfifo +MKTEMP= mktemp +MV= mv +NANO= nano +NASM= nasm +NEQN= neqn +NICE= nice +NL= nl +NM= nm +NOHUP= nohup +NROFF= nroff +NSLOOKUP= nslookup +OD= od +OPENSSL= openssl +PASTE= paste +PATCH= patch +PATHCHK= pathchk +PAX= pax +PERL= perl +PICO= pico +PR= pr +PRINTENV= printenv +PS= ps +PTAR= ptar +PTARDIFF= ptardiff +PTARGREP= ptargrep +PWD= pwd +PYDOC= pydoc +PYTHON= python +PYTHONW= pythonw +READLINK= readlink +RENICE= renice +RESET= reset +REV= rev +RI= ri +RM= rm +RMDIR= rmdir +RSYNC= rsync +RUBY= ruby +RVIM= rvim +SAY= say +SCP= scp +SCREEN= screen +SCRIPT= script +SDIFF= sdiff +SED= sed +SEQ= seq +SFTP= sftp +SH= sh +SHA1= sha1 +SHA= sha +SHAR= shar +SHASUM5_18= shasum5.18 +SHASUM= shasum +SIZE= size +SLEEP= sleep +SORT= sort +SSH= ssh +STAT= stat +STRIP= strip +STTY= stty +SUM= sum +SYNC= sync +TABS= tabs +TAIL= tail +TAR= tar +TEE= tee +TEST= test +TFTP= tftp +TIDY= tidy +TIME= time +TOP= top +TOUCH= touch +TPUT= tout +TPUT= tput +TR= tr +TROFF= troff +TRUE= true +TSET= tset +TSORT= tsort +UL= ul +UNAME= uname +UNCOMPRESS= uncompress +UNEXPAND= unexpand +UNIFDEF= unifdef +UNIFDEFALL= unifdefall +UNIQ= uniq +UNITS= units +UNLINK= unlink +UNZIP= unzip +UNZIPSFX= unzipsfx +UPTIME= uptime +UUDECODE= uudecode +UUENCODE= uuencode +UUIDGEN= uuidgen +VI= vi +VIEW= view +VIM= vim +VIMDIFF= vimdiff +W= w +WAIT4PATH= wait4path +WAIT= wait +WC= wc +WGET= wget +WHAT= what +WHATIS= whatis +WHICH= which +WHO= who +WHOAMI= whoami +WHOIS= whois +WRTIE= write +XAR= xar +XARGS= xargs +XATTR= xattr +XXD= xxd +YACC= yacc +YES= yes +ZCAT= zcat +ZCMP= zcmp +ZDIFF= zdiff +ZEGREP= zegrep +ZFGREP= zfgrep +ZFORCE= zforce +ZGREP= zgrep +ZIP= zip +ZIPCLOAK= zipcloak +ZIPGREp= zipgrep +ZIPINFo= zipinfo +ZIPNOTE= zipnote +ZIPSPLIT= zipsplit +ZLESS= zless +ZMORE= zmore +ZNEW= znew +ZPRINT= zprint +ZSH= zsh + +# Set X11_LIBDIR to the directory where the X11 library resides # -kivinen.orig: kivinen.orig.c - $(CC) $(CFLAGS) kivinen.orig.c -o kivinen.orig -lX11 \ - -lsocket -lresolv -lnsl +#X11_LIBDIR= /usr/X11R6/lib +#X11_LIBDIR= /usr/X11/lib +X11_LIBDIR= /opt/X11/lib -imc: imc.c - $(CC) $(CFLAGS) imc.c -o imc - -# NOTE: this is the original program that won +# Set X11_INCLUDEDIR to the directory where the X11 include files reside # -imc.orig: imc.orig.c - $(CC) $(CFLAGS) imc.orig.c -o imc.orig +#X11_INCDIR= /usr/X11R6/include +#X11_INCDIR= /usr/X11/include +X11_INCDIR= /opt/X11/include -lush: lush.c - $(CC) $(CFLAGS) lush.c -o lush - -lush.again: lush.c - $(CC) $(CFLAGS) lush.c -o lush.again - $(RM) -f lush.again - -# NOTE: this is the original program that won +# Common C compiler warnings to silence # -lush.orig: lush.orig.c - $(CC) $(CFLAGS) lush.orig.c -o lush.orig +#CSILENCE= +CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \ + -Wno-logical-op-parentheses -Wno-main -Wno-variadic-macros -# NOTE: some systems may need: +# Common C compiler warning flags # -# $(CC) $(CFLAGS) marangon.c -o marangon -lcurses -ltermcap +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # -marangon: marangon.c - $(CC) $(CFLAGS) marangon.c -o marangon -lcurses +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu90 -# NOTE: this is the original program that won +# Compiler bit architecture # -# NOTE: some systems may need: +# Some entries require 32-bitness: +# ARCH= -m32 # -# $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses -ltermcap +# Some entries require 64-bitness: +# ARCH= -m64 # -marangon.orig: marangon.orig.c - $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses - -nathan: nathan.c - $(CC) $(CFLAGS) nathan.c -o nathan - -# NOTE: this is the original program that won +# By default we assume nothing: # -nathan.orig: nathan.orig.c - $(CC) $(CFLAGS) nathan.orig.c -o nathan.orig +ARCH= -vern: vern.tmp.c - $(CC) $(CFLAGS) vern.tmp.c -o vern - -vern.tmp.c: vern.c - $(RM) -f vern.tmp.c - $(SED) vern.tmp.c - -# NOTE: this is the original program that won +# Defines that are needed to compile # -vern.orig: vern.orig.tmp.c - $(CC) $(CFLAGS) vern.orig.tmp.c -o vern.orig +CDEFINE= +#CDEFINE= -DIOCCC -vern.orig.tmp.c: vern.orig.c - $(RM) -f vern.orig.tmp.c - $(SED) vern.orig.tmp.c - -westley: westley.c - $(CC) $(CFLAGS) westley.c -o westley - -# alternate names for selected entries +# Include files that are needed to compile # -adgrep: adrian - $(RM) -f adgrep - $(LN) adrian adgrep -am: ant - $(RM) -f am - $(LN) ant am -babble: buzzard.1 - $(RM) -f babble - $(LN) buzzard.1 babble -first: buzzard.2 - $(RM) -f first - $(LN) buzzard.2 first -ag: gson - $(RM) -f ag - $(LN) gson ag -whereami: westley - $(RM) -f whereami - $(LN) westley whereami +#CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +CINCLUDE= -I ${HOMEBREW_PREFIX}/include +# Optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# Default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +#LIBS= +#LIBS= -lm +#LIBS= -L ${X11_LIBDIR} -lX11 -lresolv +LIBS= -L ${HOMEBREW_PREFIX}/lib -lX11 -lresolv + +# C compiler to use +# +CC= cc +#CC=clang +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-poison-system-directories -Wno-comma \ + -Wno-conditional-uninitialized -Wno-sign-conversion +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif + + +############################## +# Special flags for this entry +############################## +# +ENTRY= kivinen +PROG= ${ENTRY} +# +OBJ= ${PROG}.o +DATA= +TARGET= ${PROG} +# +ALT_OBJ= +ALT_TARGET= + + +################# +# build the entry +################# +# +all: data ${TARGET} + @${TRUE} + +.PHONY: all alt data everything clean clobber install \ + love haste waste maker easter_egg sandwich \ + supernova deep_magic magic charon pluto + +${PROG}: ${PROG}.c + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + +# alternative executable +# +alt: data ${ALT_TARGET} + @${TRUE} + +# data files +# +data: ${DATA} + @${TRUE} + +# both all and alt +# +everything: all alt + + +############### +# utility rules +############### +# clean: - $(RM) -f *.o a.out core - $(RM) -f vern.tmp.c lush.again babble.cppcb vern.orig.tmp.c - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + echo ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi clobber: clean - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig + ${RM} -f ${TARGET} ${ALT_TARGET} + @-if [ -e sandwich ]; then \ + ${RM} -f sandwich; \ + echo 'ate sandwich'; \ + fi -am_clobber: clean am - $(RM) -f am.safe - $(CP) am am.safe - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig - $(CP) am.safe am - $(RM) -f am.safe +install: + @echo "Dr. Spock says that is not logical!" + @${TRUE} -nuke: clobber - @true +# you may be able to misunderstand the source by reading indent.c +# +indent.c: ${PROG}.c + @if which "${GINDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${GINDENT} < $< > $@"; \ + ${GINDENT} < $< > $@; \ + elif which "${INDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${INDENT} < $< > $@"; \ + ${INDENT} < $< > $@; \ + else \ + echo "no intent tool found, ident $< yourself, sorry"; \ + echo "exit 1"; \ + exit 1; \ + fi -install: all - cat $(WINNERS) > /dev/null + +################## +# 133t hacker rulz +################## +# +love: + @echo 'not war?' + @${TRUE} + +haste: + $(MAKE) waste + @${TRUE} + +waste: + @echo 'haste' + @${TRUE} + +maker: + @echo 'Participate in a maker faire' + @${TRUE} + +easter_egg: + @echo "you expected to often misunderstand this $${RANDOM} magic" + @echo "chongo '' /\\oo/\\" + @echo "Eggy" + +sandwich: easter_egg + @if [ `id -u` -eq 0 ]; then \ + echo 'Okay.'; \ + echo "$${RANDOM}`date +%s`$${RANDOM}" > $@; \ + else \ + echo 'What? Make it yourself.'; \ + exit 1; \ + fi + +# Understand the history of the Homebrew Computer Club +# as well as the West Coast Computer Faire and +# you might be confused different. :-) +# +supernova: sandwich + @-if [ -r .code_anal ]; then \ + ${RM} -f .code_anal_v6; \ + else \ + echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \ + fi + @echo "A $@ helps ${MAKE} the elements that help form planets" + @${TRUE} + +deep_magic: supernova + @-if [ -r .code_anal ]; then \ + ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 \ + --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + fi + @${TRUE} + +magic: deep_magic + @-if [ -r .code_anal ]; then \ + ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "If you don't eat yer meat, you can't have any pudding!"; \ + echo "How can you have any pudding if you don't eat yer meat?!"; \ + fi + @${TRUE} + +# The IOCCC resident astronomer states +# +charon: magic + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore IAU, $@ is a planet" + +pluto: charon + ${MAKE} charon + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore, $@ is a planet" + @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" diff --git a/1992/lush/Makefile b/1992/lush/Makefile index 2eb115d13..500572ff5 100644 --- a/1992/lush/Makefile +++ b/1992/lush/Makefile @@ -1,244 +1,600 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1992 makefile +# IOCCC 1992 winning entry - lush + +################################################################################ # -# Copyright (c) 1992, Landon Curt Noll & Larry Bassel. -# All Rights Reserved. Permission for personal, educational or non-profit -# use is granted provided this this copyright and notice are included in its -# entirety and remains unaltered. All other uses must receive prior permission -# from Landon Curt Noll and Larry Bassel. - - -SHELL=/bin/sh -CHMOD=chmod -CP=cp -RM=rm -SED=sed -LN=ln -UNIQ=uniq -CB=cb -GREP=grep -# set this to where your C Processor resides +# An Historical Makefile NOTE: # -# On some systems: -# CPP=/lib/cpp +# The orig.Makefile, if it exits, is the original Makefile before this IOCCC +# year directory was reworked so that entries are in separate directories. +# This also applies to any orig.ansi.mk and orig.common.mk files. # -CPP=/usr/ccs/lib/acpp - -# flags for ansi compiles +# Several Makefiles were modified / formed in 2022, and as such it may have +# elements that are not historically compatible with way entries were built. +# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile. # -# NOTE: Some ANSI compilers make use of -Xa to turn on ANSI mode, -# others such as gcc may want -ansi, others may want nothing -# at all. Adjust the CFLAGS line as needed. +# Regarding individual entries: # -# NOTE: Some compilers cannot optimize, or optimize some entries -# entries incorrectly. You might want need to turn on -O -# to see if your compiler can handle them. +# IOCCC winning entry code may not work on your system. Even with standards, +# conditions and build environments change, especially when it comes to more +# extreme code such you might find in an IOCCC winner. Moreover, what was +# allowed and liked in one IOCCC contest may no longer be liked/allowed in +# later IOCCC years. # -#CFLAGS=-O -Xa -CFLAGS=-Xa -CC=cc - -# misc shell babble +# Corrections on winning author and fixing typos in remarks are VERY WELCOME. # -NOINCLUDE=$(SED) -e 's/^.\([ ]*\)include/%include/' -SPACECLEAN=$(SED) -e 's/\([^ ]\)\([ ]\)[ ][ ]*/\1\2/g' -CPPCLEAN=$(GREP) -v '^. [0-9][0-9]*' - -# winners that compile under ANSI C +# GitHub pull requests are welcome: # -WINNERS= adrian albert ant buzzard.1 buzzard.2 gson kivinen imc \ - lush marangon nathan vern westley -ALT_NAMES= adgrep am babble first ag whereami - -all: $(WINNERS) $(ALT_NAMES) - -adrian: adrian.c - $(CC) $(CFLAGS) adrian.c -o adrian - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c - $(SED) '1s/\..*\./. wc ./' adrian.c > ad.temp - -./adrian ad.temp adwc.c - $(CC) -o adwc adwc.c - $(SED) '1s/\..*\./. basename ./' adrian.c > ad.temp - -./adrian ad.temp adbasename.c - $(CC) -o adbasename adbasename.c - $(SED) '1s/\..*\./. echo| ./' adrian.c > ad.temp - -./adrian ad.temp adecho.c - $(CC) -o adecho adecho.c - $(SED) '1s/\..*\./. head; ./' adrian.c > ad.temp - -./adrian ad.temp adhead.c - $(CC) -o adhead adhead.c - $(SED) '1s/\..*\./. sleep ./' adrian.c > ad.temp - -./adrian ad.temp adsleep.c - $(CC) -o adsleep adsleep.c - $(RM) -f ad.temp - -# NOTE: this is the original source that won +# If you have a patch that might make running an entry work in modern Unix-like +# environments, please create a GitHub pull request for the IOCCC judges to +# consider. # -adrian.orig: adrian.orig.c - $(CC) $(CFLAGS) adrian.orig.c -o adrian.orig - -albert: albert.c - $(CC) $(CFLAGS) albert.c -o albert - -# NOTE: this is the original source that won +# Suggestions and corrections regarding Makefiles, winning author information, +# fixing typos in remarks, and code patches are welcome via opening a GitHub +# issue or better yet, by creating a GitHub pull request for the IOCCC judges +# to consider. To form a GitHub issue or GitHub pull, please visit: # -albert.orig: albert.orig.c - $(CC) $(CFLAGS) albert.orig.c -o albert.orig - -ant: ant.c - $(CC) $(CFLAGS) ant.c -o ant - -buzzard.1: buzzard.1.c - $(CC) $(CFLAGS) buzzard.1.c -o buzzard.1 - -babble.cppcb: buzzard.1.c - $(NOINCLUDE) buzzard.1.c | \ - $(CPP) $(CPPFLAGS) | \ - $(CPPCLEAN) | \ - $(CB) $(CBFLAGS) | \ - $(UNIQ) | \ - $(SPACECLEAN) > babble.cppcb 2>&1 - -buzzard.2: buzzard.2.c - $(CC) $(CFLAGS) buzzard.2.c -o buzzard.2 - -# NOTE: this is the original source that won +# https://github.com/ioccc-src/winner # -buzzard.2.orig: buzzard.2.orig.c - $(CC) $(CFLAGS) buzzard.2.orig.c -o buzzard.2.orig +################################################################################ -gson: gson.c - $(CC) $(CFLAGS) gson.c -o gson - -# NOTE: some systems may only need: +# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under: # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 +# Creative Commons Attribution-ShareAlike 3.0 Unported License. # -kivinen: kivinen.c - $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 -lsocket -lresolv -lnsl +# See: http://creativecommons.org/licenses/by-sa/3.0/ -# NOTE: this is the original program that won + +############################# +# shell used by this Makefile +############################# # -# NOTE: some systems may only need: +SHELL= bash + +####################### +# common tool locations +####################### # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 +A2P= a2p +AR= ar +ASA= asa +AT= at +ATQ= atq +ATRM= atrm +AWK= awk +BANNER= banner +BASE64= base64 +BASENAME= basename +BATCH= batch +BC= bc +BINHEX= binhex +BISON= bison +BUNZIP2= bunzip2 +BZCAT= bzcat +BZCMP= bzcmp +BZDIFF= bzdiff +BZEGREP= bzegrep +BZFGREP= bzfgrep +BZGREP= bzgrep +BZIP2= bzip2 +BZLESS= bzless +BZMORE= bzmore +C2PH= c2ph +C89= c89 +C99= c99 +CAL= cal +CALC= calc +CAT= cat +CD= cd +CHFLAGS= chflags +CHGRP= chgrp +CHMOD= chmod +CKSUM= cksum +CLANG= clang +CLANG_PLUSPLUS= clang++ +CLEAR= clear +CMP= cmp +COL= col +COLLDEF= colldef +COLRM= colrm +COLUMN= column +COMPRESS= compress +CP= cp +CPIO= cpio +CPP= cpp +CRC32= crc32 +CSH= csh +CSPLIT= csplit +CURL= curl +CUT= cut +C_PLUSPLUS= c++ +C_PLUSPLUS_FILT= c++filt +DATE= date +DC= dc +DD= dd +DF= df +DIFF3= diff3 +DIFF= diff +DIG= dig +DIRNAME= dirname +ED= ed +EGREP= egrep +ENV= env +EQN= eqn +ETAGS= etags +EXPECT= expect +EXPR= expr +FALSE= false +FGREP= fgrep +FILE= file +FIND2PERL= find2perl +FIND= find +FLEX= flex +FLEX_PLUSPLUS= flex++ +FMT= fmt +FOLD= fold +FS_USAGE= fs_usage +FUNZIP= funzip +FUSER= fuser +GCC= gcc +GDIFFMK= gdiffmk +GENCAT= gencat +GENSTRINGS= genstrings +GETOPT= getopt +GETOPTS= getopts +GINDENT= gindent +GNUMAKE= gnumake +GREP= grep +GROFF= groff +GROFFER= groffer +GROG= grog +GROPS= grops +GROTTY= grotty +GUNZIP= gunzip +GVIM= gvim +GZCAT= gzcat +GZEXE= gzexe +GZIP_PROG= gzip +G_PLUSPLUS= g++ +H2PH= h2ph +H2XS= h2xs +HASH= hash +HEAD= head +HOSTNAME_PROG= hostname +ICONV= iconv +ID= id +INDENT= indent +INFO= info +JOT= jot +KILL= kill +KSH= ksh +LAST= last +LD= ld +LESSECHO= lessecho +LEX= len +LINK= link +LN= ln +LS= ls +M4= m4 +MAKE= make +MAN= man +MKDIR= mkdir +MKFIFO= mkfifo +MKTEMP= mktemp +MV= mv +NANO= nano +NASM= nasm +NEQN= neqn +NICE= nice +NL= nl +NM= nm +NOHUP= nohup +NROFF= nroff +NSLOOKUP= nslookup +OD= od +OPENSSL= openssl +PASTE= paste +PATCH= patch +PATHCHK= pathchk +PAX= pax +PERL= perl +PICO= pico +PR= pr +PRINTENV= printenv +PS= ps +PTAR= ptar +PTARDIFF= ptardiff +PTARGREP= ptargrep +PWD= pwd +PYDOC= pydoc +PYTHON= python +PYTHONW= pythonw +READLINK= readlink +RENICE= renice +RESET= reset +REV= rev +RI= ri +RM= rm +RMDIR= rmdir +RSYNC= rsync +RUBY= ruby +RVIM= rvim +SAY= say +SCP= scp +SCREEN= screen +SCRIPT= script +SDIFF= sdiff +SED= sed +SEQ= seq +SFTP= sftp +SH= sh +SHA1= sha1 +SHA= sha +SHAR= shar +SHASUM5_18= shasum5.18 +SHASUM= shasum +SIZE= size +SLEEP= sleep +SORT= sort +SSH= ssh +STAT= stat +STRIP= strip +STTY= stty +SUM= sum +SYNC= sync +TABS= tabs +TAIL= tail +TAR= tar +TEE= tee +TEST= test +TFTP= tftp +TIDY= tidy +TIME= time +TOP= top +TOUCH= touch +TPUT= tout +TPUT= tput +TR= tr +TROFF= troff +TRUE= true +TSET= tset +TSORT= tsort +UL= ul +UNAME= uname +UNCOMPRESS= uncompress +UNEXPAND= unexpand +UNIFDEF= unifdef +UNIFDEFALL= unifdefall +UNIQ= uniq +UNITS= units +UNLINK= unlink +UNZIP= unzip +UNZIPSFX= unzipsfx +UPTIME= uptime +UUDECODE= uudecode +UUENCODE= uuencode +UUIDGEN= uuidgen +VI= vi +VIEW= view +VIM= vim +VIMDIFF= vimdiff +W= w +WAIT4PATH= wait4path +WAIT= wait +WC= wc +WGET= wget +WHAT= what +WHATIS= whatis +WHICH= which +WHO= who +WHOAMI= whoami +WHOIS= whois +WRTIE= write +XAR= xar +XARGS= xargs +XATTR= xattr +XXD= xxd +YACC= yacc +YES= yes +ZCAT= zcat +ZCMP= zcmp +ZDIFF= zdiff +ZEGREP= zegrep +ZFGREP= zfgrep +ZFORCE= zforce +ZGREP= zgrep +ZIP= zip +ZIPCLOAK= zipcloak +ZIPGREp= zipgrep +ZIPINFo= zipinfo +ZIPNOTE= zipnote +ZIPSPLIT= zipsplit +ZLESS= zless +ZMORE= zmore +ZNEW= znew +ZPRINT= zprint +ZSH= zsh + +# Set X11_LIBDIR to the directory where the X11 library resides # -kivinen.orig: kivinen.orig.c - $(CC) $(CFLAGS) kivinen.orig.c -o kivinen.orig -lX11 \ - -lsocket -lresolv -lnsl +#X11_LIBDIR= /usr/X11R6/lib +#X11_LIBDIR= /usr/X11/lib +X11_LIBDIR= /opt/X11/lib -imc: imc.c - $(CC) $(CFLAGS) imc.c -o imc - -# NOTE: this is the original program that won +# Set X11_INCLUDEDIR to the directory where the X11 include files reside # -imc.orig: imc.orig.c - $(CC) $(CFLAGS) imc.orig.c -o imc.orig +#X11_INCDIR= /usr/X11R6/include +#X11_INCDIR= /usr/X11/include +X11_INCDIR= /opt/X11/include -lush: lush.c - $(CC) $(CFLAGS) lush.c -o lush - -lush.again: lush.c - $(CC) $(CFLAGS) lush.c -o lush.again - $(RM) -f lush.again - -# NOTE: this is the original program that won +# Common C compiler warnings to silence # -lush.orig: lush.orig.c - $(CC) $(CFLAGS) lush.orig.c -o lush.orig +#CSILENCE= +CSILENCE= -Wno-error -Wno-implicit-function-declaration -Wno-macro-redefined -# NOTE: some systems may need: +# Common C compiler warning flags # -# $(CC) $(CFLAGS) marangon.c -o marangon -lcurses -ltermcap +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # -marangon: marangon.c - $(CC) $(CFLAGS) marangon.c -o marangon -lcurses +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu90 -# NOTE: this is the original program that won +# Compiler bit architecture # -# NOTE: some systems may need: +# Some entries require 32-bitness: +# ARCH= -m32 # -# $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses -ltermcap +# Some entries require 64-bitness: +# ARCH= -m64 # -marangon.orig: marangon.orig.c - $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses - -nathan: nathan.c - $(CC) $(CFLAGS) nathan.c -o nathan - -# NOTE: this is the original program that won +# By default we assume nothing: # -nathan.orig: nathan.orig.c - $(CC) $(CFLAGS) nathan.orig.c -o nathan.orig +ARCH= -vern: vern.tmp.c - $(CC) $(CFLAGS) vern.tmp.c -o vern - -vern.tmp.c: vern.c - $(RM) -f vern.tmp.c - $(SED) vern.tmp.c - -# NOTE: this is the original program that won +# Defines that are needed to compile # -vern.orig: vern.orig.tmp.c - $(CC) $(CFLAGS) vern.orig.tmp.c -o vern.orig +CDEFINE= +#CDEFINE= -DIOCCC -vern.orig.tmp.c: vern.orig.c - $(RM) -f vern.orig.tmp.c - $(SED) vern.orig.tmp.c - -westley: westley.c - $(CC) $(CFLAGS) westley.c -o westley - -# alternate names for selected entries +# Include files that are needed to compile # -adgrep: adrian - $(RM) -f adgrep - $(LN) adrian adgrep -am: ant - $(RM) -f am - $(LN) ant am -babble: buzzard.1 - $(RM) -f babble - $(LN) buzzard.1 babble -first: buzzard.2 - $(RM) -f first - $(LN) buzzard.2 first -ag: gson - $(RM) -f ag - $(LN) gson ag -whereami: westley - $(RM) -f whereami - $(LN) westley whereami +CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 +# Optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# Default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +LIBS= +#LIBS= -lm +#LIBS= -L ${X11_LIBDIR} -lX11 +#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL + +# C compiler to use +# +CC= cc +#CC=clang +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-missing-variable-declarations \ + -Wno-poison-system-directories -Wno-unused-macros +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif + + +############################## +# Special flags for this entry +############################## +# +ENTRY= lush +PROG= ${ENTRY} +# +OBJ= ${PROG}.o +DATA= +TARGET= ${PROG} +# +ALT_OBJ= +ALT_TARGET= + + +################# +# build the entry +################# +# +all: data ${TARGET} + @${TRUE} + +.PHONY: all alt data everything clean clobber install \ + love haste waste maker easter_egg sandwich \ + supernova deep_magic magic charon pluto + +${PROG}: ${PROG}.c + @echo "NOTE: This entry requires a non-standard K&R C compiler to compile." + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + +lush.again: ${PROG}.c + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + ${RM} -f $@ + +# alternative executable +# +alt: data ${ALT_TARGET} + @${TRUE} + +# data files +# +data: ${DATA} + @${TRUE} + +# both all and alt +# +everything: all alt + + +############### +# utility rules +############### +# clean: - $(RM) -f *.o a.out core - $(RM) -f vern.tmp.c lush.again babble.cppcb vern.orig.tmp.c - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c + ${RM} -f ${OBJ} ${ALT_OBJ} + ${RM} -f lush.again + @-if [ -f indent.c ]; then \ + echo ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi clobber: clean - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig + ${RM} -f ${TARGET} ${ALT_TARGET} + @-if [ -e sandwich ]; then \ + ${RM} -f sandwich; \ + echo 'ate sandwich'; \ + fi -am_clobber: clean am - $(RM) -f am.safe - $(CP) am am.safe - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig - $(CP) am.safe am - $(RM) -f am.safe +install: + @echo "Dr. Spock says that is not logical!" + @${TRUE} -nuke: clobber - @true +# you may be able to misunderstand the source by reading indent.c +# +indent.c: ${PROG}.c + @if which "${GINDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${GINDENT} < $< > $@"; \ + ${GINDENT} < $< > $@; \ + elif which "${INDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${INDENT} < $< > $@"; \ + ${INDENT} < $< > $@; \ + else \ + echo "no intent tool found, ident $< yourself, sorry"; \ + echo "exit 1"; \ + exit 1; \ + fi -install: all - cat $(WINNERS) > /dev/null + +################## +# 133t hacker rulz +################## +# +love: + @echo 'not war?' + @${TRUE} + +haste: + $(MAKE) waste + @${TRUE} + +waste: + @echo 'haste' + @${TRUE} + +maker: + @echo 'Participate in a maker faire' + @${TRUE} + +easter_egg: + @echo "you expected to often misunderstand this $${RANDOM} magic" + @echo "chongo '' /\\oo/\\" + @echo "Eggy" + +sandwich: easter_egg + @if [ `id -u` -eq 0 ]; then \ + echo 'Okay.'; \ + echo "$${RANDOM}`date +%s`$${RANDOM}" > $@; \ + else \ + echo 'What? Make it yourself.'; \ + exit 1; \ + fi + +# Understand the history of the Homebrew Computer Club +# as well as the West Coast Computer Faire and +# you might be confused different. :-) +# +supernova: sandwich + @-if [ -r .code_anal ]; then \ + ${RM} -f .code_anal_v6; \ + else \ + echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \ + fi + @echo "A $@ helps ${MAKE} the elements that help form planets" + @${TRUE} + +deep_magic: supernova + @-if [ -r .code_anal ]; then \ + ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 \ + --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + fi + @${TRUE} + +magic: deep_magic + @-if [ -r .code_anal ]; then \ + ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "If you don't eat yer meat, you can't have any pudding!"; \ + echo "How can you have any pudding if you don't eat yer meat?!"; \ + fi + @${TRUE} + +# The IOCCC resident astronomer states +# +charon: magic + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore IAU, $@ is a planet" + +pluto: charon + ${MAKE} charon + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore, $@ is a planet" + @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" diff --git a/1992/lush/README.md b/1992/lush/README.md index e85fcb723..f31d7d20c 100644 --- a/1992/lush/README.md +++ b/1992/lush/README.md @@ -1,27 +1,27 @@ -Worst Abuse of the C Preprocessor: +# Worst Abuse of the C Preprocessor: Ed Luke Mississippi State University P.O. Box 6176 Mississippi State, MS 39762, USA +## To build: -Judges' comments: + make all - To setup: - make lush - - Try: - make lush.again 2>&1 | lush (sh or ksh users) - or: - make lush.again |& lush (csh users) +### To run + + make lush.again 2>&1 | ./lush + + NOTE: This entry requires a non-standard K&R C compiler to compile. + +## Judges' comments The program uses error messages issued by the C Proproessor to generate its message to the world. One program's error is another program's data! - -Selected notes from the author: +## Author's comments This program is yet another "Hello World." program with a twist. The string Hello World has been encoded in the error messages the compiler diff --git a/1992/marangon/Makefile b/1992/marangon/Makefile index 2eb115d13..3b66bba1e 100644 --- a/1992/marangon/Makefile +++ b/1992/marangon/Makefile @@ -1,244 +1,597 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1992 makefile +# IOCCC 1992 winning entry - marangon + +################################################################################ # -# Copyright (c) 1992, Landon Curt Noll & Larry Bassel. -# All Rights Reserved. Permission for personal, educational or non-profit -# use is granted provided this this copyright and notice are included in its -# entirety and remains unaltered. All other uses must receive prior permission -# from Landon Curt Noll and Larry Bassel. - - -SHELL=/bin/sh -CHMOD=chmod -CP=cp -RM=rm -SED=sed -LN=ln -UNIQ=uniq -CB=cb -GREP=grep -# set this to where your C Processor resides +# An Historical Makefile NOTE: # -# On some systems: -# CPP=/lib/cpp +# The orig.Makefile, if it exits, is the original Makefile before this IOCCC +# year directory was reworked so that entries are in separate directories. +# This also applies to any orig.ansi.mk and orig.common.mk files. # -CPP=/usr/ccs/lib/acpp - -# flags for ansi compiles +# Several Makefiles were modified / formed in 2022, and as such it may have +# elements that are not historically compatible with way entries were built. +# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile. # -# NOTE: Some ANSI compilers make use of -Xa to turn on ANSI mode, -# others such as gcc may want -ansi, others may want nothing -# at all. Adjust the CFLAGS line as needed. +# Regarding individual entries: # -# NOTE: Some compilers cannot optimize, or optimize some entries -# entries incorrectly. You might want need to turn on -O -# to see if your compiler can handle them. +# IOCCC winning entry code may not work on your system. Even with standards, +# conditions and build environments change, especially when it comes to more +# extreme code such you might find in an IOCCC winner. Moreover, what was +# allowed and liked in one IOCCC contest may no longer be liked/allowed in +# later IOCCC years. # -#CFLAGS=-O -Xa -CFLAGS=-Xa -CC=cc - -# misc shell babble +# Corrections on winning author and fixing typos in remarks are VERY WELCOME. # -NOINCLUDE=$(SED) -e 's/^.\([ ]*\)include/%include/' -SPACECLEAN=$(SED) -e 's/\([^ ]\)\([ ]\)[ ][ ]*/\1\2/g' -CPPCLEAN=$(GREP) -v '^. [0-9][0-9]*' - -# winners that compile under ANSI C +# GitHub pull requests are welcome: # -WINNERS= adrian albert ant buzzard.1 buzzard.2 gson kivinen imc \ - lush marangon nathan vern westley -ALT_NAMES= adgrep am babble first ag whereami - -all: $(WINNERS) $(ALT_NAMES) - -adrian: adrian.c - $(CC) $(CFLAGS) adrian.c -o adrian - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c - $(SED) '1s/\..*\./. wc ./' adrian.c > ad.temp - -./adrian ad.temp adwc.c - $(CC) -o adwc adwc.c - $(SED) '1s/\..*\./. basename ./' adrian.c > ad.temp - -./adrian ad.temp adbasename.c - $(CC) -o adbasename adbasename.c - $(SED) '1s/\..*\./. echo| ./' adrian.c > ad.temp - -./adrian ad.temp adecho.c - $(CC) -o adecho adecho.c - $(SED) '1s/\..*\./. head; ./' adrian.c > ad.temp - -./adrian ad.temp adhead.c - $(CC) -o adhead adhead.c - $(SED) '1s/\..*\./. sleep ./' adrian.c > ad.temp - -./adrian ad.temp adsleep.c - $(CC) -o adsleep adsleep.c - $(RM) -f ad.temp - -# NOTE: this is the original source that won +# If you have a patch that might make running an entry work in modern Unix-like +# environments, please create a GitHub pull request for the IOCCC judges to +# consider. # -adrian.orig: adrian.orig.c - $(CC) $(CFLAGS) adrian.orig.c -o adrian.orig - -albert: albert.c - $(CC) $(CFLAGS) albert.c -o albert - -# NOTE: this is the original source that won +# Suggestions and corrections regarding Makefiles, winning author information, +# fixing typos in remarks, and code patches are welcome via opening a GitHub +# issue or better yet, by creating a GitHub pull request for the IOCCC judges +# to consider. To form a GitHub issue or GitHub pull, please visit: # -albert.orig: albert.orig.c - $(CC) $(CFLAGS) albert.orig.c -o albert.orig - -ant: ant.c - $(CC) $(CFLAGS) ant.c -o ant - -buzzard.1: buzzard.1.c - $(CC) $(CFLAGS) buzzard.1.c -o buzzard.1 - -babble.cppcb: buzzard.1.c - $(NOINCLUDE) buzzard.1.c | \ - $(CPP) $(CPPFLAGS) | \ - $(CPPCLEAN) | \ - $(CB) $(CBFLAGS) | \ - $(UNIQ) | \ - $(SPACECLEAN) > babble.cppcb 2>&1 - -buzzard.2: buzzard.2.c - $(CC) $(CFLAGS) buzzard.2.c -o buzzard.2 - -# NOTE: this is the original source that won +# https://github.com/ioccc-src/winner # -buzzard.2.orig: buzzard.2.orig.c - $(CC) $(CFLAGS) buzzard.2.orig.c -o buzzard.2.orig +################################################################################ -gson: gson.c - $(CC) $(CFLAGS) gson.c -o gson - -# NOTE: some systems may only need: +# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under: # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 +# Creative Commons Attribution-ShareAlike 3.0 Unported License. # -kivinen: kivinen.c - $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 -lsocket -lresolv -lnsl +# See: http://creativecommons.org/licenses/by-sa/3.0/ -# NOTE: this is the original program that won + +############################# +# shell used by this Makefile +############################# # -# NOTE: some systems may only need: +SHELL= bash + +####################### +# common tool locations +####################### # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 +A2P= a2p +AR= ar +ASA= asa +AT= at +ATQ= atq +ATRM= atrm +AWK= awk +BANNER= banner +BASE64= base64 +BASENAME= basename +BATCH= batch +BC= bc +BINHEX= binhex +BISON= bison +BUNZIP2= bunzip2 +BZCAT= bzcat +BZCMP= bzcmp +BZDIFF= bzdiff +BZEGREP= bzegrep +BZFGREP= bzfgrep +BZGREP= bzgrep +BZIP2= bzip2 +BZLESS= bzless +BZMORE= bzmore +C2PH= c2ph +C89= c89 +C99= c99 +CAL= cal +CALC= calc +CAT= cat +CD= cd +CHFLAGS= chflags +CHGRP= chgrp +CHMOD= chmod +CKSUM= cksum +CLANG= clang +CLANG_PLUSPLUS= clang++ +CLEAR= clear +CMP= cmp +COL= col +COLLDEF= colldef +COLRM= colrm +COLUMN= column +COMPRESS= compress +CP= cp +CPIO= cpio +CPP= cpp +CRC32= crc32 +CSH= csh +CSPLIT= csplit +CURL= curl +CUT= cut +C_PLUSPLUS= c++ +C_PLUSPLUS_FILT= c++filt +DATE= date +DC= dc +DD= dd +DF= df +DIFF3= diff3 +DIFF= diff +DIG= dig +DIRNAME= dirname +ED= ed +EGREP= egrep +ENV= env +EQN= eqn +ETAGS= etags +EXPECT= expect +EXPR= expr +FALSE= false +FGREP= fgrep +FILE= file +FIND2PERL= find2perl +FIND= find +FLEX= flex +FLEX_PLUSPLUS= flex++ +FMT= fmt +FOLD= fold +FS_USAGE= fs_usage +FUNZIP= funzip +FUSER= fuser +GCC= gcc +GDIFFMK= gdiffmk +GENCAT= gencat +GENSTRINGS= genstrings +GETOPT= getopt +GETOPTS= getopts +GINDENT= gindent +GNUMAKE= gnumake +GREP= grep +GROFF= groff +GROFFER= groffer +GROG= grog +GROPS= grops +GROTTY= grotty +GUNZIP= gunzip +GVIM= gvim +GZCAT= gzcat +GZEXE= gzexe +GZIP_PROG= gzip +G_PLUSPLUS= g++ +H2PH= h2ph +H2XS= h2xs +HASH= hash +HEAD= head +HOSTNAME_PROG= hostname +ICONV= iconv +ID= id +INDENT= indent +INFO= info +JOT= jot +KILL= kill +KSH= ksh +LAST= last +LD= ld +LESSECHO= lessecho +LEX= len +LINK= link +LN= ln +LS= ls +M4= m4 +MAKE= make +MAN= man +MKDIR= mkdir +MKFIFO= mkfifo +MKTEMP= mktemp +MV= mv +NANO= nano +NASM= nasm +NEQN= neqn +NICE= nice +NL= nl +NM= nm +NOHUP= nohup +NROFF= nroff +NSLOOKUP= nslookup +OD= od +OPENSSL= openssl +PASTE= paste +PATCH= patch +PATHCHK= pathchk +PAX= pax +PERL= perl +PICO= pico +PR= pr +PRINTENV= printenv +PS= ps +PTAR= ptar +PTARDIFF= ptardiff +PTARGREP= ptargrep +PWD= pwd +PYDOC= pydoc +PYTHON= python +PYTHONW= pythonw +READLINK= readlink +RENICE= renice +RESET= reset +REV= rev +RI= ri +RM= rm +RMDIR= rmdir +RSYNC= rsync +RUBY= ruby +RVIM= rvim +SAY= say +SCP= scp +SCREEN= screen +SCRIPT= script +SDIFF= sdiff +SED= sed +SEQ= seq +SFTP= sftp +SH= sh +SHA1= sha1 +SHA= sha +SHAR= shar +SHASUM5_18= shasum5.18 +SHASUM= shasum +SIZE= size +SLEEP= sleep +SORT= sort +SSH= ssh +STAT= stat +STRIP= strip +STTY= stty +SUM= sum +SYNC= sync +TABS= tabs +TAIL= tail +TAR= tar +TEE= tee +TEST= test +TFTP= tftp +TIDY= tidy +TIME= time +TOP= top +TOUCH= touch +TPUT= tout +TPUT= tput +TR= tr +TROFF= troff +TRUE= true +TSET= tset +TSORT= tsort +UL= ul +UNAME= uname +UNCOMPRESS= uncompress +UNEXPAND= unexpand +UNIFDEF= unifdef +UNIFDEFALL= unifdefall +UNIQ= uniq +UNITS= units +UNLINK= unlink +UNZIP= unzip +UNZIPSFX= unzipsfx +UPTIME= uptime +UUDECODE= uudecode +UUENCODE= uuencode +UUIDGEN= uuidgen +VI= vi +VIEW= view +VIM= vim +VIMDIFF= vimdiff +W= w +WAIT4PATH= wait4path +WAIT= wait +WC= wc +WGET= wget +WHAT= what +WHATIS= whatis +WHICH= which +WHO= who +WHOAMI= whoami +WHOIS= whois +WRTIE= write +XAR= xar +XARGS= xargs +XATTR= xattr +XXD= xxd +YACC= yacc +YES= yes +ZCAT= zcat +ZCMP= zcmp +ZDIFF= zdiff +ZEGREP= zegrep +ZFGREP= zfgrep +ZFORCE= zforce +ZGREP= zgrep +ZIP= zip +ZIPCLOAK= zipcloak +ZIPGREp= zipgrep +ZIPINFo= zipinfo +ZIPNOTE= zipnote +ZIPSPLIT= zipsplit +ZLESS= zless +ZMORE= zmore +ZNEW= znew +ZPRINT= zprint +ZSH= zsh + +# Set X11_LIBDIR to the directory where the X11 library resides # -kivinen.orig: kivinen.orig.c - $(CC) $(CFLAGS) kivinen.orig.c -o kivinen.orig -lX11 \ - -lsocket -lresolv -lnsl +#X11_LIBDIR= /usr/X11R6/lib +#X11_LIBDIR= /usr/X11/lib +X11_LIBDIR= /opt/X11/lib -imc: imc.c - $(CC) $(CFLAGS) imc.c -o imc - -# NOTE: this is the original program that won +# Set X11_INCLUDEDIR to the directory where the X11 include files reside # -imc.orig: imc.orig.c - $(CC) $(CFLAGS) imc.orig.c -o imc.orig +#X11_INCDIR= /usr/X11R6/include +#X11_INCDIR= /usr/X11/include +X11_INCDIR= /opt/X11/include -lush: lush.c - $(CC) $(CFLAGS) lush.c -o lush - -lush.again: lush.c - $(CC) $(CFLAGS) lush.c -o lush.again - $(RM) -f lush.again - -# NOTE: this is the original program that won +# Common C compiler warnings to silence # -lush.orig: lush.orig.c - $(CC) $(CFLAGS) lush.orig.c -o lush.orig +#CSILENCE= +CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \ + -Wno-logical-op-parentheses -Wno-main-return-type -Wno-missing-braces \ + -Wno-parentheses -Wno-return-type -Wno-tautological-bitwise-compare \ + -Wno-unsequenced -# NOTE: some systems may need: +# Common C compiler warning flags # -# $(CC) $(CFLAGS) marangon.c -o marangon -lcurses -ltermcap +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # -marangon: marangon.c - $(CC) $(CFLAGS) marangon.c -o marangon -lcurses +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu90 -# NOTE: this is the original program that won +# Compiler bit architecture # -# NOTE: some systems may need: +# Some entries require 32-bitness: +# ARCH= -m32 # -# $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses -ltermcap +# Some entries require 64-bitness: +# ARCH= -m64 # -marangon.orig: marangon.orig.c - $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses - -nathan: nathan.c - $(CC) $(CFLAGS) nathan.c -o nathan - -# NOTE: this is the original program that won +# By default we assume nothing: # -nathan.orig: nathan.orig.c - $(CC) $(CFLAGS) nathan.orig.c -o nathan.orig +ARCH= -vern: vern.tmp.c - $(CC) $(CFLAGS) vern.tmp.c -o vern - -vern.tmp.c: vern.c - $(RM) -f vern.tmp.c - $(SED) vern.tmp.c - -# NOTE: this is the original program that won +# Defines that are needed to compile # -vern.orig: vern.orig.tmp.c - $(CC) $(CFLAGS) vern.orig.tmp.c -o vern.orig +CDEFINE= +#CDEFINE= -DIOCCC -vern.orig.tmp.c: vern.orig.c - $(RM) -f vern.orig.tmp.c - $(SED) vern.orig.tmp.c - -westley: westley.c - $(CC) $(CFLAGS) westley.c -o westley - -# alternate names for selected entries +# Include files that are needed to compile # -adgrep: adrian - $(RM) -f adgrep - $(LN) adrian adgrep -am: ant - $(RM) -f am - $(LN) ant am -babble: buzzard.1 - $(RM) -f babble - $(LN) buzzard.1 babble -first: buzzard.2 - $(RM) -f first - $(LN) buzzard.2 first -ag: gson - $(RM) -f ag - $(LN) gson ag -whereami: westley - $(RM) -f whereami - $(LN) westley whereami +CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 +# Optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# Default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +#LIBS= +LIBS= -lcurses +#LIBS= -L ${X11_LIBDIR} -lX11 +#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL + +# C compiler to use +# +CC= cc +#CC=clang +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-missing-prototypes -Wno-missing-variable-declarations \ + -Wno-poison-system-directories -Wno-strict-prototypes -Wno-unreachable-code +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif + + +############################## +# Special flags for this entry +############################## +# +ENTRY= marangon +PROG= ${ENTRY} +# +OBJ= ${PROG}.o +DATA= +TARGET= ${PROG} +# +ALT_OBJ= +ALT_TARGET= + + +################# +# build the entry +################# +# +all: data ${TARGET} + @${TRUE} + +.PHONY: all alt data everything clean clobber install \ + love haste waste maker easter_egg sandwich \ + supernova deep_magic magic charon pluto + +${PROG}: ${PROG}.c + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + +# alternative executable +# +alt: data ${ALT_TARGET} + @${TRUE} + +# data files +# +data: ${DATA} + @${TRUE} + +# both all and alt +# +everything: all alt + + +############### +# utility rules +############### +# clean: - $(RM) -f *.o a.out core - $(RM) -f vern.tmp.c lush.again babble.cppcb vern.orig.tmp.c - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + echo ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi clobber: clean - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig + ${RM} -f ${TARGET} ${ALT_TARGET} + @-if [ -e sandwich ]; then \ + ${RM} -f sandwich; \ + echo 'ate sandwich'; \ + fi -am_clobber: clean am - $(RM) -f am.safe - $(CP) am am.safe - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig - $(CP) am.safe am - $(RM) -f am.safe +install: + @echo "Dr. Spock says that is not logical!" + @${TRUE} -nuke: clobber - @true +# you may be able to misunderstand the source by reading indent.c +# +indent.c: ${PROG}.c + @if which "${GINDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${GINDENT} < $< > $@"; \ + ${GINDENT} < $< > $@; \ + elif which "${INDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${INDENT} < $< > $@"; \ + ${INDENT} < $< > $@; \ + else \ + echo "no intent tool found, ident $< yourself, sorry"; \ + echo "exit 1"; \ + exit 1; \ + fi -install: all - cat $(WINNERS) > /dev/null + +################## +# 133t hacker rulz +################## +# +love: + @echo 'not war?' + @${TRUE} + +haste: + $(MAKE) waste + @${TRUE} + +waste: + @echo 'haste' + @${TRUE} + +maker: + @echo 'Participate in a maker faire' + @${TRUE} + +easter_egg: + @echo "you expected to often misunderstand this $${RANDOM} magic" + @echo "chongo '' /\\oo/\\" + @echo "Eggy" + +sandwich: easter_egg + @if [ `id -u` -eq 0 ]; then \ + echo 'Okay.'; \ + echo "$${RANDOM}`date +%s`$${RANDOM}" > $@; \ + else \ + echo 'What? Make it yourself.'; \ + exit 1; \ + fi + +# Understand the history of the Homebrew Computer Club +# as well as the West Coast Computer Faire and +# you might be confused different. :-) +# +supernova: sandwich + @-if [ -r .code_anal ]; then \ + ${RM} -f .code_anal_v6; \ + else \ + echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \ + fi + @echo "A $@ helps ${MAKE} the elements that help form planets" + @${TRUE} + +deep_magic: supernova + @-if [ -r .code_anal ]; then \ + ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 \ + --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + fi + @${TRUE} + +magic: deep_magic + @-if [ -r .code_anal ]; then \ + ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "If you don't eat yer meat, you can't have any pudding!"; \ + echo "How can you have any pudding if you don't eat yer meat?!"; \ + fi + @${TRUE} + +# The IOCCC resident astronomer states +# +charon: magic + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore IAU, $@ is a planet" + +pluto: charon + ${MAKE} charon + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore, $@ is a planet" + @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" diff --git a/1992/marangon/README.md b/1992/marangon/README.md index edd3cab06..b3a39ed4e 100644 --- a/1992/marangon/README.md +++ b/1992/marangon/README.md @@ -1,4 +1,4 @@ -Best Game: +# Best Game: Marangoni Andrea Department of Computer Science at Milano @@ -6,10 +6,15 @@ Best Game: 62014 Corridonia (MC) Italy +## To build: -Judges' comments: + make all - Make and run. +### To run + + ./marangon + +## Judges' comments The object is to refill the table with 5's, by incrementing or decrementing numbers as needed. It is the side effects @@ -25,8 +30,7 @@ Judges' comments: systems where exit returned a void. The file marangon.c avoids this problem. - -Selected notes from the author: +## Author's comments It starts off by creating a table with number 5 in all places. The CPU melts the numbers and you must return them in original state. diff --git a/1992/nathan/Makefile b/1992/nathan/Makefile index 2eb115d13..cca692254 100644 --- a/1992/nathan/Makefile +++ b/1992/nathan/Makefile @@ -1,244 +1,593 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1992 makefile +# IOCCC 1992 winning entry - nathan + +################################################################################ # -# Copyright (c) 1992, Landon Curt Noll & Larry Bassel. -# All Rights Reserved. Permission for personal, educational or non-profit -# use is granted provided this this copyright and notice are included in its -# entirety and remains unaltered. All other uses must receive prior permission -# from Landon Curt Noll and Larry Bassel. - - -SHELL=/bin/sh -CHMOD=chmod -CP=cp -RM=rm -SED=sed -LN=ln -UNIQ=uniq -CB=cb -GREP=grep -# set this to where your C Processor resides +# An Historical Makefile NOTE: # -# On some systems: -# CPP=/lib/cpp +# The orig.Makefile, if it exits, is the original Makefile before this IOCCC +# year directory was reworked so that entries are in separate directories. +# This also applies to any orig.ansi.mk and orig.common.mk files. # -CPP=/usr/ccs/lib/acpp - -# flags for ansi compiles +# Several Makefiles were modified / formed in 2022, and as such it may have +# elements that are not historically compatible with way entries were built. +# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile. # -# NOTE: Some ANSI compilers make use of -Xa to turn on ANSI mode, -# others such as gcc may want -ansi, others may want nothing -# at all. Adjust the CFLAGS line as needed. +# Regarding individual entries: # -# NOTE: Some compilers cannot optimize, or optimize some entries -# entries incorrectly. You might want need to turn on -O -# to see if your compiler can handle them. +# IOCCC winning entry code may not work on your system. Even with standards, +# conditions and build environments change, especially when it comes to more +# extreme code such you might find in an IOCCC winner. Moreover, what was +# allowed and liked in one IOCCC contest may no longer be liked/allowed in +# later IOCCC years. # -#CFLAGS=-O -Xa -CFLAGS=-Xa -CC=cc - -# misc shell babble +# Corrections on winning author and fixing typos in remarks are VERY WELCOME. # -NOINCLUDE=$(SED) -e 's/^.\([ ]*\)include/%include/' -SPACECLEAN=$(SED) -e 's/\([^ ]\)\([ ]\)[ ][ ]*/\1\2/g' -CPPCLEAN=$(GREP) -v '^. [0-9][0-9]*' - -# winners that compile under ANSI C +# GitHub pull requests are welcome: # -WINNERS= adrian albert ant buzzard.1 buzzard.2 gson kivinen imc \ - lush marangon nathan vern westley -ALT_NAMES= adgrep am babble first ag whereami - -all: $(WINNERS) $(ALT_NAMES) - -adrian: adrian.c - $(CC) $(CFLAGS) adrian.c -o adrian - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c - $(SED) '1s/\..*\./. wc ./' adrian.c > ad.temp - -./adrian ad.temp adwc.c - $(CC) -o adwc adwc.c - $(SED) '1s/\..*\./. basename ./' adrian.c > ad.temp - -./adrian ad.temp adbasename.c - $(CC) -o adbasename adbasename.c - $(SED) '1s/\..*\./. echo| ./' adrian.c > ad.temp - -./adrian ad.temp adecho.c - $(CC) -o adecho adecho.c - $(SED) '1s/\..*\./. head; ./' adrian.c > ad.temp - -./adrian ad.temp adhead.c - $(CC) -o adhead adhead.c - $(SED) '1s/\..*\./. sleep ./' adrian.c > ad.temp - -./adrian ad.temp adsleep.c - $(CC) -o adsleep adsleep.c - $(RM) -f ad.temp - -# NOTE: this is the original source that won +# If you have a patch that might make running an entry work in modern Unix-like +# environments, please create a GitHub pull request for the IOCCC judges to +# consider. # -adrian.orig: adrian.orig.c - $(CC) $(CFLAGS) adrian.orig.c -o adrian.orig - -albert: albert.c - $(CC) $(CFLAGS) albert.c -o albert - -# NOTE: this is the original source that won +# Suggestions and corrections regarding Makefiles, winning author information, +# fixing typos in remarks, and code patches are welcome via opening a GitHub +# issue or better yet, by creating a GitHub pull request for the IOCCC judges +# to consider. To form a GitHub issue or GitHub pull, please visit: # -albert.orig: albert.orig.c - $(CC) $(CFLAGS) albert.orig.c -o albert.orig - -ant: ant.c - $(CC) $(CFLAGS) ant.c -o ant - -buzzard.1: buzzard.1.c - $(CC) $(CFLAGS) buzzard.1.c -o buzzard.1 - -babble.cppcb: buzzard.1.c - $(NOINCLUDE) buzzard.1.c | \ - $(CPP) $(CPPFLAGS) | \ - $(CPPCLEAN) | \ - $(CB) $(CBFLAGS) | \ - $(UNIQ) | \ - $(SPACECLEAN) > babble.cppcb 2>&1 - -buzzard.2: buzzard.2.c - $(CC) $(CFLAGS) buzzard.2.c -o buzzard.2 - -# NOTE: this is the original source that won +# https://github.com/ioccc-src/winner # -buzzard.2.orig: buzzard.2.orig.c - $(CC) $(CFLAGS) buzzard.2.orig.c -o buzzard.2.orig +################################################################################ -gson: gson.c - $(CC) $(CFLAGS) gson.c -o gson - -# NOTE: some systems may only need: +# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under: # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 +# Creative Commons Attribution-ShareAlike 3.0 Unported License. # -kivinen: kivinen.c - $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 -lsocket -lresolv -lnsl +# See: http://creativecommons.org/licenses/by-sa/3.0/ -# NOTE: this is the original program that won + +############################# +# shell used by this Makefile +############################# # -# NOTE: some systems may only need: +SHELL= bash + +####################### +# common tool locations +####################### # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 +A2P= a2p +AR= ar +ASA= asa +AT= at +ATQ= atq +ATRM= atrm +AWK= awk +BANNER= banner +BASE64= base64 +BASENAME= basename +BATCH= batch +BC= bc +BINHEX= binhex +BISON= bison +BUNZIP2= bunzip2 +BZCAT= bzcat +BZCMP= bzcmp +BZDIFF= bzdiff +BZEGREP= bzegrep +BZFGREP= bzfgrep +BZGREP= bzgrep +BZIP2= bzip2 +BZLESS= bzless +BZMORE= bzmore +C2PH= c2ph +C89= c89 +C99= c99 +CAL= cal +CALC= calc +CAT= cat +CD= cd +CHFLAGS= chflags +CHGRP= chgrp +CHMOD= chmod +CKSUM= cksum +CLANG= clang +CLANG_PLUSPLUS= clang++ +CLEAR= clear +CMP= cmp +COL= col +COLLDEF= colldef +COLRM= colrm +COLUMN= column +COMPRESS= compress +CP= cp +CPIO= cpio +CPP= cpp +CRC32= crc32 +CSH= csh +CSPLIT= csplit +CURL= curl +CUT= cut +C_PLUSPLUS= c++ +C_PLUSPLUS_FILT= c++filt +DATE= date +DC= dc +DD= dd +DF= df +DIFF3= diff3 +DIFF= diff +DIG= dig +DIRNAME= dirname +ED= ed +EGREP= egrep +ENV= env +EQN= eqn +ETAGS= etags +EXPECT= expect +EXPR= expr +FALSE= false +FGREP= fgrep +FILE= file +FIND2PERL= find2perl +FIND= find +FLEX= flex +FLEX_PLUSPLUS= flex++ +FMT= fmt +FOLD= fold +FS_USAGE= fs_usage +FUNZIP= funzip +FUSER= fuser +GCC= gcc +GDIFFMK= gdiffmk +GENCAT= gencat +GENSTRINGS= genstrings +GETOPT= getopt +GETOPTS= getopts +GINDENT= gindent +GNUMAKE= gnumake +GREP= grep +GROFF= groff +GROFFER= groffer +GROG= grog +GROPS= grops +GROTTY= grotty +GUNZIP= gunzip +GVIM= gvim +GZCAT= gzcat +GZEXE= gzexe +GZIP_PROG= gzip +G_PLUSPLUS= g++ +H2PH= h2ph +H2XS= h2xs +HASH= hash +HEAD= head +HOSTNAME_PROG= hostname +ICONV= iconv +ID= id +INDENT= indent +INFO= info +JOT= jot +KILL= kill +KSH= ksh +LAST= last +LD= ld +LESSECHO= lessecho +LEX= len +LINK= link +LN= ln +LS= ls +M4= m4 +MAKE= make +MAN= man +MKDIR= mkdir +MKFIFO= mkfifo +MKTEMP= mktemp +MV= mv +NANO= nano +NASM= nasm +NEQN= neqn +NICE= nice +NL= nl +NM= nm +NOHUP= nohup +NROFF= nroff +NSLOOKUP= nslookup +OD= od +OPENSSL= openssl +PASTE= paste +PATCH= patch +PATHCHK= pathchk +PAX= pax +PERL= perl +PICO= pico +PR= pr +PRINTENV= printenv +PS= ps +PTAR= ptar +PTARDIFF= ptardiff +PTARGREP= ptargrep +PWD= pwd +PYDOC= pydoc +PYTHON= python +PYTHONW= pythonw +READLINK= readlink +RENICE= renice +RESET= reset +REV= rev +RI= ri +RM= rm +RMDIR= rmdir +RSYNC= rsync +RUBY= ruby +RVIM= rvim +SAY= say +SCP= scp +SCREEN= screen +SCRIPT= script +SDIFF= sdiff +SED= sed +SEQ= seq +SFTP= sftp +SH= sh +SHA1= sha1 +SHA= sha +SHAR= shar +SHASUM5_18= shasum5.18 +SHASUM= shasum +SIZE= size +SLEEP= sleep +SORT= sort +SSH= ssh +STAT= stat +STRIP= strip +STTY= stty +SUM= sum +SYNC= sync +TABS= tabs +TAIL= tail +TAR= tar +TEE= tee +TEST= test +TFTP= tftp +TIDY= tidy +TIME= time +TOP= top +TOUCH= touch +TPUT= tout +TPUT= tput +TR= tr +TROFF= troff +TRUE= true +TSET= tset +TSORT= tsort +UL= ul +UNAME= uname +UNCOMPRESS= uncompress +UNEXPAND= unexpand +UNIFDEF= unifdef +UNIFDEFALL= unifdefall +UNIQ= uniq +UNITS= units +UNLINK= unlink +UNZIP= unzip +UNZIPSFX= unzipsfx +UPTIME= uptime +UUDECODE= uudecode +UUENCODE= uuencode +UUIDGEN= uuidgen +VI= vi +VIEW= view +VIM= vim +VIMDIFF= vimdiff +W= w +WAIT4PATH= wait4path +WAIT= wait +WC= wc +WGET= wget +WHAT= what +WHATIS= whatis +WHICH= which +WHO= who +WHOAMI= whoami +WHOIS= whois +WRTIE= write +XAR= xar +XARGS= xargs +XATTR= xattr +XXD= xxd +YACC= yacc +YES= yes +ZCAT= zcat +ZCMP= zcmp +ZDIFF= zdiff +ZEGREP= zegrep +ZFGREP= zfgrep +ZFORCE= zforce +ZGREP= zgrep +ZIP= zip +ZIPCLOAK= zipcloak +ZIPGREp= zipgrep +ZIPINFo= zipinfo +ZIPNOTE= zipnote +ZIPSPLIT= zipsplit +ZLESS= zless +ZMORE= zmore +ZNEW= znew +ZPRINT= zprint +ZSH= zsh + +# Set X11_LIBDIR to the directory where the X11 library resides # -kivinen.orig: kivinen.orig.c - $(CC) $(CFLAGS) kivinen.orig.c -o kivinen.orig -lX11 \ - -lsocket -lresolv -lnsl +#X11_LIBDIR= /usr/X11R6/lib +#X11_LIBDIR= /usr/X11/lib +X11_LIBDIR= /opt/X11/lib -imc: imc.c - $(CC) $(CFLAGS) imc.c -o imc - -# NOTE: this is the original program that won +# Set X11_INCLUDEDIR to the directory where the X11 include files reside # -imc.orig: imc.orig.c - $(CC) $(CFLAGS) imc.orig.c -o imc.orig +#X11_INCDIR= /usr/X11R6/include +#X11_INCDIR= /usr/X11/include +X11_INCDIR= /opt/X11/include -lush: lush.c - $(CC) $(CFLAGS) lush.c -o lush - -lush.again: lush.c - $(CC) $(CFLAGS) lush.c -o lush.again - $(RM) -f lush.again - -# NOTE: this is the original program that won +# Common C compiler warnings to silence # -lush.orig: lush.orig.c - $(CC) $(CFLAGS) lush.orig.c -o lush.orig +CSILENCE= +#CSILENCE= -Wno-implicit-int -# NOTE: some systems may need: +# Common C compiler warning flags # -# $(CC) $(CFLAGS) marangon.c -o marangon -lcurses -ltermcap +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # -marangon: marangon.c - $(CC) $(CFLAGS) marangon.c -o marangon -lcurses +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu90 -# NOTE: this is the original program that won +# Compiler bit architecture # -# NOTE: some systems may need: +# Some entries require 32-bitness: +# ARCH= -m32 # -# $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses -ltermcap +# Some entries require 64-bitness: +# ARCH= -m64 # -marangon.orig: marangon.orig.c - $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses - -nathan: nathan.c - $(CC) $(CFLAGS) nathan.c -o nathan - -# NOTE: this is the original program that won +# By default we assume nothing: # -nathan.orig: nathan.orig.c - $(CC) $(CFLAGS) nathan.orig.c -o nathan.orig +ARCH= -vern: vern.tmp.c - $(CC) $(CFLAGS) vern.tmp.c -o vern - -vern.tmp.c: vern.c - $(RM) -f vern.tmp.c - $(SED) vern.tmp.c - -# NOTE: this is the original program that won +# Defines that are needed to compile # -vern.orig: vern.orig.tmp.c - $(CC) $(CFLAGS) vern.orig.tmp.c -o vern.orig +CDEFINE= +#CDEFINE= -DIOCCC -vern.orig.tmp.c: vern.orig.c - $(RM) -f vern.orig.tmp.c - $(SED) vern.orig.tmp.c - -westley: westley.c - $(CC) $(CFLAGS) westley.c -o westley - -# alternate names for selected entries +# Include files that are needed to compile # -adgrep: adrian - $(RM) -f adgrep - $(LN) adrian adgrep -am: ant - $(RM) -f am - $(LN) ant am -babble: buzzard.1 - $(RM) -f babble - $(LN) buzzard.1 babble -first: buzzard.2 - $(RM) -f first - $(LN) buzzard.2 first -ag: gson - $(RM) -f ag - $(LN) gson ag -whereami: westley - $(RM) -f whereami - $(LN) westley whereami +CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 +# Optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# Default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +LIBS= +#LIBS= -lm +#LIBS= -L ${X11_LIBDIR} -lX11 +#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL + +# C compiler to use +# +CC= cc +#CC=clang +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-poison-system-directories +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif + + +############################## +# Special flags for this entry +############################## +# +ENTRY= nathan +PROG= ${ENTRY} +# +OBJ= ${PROG}.o +DATA= +TARGET= ${PROG} +# +ALT_OBJ= +ALT_TARGET= + + +################# +# build the entry +################# +# +all: data ${TARGET} + @${TRUE} + +.PHONY: all alt data everything clean clobber install \ + love haste waste maker easter_egg sandwich \ + supernova deep_magic magic charon pluto + +${PROG}: ${PROG}.c + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + +# alternative executable +# +alt: data ${ALT_TARGET} + @${TRUE} + +# data files +# +data: ${DATA} + @${TRUE} + +# both all and alt +# +everything: all alt + + +############### +# utility rules +############### +# clean: - $(RM) -f *.o a.out core - $(RM) -f vern.tmp.c lush.again babble.cppcb vern.orig.tmp.c - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + echo ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi clobber: clean - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig + ${RM} -f ${TARGET} ${ALT_TARGET} + @-if [ -e sandwich ]; then \ + ${RM} -f sandwich; \ + echo 'ate sandwich'; \ + fi -am_clobber: clean am - $(RM) -f am.safe - $(CP) am am.safe - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig - $(CP) am.safe am - $(RM) -f am.safe +install: + @echo "Dr. Spock says that is not logical!" + @${TRUE} -nuke: clobber - @true +# you may be able to misunderstand the source by reading indent.c +# +indent.c: ${PROG}.c + @if which "${GINDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${GINDENT} < $< > $@"; \ + ${GINDENT} < $< > $@; \ + elif which "${INDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${INDENT} < $< > $@"; \ + ${INDENT} < $< > $@; \ + else \ + echo "no intent tool found, ident $< yourself, sorry"; \ + echo "exit 1"; \ + exit 1; \ + fi -install: all - cat $(WINNERS) > /dev/null + +################## +# 133t hacker rulz +################## +# +love: + @echo 'not war?' + @${TRUE} + +haste: + $(MAKE) waste + @${TRUE} + +waste: + @echo 'haste' + @${TRUE} + +maker: + @echo 'Participate in a maker faire' + @${TRUE} + +easter_egg: + @echo "you expected to often misunderstand this $${RANDOM} magic" + @echo "chongo '' /\\oo/\\" + @echo "Eggy" + +sandwich: easter_egg + @if [ `id -u` -eq 0 ]; then \ + echo 'Okay.'; \ + echo "$${RANDOM}`date +%s`$${RANDOM}" > $@; \ + else \ + echo 'What? Make it yourself.'; \ + exit 1; \ + fi + +# Understand the history of the Homebrew Computer Club +# as well as the West Coast Computer Faire and +# you might be confused different. :-) +# +supernova: sandwich + @-if [ -r .code_anal ]; then \ + ${RM} -f .code_anal_v6; \ + else \ + echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \ + fi + @echo "A $@ helps ${MAKE} the elements that help form planets" + @${TRUE} + +deep_magic: supernova + @-if [ -r .code_anal ]; then \ + ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 \ + --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + fi + @${TRUE} + +magic: deep_magic + @-if [ -r .code_anal ]; then \ + ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "If you don't eat yer meat, you can't have any pudding!"; \ + echo "How can you have any pudding if you don't eat yer meat?!"; \ + fi + @${TRUE} + +# The IOCCC resident astronomer states +# +charon: magic + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore IAU, $@ is a planet" + +pluto: charon + ${MAKE} charon + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore, $@ is a planet" + @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" diff --git a/1992/nathan/README.md b/1992/nathan/README.md index 350180c85..af1545e92 100644 --- a/1992/nathan/README.md +++ b/1992/nathan/README.md @@ -1,4 +1,4 @@ -Worst Abuse of the Rules: +# Worst Abuse of the Rules: Nathan Sidwell Inmos UK @@ -7,8 +7,15 @@ Worst Abuse of the Rules: Bristol UK BS12 4SQ +## To build: -Judges' comments: + make all + +### To run + + ./nathan + +## Judges' comments The US International Traffic in Arms Regulations controls certain exportations going out of the United States. The U.S. Munitions @@ -54,8 +61,7 @@ Judges' comments: rules entries are ones that tend to 'streach' the limits and take the contest into unexpected territory. - -Personal note from chongo: +### Personal note from chongo: I think this situation shows just how ridiculous US crypto regulations really are. Certain US federal officials can get away @@ -63,8 +69,7 @@ Personal note from chongo: laws, but I personally can't re-distribute a program contest winner to the network! - -Selected notes from the author: +## Author's comments PROGRAM USE diff --git a/1992/vern/.gitignore b/1992/vern/.gitignore index 420cacfdf..b287f41f9 100644 --- a/1992/vern/.gitignore +++ b/1992/vern/.gitignore @@ -1 +1,2 @@ vern +vern.tmp.c diff --git a/1992/vern/Makefile b/1992/vern/Makefile index 2eb115d13..e13c36320 100644 --- a/1992/vern/Makefile +++ b/1992/vern/Makefile @@ -1,244 +1,603 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1992 makefile +# IOCCC 1992 winning entry - vern + +################################################################################ # -# Copyright (c) 1992, Landon Curt Noll & Larry Bassel. -# All Rights Reserved. Permission for personal, educational or non-profit -# use is granted provided this this copyright and notice are included in its -# entirety and remains unaltered. All other uses must receive prior permission -# from Landon Curt Noll and Larry Bassel. - - -SHELL=/bin/sh -CHMOD=chmod -CP=cp -RM=rm -SED=sed -LN=ln -UNIQ=uniq -CB=cb -GREP=grep -# set this to where your C Processor resides +# An Historical Makefile NOTE: # -# On some systems: -# CPP=/lib/cpp +# The orig.Makefile, if it exits, is the original Makefile before this IOCCC +# year directory was reworked so that entries are in separate directories. +# This also applies to any orig.ansi.mk and orig.common.mk files. # -CPP=/usr/ccs/lib/acpp - -# flags for ansi compiles +# Several Makefiles were modified / formed in 2022, and as such it may have +# elements that are not historically compatible with way entries were built. +# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile. # -# NOTE: Some ANSI compilers make use of -Xa to turn on ANSI mode, -# others such as gcc may want -ansi, others may want nothing -# at all. Adjust the CFLAGS line as needed. +# Regarding individual entries: # -# NOTE: Some compilers cannot optimize, or optimize some entries -# entries incorrectly. You might want need to turn on -O -# to see if your compiler can handle them. +# IOCCC winning entry code may not work on your system. Even with standards, +# conditions and build environments change, especially when it comes to more +# extreme code such you might find in an IOCCC winner. Moreover, what was +# allowed and liked in one IOCCC contest may no longer be liked/allowed in +# later IOCCC years. # -#CFLAGS=-O -Xa -CFLAGS=-Xa -CC=cc - -# misc shell babble +# Corrections on winning author and fixing typos in remarks are VERY WELCOME. # -NOINCLUDE=$(SED) -e 's/^.\([ ]*\)include/%include/' -SPACECLEAN=$(SED) -e 's/\([^ ]\)\([ ]\)[ ][ ]*/\1\2/g' -CPPCLEAN=$(GREP) -v '^. [0-9][0-9]*' - -# winners that compile under ANSI C +# GitHub pull requests are welcome: # -WINNERS= adrian albert ant buzzard.1 buzzard.2 gson kivinen imc \ - lush marangon nathan vern westley -ALT_NAMES= adgrep am babble first ag whereami - -all: $(WINNERS) $(ALT_NAMES) - -adrian: adrian.c - $(CC) $(CFLAGS) adrian.c -o adrian - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c - $(SED) '1s/\..*\./. wc ./' adrian.c > ad.temp - -./adrian ad.temp adwc.c - $(CC) -o adwc adwc.c - $(SED) '1s/\..*\./. basename ./' adrian.c > ad.temp - -./adrian ad.temp adbasename.c - $(CC) -o adbasename adbasename.c - $(SED) '1s/\..*\./. echo| ./' adrian.c > ad.temp - -./adrian ad.temp adecho.c - $(CC) -o adecho adecho.c - $(SED) '1s/\..*\./. head; ./' adrian.c > ad.temp - -./adrian ad.temp adhead.c - $(CC) -o adhead adhead.c - $(SED) '1s/\..*\./. sleep ./' adrian.c > ad.temp - -./adrian ad.temp adsleep.c - $(CC) -o adsleep adsleep.c - $(RM) -f ad.temp - -# NOTE: this is the original source that won +# If you have a patch that might make running an entry work in modern Unix-like +# environments, please create a GitHub pull request for the IOCCC judges to +# consider. # -adrian.orig: adrian.orig.c - $(CC) $(CFLAGS) adrian.orig.c -o adrian.orig - -albert: albert.c - $(CC) $(CFLAGS) albert.c -o albert - -# NOTE: this is the original source that won +# Suggestions and corrections regarding Makefiles, winning author information, +# fixing typos in remarks, and code patches are welcome via opening a GitHub +# issue or better yet, by creating a GitHub pull request for the IOCCC judges +# to consider. To form a GitHub issue or GitHub pull, please visit: # -albert.orig: albert.orig.c - $(CC) $(CFLAGS) albert.orig.c -o albert.orig - -ant: ant.c - $(CC) $(CFLAGS) ant.c -o ant - -buzzard.1: buzzard.1.c - $(CC) $(CFLAGS) buzzard.1.c -o buzzard.1 - -babble.cppcb: buzzard.1.c - $(NOINCLUDE) buzzard.1.c | \ - $(CPP) $(CPPFLAGS) | \ - $(CPPCLEAN) | \ - $(CB) $(CBFLAGS) | \ - $(UNIQ) | \ - $(SPACECLEAN) > babble.cppcb 2>&1 - -buzzard.2: buzzard.2.c - $(CC) $(CFLAGS) buzzard.2.c -o buzzard.2 - -# NOTE: this is the original source that won +# https://github.com/ioccc-src/winner # -buzzard.2.orig: buzzard.2.orig.c - $(CC) $(CFLAGS) buzzard.2.orig.c -o buzzard.2.orig +################################################################################ -gson: gson.c - $(CC) $(CFLAGS) gson.c -o gson - -# NOTE: some systems may only need: +# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under: # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 +# Creative Commons Attribution-ShareAlike 3.0 Unported License. # -kivinen: kivinen.c - $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 -lsocket -lresolv -lnsl +# See: http://creativecommons.org/licenses/by-sa/3.0/ -# NOTE: this is the original program that won + +############################# +# shell used by this Makefile +############################# # -# NOTE: some systems may only need: +SHELL= bash + +####################### +# common tool locations +####################### # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 +A2P= a2p +AR= ar +ASA= asa +AT= at +ATQ= atq +ATRM= atrm +AWK= awk +BANNER= banner +BASE64= base64 +BASENAME= basename +BATCH= batch +BC= bc +BINHEX= binhex +BISON= bison +BUNZIP2= bunzip2 +BZCAT= bzcat +BZCMP= bzcmp +BZDIFF= bzdiff +BZEGREP= bzegrep +BZFGREP= bzfgrep +BZGREP= bzgrep +BZIP2= bzip2 +BZLESS= bzless +BZMORE= bzmore +C2PH= c2ph +C89= c89 +C99= c99 +CAL= cal +CALC= calc +CAT= cat +CD= cd +CHFLAGS= chflags +CHGRP= chgrp +CHMOD= chmod +CKSUM= cksum +CLANG= clang +CLANG_PLUSPLUS= clang++ +CLEAR= clear +CMP= cmp +COL= col +COLLDEF= colldef +COLRM= colrm +COLUMN= column +COMPRESS= compress +CP= cp +CPIO= cpio +CPP= cpp +CRC32= crc32 +CSH= csh +CSPLIT= csplit +CURL= curl +CUT= cut +C_PLUSPLUS= c++ +C_PLUSPLUS_FILT= c++filt +DATE= date +DC= dc +DD= dd +DF= df +DIFF3= diff3 +DIFF= diff +DIG= dig +DIRNAME= dirname +ED= ed +EGREP= egrep +ENV= env +EQN= eqn +ETAGS= etags +EXPECT= expect +EXPR= expr +FALSE= false +FGREP= fgrep +FILE= file +FIND2PERL= find2perl +FIND= find +FLEX= flex +FLEX_PLUSPLUS= flex++ +FMT= fmt +FOLD= fold +FS_USAGE= fs_usage +FUNZIP= funzip +FUSER= fuser +GCC= gcc +GDIFFMK= gdiffmk +GENCAT= gencat +GENSTRINGS= genstrings +GETOPT= getopt +GETOPTS= getopts +GINDENT= gindent +GNUMAKE= gnumake +GREP= grep +GROFF= groff +GROFFER= groffer +GROG= grog +GROPS= grops +GROTTY= grotty +GUNZIP= gunzip +GVIM= gvim +GZCAT= gzcat +GZEXE= gzexe +GZIP_PROG= gzip +G_PLUSPLUS= g++ +H2PH= h2ph +H2XS= h2xs +HASH= hash +HEAD= head +HOSTNAME_PROG= hostname +ICONV= iconv +ID= id +INDENT= indent +INFO= info +JOT= jot +KILL= kill +KSH= ksh +LAST= last +LD= ld +LESSECHO= lessecho +LEX= len +LINK= link +LN= ln +LS= ls +M4= m4 +MAKE= make +MAN= man +MKDIR= mkdir +MKFIFO= mkfifo +MKTEMP= mktemp +MV= mv +NANO= nano +NASM= nasm +NEQN= neqn +NICE= nice +NL= nl +NM= nm +NOHUP= nohup +NROFF= nroff +NSLOOKUP= nslookup +OD= od +OPENSSL= openssl +PASTE= paste +PATCH= patch +PATHCHK= pathchk +PAX= pax +PERL= perl +PICO= pico +PR= pr +PRINTENV= printenv +PS= ps +PTAR= ptar +PTARDIFF= ptardiff +PTARGREP= ptargrep +PWD= pwd +PYDOC= pydoc +PYTHON= python +PYTHONW= pythonw +READLINK= readlink +RENICE= renice +RESET= reset +REV= rev +RI= ri +RM= rm +RMDIR= rmdir +RSYNC= rsync +RUBY= ruby +RVIM= rvim +SAY= say +SCP= scp +SCREEN= screen +SCRIPT= script +SDIFF= sdiff +SED= sed +SEQ= seq +SFTP= sftp +SH= sh +SHA1= sha1 +SHA= sha +SHAR= shar +SHASUM5_18= shasum5.18 +SHASUM= shasum +SIZE= size +SLEEP= sleep +SORT= sort +SSH= ssh +STAT= stat +STRIP= strip +STTY= stty +SUM= sum +SYNC= sync +TABS= tabs +TAIL= tail +TAR= tar +TEE= tee +TEST= test +TFTP= tftp +TIDY= tidy +TIME= time +TOP= top +TOUCH= touch +TPUT= tout +TPUT= tput +TR= tr +TROFF= troff +TRUE= true +TSET= tset +TSORT= tsort +UL= ul +UNAME= uname +UNCOMPRESS= uncompress +UNEXPAND= unexpand +UNIFDEF= unifdef +UNIFDEFALL= unifdefall +UNIQ= uniq +UNITS= units +UNLINK= unlink +UNZIP= unzip +UNZIPSFX= unzipsfx +UPTIME= uptime +UUDECODE= uudecode +UUENCODE= uuencode +UUIDGEN= uuidgen +VI= vi +VIEW= view +VIM= vim +VIMDIFF= vimdiff +W= w +WAIT4PATH= wait4path +WAIT= wait +WC= wc +WGET= wget +WHAT= what +WHATIS= whatis +WHICH= which +WHO= who +WHOAMI= whoami +WHOIS= whois +WRTIE= write +XAR= xar +XARGS= xargs +XATTR= xattr +XXD= xxd +YACC= yacc +YES= yes +ZCAT= zcat +ZCMP= zcmp +ZDIFF= zdiff +ZEGREP= zegrep +ZFGREP= zfgrep +ZFORCE= zforce +ZGREP= zgrep +ZIP= zip +ZIPCLOAK= zipcloak +ZIPGREp= zipgrep +ZIPINFo= zipinfo +ZIPNOTE= zipnote +ZIPSPLIT= zipsplit +ZLESS= zless +ZMORE= zmore +ZNEW= znew +ZPRINT= zprint +ZSH= zsh + +# Set X11_LIBDIR to the directory where the X11 library resides # -kivinen.orig: kivinen.orig.c - $(CC) $(CFLAGS) kivinen.orig.c -o kivinen.orig -lX11 \ - -lsocket -lresolv -lnsl +#X11_LIBDIR= /usr/X11R6/lib +#X11_LIBDIR= /usr/X11/lib +X11_LIBDIR= /opt/X11/lib -imc: imc.c - $(CC) $(CFLAGS) imc.c -o imc - -# NOTE: this is the original program that won +# Set X11_INCLUDEDIR to the directory where the X11 include files reside # -imc.orig: imc.orig.c - $(CC) $(CFLAGS) imc.orig.c -o imc.orig +#X11_INCDIR= /usr/X11R6/include +#X11_INCDIR= /usr/X11/include +X11_INCDIR= /opt/X11/include -lush: lush.c - $(CC) $(CFLAGS) lush.c -o lush - -lush.again: lush.c - $(CC) $(CFLAGS) lush.c -o lush.again - $(RM) -f lush.again - -# NOTE: this is the original program that won +# Common C compiler warnings to silence # -lush.orig: lush.orig.c - $(CC) $(CFLAGS) lush.orig.c -o lush.orig +#CSILENCE= +CSILENCE= -Wno-bitwise-conditional-parentheses -Wno-dangling-else -Wno-error \ + -Wno-implicit-function-declaration -Wno-parentheses -Wno-pedantic \ + -Wno-return-type -Wno-shift-op-parentheses -# NOTE: some systems may need: +# Common C compiler warning flags # -# $(CC) $(CFLAGS) marangon.c -o marangon -lcurses -ltermcap +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # -marangon: marangon.c - $(CC) $(CFLAGS) marangon.c -o marangon -lcurses +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu90 -# NOTE: this is the original program that won +# Compiler bit architecture # -# NOTE: some systems may need: +# Some entries require 32-bitness: +# ARCH= -m32 # -# $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses -ltermcap +# Some entries require 64-bitness: +# ARCH= -m64 # -marangon.orig: marangon.orig.c - $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses - -nathan: nathan.c - $(CC) $(CFLAGS) nathan.c -o nathan - -# NOTE: this is the original program that won +# By default we assume nothing: # -nathan.orig: nathan.orig.c - $(CC) $(CFLAGS) nathan.orig.c -o nathan.orig +ARCH= -vern: vern.tmp.c - $(CC) $(CFLAGS) vern.tmp.c -o vern - -vern.tmp.c: vern.c - $(RM) -f vern.tmp.c - $(SED) vern.tmp.c - -# NOTE: this is the original program that won +# Defines that are needed to compile # -vern.orig: vern.orig.tmp.c - $(CC) $(CFLAGS) vern.orig.tmp.c -o vern.orig +CDEFINE= +#CDEFINE= -DIOCCC -vern.orig.tmp.c: vern.orig.c - $(RM) -f vern.orig.tmp.c - $(SED) vern.orig.tmp.c - -westley: westley.c - $(CC) $(CFLAGS) westley.c -o westley - -# alternate names for selected entries +# Include files that are needed to compile # -adgrep: adrian - $(RM) -f adgrep - $(LN) adrian adgrep -am: ant - $(RM) -f am - $(LN) ant am -babble: buzzard.1 - $(RM) -f babble - $(LN) buzzard.1 babble -first: buzzard.2 - $(RM) -f first - $(LN) buzzard.2 first -ag: gson - $(RM) -f ag - $(LN) gson ag -whereami: westley - $(RM) -f whereami - $(LN) westley whereami +CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 +# Optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# Default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +LIBS= +#LIBS= -lm +#LIBS= -L ${X11_LIBDIR} -lX11 +#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL + +# C compiler to use +# +CC= cc +#CC=clang +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-comma -Wno-float-conversion -Wno-missing-prototypes \ + -Wno-missing-variable-declarations -Wno-poison-system-directories \ + -Wno-shadow -Wno-strict-prototypes +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif + + +############################## +# Special flags for this entry +############################## +# +ENTRY= vern +PROG= ${ENTRY} +# +OBJ= ${PROG}.o +DATA= +TARGET= ${PROG} +# +ALT_OBJ= +ALT_TARGET= + + +################# +# build the entry +################# +# +all: data ${TARGET} + @${TRUE} + +.PHONY: all alt data everything clean clobber install \ + love haste waste maker easter_egg sandwich \ + supernova deep_magic magic charon pluto + +${PROG}: ${PROG}.tmp.c + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + +${PROG}.tmp.c: ${PROG}.c + ${RM} -f $@ + ${SED} <${PROG}.c 's/{ /(/g;s/} /)/g;s/; /#define /' | \ + ${SED} 's/} /=/g;s/{ /i/g' >$@ + +# alternative executable +# +alt: data ${ALT_TARGET} + @${TRUE} + +# data files +# +data: ${DATA} + @${TRUE} + +# both all and alt +# +everything: all alt + + +############### +# utility rules +############### +# clean: - $(RM) -f *.o a.out core - $(RM) -f vern.tmp.c lush.again babble.cppcb vern.orig.tmp.c - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + echo ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi clobber: clean - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig + ${RM} -f ${TARGET} ${ALT_TARGET} + ${RM} -f ${PROG}.tmp.c + @-if [ -e sandwich ]; then \ + ${RM} -f sandwich; \ + echo 'ate sandwich'; \ + fi -am_clobber: clean am - $(RM) -f am.safe - $(CP) am am.safe - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig - $(CP) am.safe am - $(RM) -f am.safe +install: + @echo "Dr. Spock says that is not logical!" + @${TRUE} -nuke: clobber - @true +# you may be able to misunderstand the source by reading indent.c +# +indent.c: ${PROG}.c + @if which "${GINDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${GINDENT} < $< > $@"; \ + ${GINDENT} < $< > $@; \ + elif which "${INDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${INDENT} < $< > $@"; \ + ${INDENT} < $< > $@; \ + else \ + echo "no intent tool found, ident $< yourself, sorry"; \ + echo "exit 1"; \ + exit 1; \ + fi -install: all - cat $(WINNERS) > /dev/null + +################## +# 133t hacker rulz +################## +# +love: + @echo 'not war?' + @${TRUE} + +haste: + $(MAKE) waste + @${TRUE} + +waste: + @echo 'haste' + @${TRUE} + +maker: + @echo 'Participate in a maker faire' + @${TRUE} + +easter_egg: + @echo "you expected to often misunderstand this $${RANDOM} magic" + @echo "chongo '' /\\oo/\\" + @echo "Eggy" + +sandwich: easter_egg + @if [ `id -u` -eq 0 ]; then \ + echo 'Okay.'; \ + echo "$${RANDOM}`date +%s`$${RANDOM}" > $@; \ + else \ + echo 'What? Make it yourself.'; \ + exit 1; \ + fi + +# Understand the history of the Homebrew Computer Club +# as well as the West Coast Computer Faire and +# you might be confused different. :-) +# +supernova: sandwich + @-if [ -r .code_anal ]; then \ + ${RM} -f .code_anal_v6; \ + else \ + echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \ + fi + @echo "A $@ helps ${MAKE} the elements that help form planets" + @${TRUE} + +deep_magic: supernova + @-if [ -r .code_anal ]; then \ + ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 \ + --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + fi + @${TRUE} + +magic: deep_magic + @-if [ -r .code_anal ]; then \ + ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "If you don't eat yer meat, you can't have any pudding!"; \ + echo "How can you have any pudding if you don't eat yer meat?!"; \ + fi + @${TRUE} + +# The IOCCC resident astronomer states +# +charon: magic + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore IAU, $@ is a planet" + +pluto: charon + ${MAKE} charon + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore, $@ is a planet" + @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" diff --git a/1992/vern/README.md b/1992/vern/README.md index 5c81883d4..3bbfe1e45 100644 --- a/1992/vern/README.md +++ b/1992/vern/README.md @@ -1,4 +1,4 @@ -Best of Show: +# Best of Show: Vern Paxson Lawrence Berkeley Laboratory @@ -8,24 +8,29 @@ Best of Show: 1 Cyclotron Rd. Berkeley, CA 94720 USA +## To build: -Judges' comments: + make all - Try: - make vern - vern 3 <-- default is 2 +### To run + + ./vern 3 # <-- default is 2 + +## Judges' comments You might start off by giving the following input: + 63 43 76 55 71 52 67 57 (this may take a while) - + The judges assume no responsibility for the obfuscated opening suggested above. :-) For a real quick game try: - vern + + ./vern 65 55 66 46 @@ -35,8 +40,7 @@ Judges' comments: NOTE: Because some mailers have problems with the original winning source, a slightly modified version with shorter lines has been provided. - -Selected notes from the author: +## Author's comments This program plays chess. You play the white pieces and the program the black pieces. Moves are entered as a two-digit number specifying diff --git a/1992/westley/Makefile b/1992/westley/Makefile index 2eb115d13..2bfbfbb2b 100644 --- a/1992/westley/Makefile +++ b/1992/westley/Makefile @@ -1,244 +1,600 @@ -# %W% %G% %U% +#!/usr/bin/env make # -# 1992 makefile +# IOCCC 1992 winning entry - westley + +################################################################################ # -# Copyright (c) 1992, Landon Curt Noll & Larry Bassel. -# All Rights Reserved. Permission for personal, educational or non-profit -# use is granted provided this this copyright and notice are included in its -# entirety and remains unaltered. All other uses must receive prior permission -# from Landon Curt Noll and Larry Bassel. - - -SHELL=/bin/sh -CHMOD=chmod -CP=cp -RM=rm -SED=sed -LN=ln -UNIQ=uniq -CB=cb -GREP=grep -# set this to where your C Processor resides +# An Historical Makefile NOTE: # -# On some systems: -# CPP=/lib/cpp +# The orig.Makefile, if it exits, is the original Makefile before this IOCCC +# year directory was reworked so that entries are in separate directories. +# This also applies to any orig.ansi.mk and orig.common.mk files. # -CPP=/usr/ccs/lib/acpp - -# flags for ansi compiles +# Several Makefiles were modified / formed in 2022, and as such it may have +# elements that are not historically compatible with way entries were built. +# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile. # -# NOTE: Some ANSI compilers make use of -Xa to turn on ANSI mode, -# others such as gcc may want -ansi, others may want nothing -# at all. Adjust the CFLAGS line as needed. +# Regarding individual entries: # -# NOTE: Some compilers cannot optimize, or optimize some entries -# entries incorrectly. You might want need to turn on -O -# to see if your compiler can handle them. +# IOCCC winning entry code may not work on your system. Even with standards, +# conditions and build environments change, especially when it comes to more +# extreme code such you might find in an IOCCC winner. Moreover, what was +# allowed and liked in one IOCCC contest may no longer be liked/allowed in +# later IOCCC years. # -#CFLAGS=-O -Xa -CFLAGS=-Xa -CC=cc - -# misc shell babble +# Corrections on winning author and fixing typos in remarks are VERY WELCOME. # -NOINCLUDE=$(SED) -e 's/^.\([ ]*\)include/%include/' -SPACECLEAN=$(SED) -e 's/\([^ ]\)\([ ]\)[ ][ ]*/\1\2/g' -CPPCLEAN=$(GREP) -v '^. [0-9][0-9]*' - -# winners that compile under ANSI C +# GitHub pull requests are welcome: # -WINNERS= adrian albert ant buzzard.1 buzzard.2 gson kivinen imc \ - lush marangon nathan vern westley -ALT_NAMES= adgrep am babble first ag whereami - -all: $(WINNERS) $(ALT_NAMES) - -adrian: adrian.c - $(CC) $(CFLAGS) adrian.c -o adrian - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c - $(SED) '1s/\..*\./. wc ./' adrian.c > ad.temp - -./adrian ad.temp adwc.c - $(CC) -o adwc adwc.c - $(SED) '1s/\..*\./. basename ./' adrian.c > ad.temp - -./adrian ad.temp adbasename.c - $(CC) -o adbasename adbasename.c - $(SED) '1s/\..*\./. echo| ./' adrian.c > ad.temp - -./adrian ad.temp adecho.c - $(CC) -o adecho adecho.c - $(SED) '1s/\..*\./. head; ./' adrian.c > ad.temp - -./adrian ad.temp adhead.c - $(CC) -o adhead adhead.c - $(SED) '1s/\..*\./. sleep ./' adrian.c > ad.temp - -./adrian ad.temp adsleep.c - $(CC) -o adsleep adsleep.c - $(RM) -f ad.temp - -# NOTE: this is the original source that won +# If you have a patch that might make running an entry work in modern Unix-like +# environments, please create a GitHub pull request for the IOCCC judges to +# consider. # -adrian.orig: adrian.orig.c - $(CC) $(CFLAGS) adrian.orig.c -o adrian.orig - -albert: albert.c - $(CC) $(CFLAGS) albert.c -o albert - -# NOTE: this is the original source that won +# Suggestions and corrections regarding Makefiles, winning author information, +# fixing typos in remarks, and code patches are welcome via opening a GitHub +# issue or better yet, by creating a GitHub pull request for the IOCCC judges +# to consider. To form a GitHub issue or GitHub pull, please visit: # -albert.orig: albert.orig.c - $(CC) $(CFLAGS) albert.orig.c -o albert.orig - -ant: ant.c - $(CC) $(CFLAGS) ant.c -o ant - -buzzard.1: buzzard.1.c - $(CC) $(CFLAGS) buzzard.1.c -o buzzard.1 - -babble.cppcb: buzzard.1.c - $(NOINCLUDE) buzzard.1.c | \ - $(CPP) $(CPPFLAGS) | \ - $(CPPCLEAN) | \ - $(CB) $(CBFLAGS) | \ - $(UNIQ) | \ - $(SPACECLEAN) > babble.cppcb 2>&1 - -buzzard.2: buzzard.2.c - $(CC) $(CFLAGS) buzzard.2.c -o buzzard.2 - -# NOTE: this is the original source that won +# https://github.com/ioccc-src/winner # -buzzard.2.orig: buzzard.2.orig.c - $(CC) $(CFLAGS) buzzard.2.orig.c -o buzzard.2.orig +################################################################################ -gson: gson.c - $(CC) $(CFLAGS) gson.c -o gson - -# NOTE: some systems may only need: +# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under: # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 +# Creative Commons Attribution-ShareAlike 3.0 Unported License. # -kivinen: kivinen.c - $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 -lsocket -lresolv -lnsl +# See: http://creativecommons.org/licenses/by-sa/3.0/ -# NOTE: this is the original program that won + +############################# +# shell used by this Makefile +############################# # -# NOTE: some systems may only need: +SHELL= bash + +####################### +# common tool locations +####################### # -# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 +A2P= a2p +AR= ar +ASA= asa +AT= at +ATQ= atq +ATRM= atrm +AWK= awk +BANNER= banner +BASE64= base64 +BASENAME= basename +BATCH= batch +BC= bc +BINHEX= binhex +BISON= bison +BUNZIP2= bunzip2 +BZCAT= bzcat +BZCMP= bzcmp +BZDIFF= bzdiff +BZEGREP= bzegrep +BZFGREP= bzfgrep +BZGREP= bzgrep +BZIP2= bzip2 +BZLESS= bzless +BZMORE= bzmore +C2PH= c2ph +C89= c89 +C99= c99 +CAL= cal +CALC= calc +CAT= cat +CD= cd +CHFLAGS= chflags +CHGRP= chgrp +CHMOD= chmod +CKSUM= cksum +CLANG= clang +CLANG_PLUSPLUS= clang++ +CLEAR= clear +CMP= cmp +COL= col +COLLDEF= colldef +COLRM= colrm +COLUMN= column +COMPRESS= compress +CP= cp +CPIO= cpio +CPP= cpp +CRC32= crc32 +CSH= csh +CSPLIT= csplit +CURL= curl +CUT= cut +C_PLUSPLUS= c++ +C_PLUSPLUS_FILT= c++filt +DATE= date +DC= dc +DD= dd +DF= df +DIFF3= diff3 +DIFF= diff +DIG= dig +DIRNAME= dirname +ED= ed +EGREP= egrep +ENV= env +EQN= eqn +ETAGS= etags +EXPECT= expect +EXPR= expr +FALSE= false +FGREP= fgrep +FILE= file +FIND2PERL= find2perl +FIND= find +FLEX= flex +FLEX_PLUSPLUS= flex++ +FMT= fmt +FOLD= fold +FS_USAGE= fs_usage +FUNZIP= funzip +FUSER= fuser +GCC= gcc +GDIFFMK= gdiffmk +GENCAT= gencat +GENSTRINGS= genstrings +GETOPT= getopt +GETOPTS= getopts +GINDENT= gindent +GNUMAKE= gnumake +GREP= grep +GROFF= groff +GROFFER= groffer +GROG= grog +GROPS= grops +GROTTY= grotty +GUNZIP= gunzip +GVIM= gvim +GZCAT= gzcat +GZEXE= gzexe +GZIP_PROG= gzip +G_PLUSPLUS= g++ +H2PH= h2ph +H2XS= h2xs +HASH= hash +HEAD= head +HOSTNAME_PROG= hostname +ICONV= iconv +ID= id +INDENT= indent +INFO= info +JOT= jot +KILL= kill +KSH= ksh +LAST= last +LD= ld +LESSECHO= lessecho +LEX= len +LINK= link +LN= ln +LS= ls +M4= m4 +MAKE= make +MAN= man +MKDIR= mkdir +MKFIFO= mkfifo +MKTEMP= mktemp +MV= mv +NANO= nano +NASM= nasm +NEQN= neqn +NICE= nice +NL= nl +NM= nm +NOHUP= nohup +NROFF= nroff +NSLOOKUP= nslookup +OD= od +OPENSSL= openssl +PASTE= paste +PATCH= patch +PATHCHK= pathchk +PAX= pax +PERL= perl +PICO= pico +PR= pr +PRINTENV= printenv +PS= ps +PTAR= ptar +PTARDIFF= ptardiff +PTARGREP= ptargrep +PWD= pwd +PYDOC= pydoc +PYTHON= python +PYTHONW= pythonw +READLINK= readlink +RENICE= renice +RESET= reset +REV= rev +RI= ri +RM= rm +RMDIR= rmdir +RSYNC= rsync +RUBY= ruby +RVIM= rvim +SAY= say +SCP= scp +SCREEN= screen +SCRIPT= script +SDIFF= sdiff +SED= sed +SEQ= seq +SFTP= sftp +SH= sh +SHA1= sha1 +SHA= sha +SHAR= shar +SHASUM5_18= shasum5.18 +SHASUM= shasum +SIZE= size +SLEEP= sleep +SORT= sort +SSH= ssh +STAT= stat +STRIP= strip +STTY= stty +SUM= sum +SYNC= sync +TABS= tabs +TAIL= tail +TAR= tar +TEE= tee +TEST= test +TFTP= tftp +TIDY= tidy +TIME= time +TOP= top +TOUCH= touch +TPUT= tout +TPUT= tput +TR= tr +TROFF= troff +TRUE= true +TSET= tset +TSORT= tsort +UL= ul +UNAME= uname +UNCOMPRESS= uncompress +UNEXPAND= unexpand +UNIFDEF= unifdef +UNIFDEFALL= unifdefall +UNIQ= uniq +UNITS= units +UNLINK= unlink +UNZIP= unzip +UNZIPSFX= unzipsfx +UPTIME= uptime +UUDECODE= uudecode +UUENCODE= uuencode +UUIDGEN= uuidgen +VI= vi +VIEW= view +VIM= vim +VIMDIFF= vimdiff +W= w +WAIT4PATH= wait4path +WAIT= wait +WC= wc +WGET= wget +WHAT= what +WHATIS= whatis +WHICH= which +WHO= who +WHOAMI= whoami +WHOIS= whois +WRTIE= write +XAR= xar +XARGS= xargs +XATTR= xattr +XXD= xxd +YACC= yacc +YES= yes +ZCAT= zcat +ZCMP= zcmp +ZDIFF= zdiff +ZEGREP= zegrep +ZFGREP= zfgrep +ZFORCE= zforce +ZGREP= zgrep +ZIP= zip +ZIPCLOAK= zipcloak +ZIPGREp= zipgrep +ZIPINFo= zipinfo +ZIPNOTE= zipnote +ZIPSPLIT= zipsplit +ZLESS= zless +ZMORE= zmore +ZNEW= znew +ZPRINT= zprint +ZSH= zsh + +# Set X11_LIBDIR to the directory where the X11 library resides # -kivinen.orig: kivinen.orig.c - $(CC) $(CFLAGS) kivinen.orig.c -o kivinen.orig -lX11 \ - -lsocket -lresolv -lnsl +#X11_LIBDIR= /usr/X11R6/lib +#X11_LIBDIR= /usr/X11/lib +X11_LIBDIR= /opt/X11/lib -imc: imc.c - $(CC) $(CFLAGS) imc.c -o imc - -# NOTE: this is the original program that won +# Set X11_INCLUDEDIR to the directory where the X11 include files reside # -imc.orig: imc.orig.c - $(CC) $(CFLAGS) imc.orig.c -o imc.orig +#X11_INCDIR= /usr/X11R6/include +#X11_INCDIR= /usr/X11/include +X11_INCDIR= /opt/X11/include -lush: lush.c - $(CC) $(CFLAGS) lush.c -o lush - -lush.again: lush.c - $(CC) $(CFLAGS) lush.c -o lush.again - $(RM) -f lush.again - -# NOTE: this is the original program that won +# Common C compiler warnings to silence # -lush.orig: lush.orig.c - $(CC) $(CFLAGS) lush.orig.c -o lush.orig +#CSILENCE= +CSILENCE= -Wno-bitwise-op-parentheses -Wno-error -Wno-implicit-function-declaration \ + -Wno-parentheses -Wno-pedantic -# NOTE: some systems may need: +# Common C compiler warning flags # -# $(CC) $(CFLAGS) marangon.c -o marangon -lcurses -ltermcap +#CWARN= ${CSILENCE} +#CWARN= -Wall ${CSILENCE} +#CWARN= -Wall -Wextra ${CSILENCE} +CWARN= -Wall -Wextra -pedantic ${CSILENCE} + +# Compiler standard # -marangon: marangon.c - $(CC) $(CFLAGS) marangon.c -o marangon -lcurses +#CSTD= +#CSTD= -ansi +CSTD= -std=gnu90 -# NOTE: this is the original program that won +# Compiler bit architecture # -# NOTE: some systems may need: +# Some entries require 32-bitness: +# ARCH= -m32 # -# $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses -ltermcap +# Some entries require 64-bitness: +# ARCH= -m64 # -marangon.orig: marangon.orig.c - $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses - -nathan: nathan.c - $(CC) $(CFLAGS) nathan.c -o nathan - -# NOTE: this is the original program that won +# By default we assume nothing: # -nathan.orig: nathan.orig.c - $(CC) $(CFLAGS) nathan.orig.c -o nathan.orig +ARCH= -vern: vern.tmp.c - $(CC) $(CFLAGS) vern.tmp.c -o vern - -vern.tmp.c: vern.c - $(RM) -f vern.tmp.c - $(SED) vern.tmp.c - -# NOTE: this is the original program that won +# Defines that are needed to compile # -vern.orig: vern.orig.tmp.c - $(CC) $(CFLAGS) vern.orig.tmp.c -o vern.orig +CDEFINE= +#CDEFINE= -DIOCCC -vern.orig.tmp.c: vern.orig.c - $(RM) -f vern.orig.tmp.c - $(SED) vern.orig.tmp.c - -westley: westley.c - $(CC) $(CFLAGS) westley.c -o westley - -# alternate names for selected entries +# Include files that are needed to compile # -adgrep: adrian - $(RM) -f adgrep - $(LN) adrian adgrep -am: ant - $(RM) -f am - $(LN) ant am -babble: buzzard.1 - $(RM) -f babble - $(LN) buzzard.1 babble -first: buzzard.2 - $(RM) -f first - $(LN) buzzard.2 first -ag: gson - $(RM) -f ag - $(LN) gson ag -whereami: westley - $(RM) -f whereami - $(LN) westley whereami +CINCLUDE= +#CINCLUDE= -include stdlib.h +#CINCLUDE= -include stdio.h +#CINCLUDE= -include stdlib.h -include stdio.h +#CINCLUDE= -I ${X11_INCDIR} +#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 +# Optimization +# +# Most compiles will safely use -O2. Some can use only -O1 or -O. +# A few compilers have broken optimizers or this entry make break +# under those buggy optimizers and thus you may not want anything. +# Reasonable compilers will allow for -O3. +# +#OPT= +#OPT= -O +#OPT= -O1 +#OPT= -O2 +OPT= -O3 + +# Default flags for ANSI C compilation +# +CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT} + +# Libraries needed to build +# +LIBS= +#LIBS= -lm +#LIBS= -L ${X11_LIBDIR} -lX11 +#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL + +# C compiler to use +# +CC= cc +#CC=clang +#CC=gcc + +# Compiler add-ons or replacements for clang only +# +ifeq ($(CC),clang) +# +CSILENCE+= -Wno-poison-system-directories +# +CWARN+= -Weverything +# +endif + +# Specific add-ons or replacements for gcc only +# +ifeq ($(CC),gcc) +# +#CSILENCE+= +# +#CWARN+= +# +endif + + +############################## +# Special flags for this entry +############################## +# +ENTRY= westley +PROG= ${ENTRY} +# +OBJ= ${PROG}.o +DATA= +TARGET= ${PROG} +# +ALT_OBJ= +ALT_TARGET= + + +################# +# build the entry +################# +# +all: data ${TARGET} + @${TRUE} + +.PHONY: all alt data everything clean clobber install \ + love haste waste maker easter_egg sandwich \ + supernova deep_magic magic charon pluto + +${PROG}: ${PROG}.c + @echo "NOTE: This entry may not compile when using modern compilers." + ${CC} ${CFLAGS} $< -o $@ ${LIBS} + +whereami: ${PROG} + ${RM} -f $@ + ${LN} $< $@ + +# alternative executable +# +alt: data ${ALT_TARGET} + @${TRUE} + +# data files +# +data: ${DATA} + @${TRUE} + +# both all and alt +# +everything: all alt + + +############### +# utility rules +############### +# clean: - $(RM) -f *.o a.out core - $(RM) -f vern.tmp.c lush.again babble.cppcb vern.orig.tmp.c - $(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c + ${RM} -f ${OBJ} ${ALT_OBJ} + @-if [ -f indent.c ]; then \ + echo ${RM} -f indent.c; \ + ${RM} -f indent.c; \ + fi clobber: clean - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig + ${RM} -f ${TARGET} ${ALT_TARGET} + ${RM} -f whereami + @-if [ -e sandwich ]; then \ + ${RM} -f sandwich; \ + echo 'ate sandwich'; \ + fi -am_clobber: clean am - $(RM) -f am.safe - $(CP) am am.safe - $(RM) -f $(WINNERS) a.out - $(RM) -f $(ALT_NAMES) - $(RM) -f adwc adbasename adecho adhead adsleep - $(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig - $(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig - $(CP) am.safe am - $(RM) -f am.safe +install: + @echo "Dr. Spock says that is not logical!" + @${TRUE} -nuke: clobber - @true +# you may be able to misunderstand the source by reading indent.c +# +indent.c: ${PROG}.c + @if which "${GINDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${GINDENT} < $< > $@"; \ + ${GINDENT} < $< > $@; \ + elif which "${INDENT}" >/dev/null 2>&1; then \ + echo ${RM} -f $@; \ + ${RM} -f $@; \ + echo "${INDENT} < $< > $@"; \ + ${INDENT} < $< > $@; \ + else \ + echo "no intent tool found, ident $< yourself, sorry"; \ + echo "exit 1"; \ + exit 1; \ + fi -install: all - cat $(WINNERS) > /dev/null + +################## +# 133t hacker rulz +################## +# +love: + @echo 'not war?' + @${TRUE} + +haste: + $(MAKE) waste + @${TRUE} + +waste: + @echo 'haste' + @${TRUE} + +maker: + @echo 'Participate in a maker faire' + @${TRUE} + +easter_egg: + @echo "you expected to often misunderstand this $${RANDOM} magic" + @echo "chongo '' /\\oo/\\" + @echo "Eggy" + +sandwich: easter_egg + @if [ `id -u` -eq 0 ]; then \ + echo 'Okay.'; \ + echo "$${RANDOM}`date +%s`$${RANDOM}" > $@; \ + else \ + echo 'What? Make it yourself.'; \ + exit 1; \ + fi + +# Understand the history of the Homebrew Computer Club +# as well as the West Coast Computer Faire and +# you might be confused different. :-) +# +supernova: sandwich + @-if [ -r .code_anal ]; then \ + ${RM} -f .code_anal_v6; \ + else \ + echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \ + fi + @echo "A $@ helps ${MAKE} the elements that help form planets" + @${TRUE} + +deep_magic: supernova + @-if [ -r .code_anal ]; then \ + ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 \ + --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + sleep 2; \ + echo "Wrong! Do it again!"; \ + fi + @${TRUE} + +magic: deep_magic + @-if [ -r .code_anal ]; then \ + ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \ + else \ + echo "If you don't eat yer meat, you can't have any pudding!"; \ + echo "How can you have any pudding if you don't eat yer meat?!"; \ + fi + @${TRUE} + +# The IOCCC resident astronomer states +# +charon: magic + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore IAU, $@ is a planet" + +pluto: charon + ${MAKE} charon + @echo "$@ is a dwarf planet" + @echo "dwarf is a type of planet" + @echo "therefore, $@ is a planet" + @echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them" diff --git a/1992/westley/README.md b/1992/westley/README.md index 1ad95e5c3..675b778d1 100644 --- a/1992/westley/README.md +++ b/1992/westley/README.md @@ -1,4 +1,4 @@ -Best Small Program: +# Best Small Program: Brian Westley (aka Merlyn LeRoy) Digi International @@ -6,23 +6,31 @@ Best Small Program: St. Paul, MN 55104 USA +## To build: -Judges' comments: + make all + + NOTE: This entry may not compile when using modern compilers. + +### To run If lost: + make whereami Then run: - whereami lat long + + ./whereami lat long + +## Judges' comments Where lat and long correspond to your latitude and longitude. To find the approximate place where this entry was judged, type: - whereami 37 -122 (- means west of meridian) + ./whereami 37 -122 (- means west of meridian) - -Selected notes from the author: +## Author's comments Run the program with your latitude & longitude as integer arguments; it will produce a map made up of '!' with the given From 11bb36ac8ce790f32a9a3e5d2131ee12820fb8ec Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Wed, 22 Feb 2023 05:44:55 -0800 Subject: [PATCH 50/50] Fix conflicts with recent commits (I think/hope) Some commits this week caused some conflicts with some open pull requests made last week. I believe and hope that I fixed the conflicts. --- 1984/{README => README.md} | 0 1985/{README => README.md} | 0 1986/{README => README.md} | 0 1987/{README => README.md} | 0 1988/{README => README.md} | 0 1988/{rules => rules.txt} | 0 1989/{README => README.md} | 0 1990/{README => README.md} | 0 1990/{rules => rules.txt} | 0 1991/{README => README.md} | 0 1992/{README => README.md} | 0 1993/{README => README.md} | 0 1994/{README => README.md} | 0 1995/{README => README.md} | 0 1996/{README => README.md} | 0 1998/{README => README.md} | 0 2000/{README => README.md} | 0 2001/{README => README.md} | 0 2004/{README => README.md} | 0 2018/ferguson/.gitignore | 2 +- all/{README => README.md} | 0 21 files changed, 1 insertion(+), 1 deletion(-) rename 1984/{README => README.md} (100%) rename 1985/{README => README.md} (100%) rename 1986/{README => README.md} (100%) rename 1987/{README => README.md} (100%) rename 1988/{README => README.md} (100%) rename 1988/{rules => rules.txt} (100%) rename 1989/{README => README.md} (100%) rename 1990/{README => README.md} (100%) rename 1990/{rules => rules.txt} (100%) rename 1991/{README => README.md} (100%) rename 1992/{README => README.md} (100%) rename 1993/{README => README.md} (100%) rename 1994/{README => README.md} (100%) rename 1995/{README => README.md} (100%) rename 1996/{README => README.md} (100%) rename 1998/{README => README.md} (100%) rename 2000/{README => README.md} (100%) rename 2001/{README => README.md} (100%) rename 2004/{README => README.md} (100%) rename all/{README => README.md} (100%) diff --git a/1984/README b/1984/README.md similarity index 100% rename from 1984/README rename to 1984/README.md diff --git a/1985/README b/1985/README.md similarity index 100% rename from 1985/README rename to 1985/README.md diff --git a/1986/README b/1986/README.md similarity index 100% rename from 1986/README rename to 1986/README.md diff --git a/1987/README b/1987/README.md similarity index 100% rename from 1987/README rename to 1987/README.md diff --git a/1988/README b/1988/README.md similarity index 100% rename from 1988/README rename to 1988/README.md diff --git a/1988/rules b/1988/rules.txt similarity index 100% rename from 1988/rules rename to 1988/rules.txt diff --git a/1989/README b/1989/README.md similarity index 100% rename from 1989/README rename to 1989/README.md diff --git a/1990/README b/1990/README.md similarity index 100% rename from 1990/README rename to 1990/README.md diff --git a/1990/rules b/1990/rules.txt similarity index 100% rename from 1990/rules rename to 1990/rules.txt diff --git a/1991/README b/1991/README.md similarity index 100% rename from 1991/README rename to 1991/README.md diff --git a/1992/README b/1992/README.md similarity index 100% rename from 1992/README rename to 1992/README.md diff --git a/1993/README b/1993/README.md similarity index 100% rename from 1993/README rename to 1993/README.md diff --git a/1994/README b/1994/README.md similarity index 100% rename from 1994/README rename to 1994/README.md diff --git a/1995/README b/1995/README.md similarity index 100% rename from 1995/README rename to 1995/README.md diff --git a/1996/README b/1996/README.md similarity index 100% rename from 1996/README rename to 1996/README.md diff --git a/1998/README b/1998/README.md similarity index 100% rename from 1998/README rename to 1998/README.md diff --git a/2000/README b/2000/README.md similarity index 100% rename from 2000/README rename to 2000/README.md diff --git a/2001/README b/2001/README.md similarity index 100% rename from 2001/README rename to 2001/README.md diff --git a/2004/README b/2004/README.md similarity index 100% rename from 2004/README rename to 2004/README.md diff --git a/2018/ferguson/.gitignore b/2018/ferguson/.gitignore index 657860f36..e626c23cc 100644 --- a/2018/ferguson/.gitignore +++ b/2018/ferguson/.gitignore @@ -1,5 +1,5 @@ -prog prog-simple prog.orig weasel weasel-simple +prog diff --git a/all/README b/all/README.md similarity index 100% rename from all/README rename to all/README.md