Add preview of 1984-2019
The 2020 winners are hinted it, but the source code is not there,
nor are the hints. Someone could look into the HTML and
see what was commented out, but that is not a problem because
WHO won is known and the name of their AWARD is known already.
Moreover a number of the winners have talked about what their
entirs do, so the commented out spoiler text is not a bit problem.
One will find HTML commented out with:
<!-- XXX remove when 2020 is ready
2020 links here
XXX remove when 2020 is ready -->
The "XXX remove when 2020 is ready" string is found at the
start and end comment blocks. Again, soneone could read
what was commented out, but that is OK since most of that
information is known or can be known. The following files
have such HTML comment blocks in them.
./winners.html
./years-spoiler.html
./years.html
In addition, ./all/summary.txt was modified to not
include the 2020 entries for the momemt.
The 2020 winner code AND write-ups are NOT part of this set.
p.s. The all/all.tar.bz2 does not contain the 2020 source code (yet?).
This commit is contained in:
1 parent
28efc67f5d
commit
c0663537cb
1683 files changed
+220064
No files matched your search
Binary file not shown.
@@ -0,0 +1,77 @@
|
||||
#!/usr/bin/env make
|
||||
#
|
||||
# 1987 makefile
|
||||
#
|
||||
# This work by Landon Curt Noll, Simon Cooper, and Leonid A. Broukhis
|
||||
# is licensed under:
|
||||
#
|
||||
# Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
||||
#
|
||||
# See: http://creativecommons.org/licenses/by-sa/3.0/
|
||||
|
||||
|
||||
################
|
||||
# tool locations
|
||||
################
|
||||
#
|
||||
SHELL= /bin/bash
|
||||
CP= cp
|
||||
CPP= cpp
|
||||
GUNZIP= gunzip
|
||||
LD= ld
|
||||
MAKE= make
|
||||
RM= rm
|
||||
SED= sed
|
||||
TAR= tar
|
||||
TRUE= true
|
||||
|
||||
# for System V style systems
|
||||
OPSYS= -Dindex=strchr
|
||||
# for BSD style systems
|
||||
#OPSYS=
|
||||
|
||||
# ANSI compiler
|
||||
#
|
||||
# Set CC to the name of your ANSI compiler.
|
||||
#
|
||||
CC= cc
|
||||
|
||||
|
||||
###############
|
||||
# IOCCC winners
|
||||
###############
|
||||
#
|
||||
WINNERS= heckbert wall westley hines korn biggar lievaart
|
||||
|
||||
###################
|
||||
# build all entries
|
||||
###################
|
||||
#
|
||||
all:
|
||||
@for i in ${WINNERS} ; do \
|
||||
echo "(cd $$i && $(MAKE) OPSYS=${OPSYS} $@)"; \
|
||||
(cd $$i && $(MAKE) "OPSYS=${OPSYS}" $@); \
|
||||
done
|
||||
|
||||
|
||||
###############
|
||||
# utility rules
|
||||
###############
|
||||
#
|
||||
clean:
|
||||
@for i in ${WINNERS} ; do \
|
||||
echo "(cd $$i && $(MAKE) $@)"; \
|
||||
(cd $$i && $(MAKE) $@); \
|
||||
done
|
||||
|
||||
clobber:
|
||||
@for i in ${WINNERS} ; do \
|
||||
echo "(cd $$i && $(MAKE) $@)"; \
|
||||
(cd $$i && $(MAKE) $@); \
|
||||
done
|
||||
|
||||
install:
|
||||
@for i in ${WINNERS} ; do \
|
||||
echo "(cd $$i && $(MAKE) $@)"; \
|
||||
(cd $$i && $(MAKE) $@); \
|
||||
done
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
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.
|
||||
|
||||
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
|
||||
example, a simple excessive abuse of /lib/cpp was discouraged unless
|
||||
the abuse was unusual. The mailboxes for the contest were moved from
|
||||
nsc to amdahl. The practice of posting a preliminary set of rules for
|
||||
the next year was started this year.
|
||||
|
||||
Rules and results were posted to comp.lang.c, comp.unix.wizards with
|
||||
an announcement in news.announce.important. Micro/Systems Journal
|
||||
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.
|
||||
@@ -0,0 +1,32 @@
|
||||
# %W% %G% %U%
|
||||
#
|
||||
# 1987 makefile
|
||||
#
|
||||
# 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
|
||||
# from Landon Curt Noll and Larry Bassel.
|
||||
|
||||
|
||||
SHELL= /bin/sh
|
||||
WINNERS= biggar
|
||||
|
||||
# for System V style systems
|
||||
OPSYS= -Dindex=strchr
|
||||
# for BSD style systems
|
||||
#OPSYS=
|
||||
|
||||
all: ${WINNERS}
|
||||
|
||||
biggar: biggar.c
|
||||
cc -DC="R>0" -DI="if(T)O" -DO="c=write(1,&c,1);" \
|
||||
-DP="main(){X}" -DR="read(0,&c,1)" -DT="c!=015" \
|
||||
-DW="while(C)I" -DX="char c;W" $? -o $@
|
||||
|
||||
clean:
|
||||
rm -f core
|
||||
clobber: clean
|
||||
rm -f ${WINNERS}
|
||||
install: all
|
||||
@echo are you kidding'??'
|
||||
@@ -0,0 +1 @@
|
||||
P;
|
||||
@@ -0,0 +1,44 @@
|
||||
<h1>Best Abuse of the Rules</h1>
|
||||
|
||||
<p>Mark Biggar<br>
|
||||
UNiSYS - System Development Group, Santa Monica<br>
|
||||
2525 Colorado AV MD 91-01<br>
|
||||
Santa Monica, CA<br>
|
||||
90406</p>
|
||||
|
||||
<h2>Judges' comments:</h2>
|
||||
|
||||
<h3>To build:</h3>
|
||||
|
||||
<pre><code>cc -DC="R>0" -DI="if(T)O" -DO="c=write(1,&c,1);" -DP="main(){X}"\
|
||||
-DR="read(0,&c,1)" -DT="c!=015" -DW="while(C)I" -DX="char c;W" markb.c
|
||||
</code></pre>
|
||||
|
||||
<p>Passes BSD and UTS lint. At least one version of lint is thrown into
|
||||
an infinite loop by this entry.</p>
|
||||
|
||||
<h3>Try:</h3>
|
||||
|
||||
<pre><code>... | markb | od -c (remember to compile as indicated above)
|
||||
</code></pre>
|
||||
|
||||
<p>By changing the compile line you can make this program do anything you
|
||||
want. This is a very efficient way to transfer source, though it
|
||||
increases the size of Makefiles.</p>
|
||||
|
||||
<p>With only slight variations, this program can be set to many uses.
|
||||
Consider how easy it would be to release Un*x source in this form;
|
||||
so what if the make files grow a little! :-)</p>
|
||||
|
||||
<p>One vendor’s lint got hung in an infinite loop over this entry!</p>
|
||||
|
||||
<blockquote><p>FYI: We will let Mark get away with this truly sick entry this time, but
|
||||
for the future on we have placed a limit on the size of a compile line.</p></blockquote>
|
||||
|
||||
<p>Also see our comment in Larry Wall’s entry regarding Mark’s contribution.</p>
|
||||
|
||||
<p>Copyright © 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.</p>
|
||||
@@ -0,0 +1,43 @@
|
||||
# Best Abuse of the Rules
|
||||
|
||||
Mark Biggar
|
||||
UNiSYS - System Development Group, Santa Monica
|
||||
2525 Colorado AV MD 91-01
|
||||
Santa Monica, CA
|
||||
90406
|
||||
|
||||
## Judges' comments:
|
||||
|
||||
### To build:
|
||||
|
||||
cc -DC="R>0" -DI="if(T)O" -DO="c=write(1,&c,1);" -DP="main(){X}"\
|
||||
-DR="read(0,&c,1)" -DT="c!=015" -DW="while(C)I" -DX="char c;W" markb.c
|
||||
|
||||
Passes BSD and UTS lint. At least one version of lint is thrown into
|
||||
an infinite loop by this entry.
|
||||
|
||||
### Try:
|
||||
|
||||
... | markb | od -c (remember to compile as indicated above)
|
||||
|
||||
|
||||
By changing the compile line you can make this program do anything you
|
||||
want. This is a very efficient way to transfer source, though it
|
||||
increases the size of Makefiles.
|
||||
|
||||
With only slight variations, this program can be set to many uses.
|
||||
Consider how easy it would be to release Un*x source in this form;
|
||||
so what if the make files grow a little! :-)
|
||||
|
||||
One vendor's lint got hung in an infinite loop over this entry!
|
||||
|
||||
> FYI: We will let Mark get away with this truly sick entry this time, but
|
||||
> for the future on we have placed a limit on the size of a compile line.
|
||||
|
||||
Also see our comment in Larry Wall's entry regarding Mark's contribution.
|
||||
|
||||
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.
|
||||
@@ -0,0 +1,30 @@
|
||||
# %W% %G% %U%
|
||||
#
|
||||
# 1987 makefile
|
||||
#
|
||||
# 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
|
||||
# from Landon Curt Noll and Larry Bassel.
|
||||
|
||||
|
||||
SHELL= /bin/sh
|
||||
WINNERS= heckbert
|
||||
|
||||
# for System V style systems
|
||||
OPSYS= -Dindex=strchr
|
||||
# for BSD style systems
|
||||
#OPSYS=
|
||||
|
||||
all: ${WINNERS}
|
||||
|
||||
heckbert: heckbert.c
|
||||
cc ${OPSYS} $? -o $@
|
||||
|
||||
clean:
|
||||
rm -f core
|
||||
clobber: clean
|
||||
rm -f ${WINNERS}
|
||||
install: all
|
||||
@echo are you kidding'??'
|
||||
@@ -0,0 +1,18 @@
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#define _ define
|
||||
#_ A putchar
|
||||
#_ B return
|
||||
#_ C index
|
||||
char*r,c[300001],*d=">=<=!===||&&->++-->><<",*i,*l,*j,*m,*k,*n,*h,*y;e,u=1,v,w,
|
||||
f=1,p,s,x;main(a,b)char**b;{p=a>1?atoi(b[1]):79;r=c+read(0,j=l=i=c,300000);v=g(
|
||||
j,&m);for(k=m;v!=2;j=k,m=n,v=w,k=m){w=g(k,&n);if(v==1&&m-j==1&&*j==35)e&&A(10),
|
||||
e=f=0;if(!f&&v==3&&(char*)C(j,10)<m)A(10),e=0,f=1;else if(v>2&&(u||w)&&(f||u)&&
|
||||
(l-i>1||*i!=61||n-k>1||!C("-*&",*k)))continue;else if(v==3)if(f&&e+1+n-k>p&&e)A
|
||||
(10),e=0;else A(32),e++;else{if(f&&e+m-j>p&&e)A(10),e=0;e+=m-j;k=j;while(k<m)A(
|
||||
*k++);}i=j;l=m;u=v;}e&&A(10);}g(j,m)char*j,**m;{if(j>=r)B*m=j,2;s=isdigit(*j)||
|
||||
*j==46&&isdigit(j[1]);for(h=j;h<r;h++)if(!isalnum(*h)&&*h!=95&&(!s||*h!=46)&&(!
|
||||
s||h[-1]!=101&&h[-1]!=69||!C("+-",*h)))break;if(h>j)B*m=h,0;x=1;for(h=j;h<r&&C(
|
||||
" \t\n",*h);h++);if(h>j)h--,x=3;if(*j==34||*j==39)for(h=j+1;h<r&&*h!=*j;h++)if(
|
||||
*h==92)h++;for(y=d;*y&&strncmp(y,j,2);y+=2);if(*y)h=j+1;if(!strncmp("/*",j,2)){
|
||||
h=j+2;while(*++h!=42||*++h!=47);x=4;}*m=h+1;B x;}
|
||||
@@ -0,0 +1,25 @@
|
||||
<h1>Best Obfuscator of Programs</h1>
|
||||
|
||||
<p>Paul Heckbert<br>
|
||||
Pixar</p>
|
||||
|
||||
<h2>Judges' comments:</h2>
|
||||
|
||||
<h3>Try:</h3>
|
||||
|
||||
<pre><code>ph 40 < ph.c > foo.c; cc foo.c -o ph
|
||||
ph 20 < a_C_prog.c > bar.c; cc bar.c
|
||||
</code></pre>
|
||||
|
||||
<p>The judges used this program to fold up very long lines which the
|
||||
BSD fold(1) was unable to process. This program has been added
|
||||
to the contest tool chest.</p>
|
||||
|
||||
<p>On System V systems, compile with: <code>-Dindex=strchr</code>
|
||||
To compile on a 16 bit machine, change 300000’s to 30000.</p>
|
||||
|
||||
<p>Copyright © 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.</p>
|
||||
@@ -0,0 +1,24 @@
|
||||
# Best Obfuscator of Programs
|
||||
|
||||
Paul Heckbert
|
||||
Pixar
|
||||
|
||||
## Judges' comments:
|
||||
|
||||
|
||||
### Try:
|
||||
ph 40 < ph.c > foo.c; cc foo.c -o ph
|
||||
ph 20 < a_C_prog.c > bar.c; cc bar.c
|
||||
|
||||
The judges used this program to fold up very long lines which the
|
||||
BSD fold(1) was unable to process. This program has been added
|
||||
to the contest tool chest.
|
||||
|
||||
On System V systems, compile with: `-Dindex=strchr`
|
||||
To compile on a 16 bit machine, change 300000's to 30000.
|
||||
|
||||
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.
|
||||
@@ -0,0 +1,30 @@
|
||||
# %W% %G% %U%
|
||||
#
|
||||
# 1987 makefile
|
||||
#
|
||||
# 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
|
||||
# from Landon Curt Noll and Larry Bassel.
|
||||
|
||||
|
||||
SHELL= /bin/sh
|
||||
WINNERS= hines
|
||||
|
||||
# for System V style systems
|
||||
OPSYS= -Dindex=strchr
|
||||
# for BSD style systems
|
||||
#OPSYS=
|
||||
|
||||
all: ${WINNERS}
|
||||
|
||||
hines: hines.c
|
||||
cc $? -o $@
|
||||
|
||||
clean:
|
||||
rm -f core
|
||||
clobber: clean
|
||||
rm -f ${WINNERS}
|
||||
install: all
|
||||
@echo are you kidding'??'
|
||||
@@ -0,0 +1,19 @@
|
||||
#include <stdio.h>
|
||||
#include <malloc.h>
|
||||
main(togo,toog)
|
||||
int togo;
|
||||
char *toog[];
|
||||
{char *ogto, tgoo[80];FILE *ogot; int oogt=0, ootg, otog=79,
|
||||
ottg=1;if ( togo== ottg) goto gogo; goto goog; ggot:
|
||||
if ( fgets( tgoo, otog, ogot)) goto gtgo; goto gott;
|
||||
gtot: exit(); ogtg: ++oogt; goto ogoo; togg: if ( ootg > 0)
|
||||
goto oggt; goto ggot; ogog: if ( !ogot) goto gogo;
|
||||
goto ggto; gtto: printf( "%d goto \'s\n", oogt); goto
|
||||
gtot; oggt: if ( !memcmp( ogto, "goto", 4)) goto otgg;
|
||||
goto gooo; gogo: exit( ottg); tggo: ootg= strlen(tgoo);
|
||||
goto tgog; oogo: --ootg; goto togg; gooo: ++ogto; goto
|
||||
oogo; gott: fclose( ogot); goto gtto; otgg: ogto= ogto +3;
|
||||
goto ogtg; tgog: ootg-=4;goto togg; gtgo: ogto= tgoo;
|
||||
goto tggo; ogoo: ootg-=3;goto gooo; goog: ogot= fopen(
|
||||
toog[ ottg], "r"); goto ogog; ggto: ogto= tgoo; goto
|
||||
ggot;}
|
||||
@@ -0,0 +1,29 @@
|
||||
<h1>Worst Style</h1>
|
||||
|
||||
<p>Spencer Hines<br>
|
||||
OnLine Computer Systems<br>
|
||||
4200 Farragut Street<br>
|
||||
Hyattsville, MD<br>
|
||||
20781<br>
|
||||
USA</p>
|
||||
|
||||
<h2>Judges' comments:</h2>
|
||||
|
||||
<h3>Try:</h3>
|
||||
|
||||
<pre><code>hines hines.c
|
||||
</code></pre>
|
||||
|
||||
<p>This program was designed to maximize the bother function for
|
||||
structured programmers. This program takes goto statements to their
|
||||
logical conclusion. The layout and choice of names are classic.</p>
|
||||
|
||||
<p>We consider this to be a beautiful counter-example for Frank Rubin’s
|
||||
letter to ACM form titled: <em>“GOTO Considered Harmful” Considered Harmful</em>.
|
||||
See the Communications of the ACM, March 1987, Page 195-196.</p>
|
||||
|
||||
<p>Copyright © 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.</p>
|
||||
@@ -0,0 +1,28 @@
|
||||
# Worst Style
|
||||
|
||||
Spencer Hines
|
||||
OnLine Computer Systems
|
||||
4200 Farragut Street
|
||||
Hyattsville, MD
|
||||
20781
|
||||
USA
|
||||
|
||||
## Judges' comments:
|
||||
|
||||
### Try:
|
||||
|
||||
hines hines.c
|
||||
|
||||
This program was designed to maximize the bother function for
|
||||
structured programmers. This program takes goto statements to their
|
||||
logical conclusion. The layout and choice of names are classic.
|
||||
|
||||
We consider this to be a beautiful counter-example for Frank Rubin's
|
||||
letter to ACM form titled: *"GOTO Considered Harmful" Considered Harmful*.
|
||||
See the Communications of the ACM, March 1987, Page 195-196.
|
||||
|
||||
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.
|
||||
@@ -0,0 +1,30 @@
|
||||
# %W% %G% %U%
|
||||
#
|
||||
# 1987 makefile
|
||||
#
|
||||
# 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
|
||||
# from Landon Curt Noll and Larry Bassel.
|
||||
|
||||
|
||||
SHELL= /bin/sh
|
||||
WINNERS= korn
|
||||
|
||||
# for System V style systems
|
||||
OPSYS= -Dindex=strchr
|
||||
# for BSD style systems
|
||||
#OPSYS=
|
||||
|
||||
all: ${WINNERS}
|
||||
|
||||
korn: korn.c
|
||||
cc $? -o $@
|
||||
|
||||
clean:
|
||||
rm -f core
|
||||
clobber: clean
|
||||
rm -f ${WINNERS}
|
||||
install: all
|
||||
@echo are you kidding'??'
|
||||
@@ -0,0 +1,56 @@
|
||||
<h1>Best One Liner</h1>
|
||||
|
||||
<p>David Korn<br>
|
||||
AT&T Bell Labs<br>
|
||||
MH 3C-526B, AT&T Bell Labs<br>
|
||||
Murray Hill, NJ<br>
|
||||
07974<br>
|
||||
USA</p>
|
||||
|
||||
<h2>Judges' comments:</h2>
|
||||
|
||||
<p>The Judges believe that this is the best one line entry ever received.
|
||||
Compile on a UN*X system, or at least using a C implementation that
|
||||
fakes it. Very few people are able to determine what this program
|
||||
does by visual inspection. I suggest that you stop reading this
|
||||
section right now and see if you are one of the few people who can.</p>
|
||||
|
||||
<p>Several points are important to understand in this program:</p>
|
||||
|
||||
<p>1) What is the symbol ‘unix’ and what is its value in the program?
|
||||
Clearly ‘unix’ is not a function, and since ‘unix’ is not declared
|
||||
to be a data type (such as int, char, struct foo, enum, …)
|
||||
what must ‘unix’ be?</p>
|
||||
|
||||
<p>2) What is the value of the symbol “have”? (hint: the value is
|
||||
NOT 4 characters, or ‘h’, or a string) Consider the fact that:</p>
|
||||
|
||||
<pre><code> char *x;
|
||||
</code></pre>
|
||||
|
||||
<p> defines a pointer to a character (i.e. an address), and that
|
||||
the ‘=’ assigns things is compatible types. Since:</p>
|
||||
|
||||
<pre><code> x = "have";
|
||||
</code></pre>
|
||||
|
||||
<p> is legal C, what type of value is “have”?</p>
|
||||
|
||||
<p>3) Note that the following expressions yield the same value:</p>
|
||||
|
||||
<pre><code> x[3] *(x+3) *(3+x)
|
||||
</code></pre>
|
||||
|
||||
<p> since addition is communitive. What can be said about the value:</p>
|
||||
|
||||
<pre><code> 3[x]
|
||||
</code></pre>
|
||||
|
||||
<p>David Korn’s /bin/ksh provides us with a greatly improved version of
|
||||
the /bin/sh. The source for v7’s /bin/sh greatly inspired this contest.</p>
|
||||
|
||||
<p>Copyright © 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.</p>
|
||||
@@ -0,0 +1,52 @@
|
||||
# Best One Liner
|
||||
|
||||
David Korn
|
||||
AT&T Bell Labs
|
||||
MH 3C-526B, AT&T Bell Labs
|
||||
Murray Hill, NJ
|
||||
07974
|
||||
USA
|
||||
|
||||
## Judges' comments:
|
||||
|
||||
The Judges believe that this is the best one line entry ever received.
|
||||
Compile on a UN*X system, or at least using a C implementation that
|
||||
fakes it. Very few people are able to determine what this program
|
||||
does by visual inspection. I suggest that you stop reading this
|
||||
section right now and see if you are one of the few people who can.
|
||||
|
||||
Several points are important to understand in this program:
|
||||
|
||||
1) What is the symbol 'unix' and what is its value in the program?
|
||||
Clearly 'unix' is not a function, and since 'unix' is not declared
|
||||
to be a data type (such as int, char, struct foo, enum, ...)
|
||||
what must 'unix' be?
|
||||
|
||||
2) What is the value of the symbol "have"? (hint: the value is
|
||||
NOT 4 characters, or 'h', or a string) Consider the fact that:
|
||||
|
||||
char *x;
|
||||
|
||||
defines a pointer to a character (i.e. an address), and that
|
||||
the '=' assigns things is compatible types. Since:
|
||||
|
||||
x = "have";
|
||||
|
||||
is legal C, what type of value is "have"?
|
||||
|
||||
3) Note that the following expressions yield the same value:
|
||||
|
||||
x[3] *(x+3) *(3+x)
|
||||
|
||||
since addition is communitive. What can be said about the value:
|
||||
|
||||
3[x]
|
||||
|
||||
David Korn's /bin/ksh provides us with a greatly improved version of
|
||||
the /bin/sh. The source for v7's /bin/sh greatly inspired this 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.
|
||||
@@ -0,0 +1 @@
|
||||
main() { printf(&unix["\021%six\012\0"],(unix)["have"]+"fun"-0x60);}
|
||||
@@ -0,0 +1,33 @@
|
||||
# %W% %G% %U%
|
||||
#
|
||||
# 1987 makefile
|
||||
#
|
||||
# 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
|
||||
# from Landon Curt Noll and Larry Bassel.
|
||||
|
||||
|
||||
SHELL= /bin/sh
|
||||
WINNERS= lievaart lievaart2
|
||||
|
||||
# for System V style systems
|
||||
OPSYS= -Dindex=strchr
|
||||
# for BSD style systems
|
||||
#OPSYS=
|
||||
|
||||
all: ${WINNERS}
|
||||
|
||||
lievaart: lievaart.c
|
||||
cc $? -o $@
|
||||
# not an official entry
|
||||
lievaart2: lievaart2.c
|
||||
cc $? -o $@
|
||||
|
||||
clean:
|
||||
rm -f core
|
||||
clobber: clean
|
||||
rm -f ${WINNERS}
|
||||
install: all
|
||||
@echo are you kidding'??'
|
||||
@@ -0,0 +1,36 @@
|
||||
<h1>Grand Prize</h1>
|
||||
|
||||
<p>Roemer B. Lievaart<br>
|
||||
VU Informatica<br>
|
||||
Churchilllaan 173-IV<br>
|
||||
Amsterdam, The Netherlands</p>
|
||||
|
||||
<h2>Judges' remarks:</h2>
|
||||
|
||||
<p>We believe that you too will be amazed at just how much power Mr. Lievaart
|
||||
packed into 1024 bytes!</p>
|
||||
|
||||
<p>This Plays the game of reversi (Othello)! Compile and run. It then
|
||||
asks for a playing level. Enter 0-10 (easy-hard). It then asks for
|
||||
your move. A move is a number within 11-88, or a 99 to pass. Illegal
|
||||
moves (except for an illegal pass) are rejected. Then the computer
|
||||
does its move (or a 0 to pass), until the board is full.</p>
|
||||
|
||||
<p>It plays rather well, for such a small program! Lievaart had to leave out the
|
||||
board printing routine, so you’ll have to take a real game board to
|
||||
play it. … Also due to space-limitations (the rules for 1987 had a
|
||||
limit of 1024 byes), Lievaart took out the passing-handler, which
|
||||
makes its ending-game rather poor. But further it knows all the
|
||||
rules, uses alpha-beta pruning, and it plays f.i. on mobility(!).
|
||||
Most important: it can play a pretty good game of Reversi!</p>
|
||||
|
||||
<p>The Author was kind enough to supply the fully functional version of the
|
||||
program. The file lievaart2.c contains what the program would have
|
||||
been without the size restriction. This version has the full end game
|
||||
logic and displays the board after each move!</p>
|
||||
|
||||
<p>Copyright © 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.</p>
|
||||
@@ -0,0 +1,37 @@
|
||||
# Grand Prize
|
||||
|
||||
Roemer B. Lievaart
|
||||
VU Informatica
|
||||
Churchilllaan 173-IV
|
||||
Amsterdam, The Netherlands
|
||||
|
||||
|
||||
## Judges' remarks:
|
||||
|
||||
We believe that you too will be amazed at just how much power Mr. Lievaart
|
||||
packed into 1024 bytes!
|
||||
|
||||
This Plays the game of reversi (Othello)! Compile and run. It then
|
||||
asks for a playing level. Enter 0-10 (easy-hard). It then asks for
|
||||
your move. A move is a number within 11-88, or a 99 to pass. Illegal
|
||||
moves (except for an illegal pass) are rejected. Then the computer
|
||||
does its move (or a 0 to pass), until the board is full.
|
||||
|
||||
It plays rather well, for such a small program! Lievaart had to leave out the
|
||||
board printing routine, so you'll have to take a real game board to
|
||||
play it. ... Also due to space-limitations (the rules for 1987 had a
|
||||
limit of 1024 byes), Lievaart took out the passing-handler, which
|
||||
makes its ending-game rather poor. But further it knows all the
|
||||
rules, uses alpha-beta pruning, and it plays f.i. on mobility(!).
|
||||
Most important: it can play a pretty good game of Reversi!
|
||||
|
||||
The Author was kind enough to supply the fully functional version of the
|
||||
program. The file lievaart2.c contains what the program would have
|
||||
been without the size restriction. This version has the full end game
|
||||
logic and displays the board after each move!
|
||||
|
||||
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.
|
||||
@@ -0,0 +1,20 @@
|
||||
#define D define
|
||||
#D Y return
|
||||
#D R for
|
||||
#D e while
|
||||
#D I printf
|
||||
#D l int
|
||||
#D C y=v+111;H(x,v)*y++= *x
|
||||
#D H(a,b)R(a=b+11;a<b+89;a++)
|
||||
#D s(a)t=scanf("%d",&a)
|
||||
l V[1100],u,r[]={-1,-11,-10,-9,1,11,10,9},h[]={11,18,81,88},ih[]={22,27,72,77},
|
||||
bz,lv=60,*x,*y,m,t;S(d,v,f,a,b)l*v;{l c=0,*n=v+100,bw=d<u-1?a:-9000,w,z,i,zb,q=
|
||||
3-f;if(d>u){R(w=i=0;i<4;i++)w+=(m=v[h[i]])==f?300:m==q?-300:(t=v[ih[i]])==f?-50
|
||||
:t==q?50:0;return w;}H(z,0){if(GZ(v,z,f,100)){c++;w= -S(d+1,n,q,-b,-bw);if(w>bw
|
||||
){zb=z;bw=w;if(w>=b||w>=8003)Y w;}}}if(!c){bz=0;C;Y-S(d+1,n,q,-b,-bw);}bz=zb;Y
|
||||
d>=u-1?bw+(c<<3):bw;}main(){R(;t<1100;t+=100)R(m=0;m<100;m++)V[t+m]=m<11||m>88
|
||||
||(m+1)%10<2?3:0;V[44]=V[55]=1;V[45]=V[54]=2;I("Level:");s(u);e(lv>0){do{I("Yo\
|
||||
u:");s(m);}e(!GZ(V,m,2,0)&&m!=99);if(m!=99)lv--;if(lv<15&&u<10)u+=2;I("Wait\n")
|
||||
;I("Value:%d\n",S(0,V,1,-9000,9000));I("move: %d\n",(lv-=GZ(V,bz,1,0),bz));}}GZ
|
||||
(v,z,f,o)l*v;{l*j,q=3-f,g=0,i,h,*k=v+z;if(*k==0)R(i=7;i>=0;i--){j=k+(h=r[i]);e(
|
||||
*j==q)j+=h;if(*j==f&&j-h!=k){if(!g){g=1;C;}e(j!=k)*((j-=h)+o)=f;}}Y g;}
|
||||
@@ -0,0 +1,25 @@
|
||||
#define D define
|
||||
#D Y return
|
||||
#D R for
|
||||
#D e while
|
||||
#D I printf
|
||||
#D l int
|
||||
#D W if
|
||||
#D C y=v+111;H(x,v)*y++= *x
|
||||
#D H(a,b)R(a=b+11;a<b+89;a++)
|
||||
#D s(a)t=scanf("%d",&a)
|
||||
#D U Z I
|
||||
#D Z I("123\
|
||||
45678\n");H(x,V){putchar(".XO"[*x]);W((x-V)%10==8){x+=2;I("%d\n",(x-V)/10-1);}}
|
||||
l V[1600],u,r[]={-1,-11,-10,-9,1,11,10,9},h[]={11,18,81,88},ih[]={22,27,72,77},
|
||||
bz,lv=60,*x,*y,m,t;S(d,v,f,_,a,b)l*v;{l c=0,*n=v+100,j=d<u-1?a:-9000,w,z,i,g,q=
|
||||
3-f;W(d>u){R(w=i=0;i<4;i++)w+=(m=v[h[i]])==f?300:m==q?-300:(t=v[ih[i]])==f?-50:
|
||||
t==q?50:0;Y w;}H(z,0){W(E(v,z,f,100)){c++;w= -S(d+1,n,q,0,-b,-j);W(w>j){g=bz=z;
|
||||
j=w;W(w>=b||w>=8003)Y w;}}}W(!c){g=0;W(_){H(x,v)c+= *x==f?1:*x==3-f?-1:0;Y c>0?
|
||||
8000+c:c-8000;}C;j= -S(d+1,n,q,1,-b,-j);}bz=g;Y d>=u-1?j+(c<<3):j;}main(){R(;t<
|
||||
1600;t+=100)R(m=0;m<100;m++)V[t+m]=m<11||m>88||(m+1)%10<2?3:0;I("Level:");V[44]
|
||||
=V[55]=1;V[45]=V[54]=2;s(u);e(lv>0){Z do{I("You:");s(m);}e(!E(V,m,2,0)&&m!=99);
|
||||
W(m!=99)lv--;W(lv<15&&u<10)u+=2;U("Wait\n");I("Value:%d\n",S(0,V,1,0,-9000,9000
|
||||
));I("move: %d\n",(lv-=E(V,bz,1,0),bz));}}E(v,z,f,o)l*v;{l*j,q=3-f,g=0,i,w,*k=v
|
||||
+z;W(*k==0)R(i=7;i>=0;i--){j=k+(w=r[i]);e(*j==q)j+=w;W(*j==f&&j-w!=k){W(!g){g=1
|
||||
;C;}e(j!=k)*((j-=w)+o)=f;}}Y g;}
|
||||
+167
@@ -0,0 +1,167 @@
|
||||
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.
|
||||
|
||||
WARNING: The rules and mailing address for the contest change from year
|
||||
to year. Be sure that you consult the current set of rules
|
||||
before submitting entries.
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Subject: 4th International Obfuscated C Code Contest Rules
|
||||
Newsgroups: comp.lang.c,comp.unix.wizards
|
||||
Keywords: rules,1987,obfuscate,contest
|
||||
|
||||
GOALS OF THE CONTEST:
|
||||
|
||||
* To write the most Obscure/Obfuscated C program under the rules below.
|
||||
* To show what should NOT be done in C programs.
|
||||
* To provide a safe forum for poor C code. :-)
|
||||
|
||||
RULES:
|
||||
1) The source must be 1024 characters long or less. NO EXCEPTIONS!
|
||||
|
||||
2) To help us process your entries, we ask that you submit entries
|
||||
in the following format: (please include the --- lines)
|
||||
|
||||
---start of header items---
|
||||
name:
|
||||
org:
|
||||
email address:
|
||||
postal address:
|
||||
environment:
|
||||
remarks:
|
||||
---start of entry---
|
||||
X <place obfuscated source of 1024 characters or less here>
|
||||
X <add a leading X to each line to avoid problems with mailers>
|
||||
X <leading X's do not count toward the source character count>
|
||||
X <the first X of each source line will be removed prior to compilation>
|
||||
X <newlines count as 1 character>
|
||||
X <assume a standard 8 character tab stop>
|
||||
---end of entry---
|
||||
|
||||
3) Regarding the header items:
|
||||
|
||||
* All header items except 'remark' are optional. If you do not
|
||||
wish to answer an item, indicate so by the string: ***NONE***
|
||||
Any text outside of the above format will be kept confidential.
|
||||
|
||||
* You can remain anonymous. If the name item is: ***ANONYMOUS***
|
||||
all items except the 'remarks' item will not be relased.
|
||||
|
||||
* Indicate the name of your Company or School in the 'org' item.
|
||||
|
||||
* The 'email address' item asks for a network path from a major
|
||||
site (such as amdahl) to your mailbox.
|
||||
|
||||
* If you give a 'postal address', please include your Country.
|
||||
|
||||
* Give the machine and operating system (i.e., Un*x version) on
|
||||
which your program ran.
|
||||
|
||||
* The 'remarks' item is not optional. Please indicate:
|
||||
- how to execute or compile if something special is required
|
||||
- type of input or argument needed, if applicable
|
||||
- what this program does
|
||||
- any other remarks you wish to make
|
||||
|
||||
* If you need more than one line on a header item, place
|
||||
tab or space characters at the beginning of each additional line.
|
||||
|
||||
4) The entry should be written in a common C. (K&R + common extensions)
|
||||
|
||||
5) The program must be of original work. All programs must be
|
||||
in the public domain. All copyrighted programs will be rejected.
|
||||
|
||||
6) Entries must be received before 30-May-87 0:00 GMT.
|
||||
Email your entries to:
|
||||
|
||||
...!amdahl!obfuscate
|
||||
|
||||
Amdahl talks to hplabs, decwrl, pyramid, seismo and cbosgd.
|
||||
We will attempt to Email a confirmation of receipt of contest
|
||||
entries, however since Email is not reliable you may not receive it.
|
||||
People are encouraged to submit entries via Email, however
|
||||
one may mail entries the following postal address:
|
||||
|
||||
Landon Curt Noll
|
||||
Amdahl Corp.
|
||||
1250 E. Arques Ave. M/S 316
|
||||
P.O. Box 3470
|
||||
Sunnyvale, CA
|
||||
94088-3470
|
||||
U.S.A.
|
||||
|
||||
Write the words: "International Obfuscated C Code Contest" near the
|
||||
bottom left corner of the envelope.
|
||||
|
||||
8) Contest entries sent in by post should indicate where TAB characters
|
||||
are to be placed, otherwise space characters will be assumed. Each
|
||||
line will be assumed to contain a newline character. The leading
|
||||
'X' will serve to indicate where each source line starts.
|
||||
|
||||
9) Each person may submit up to 5 entries. Multiple entries must
|
||||
be sent in separate Email letters or postal envelopes.
|
||||
|
||||
10) People are encouraged to examine winners of the previous
|
||||
contests. A copy of these entries was posted to mod.sources
|
||||
on or about 12-Mar-87. Contact the mod.sources moderator
|
||||
if you missed that article. Keep in mind that rules change from
|
||||
year to year, so some winning entries may not be valid
|
||||
entries this year. Also what was unique and novel one
|
||||
year can get 'old' the next year.
|
||||
|
||||
|
||||
ANNOUNCEMENT OF WINNERS:
|
||||
|
||||
* First announcement will be at the Summer 87 Usenix BOF.
|
||||
|
||||
* An announcement will be posted to mod.announce near
|
||||
mid June 1987 stating to which newsgroup the winners
|
||||
have been posted.
|
||||
|
||||
* An article containing the winning entries will be published
|
||||
in a future issue of the "Micro/Systems Journal".
|
||||
|
||||
* Winners receive international fame and flames! :-)
|
||||
|
||||
|
||||
JUDGING:
|
||||
Awards will be given to the best entry in a number of categories.
|
||||
The actual category list will vary depending on the types of entries
|
||||
we receive. At the moment, we are considering using the following:
|
||||
|
||||
* The best small one line program
|
||||
* The most obscure algorithm
|
||||
* The worst abuse of the C preprocessor (note warnings below)
|
||||
* The strangest source layout
|
||||
* The most useful obfuscated program
|
||||
* <anything else so strange that it deserves an award>
|
||||
|
||||
Extra points will be given for programs which:
|
||||
|
||||
* pass lint without complaint
|
||||
* do something quasi-interesting
|
||||
* are portable
|
||||
* are unique in their obfuscation style
|
||||
* are concise
|
||||
|
||||
Points will be taken away for programs that:
|
||||
|
||||
* are very hardware or Un*x version specific
|
||||
* dump core or have compiler warnings
|
||||
(we won't take points away if you warn us in the remark item)
|
||||
* fail to compile
|
||||
* obfuscate only by overuse of #defines
|
||||
(you should do this ONLY if your use is unusual)
|
||||
* are similar to previous winners
|
||||
* are similar to previous losers :-)
|
||||
|
||||
The Judging will be done by Landon Noll and Larry Bassel.
|
||||
Comments & questions (not entries) about the contest can be Emailed to:
|
||||
|
||||
...!amdahl!judges
|
||||
|
||||
chongo <Landon Curt Noll> /\cc/\
|
||||
Larry Bassel
|
||||
@@ -0,0 +1,30 @@
|
||||
# %W% %G% %U%
|
||||
#
|
||||
# 1987 makefile
|
||||
#
|
||||
# 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
|
||||
# from Landon Curt Noll and Larry Bassel.
|
||||
|
||||
|
||||
SHELL= /bin/sh
|
||||
WINNERS= wall
|
||||
|
||||
# for System V style systems
|
||||
OPSYS= -Dindex=strchr
|
||||
# for BSD style systems
|
||||
#OPSYS=
|
||||
|
||||
all: ${WINNERS}
|
||||
|
||||
wall: wall.c
|
||||
cc $? -o $@
|
||||
|
||||
clean:
|
||||
rm -f core
|
||||
clobber: clean
|
||||
rm -f ${WINNERS}
|
||||
install: all
|
||||
@echo are you kidding'??'
|
||||
@@ -0,0 +1,35 @@
|
||||
<h1>Most Useful Obfuscation</h1>
|
||||
|
||||
<p>Larry Wall<br>
|
||||
Unisys - System Development Group Santa Monica<br>
|
||||
9132 Kester Ave<br>
|
||||
Panorama City, CA 91402 USA</p>
|
||||
|
||||
<h2>Judges' comments:</h2>
|
||||
|
||||
<h3>Try:</h3>
|
||||
|
||||
<pre><code>lwall | bc | lwall
|
||||
input: x*x
|
||||
input: c^2
|
||||
</code></pre>
|
||||
|
||||
<h3>Also try:</h3>
|
||||
|
||||
<pre><code>lwall | bc and lwall | cat
|
||||
</code></pre>
|
||||
|
||||
<p>What we found amazing was how the flow of control was transferred
|
||||
between subroutines. Careful inspection will show that the array of
|
||||
pointers to functions named ‘vi’ refers to functions which seem to not
|
||||
be directly called. Even so, these pointers to functions are being
|
||||
used as an argument to signal. Can you determine why this is being
|
||||
done and how it is being exploited?</p>
|
||||
|
||||
<p>Some compilers complained about this file, so we changed: ‘=++I’ to ‘= ++I’.</p>
|
||||
|
||||
<p>Copyright © 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.</p>
|
||||
@@ -0,0 +1,31 @@
|
||||
# Most Useful Obfuscation
|
||||
|
||||
Larry Wall
|
||||
Unisys - System Development Group Santa Monica
|
||||
9132 Kester Ave
|
||||
Panorama City, CA 91402 USA
|
||||
|
||||
## Judges' comments:
|
||||
|
||||
### Try:
|
||||
lwall | bc | lwall
|
||||
input: x*x
|
||||
input: c^2
|
||||
|
||||
### Also try:
|
||||
lwall | bc and lwall | cat
|
||||
|
||||
What we found amazing was how the flow of control was transferred
|
||||
between subroutines. Careful inspection will show that the array of
|
||||
pointers to functions named 'vi' refers to functions which seem to not
|
||||
be directly called. Even so, these pointers to functions are being
|
||||
used as an argument to signal. Can you determine why this is being
|
||||
done and how it is being exploited?
|
||||
|
||||
Some compilers complained about this file, so we changed: '=++I' to '= ++I'.
|
||||
|
||||
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.
|
||||
@@ -0,0 +1,18 @@
|
||||
#define iv 4
|
||||
#define v ;(void
|
||||
#define XI(xi)int xi[iv*'V'];
|
||||
#define L(c,l,i)c(){d(l);m(i);}
|
||||
#include <stdio.h>
|
||||
int*cc,c,i,ix='\t',exit(),X='\n'*'\d';XI(VI)XI(xi)extern(*vi[])(),(*
|
||||
signal())();char*V,cm,D['x'],M='\n',I,*gets();L(MV,V,(c+='d',ix))m(x){v)
|
||||
signal(X/'I',vi[x]);}d(x)char*x;{v)write(i,x,i);}L(MC,V,M+I)xv(){c>=i?m(
|
||||
c/M/M+M):(d(&M),m(cm));}L(mi,V+cm,M)L(md,V,M)MM(){c=c*M%X;V-=cm;m(ix);}
|
||||
LXX(){gets(D)||(vi[iv])();c=atoi(D);while(c>=X){c-=X;d("m");}V="ivxlcdm"
|
||||
+iv;m(ix);}LV(){c-=c;while((i=cc[*D=getchar()])>-I)i?(c?(c<i&&l(-c-c,
|
||||
"%d"),l(i,"+%d")):l(i,"(%d")):(c&&l(M,")"),l(*D,"%c")),c=i;c&&l(X,")"),l
|
||||
(-i,"%c");m(iv-!(i&I));}L(ml,V,'\f')li(){m(cm+!isatty(i=I));}ii(){m(c=cm
|
||||
= ++I)v)pipe(VI);cc=xi+cm++;for(V="jWYmDEnX";*V;V++)xi[*V^' ']=c,xi[*V++]
|
||||
=c,c*=M,xi[*V^' ']=xi[*V]=c>>I;cc[-I]-=ix v)close(*VI);cc[M]-=M;}main(){
|
||||
(*vi)();for(;v)write(VI[I],V,M));}l(xl,lx)char*lx;{v)printf(lx,xl)v)
|
||||
fflush(stdout);}L(xx,V+I,(c-=X/cm,ix))int(*vi[])()={ii,li,LXX,LV,exit,l,
|
||||
d,l,d,xv,MM,md,MC,ml,MV,xx,xx,xx,xx,MV,mi};
|
||||
@@ -0,0 +1,30 @@
|
||||
# %W% %G% %U%
|
||||
#
|
||||
# 1987 makefile
|
||||
#
|
||||
# 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
|
||||
# from Landon Curt Noll and Larry Bassel.
|
||||
|
||||
|
||||
SHELL= /bin/sh
|
||||
WINNERS= westley
|
||||
|
||||
# for System V style systems
|
||||
OPSYS= -Dindex=strchr
|
||||
# for BSD style systems
|
||||
#OPSYS=
|
||||
|
||||
all: ${WINNERS}
|
||||
|
||||
westley: westley.c
|
||||
cc $? -o $@
|
||||
|
||||
clean:
|
||||
rm -f core
|
||||
clobber: clean
|
||||
rm -f ${WINNERS}
|
||||
install: all
|
||||
@echo are you kidding'??'
|
||||
@@ -0,0 +1,23 @@
|
||||
<h1>Best Layout</h1>
|
||||
|
||||
<p>Brian Westley (aka Merlyn Leroy on usenet)<br>
|
||||
Starfire Consulting<br>
|
||||
1121 Hamline Ave. N. #17<br>
|
||||
St. Paul, MN<br>
|
||||
55108<br>
|
||||
USA</p>
|
||||
|
||||
<h2>Judges' comments:</h2>
|
||||
|
||||
<p>Putchar must exist in the C library and not just as a macro.
|
||||
If it fails to compile, add the line: <code>#include <stdio.h></code> at the
|
||||
top of the program.</p>
|
||||
|
||||
<p>Line by line symmetry performed better than any C beautifier. Think
|
||||
of if it as a C ink blot. :-)</p>
|
||||
|
||||
<p>Copyright © 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.</p>
|
||||
@@ -0,0 +1,23 @@
|
||||
# Best Layout
|
||||
|
||||
Brian Westley (aka Merlyn Leroy on usenet)
|
||||
Starfire Consulting
|
||||
1121 Hamline Ave. N. #17
|
||||
St. Paul, MN
|
||||
55108
|
||||
USA
|
||||
|
||||
## Judges' comments:
|
||||
|
||||
Putchar must exist in the C library and not just as a macro.
|
||||
If it fails to compile, add the line: `#include <stdio.h>` at the
|
||||
top of the program.
|
||||
|
||||
Line by line symmetry performed better than any C beautifier. Think
|
||||
of if it as a C ink blot. :-)
|
||||
|
||||
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.
|
||||
@@ -0,0 +1,48 @@
|
||||
char rahc
|
||||
[ ]
|
||||
=
|
||||
"\n/"
|
||||
,
|
||||
redivider
|
||||
[ ]
|
||||
=
|
||||
"Able was I ere I saw elbA"
|
||||
,
|
||||
*
|
||||
deliver,reviled
|
||||
=
|
||||
1+1
|
||||
,
|
||||
niam ; main
|
||||
( )
|
||||
{/*\}
|
||||
\*/
|
||||
int tni
|
||||
=
|
||||
0x0
|
||||
,
|
||||
rahctup,putchar
|
||||
( )
|
||||
,LACEDx0 = 0xDECAL,
|
||||
rof ; for
|
||||
(;(int) (tni);)
|
||||
(int) (tni)
|
||||
= reviled ; deliver =
|
||||
redivider
|
||||
;
|
||||
for ((int)(tni)++,++reviled;reviled* *deliver;deliver++,++(int)(tni)) rof
|
||||
=
|
||||
(int) -1- (tni)
|
||||
;reviled--;--deliver;
|
||||
(tni) = (int)
|
||||
- 0xDECAL + LACEDx0 -
|
||||
rof ; for
|
||||
(reviled--,(int)--(tni);(int) (tni);(int)--(tni),--deliver)
|
||||
rahctup = putchar
|
||||
(reviled* *deliver)
|
||||
;
|
||||
rahctup * putchar
|
||||
((char) * (rahc))
|
||||
;
|
||||
/*\
|
||||
{\*/}
|
||||
Reference in new issue
Block a user