Merge pull request #12 from xexyl/1993

Get most 1993 entries to compile
This commit is contained in:
Landon Curt Noll authored and GitHub committed 2023-02-22 20:48:04 -08:00
commit 777fcb40dc
19 files changed
+92 -26

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
ant/ant
cmills/cmills
dgibson/data.name
dgibson/data.name2
dgibson/life.d
ejb/ejb
jonth/jonth
jonth/jonth.tmp.c
leo/leo
plummer/plummer
rince/rince
schnitzi/schnitzi
vanb/vanb
+6 -1
View File
@@ -66,13 +66,18 @@ YEAR= 1993
# build all entries # build all entries
################### ###################
# #
# XXX the $(MAKE) $$i is a temporary workaround while we get the other Makefiles
# in order. It should read:
#
# (cd $$i && $(MAKE) $$i):
all: all:
@echo '=-=-= ${YEAR} begin make $@ =-=-=' @echo '=-=-= ${YEAR} begin make $@ =-=-='
@echo @echo
@for i in ${WINNERS} ; do \ @for i in ${WINNERS} ; do \
echo "=-= start ${YEAR}/$$i =-="; \ echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && $(MAKE) $@)"; \ echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \ (cd $$i && $(MAKE) $$i); \
echo "=-= end ${YEAR}/$$i =-="; \ echo "=-= end ${YEAR}/$$i =-="; \
echo; \ echo; \
done done
+1 -1
View File
@@ -28,7 +28,7 @@ LN=ln
# #
#CFLAGS=-O -Xa #CFLAGS=-O -Xa
#CFLAGS=-Xa #CFLAGS=-Xa
CFLAGS= -ansi CFLAGS= -ansi -include stdlib.h
#CFLAGS= #CFLAGS=
# ANSI compiler # ANSI compiler
+1
View File
@@ -1,6 +1,7 @@
long long
z[7992],W,H,*t=z,j,k,*T=z,n,b; z[7992],W,H,*t=z,j,k,*T=z,n,b;
#include<X11/Xlib.h> #include<X11/Xlib.h>
#include<stdlib.h>
Window*E,D,s,w[999],*e=w; Window*E,D,s,w[999],*e=w;
Display*d; Display*d;
Pixmap Pixmap
+7 -1
View File
@@ -11,7 +11,7 @@ Best Abuse of the C Preprocessor:
Judges' comments: Judges' comments:
To use: To build use:
sh ./dgibson.sh [datafile] sh ./dgibson.sh [datafile]
where: where:
@@ -35,6 +35,12 @@ Judges' comments:
Good luck trying to use a debugger on this entry! Life is not Good luck trying to use a debugger on this entry! Life is not
always pretty. always pretty.
NOTE: we could not compile this entry under modern macOS but it will work
fine under linux. It likely fails to compile under macOS because its gcc is
actually just clang which is more strict about the type of the second argument
of main(). If you have gcc under macOS it might work just as well. We did not
test other systems.
Selected notes from the author: Selected notes from the author:
Regular → Executable
+1 -1
View File
@@ -50,4 +50,4 @@ make dgibson
# form the next generation # form the next generation
# #
chmod +w life.d chmod +w life.d
dgibson | tee life.d ./dgibson | tee life.d
+1 -1
View File
@@ -28,7 +28,7 @@ LN=ln
# #
#CFLAGS=-O -Xa #CFLAGS=-O -Xa
#CFLAGS=-Xa #CFLAGS=-Xa
CFLAGS= -ansi CFLAGS= -ansi -include stdio.h -include stdlib.h -include string.h
#CFLAGS= #CFLAGS=
# ANSI compiler # ANSI compiler
+2
View File
@@ -19,6 +19,8 @@ Judges' comments:
This program's output may be even more obfuscated when played This program's output may be even more obfuscated when played
on inverse video. :-) on inverse video. :-)
Yusuke Endoh provided a patch which allows this entry to compile on modern
systems. Thank you Yusuke!
Selected notes from the author: Selected notes from the author:
+5 -3
View File
@@ -1,4 +1,5 @@
G int i,j #include <X11/Xlib.h>
G long i,j
K case K case
R return 0 R return 0
S( x,y) for(x=0; x<y; x++) S( x,y) for(x=0; x<y; x++)
@@ -35,7 +36,7 @@ Z(){
setitimer(0,_,0); setitimer(0,_,0);
} }
main(){ main(){
G,*_=(int*)X; G,*_=(long*)X;
char*c= char*c=
"*{{{ {}{{*{{{ {}* { {{*{{{ *{{{ {* {* * { {{ { { *{* { {* *{{{ *{{{ { * { { *{{{ {{ *{{ { {{* { {*{{ {{ {{ {* { {*{{ { *{{{{ *{{ {{ "; "*{{{ {}{{*{{{ {}* { {{*{{{ *{{{ {* {* * { {{ { { *{* { {* *{{{ *{{{ { * { { *{{{ {{ *{{ { {{* { {*{{ {{ {{ {* { {*{{ { *{{{{ *{{ {{ ";
for(; *c; ) for(; *c; )
@@ -45,6 +46,7 @@ main(){
D=XOpenDisplay(0); D=XOpenDisplay(0);
L[1]=L[2]=XWhitePixel(D,j=XDefaultScreen(D)); L[1]=L[2]=XWhitePixel(D,j=XDefaultScreen(D));
XMap@p=XCreate@XRoot@j),0,0,200,470,2,0,1,0,2056,L)); XMap@p=XCreate@XRoot@j),0,0,200,470,2,0,1,0,2056,L));
XSelectInput(D,p,ExposureMask|KeyPressMask);
T W; T W;
L[2]=XBlackPixel(D,j); L[2]=XBlackPixel(D,j);
J W;{ J W;{
@@ -85,7 +87,7 @@ Y(){
lK(){ lK(){
XNextEvent(D,o); XNextEvent(D,o);
switch(*o){ switch(*o){
K 2:R+o[2]?0:XX k){ K 2:R+o[2]?0:XKeycodeToKeysym(D,((XKeyEvent*)o)->keycode,0);K 12:Y();}R;}d H 19;}M(J,4)}N H 20;}M(T,4)}q(m,w,k){
G=1;switch(k){ G=1;switch(k){
K 1:z+l]=1; K 1:z+l]=1;
d(m);R+1; d(m);R+1;
+25 -8
View File
@@ -13,10 +13,10 @@ Judges' comments:
make leo make leo
To have the computer guess: To have the computer guess:
leo [colors] ./leo [colors]
To guess the computer's number: To guess the computer's number:
mind [colors] ./mind [colors]
where: where:
colors number of possible colors (1 to 15) (default: 6) colors number of possible colors (1 to 15) (default: 6)
@@ -28,14 +28,31 @@ Judges' comments:
We look forward to more entries from the newer members of the We look forward to more entries from the newer members of the
International Internet community. International Internet community.
On some systems, you may need to remove the line: On more modern systems we had to make the following changes to get it to
compile:
#include <malloc.h>
or replace that line with:
#include <sys/types.h> --- i/1993/leo/leo.c
#include <sys/malloc.h> +++ w/1993/leo/leo.c
@@ -1,19 +1,20 @@
#include <stdio.h>
-#include <malloc.h>
+#include <stdlib.h>
#include <string.h>
+#include <time.h>
#define A(x) (e^d)&i?e:(e+=i+i/15-d,d<<=4,i<<=4,x)
#define B b+=!((e^d)&i)&&(d|=i),i<<=4,
#define C i=15,B B B B d=d<<4|d>>12,
#define D=(d=g,b=0,C b<<=4, C C C b)
#define E if(**y)goto
#define F=a[rand()%c]
#define G unsigned short
#define H e^=a[z],a[z]^=e,e^=a[z],
-void
+int
to successfully build this entry. to successfully build this entry.
+3 -2
View File
@@ -1,6 +1,7 @@
#include <stdio.h> #include <stdio.h>
#include <malloc.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <time.h>
#define A(x) (e^d)&i?e:(e+=i+i/15-d,d<<=4,i<<=4,x) #define A(x) (e^d)&i?e:(e+=i+i/15-d,d<<=4,i<<=4,x)
#define B b+=!((e^d)&i)&&(d|=i),i<<=4, #define B b+=!((e^d)&i)&&(d|=i),i<<=4,
@@ -11,7 +12,7 @@
#define G unsigned short #define G unsigned short
#define H e^=a[z],a[z]^=e,e^=a[z], #define H e^=a[z],a[z]^=e,e^=a[z],
void int
main main
(int (int
z,char z,char
+4 -2
View File
@@ -16,8 +16,9 @@ Judges' comments:
There's more than one way to get around disk quotas. :-) There's more than one way to get around disk quotas. :-)
Some people have reported problems compiling this entry This entry will not compile on modern systems because it
with gcc 2.3.3. relies on a compiler bug which was fixed in gcc 2.3.3 (a very
long time ago now).
The make command: The make command:
@@ -27,6 +28,7 @@ Judges' comments:
make of lmfjyh. make of lmfjyh.
Selected notes from the author: Selected notes from the author:
"Practical and efficient method of compressing source code" "Practical and efficient method of compressing source code"
+1 -1
View File
@@ -28,7 +28,7 @@ LN=ln
# #
#CFLAGS=-O -Xa #CFLAGS=-O -Xa
#CFLAGS=-Xa #CFLAGS=-Xa
CFLAGS= -ansi CFLAGS= -ansi -include stdio.h
#CFLAGS= #CFLAGS=
# ANSI compiler # ANSI compiler
+2 -2
View File
@@ -50,7 +50,7 @@ x X l
int _tty_ch; int _tty_ch;
bool _echoit; bool _echoit;
bool _rawmode; bool _rawmode;
SGTTY _tty; int _tty;
#define U char #define U char
#define G for( #define G for(
#define I )malloc(sizeof( #define I )malloc(sizeof(
@@ -71,7 +71,7 @@ j*a(int Q, int i) {
(mvaddch(y,x,X[y][x]),++x^W-1)||(x=0,y++)); (mvaddch(y,x,X[y][x]),++x^W-1)||(x=0,y++));
k=y=- --x; k=y=- --x;
G G
refresh(),c=select(k,&y,0,0,&v)?getch():0; refresh(),c=select(k,&y,0,0,(v.tv_usec=1<<17,&v))?getch():0;
k?++x-W||(x=1,++y-Q||(--k,x=W-1,y=Q-1)):--x||(y--,x=W-1),k|y; k?++x-W||(x=1,++y-Q||(--k,x=W-1,y=Q-1)):--x||(y--,x=W-1),k|y;
) )
+1 -1
View File
@@ -28,7 +28,7 @@ LN=ln
# #
#CFLAGS=-O -Xa #CFLAGS=-O -Xa
#CFLAGS=-Xa #CFLAGS=-Xa
CFLAGS= -ansi CFLAGS= -ansi -include stdlib.h -include string.h -include ctype.h
#CFLAGS= #CFLAGS=
# ANSI compiler # ANSI compiler
+9 -2
View File
@@ -29,11 +29,18 @@ Judges' comments:
Is it true that Elvis is alive? Is it true that Elvis is alive?
Do colorless green ideas sleep furiously? Do colorless green ideas sleep furiously?
NOTE: The author may also be contacted at: marks@aldrin.ksc.nasa.gov
We suggest you try using the body (minus the header and signature line) We suggest you try using the body (minus the header and signature line)
of a Usenet article. You might want to try something from alt.flame. :-) of a Usenet article. You might want to try something from alt.flame. :-)
If you have a ' in the question this entry may fail.
NOTE: This entry uses `gets()` so you might get a warning when compiling and
running this entry.
NOTE: this entry will likely segfault if you do not provide it with a data
file.
NOTE: The author may also be contacted at: marks@aldrin.ksc.nasa.gov
Selected notes from the author: Selected notes from the author:
+4
View File
@@ -1,4 +1,8 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#define iii\ #define iii\
( I ) if ( ii(I,6\ ( I ) if ( ii(I,6\
) )I [ strlen(I ) -1]=!1 ) )I [ strlen(I ) -1]=!1
+5
View File
@@ -31,6 +31,11 @@ Judges' comments:
It is a good thing that this program consists of only one It is a good thing that this program consists of only one
expression, otherwise it might become hard to understand. :-) expression, otherwise it might become hard to understand. :-)
NOTE: we could not compile this entry under modern macOS but it will work
fine under linux. It likely fails to compile under macOS because its gcc is
actually just clang which is more strict about the type of the third
argument of main(). If you have gcc under macOS it might work just as well.
We did not test other systems.
Selected notes from the author: Selected notes from the author:
+1
View File
@@ -1,3 +1,4 @@
#include <stdio.h>
O5(O2,O7,O3)char**O7;{return!(O2+=~01+01)?00:!(O2-=02>01)?printf("\045\157\012" O5(O2,O7,O3)char**O7;{return!(O2+=~01+01)?00:!(O2-=02>01)?printf("\045\157\012"
,O5(012,O7+01,00)):!(O2-=02>>01)?(**O7<=067&&**O7>057?O5(03,O7,*(*O7)++-060+010 ,O5(012,O7+01,00)):!(O2-=02>>01)?(**O7<=067&&**O7>057?O5(03,O7,*(*O7)++-060+010
*O3):O3 ):!(O2 -=-O3- ~O3)? (072>** *O3):O3 ):!(O2 -=-O3- ~O3)? (072>**