Merge pull request #12 from xexyl/1993
Get most 1993 entries to compile
This commit is contained in:
19 files changed
+92
-26
No files matched your search
@@ -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
@@ -66,13 +66,18 @@ YEAR= 1993
|
||||
# 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:
|
||||
@echo '=-=-= ${YEAR} begin make $@ =-=-='
|
||||
@echo
|
||||
@for i in ${WINNERS} ; do \
|
||||
echo "=-= start ${YEAR}/$$i =-="; \
|
||||
echo "(cd $$i && $(MAKE) $@)"; \
|
||||
(cd $$i && $(MAKE) $@); \
|
||||
(cd $$i && $(MAKE) $$i); \
|
||||
echo "=-= end ${YEAR}/$$i =-="; \
|
||||
echo; \
|
||||
done
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ LN=ln
|
||||
#
|
||||
#CFLAGS=-O -Xa
|
||||
#CFLAGS=-Xa
|
||||
CFLAGS= -ansi
|
||||
CFLAGS= -ansi -include stdlib.h
|
||||
#CFLAGS=
|
||||
|
||||
# ANSI compiler
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
long
|
||||
z[7992],W,H,*t=z,j,k,*T=z,n,b;
|
||||
#include<X11/Xlib.h>
|
||||
#include<stdlib.h>
|
||||
Window*E,D,s,w[999],*e=w;
|
||||
Display*d;
|
||||
Pixmap
|
||||
|
||||
@@ -11,7 +11,7 @@ Best Abuse of the C Preprocessor:
|
||||
|
||||
Judges' comments:
|
||||
|
||||
To use:
|
||||
To build use:
|
||||
sh ./dgibson.sh [datafile]
|
||||
|
||||
where:
|
||||
@@ -35,6 +35,12 @@ Judges' comments:
|
||||
Good luck trying to use a debugger on this entry! Life is not
|
||||
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:
|
||||
|
||||
|
||||
Regular → Executable
+1
-1
@@ -50,4 +50,4 @@ make dgibson
|
||||
# form the next generation
|
||||
#
|
||||
chmod +w life.d
|
||||
dgibson | tee life.d
|
||||
./dgibson | tee life.d
|
||||
+1
-1
@@ -28,7 +28,7 @@ LN=ln
|
||||
#
|
||||
#CFLAGS=-O -Xa
|
||||
#CFLAGS=-Xa
|
||||
CFLAGS= -ansi
|
||||
CFLAGS= -ansi -include stdio.h -include stdlib.h -include string.h
|
||||
#CFLAGS=
|
||||
|
||||
# ANSI compiler
|
||||
|
||||
@@ -19,6 +19,8 @@ Judges' comments:
|
||||
This program's output may be even more obfuscated when played
|
||||
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:
|
||||
|
||||
|
||||
+5
-3
@@ -1,4 +1,5 @@
|
||||
G int i,j
|
||||
#include <X11/Xlib.h>
|
||||
G long i,j
|
||||
K case
|
||||
R return 0
|
||||
S( x,y) for(x=0; x<y; x++)
|
||||
@@ -35,7 +36,7 @@ Z(){
|
||||
setitimer(0,_,0);
|
||||
}
|
||||
main(){
|
||||
G,*_=(int*)X;
|
||||
G,*_=(long*)X;
|
||||
char*c=
|
||||
"*{{{ {}{{*{{{ {}* { {{*{{{ *{{{ {* {* * { {{ { { *{* { {* *{{{ *{{{ { * { { *{{{ {{ *{{ { {{* { {*{{ {{ {{ {* { {*{{ { *{{{{ *{{ {{ ";
|
||||
for(; *c; )
|
||||
@@ -45,6 +46,7 @@ main(){
|
||||
D=XOpenDisplay(0);
|
||||
L[1]=L[2]=XWhitePixel(D,j=XDefaultScreen(D));
|
||||
XMap@p=XCreate@XRoot@j),0,0,200,470,2,0,1,0,2056,L));
|
||||
XSelectInput(D,p,ExposureMask|KeyPressMask);
|
||||
T W;
|
||||
L[2]=XBlackPixel(D,j);
|
||||
J W;{
|
||||
@@ -85,7 +87,7 @@ Y(){
|
||||
lK(){
|
||||
XNextEvent(D,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){
|
||||
K 1:z+l]=1;
|
||||
d(m);R+1;
|
||||
|
||||
+25
-8
@@ -13,10 +13,10 @@ Judges' comments:
|
||||
make leo
|
||||
|
||||
To have the computer guess:
|
||||
leo [colors]
|
||||
./leo [colors]
|
||||
|
||||
To guess the computer's number:
|
||||
mind [colors]
|
||||
./mind [colors]
|
||||
|
||||
where:
|
||||
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
|
||||
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>
|
||||
#include <sys/malloc.h>
|
||||
--- i/1993/leo/leo.c
|
||||
+++ 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.
|
||||
|
||||
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
#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,
|
||||
@@ -11,7 +12,7 @@
|
||||
#define G unsigned short
|
||||
#define H e^=a[z],a[z]^=e,e^=a[z],
|
||||
|
||||
void
|
||||
int
|
||||
main
|
||||
(int
|
||||
z,char
|
||||
|
||||
@@ -16,8 +16,9 @@ Judges' comments:
|
||||
|
||||
There's more than one way to get around disk quotas. :-)
|
||||
|
||||
Some people have reported problems compiling this entry
|
||||
with gcc 2.3.3.
|
||||
This entry will not compile on modern systems because it
|
||||
relies on a compiler bug which was fixed in gcc 2.3.3 (a very
|
||||
long time ago now).
|
||||
|
||||
The make command:
|
||||
|
||||
@@ -27,6 +28,7 @@ Judges' comments:
|
||||
make of lmfjyh.
|
||||
|
||||
|
||||
|
||||
Selected notes from the author:
|
||||
|
||||
"Practical and efficient method of compressing source code"
|
||||
|
||||
@@ -28,7 +28,7 @@ LN=ln
|
||||
#
|
||||
#CFLAGS=-O -Xa
|
||||
#CFLAGS=-Xa
|
||||
CFLAGS= -ansi
|
||||
CFLAGS= -ansi -include stdio.h
|
||||
#CFLAGS=
|
||||
|
||||
# ANSI compiler
|
||||
|
||||
+2
-2
@@ -50,7 +50,7 @@ x X l
|
||||
int _tty_ch;
|
||||
bool _echoit;
|
||||
bool _rawmode;
|
||||
SGTTY _tty;
|
||||
int _tty;
|
||||
#define U char
|
||||
#define G for(
|
||||
#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++));
|
||||
k=y=- --x;
|
||||
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;
|
||||
)
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ LN=ln
|
||||
#
|
||||
#CFLAGS=-O -Xa
|
||||
#CFLAGS=-Xa
|
||||
CFLAGS= -ansi
|
||||
CFLAGS= -ansi -include stdlib.h -include string.h -include ctype.h
|
||||
#CFLAGS=
|
||||
|
||||
# ANSI compiler
|
||||
|
||||
@@ -29,11 +29,18 @@ Judges' comments:
|
||||
Is it true that Elvis is alive?
|
||||
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)
|
||||
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:
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#define iii\
|
||||
( I ) if ( ii(I,6\
|
||||
) )I [ strlen(I ) -1]=!1
|
||||
|
||||
@@ -31,6 +31,11 @@ Judges' comments:
|
||||
It is a good thing that this program consists of only one
|
||||
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:
|
||||
|
||||
|
||||
@@ -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(012,O7+01,00)):!(O2-=02>>01)?(**O7<=067&&**O7>057?O5(03,O7,*(*O7)++-060+010
|
||||
*O3):O3 ):!(O2 -=-O3- ~O3)? (072>**
|
||||
|
||||
Reference in new issue
Block a user