From: chongo@hoptoad.uucp (Landon C. Noll)
Newsgroups: comp.lang.c,comp.sources.d,comp.unix.wizards,alt.sources,misc.misc
Subject: 1992 International Obfuscated C Code Contest winners, 4 of 4
Keywords: ioccc
Date: 9 Sep 92 01:43:03 GMT
Expires: 28 Nov 92 00:00:00 GMT
Reply-To: chongo@hoptoad.UUCP (Landon C. Noll)
Organization: Nebula Consultants in San Francisco

Submitted-by: chongo@toad.com (Landon Curt Noll)
#
# Send comments, questions, bugs to: 
#
#    judges@toad.com   -or-   ...!{sun,uunet,utzoo,pyramid}!hoptoad!judges
#
# You are strongly encouraged to read the new contest rules before
# sending any entries.  The rules, and sometimes the contest Email
# address itself, change over time.  A valid entry one year may
# be rejected in a later year due to changes in the rules.  The typical
# start date for a contest is early March.  The typical end date for a
# contest is early May.
#
# The contest rules are posted to comp.unix.wizards, comp.lang.c,
# misc.misc, alt.sources and comp.sources.d.  If you do not have access 
# to these groups, or if you missed the early March posting, you may 
# request a copy from the judges, via Email, at the address above.
#
Archive-name: ioccc.1992/part04

---- Cut Here and unpack ----
#!/bin/sh
# This is part 04 of ioccc.1992
if touch 2>&1 | fgrep 'amc' > /dev/null
 then TOUCH=touch
 else TOUCH=true
fi
# ============= 1992/imc.hint ==============
echo "x - extracting 1992/imc.hint (Text)"
sed 's/^X//' << 'SHAR_EOF' > 1992/imc.hint &&
XBest Output: <imc@ecs.ox.ac.uk> Ian Collier
X
X	Ian Collier
X	Oxford University
X	The Queen's College
X	High Street
X	OXFORD
X	OX1 4AW
X	ENGLAND
X
X
XJudges' comments:
X
X    Make and run.
X
X    The program is more interesting to run on workstations that can
X    make use of a Sun raster file.  Others can make use of the -text
X    flag for character oriented output.
X
X    Of course, the source (layout) is self-documenting!  :-)
X
X    NOTE: The original winning source imc.orig.c assumed that
X	  exit returned a value which cause problems for some
X	  systems where exit returned a void.  The file imc.c
X	  avoids this problem.
X
X
XSelected notes from the author:
X
X    Portability
X
X    This program depends upon the ASCII character set, and makes certain
X    assumptions about the architecture. It naughtily declares the first
X    argument to main as a long, and passes a pointer to long instead of char
X    to fwrite, giving a length value of 32 bytes for an array of 8 longs. I
X    guess that makes this program OK on most flavours of unix, but not on
X    PCs.
X
X    About the program
X
X    This program has several parameters; each of them has a default, so the
X    program runs happily without any parameters. If you supply an incorrect
X    parameter, an obfuscated error message results! :-) Should you want to
X    run the program without knowing what it does, then supplying the single
X    letter t as a parameter is a good move. Otherwise, direct the output
X    into a file. The resulting file is most useful on Sun OS, where the
X    "file" command will tell you what to do with it. For best results with
X    the t option, you may want to change the definition of the I macro :-)
X    Details appear later, though the formatting of the code is a large clue.
X
X    All the code in this program appears between the ";" and ")" in
X    "for(;;)". That isn't because I want to win the best one-liner, but
X    merely because it makes the code so much more impenetrable :-) In fact
X    running a pretty printer on the code hardly improves it at all. This
X    program has the obligatory macros with unmatched parentheses, and the
X    cleverly arranged macro names and parameters to spell out "Ian Colliers
X    Obfuscated C Code". If you expand macros, bear in mind that the more
X    complex ones are best left as macros, because they have well-defined and
X    nontrivial (IMHO) functions. These macros help to give the program's
X    parameter format its flexibility. The parameters are sorted out in a
X    unique way (based on an idea by Pete Bevin) which hides very effectively
X    their identities (and I think that using a variable called _ adds a nice
X    touch to the illegibility of the code). In this section of the code, the
X    data types of the numbers checked against is varied, and just because
X    you see a ',' doesn't mean it has anything to do with commas! So I hope
X    you will agree that this program is more than a little obfuscated...
X
X    This is a Mandelbrot/Julia drawer. Normally it produces a monochrome
X    Sun-format raster file. The version of xloadimage we have is able to
X    view such files, and so is Sun's screenload command. [Note: the header
X    contains eight 4-byte integers, the byte order in which depends upon the
X    machine. On Sun workstations they are stored MSB first].
X
X    The program may be asked to produce text output instead of a raster
X    file. Then the characters defined in the I macro will be used to create
X    up to 16 different shades of grey. Quite a respectable picture can be
X    gained by printing a 130x110 output on a dot matrix 132 column printer
X    with the linefeed set to 7 points. Text output also gives a good picture
X    when used in an X window with small characters having a square aspect
X    ratio.
X
X    The options accepted by the program follow. Each option is a letter; it
X    may be preceded with a minus sign (or any character in [!-/]) and may be
X    followed by other letters, so for example
X          m    -m     mask     *mail
X    all mean the same thing. Most options may be followed by one or two
X    numbers. These numbers may be separated from each other and from the
X    option by a space, or may be joined to each other with a comma, or may
X    be appended to the single-letter option, so
X          -s100,200    size 100,200    -size123 100 200  s100 200
X    all mean the same (note that in "-size123" all characters following the
X    initial s are ignored). Numbers need not be specified, as each has a
X    default value. In all cases except "j" and "t", and "s" whenever it
X    appears before "t", specifying an option without numbers has no effect.
X    (specifying "-s -t" has the effect of producing text with the default
X    raster size; not a good idea!). The options are:
X
X    -centre x y  (float x,y) Centre the picture at x+iy in the complex
X                             plane (default x=0 y=0)
X    -factor f    (float f)   Use f pixels per unit of the plane (default
X                             f=x/4 where x is the width)
X    -julia  x y  (float x,y) Draw a julia set. Use x+iy as the constant
X                             to add after squaring (default x=0 y=0)
X    -limit  l    (int l)     Use l iterations maximum (default l=128)
X    -mask   m    (int m)     Use m as a mask in deciding the colour of each
X                             pixel (see below) (default m=1)
X    -size   x y  (int x,y)   Produce an x-by-y output (default for raster
X                             x=768 y=768; default for text x=63 y=23)
X    -text                    Produce text instead of raster.
X
X    The colour of each point is determined by taking the bit-and of the
X    number of iterations and the mask. For a raster, the point is black
X    (1-bit) if the result is zero, white otherwise. For text, the result of
X    the operation determines the grey-ness of the character produced, with a
X    blank for zero going up to a star for the maximum value. For a
X    four-colour picture, for example, use a mask with two bits set (e.g. 3),
X    and for a 16-colour picture use a mask with four bits set (e.g. 15). For
X    a picture with coarse detail, use a mask which ends with several zero
X    bits (e.g. 8).
X
X    While the program is creating your picture, it displays dots on the
X    standard error to indicate its progess (one dot per pixel line).
X
X    Here are a couple of good pictures to draw:
X
X    imc -s 512,512 -f 600000 -l 512 -m 16 -c.00805,.74274 > screen1.ras
X    imc -s512,512 -j-.523,-.535 > screen2.ras
SHAR_EOF
$TOUCH -am 0908160292 1992/imc.hint &&
chmod 0444 1992/imc.hint ||
echo "restore of 1992/imc.hint failed"
set `wc -c 1992/imc.hint`;Wc_c=$1
if test "$Wc_c" != "6479"; then
	echo original size 6479, current size $Wc_c
fi
# ============= 1992/imc.orig.c ==============
echo "x - extracting 1992/imc.orig.c (Text)"
sed 's/^X//' << 'SHAR_EOF' > 1992/imc.orig.c &&
X#include		     <stdio.h> 
X#include		     <malloc.h> 
X#define I		  " .:\';+<?F7RQ&%#*"
X#define a			"%s?\n"
X#define n			"0?\n"
X#define C			double	
X#define o			 char
X#define l			 long
X#define L			sscanf
X#define i			stderr
X#define e			stdout
X#define r		      exit   (1)
X#define s(O,B)	   L(++J,O,&B)!=1&&c>++q&&L(v[q],O,&B)!=1&&--q
X#define F(U,S,C,A) t=0,*++J&&(t=L(J,U,&C,&A)),(!t&&c>++q&&!(t=L(v[q],U,\
X		   &C,&A)))?--q:(t<2&&c>++q&&!(t=L(v[q],S,&A))&&--q
X#define T(E)		(s("%d",E),E||(fputs(n,i),r))
X#define d(C,c)		  (F("%lg,%lg","%lg",C,c)))
X#define O	   (F("%d,%d","%d",N,U),(N&&U)||(fputs(n,i),r)))
X#define D		      (s("%lg",f))
X#define E			  putc
X					       C
X						G=0,
X						R
X					     =0,Q,H
X					    ,M,P,z,S
X					     =0,x=0
X				 ,        f=0;l b,j=0,	      k
X				  =128,K=1,V,B=0,Y,m=128,p=0,N
X				 =768,U=768,h[]={0x59A66A95,256
X			     ,192,1,6912,1,0,0},t,A=0,W=0,Z=63,X=23
X			    ;o*J,_;main(c,v)l c;o**v;{l q=1;for(;;q<
X		  c	   ?(((J=v[q])[0]&&J[0]<48&&J++,((_= *J)<99||
X		_/2==	   '2'||(_-1)/3=='\"'||_==107||_/05*2==','||_
X	      >0x074)?(   fprintf(i,a,v[q]),r):_>0152?(_/4>27?(_&1?(
X	     O,Z=N,X=U):  (W++,N=Z,U=X)):_&1?T(K):T(k)):_>103?(d(G,
X	R    ),j=1):_&1? d(S,x):D,q++),q--,main(c-q,v+q)):A==0?(A=
X  1,f||(f=N/4.),b=(((N-1)&017)<8),q=(((N+7)>>3)+b)*U,(J=malloc(q)
X  )||(perror("malloc"),r),S-=(N/2)/f,x+=(U/2)/f):A==1?(B<U?(A=2,V
X	=    0,Q=x-B/f,j ||(R=Q),W&&E('\n',e),E(46,i)):(W&&E('\n',
X	     e),E('\n',i  ),h[1]=N,h[2]=U,h[4]=q,W||(fwrite(h,1,32,
X	      e),fwrite   (J,1,q,e)),free(J),exit(0))):A==2?(V<N?(j?
X		(H=V/f	   +S,M=Q):(G=V/f+S,H=M=0),Y=0,A=03):((m&0x80
X		   )	   ||(m=0x80,p++),b&&(J[p++]=0),A=1,B++)):((Y
X			    <k&&(P=H*H)+(z=M*M)<4.)?(M=2*H*M+R,H=P-z
X			     +G,Y++):(W&&E(I[0x0f*(Y&K)/K],e),Y&K?J
X			         [p]&=~m:(J[p]|=m),(m>>=1)||/*/
X				  (m=128,u--),A==6?exit(1):B<u
X				 .	  e=3,l=2*c*/(        m
X					     =0x80,
X					    p++),V++
X					     ,A=0x2
X						)
X						));
X					       }
SHAR_EOF
$TOUCH -am 0817110092 1992/imc.orig.c &&
chmod 0444 1992/imc.orig.c ||
echo "restore of 1992/imc.orig.c failed"
set `wc -c 1992/imc.orig.c`;Wc_c=$1
if test "$Wc_c" != "1937"; then
	echo original size 1937, current size $Wc_c
fi
# ============= 1992/kivinen.c ==============
echo "x - extracting 1992/kivinen.c (Text)"
sed 's/^X//' << 'SHAR_EOF' > 1992/kivinen.c &&
X#include						       <X11/Xlib.h>
X#define							 ext(a) (exit(a),0)
X# define		     X(	    x,v,y) XMoveWindow(d,s[x],(v)*z,(y)*z)
X#  define		     _		ButtonPressMask|ButtonReleaseMask
X#   define		     I(		     x,y) XSelectInput(d,s[x],y)
X#    define		     N(		      v) (XMapWindow(d,s[v]),v)
X#     define		     V			  VisibilityChangeMask
X#      define		     A			  XCreateSimpleWindow
X#	define		     D			    DefaultScreen(d)
X#	 define		     E			   r.xbutton.button
X#	  define	     R			    BlackPixel(d,D)
X#	   define	     S			    r.xvisibility
X
X	      int main(a)int a;{Window s[53];int w,u,i,c,y,l=0
X	  ,q,e=32,t,k,j=~0,z=(a+1)/2,x=a&1,v=z&1;XEvent r;Display*
X	d=XOpenDisplay("");s[0]=A(d,DefaultRootWindow(d),200,200,(x&
X       v?330:120)*z,215*z,2,R,R);I(N(c=0),_);for(;c<(x?32:52);c++){s[
X       c+1]=A(d,s[0],x	      ?c*20*z:(c-1)%10	      *12*z,x?-20*z:(
X      c-1)/10*12*z,x		?z*(c^31?10:		2):z*10*(c?1:2
X      ), x& v?z*10:	 (c	 &&!x?10:1+	 x)	 *z,k =q=1, R,
X      WhitePixel(d     ,D));I	  (N(c+1),     V);}X(	  N(1),y=(x&v)
X      *115+50,x*70+	 60	 ); X(N(c--	 )+	 1,x?-10:(i=y)
X      ,u=!x*130-20);		while(c &&e<		160){if(x){if(
X      v){l=!(e &32)*9;	      for(w=30; w--;){	      if(s[w+2]){ k=w%
X      10;l=e&32?k>l?k:l:k<l?k:l;X(w+2,10+k *20+q,(w/10)*20+e);}}l*=20;
X      e&31?e++:e&32?(q++,(q+l>300?e++:0)):(q--,q+l<10?e++:0); } u>140?
X      ext(c):u>-20?X(32,i,u-=(v?5:-1 )) :(!v?(u =5,srandom(time(0)),i=
X      random()%88+6):0); } else{k>0?i+=(i>105?k= -k:k):(i+=(i<1?k= -k:
X      k)); j>0?u	 +=(u>140?ext(++c):j):(u+=(u	    <1?j= -j:j
X      )); X(		    52,i,u);}XSync(d,0);		while(
X      XCheckMaskEvent(d	      ,_|V,&r))if(!(r.	     type==ButtonPress
X      ?(E&1||!x||!v?t=E*4-8			 :u<0?i=y+4,u=122:1):r
X      .type==ButtonRelease&&E?t=0,1:r.type^VisibilityNotify|S.state^1)
X      )for(x&v?(u=	     -15),w++:(w=0);++w		  <52-x*20;)if
X      (s[w]		      ==S.window)x&&v||			 w ^1?
X      XUnmapWindow		   (d,s[w])		  ,s[w]=0,c--:
X      0,l=1; if(!x&&l)j=			    -j,l=0; if(l&x&&!v
X      )u=~19,c--,l=0;t=(!x||!v)		     &&(y<5&&t<0||y>95&&t>0)?0
X	  :t;s[1]?X(1,y+=x&v?t:t/(x+1),130):ext(++c);};return(c);}
SHAR_EOF
$TOUCH -am 0817110292 1992/kivinen.c &&
chmod 0444 1992/kivinen.c ||
echo "restore of 1992/kivinen.c failed"
set `wc -c 1992/kivinen.c`;Wc_c=$1
if test "$Wc_c" != "2119"; then
	echo original size 2119, current size $Wc_c
fi
# ============= 1992/kivinen.hint ==============
echo "x - extracting 1992/kivinen.hint (Text)"
sed 's/^X//' << 'SHAR_EOF' > 1992/kivinen.hint &&
XBest X Program: <kivinen@hut.fi> Tero Kivinen
X
X	Tero Kivinen
X	Helsinki University of Technology
X	Klovinrinne 6b
X	02180 Espoo
X	Finland
X
X
XJudges' comments:
X
X    If your machine support the X Window System, Version 11:
X	make kivinen
X
X    The type of entertainment depends on number of arguments
X    you have with the program.  :-)
X
X    NOTE: Some systems do not need (or have) -lsocket -lresolv -lnsl.
X	  Such systems should compile using -lX11.
X
X    NOTE: The original winning source kivinen.orig.c assumed that
X	  exit returned a value which cause problems for some
X	  systems where exit returned a void.  The file kivinen.c
X	  avoids this problem.
X	
X
XSelected notes from the author:
X
X    X Entertainment Kit
X
X    This kit includes three games from the early of video games for
X    The X Window System Version 11 Release 5. It should work with
X    earlier releases, though.
X
X
X    Space Invaders
X
X    The classic game of shooting aliens from outer space, trying to
X    exterminate all life on earth. The game ends when the first line
X    of aliens touches the ground, or destroy you. To win the game you
X    must destroy all the aliens. If you evade out from the screen you
X    lose.
X
X        Controls:
X                Button 1 = Move left
X                Button 2 = Fire missile
X                Button 3 = Move right
X
X
X    Breakout
X
X    Break all the bricks with the ball, using your paddle. If you miss
X    the ball the game ends.
X
X        Controls:
X                Button 1 = Move left
X                Button 3 = Move right
X
X
X    Dropout
X
X    Catch all the falling pieces, before they reach the ground. If you
X    miss it, game ends. To win you must catch all 30 pieces.
X
X        Controls:
X                Button 1 = Move left
X                Button 3 = Move right
X
X
X
X    Starting the game
X
X    The type of the game is determined by the number of arguments
X    given to the program.
X
X        no arguments = Space Invaders
X        1 argument   = Breakout
X        2 arguments  = Dropout
X        3 arguments  = double sized Breakout
X        4 arguments  = triple sized Space Invaders
X        5 arguments  = triple sized Breakout
X        6 arguments  = double sized Dropout
X        7 arguments  = quadruple sized Breakout
X        and so on...
X
X
X    Scores
X
X    The exit value of the game is your score. The smaller the score
X    the better it is. The exit value of zero means you have won.
X
X
X    Features
X
X    The game has a cheat system, which can be found after examining the
X    event loop at the end of program. It is not a bug, it's a feature!
X
SHAR_EOF
$TOUCH -am 0908160392 1992/kivinen.hint &&
chmod 0444 1992/kivinen.hint ||
echo "restore of 1992/kivinen.hint failed"
set `wc -c 1992/kivinen.hint`;Wc_c=$1
if test "$Wc_c" != "2547"; then
	echo original size 2547, current size $Wc_c
fi
# ============= 1992/kivinen.orig.c ==============
echo "x - extracting 1992/kivinen.orig.c (Text)"
sed 's/^X//' << 'SHAR_EOF' > 1992/kivinen.orig.c &&
X#include						       <X11/Xlib.h>
X# define		     X(	    x,v,y) XMoveWindow(d,s[x],(v)*z,(y)*z)
X#  define		     _		ButtonPressMask|ButtonReleaseMask
X#   define		     I(		     x,y) XSelectInput(d,s[x],y)
X#    define		     N(		      v) (XMapWindow(d,s[v]),v)
X#     define		     V			  VisibilityChangeMask
X#      define		     A			  XCreateSimpleWindow
X#	define		     D			    DefaultScreen(d)
X#	 define		     E			   r.xbutton.button
X#	  define	     R			    BlackPixel(d,D)
X#	   define	     S			    r.xvisibility
X
X	      int main(a)int a;{Window s[53];int w,u,i,c,y,l=0
X	  ,q,e=32,t,k,j=~0,z=(a+1)/2,x=a&1,v=z&1;XEvent r;Display*
X	d=XOpenDisplay("");s[0]=A(d,DefaultRootWindow(d),200,200,(x&
X       v?330:120)*z,215*z,2,R,R);I(N(c=0),_);for(;c<(x?32:52);c++){s[
X       c+1]=A(d,s[0],x	      ?c*20*z:(c-1)%10	      *12*z,x?-20*z:(
X      c-1)/10*12*z,x		?z*(c^31?10:		2):z*10*(c?1:2
X      ), x& v?z*10:	 (c	 &&!x?10:1+	 x)	 *z,k =q=1, R,
X      WhitePixel(d     ,D));I	  (N(c+1),     V);}X(	  N(1),y=(x&v)
X      *115+50,x*70+	 60	 ); X(N(c--	 )+	 1,x?-10:(i=y)
X      ,u=!x*130-20);		while(c &&e<		160){if(x){if(
X      v){l=!(e &32)*9;	      for(w=30; w--;){	      if(s[w+2]){ k=w%
X      10;l=e&32?k>l?k:l:k<l?k:l;X(w+2,10+k *20+q,(w/10)*20+e);}}l*=20;
X      e&31?e++:e&32?(q++,(q+l>300?e++:0)):(q--,q+l<10?e++:0); } u>140?
X      exit(c):u>-20?X(32,i,u-=(v?5:-1)):(!v?(u =5,srandom(time(0)),i=
X      random()%88+6):0); } else{k>0?i+=(i>105?k= -k:k):(i+=(i<1?k= -k:
X      k)); j>0?u	+=(u>140?exit(++c):j):(u+=(u	    <1?j= -j:j
X      )); X(		    52,i,u);}XSync(d,0);		while(
X      XCheckMaskEvent(d	      ,_|V,&r))if(!(r.	     type==ButtonPress
X      ?(E&1||!x||!v?t=E*4-8			 :u<0?i=y+4,u=122:1):r
X      .type==ButtonRelease&&E?t=0,1:r.type^VisibilityNotify|S.state^1)
X      )for(x&v?(u=	     -15),w++:(w=0);++w		  <52-x*20;)if
X      (s[w]		      ==S.window)x&&v||			 w ^1?
X      XUnmapWindow		   (d,s[w])		  ,s[w]=0,c--:
X      0,l=1; if(!x&&l)j=			    -j,l=0; if(l&x&&!v
X      )u=~19,c--,l=0;t=(!x||!v)		     &&(y<5&&t<0||y>95&&t>0)?0
X	 :t;s[1]?X(1,y+=x&v?t:t/(x+1),130):exit(++c);};return(c);}
SHAR_EOF
$TOUCH -am 0817110092 1992/kivinen.orig.c &&
chmod 0444 1992/kivinen.orig.c ||
echo "restore of 1992/kivinen.orig.c failed"
set `wc -c 1992/kivinen.orig.c`;Wc_c=$1
if test "$Wc_c" != "2084"; then
	echo original size 2084, current size $Wc_c
fi
# ============= 1992/lush.c ==============
echo "x - extracting 1992/lush.c (Text)"
sed 's/^X//' << 'SHAR_EOF' > 1992/lush.c &&
X#define f 000:
X          char
X	  *s,*
X	  t,v;
X	  char 
X	  _  [
X	  999]
X	  ,x [
X	  999]
X	  ,*p=
X	  x  ;
X	  char
X	  *av[
X	  ]= {
X	  "W",
X	  "H",
X	  "o",
X	  "l",
X	  "N",
X	  "e",
X	  " ",
X	  "r",
X	  "d",
X	  ".",
X	  "m",
X          "s",
X          "g",
X          "!",
X          "*",
X          "\n"
X	  }  ;
X	   int 
X	  n= 0
X	  ;int 
X	  __ =
X	  0,i=
X	  000;
X	  main
X	  () {
X#define f 001:
X#define F 042:
X#define f 100:
X         _[i--
X#define f 126:
X#define f 132:
X#define f 103:
X#define f 202:
X#define f 666:
X#define f 77::
X#define f 101:
X	   ]=0
X#define f 232:
X#define f 151:
X	  ;if(
X#define f 256:
X          !i){
X          puts
X          ("I"
X          "BM"
X          " S"
X          "UX"
X          );;;
X          ;;;}
X	  ;for
X	  (  ;
X	  gets
X	  (_);
X	  )  {
X	  for(
X#define f 301:
X	  t=_,
X#define f 700:
X#define f 999:
X	  s=t,
X#define f 77 :
X#define f 300:
X	  s=t;
X#define f s=t;
X#define f 123:
X#define f 127:
X	  *t&&
X	  !(!(
X	  *t <
X	  '0'
X	  ||*t
X	  >'9'
X	  )&&!
X          ((t[
X          1] ^
X          ':')
X          &&(t
X          [1]^
X          '.')
X	  )) ; 
X	  t++)
X#define f 137:
X#define f 133:
X	  ;if(
X#define f 111:
X#define f 220:
X          v^*t
X          &&*t
X	  ){v=
X          *t;;
X          n=n*
X	  2+(1
X	  &*t)
X	  ;__=
X	  (__+
X	  1)&3
X	  ; __
X	  ||((
X	  n<15
X	  &&(*
X	  p= *
X	  av[n
X	  ] ),
X#define f 2+2:
X	  p++)
X	  ,n=0
X	  );}}
X#define f ==4:
X	  ;*p=
X	  '\0'
X	  ;;;;
X#define f puts
X	  puts
X	  (x);
X	  s=t;
X#define f s=5;
X	  s=t;
X#define f s=5:
X	  s=t;
X#define f 445:
X#define f 113:
X#define f 900:
X	  s=t;
X#define f n22:
X#define f n40:
X	  s=t;
X#define f nn6:
X	  s=t;
X#define f nn1:
X#define f 0:--
X	  s=t;
X#define f 19:-
X#define f x2:x
X	  s=t;
X#define f x1:x
X	  s=t;
X#define f y2:x
X#define f y7:y
X	  s=t;
X#define f 1:::
X	  s=t;
X#define f @3:@
X#define f 10:0
X#define f x+1:
X	  s=t;
X#define f 2:::
X#define f 3:::
X#define x 7:::
X#define y 3:::
X#define z 990:
X#define Z 47::
X	  ;;;}
X
SHAR_EOF
$TOUCH -am 0817110092 1992/lush.c &&
chmod 0444 1992/lush.c ||
echo "restore of 1992/lush.c failed"
set `wc -c 1992/lush.c`;Wc_c=$1
if test "$Wc_c" != "1885"; then
	echo original size 1885, current size $Wc_c
fi
# ============= 1992/lush.hint ==============
echo "x - extracting 1992/lush.hint (Text)"
sed 's/^X//' << 'SHAR_EOF' > 1992/lush.hint &&
XWorst Abuse of the C Preprocessor: <lush@erc.msstate.edu> Ed Luke
X
X	Ed Luke
X	Mississippi State University
X	P.O. Box 6176
X	Mississippi State, MS 39762, USA
X
X
XJudges' comments:
X
X    To setup:
X	make lush
X    
X    Try:
X	make lush.again 2>&1 | lush		(sh or ksh users)
X    or:
X	make lush.again |& lush			(csh users)
X
X    The program uses error messages issued by the C Proproessor to
X    generate its message to the world.  One program's error is another 
X    program's data!
X
X
XSelected notes from the author:
X
X    This program is yet another "Hello World." program with a twist.  The
X    string Hello World has been encoded in the error messages the compiler
X    generates when compiling the source.
SHAR_EOF
$TOUCH -am 0908160392 1992/lush.hint &&
chmod 0444 1992/lush.hint ||
echo "restore of 1992/lush.hint failed"
set `wc -c 1992/lush.hint`;Wc_c=$1
if test "$Wc_c" != "695"; then
	echo original size 695, current size $Wc_c
fi
# ============= 1992/lush.orig.c ==============
echo "x - extracting 1992/lush.orig.c (Text)"
sed 's/^X//' << 'SHAR_EOF' > 1992/lush.orig.c &&
X#define f 000:
X          char
X	  *s,*
X	  t,v;
X	  char 
X	  _  [
X	  999]
X	  ,x [
X	  999]
X	  ,*p=
X	  x  ;
X	  char
X	  *av[
X	  ]= {
X	  "W",
X	  "H",
X	  "o",
X	  "l",
X	  "N",
X	  "e",
X	  " ",
X	  "r",
X	  "d",
X	  ".",
X	  "m",
X          "s",
X          "g",
X          "!",
X          "*",
X          "\n"
X	  }  ;
X	   int 
X	  n= 0
X	  ;int 
X	  __ =
X	  0,i=
X	  000;
X	  main
X	  () {
X#define f 001:
X#define F 042:
X#define f 100:
X          i--[
X#define f 126:
X#define f 132:
X#define f 103:
X#define f 202:
X#define f 666:
X#define f 77::
X#define f 101:
X	  _]=0
X#define f 232:
X#define f 151:
X	  ;if(
X#define f 256:
X          !i){
X          puts
X          ("I"
X          "BM"
X          " S"
X          "UX"
X          );;;
X          ;;;}
X	  ;for
X	  (  ;
X	  gets
X	  (_);
X	  )  {
X	  for(
X#define f 301:
X	  t=_,
X#define f 700:
X#define f 999:
X	  s=t,
X#define f 77 :
X#define f 300:
X	  s=t;
X#define f s=t;
X#define f 123:
X#define f 127:
X	  *t&&
X	  !(!(
X	  *t <
X	  '0'
X	  ||*t
X	  >'9'
X	  )&&!
X          ((t[
X          1] ^
X          ':')
X          &&(t
X          [1]^
X          '.')
X	  )) ; 
X	  t++)
X#define f 137:
X#define f 133:
X	  ;if(
X#define f 111:
X#define f 220:
X          v^*t
X          &&*t
X	  ){v=
X          *t;;
X          n=n*
X	  2+(1
X	  &*t)
X	  ;__=
X	  (__+
X	  1)&3
X	  ; __
X	  ||((
X	  n<15
X	  &&(*
X	  p= *
X	  av[n
X	  ] ),
X#define f 2+2:
X	  p++)
X	  ,n=0
X	  );}}
X#define f ==4:
X	  ;*p=
X	  '\0'
X	  ;;;;
X#define f puts
X	  puts
X	  (x);
X	  s=t;
X#define f s=5;
X	  s=t;
X#define f s=5:
X	  s=t;
X#define f 445:
X#define f 113:
X#define f 900:
X	  s=t;
X#define f n22:
X#define f n40:
X	  s=t;
X#define f nn6:
X	  s=t;
X#define f nn1:
X#define f 0:--
X	  s=t;
X#define f 19:-
X#define f x2:x
X	  s=t;
X#define f x1:x
X	  s=t;
X#define f y2:x
X#define f y7:y
X	  s=t;
X#define f 1:::
X	  s=t;
X#define f @3:@
X#define f 10:0
X#define f x+1:
X	  s=t;
X#define f 2:::
X#define f 3:::
X#define x 7:::
X#define y 3:::
X#define z 990:
X#define Z 47::
X	  ;;;}
X
SHAR_EOF
$TOUCH -am 0817110092 1992/lush.orig.c &&
chmod 0444 1992/lush.orig.c ||
echo "restore of 1992/lush.orig.c failed"
set `wc -c 1992/lush.orig.c`;Wc_c=$1
if test "$Wc_c" != "1885"; then
	echo original size 1885, current size $Wc_c
fi
# ============= 1992/marangon.c ==============
echo "x - extracting 1992/marangon.c (Text)"
sed 's/^X//' << 'SHAR_EOF' > 1992/marangon.c &&
X#include <stdio.h>
X#include <curses.h>
X
X#define ST strchr
X#define SRD srand48
X#define RD lrand48
X#define ext(a) (exit(a),0)
X
X#define Q return
X#define W wrefresh(r)
Xtypedef int i;
X
X#define Z(d,a) (RD()%((a)-(d)+1)+(d))
Xi f[3][3] = {15,52,36,20,-39,48,60,0,-25};
X
Xchar z[6][6];
X#define Y(x) (4*(x)+3)
X#define X(x) (2*(x)+1)
X#define I for
XWINDOW *r=NULL;
X#define K endwin()
X
Xchar *g ="\
XUse l-h-k-j for move.\nUse + for increment. Use - for decrement.\nUse Q to quit.";
X
Xi (*d())();
Xnt()
X{
Xlong time();
XSRD(time((i *)0));
Xmemset(z,5,36);
Xinitscr();
Xcbreak();
Xnoecho();
Xnonl();
Xif (COLS<80||LINES<24)
XK,ext(1);
Xif (!(r=newwin(X(6),Y(6),
X(LINES-X(6))/2,(COLS-Y(6))/2)))
XK,ext(1);
Xmvaddstr(LINES-5,0,g);
Xrefresh();
X}
Xi ci()
X{
Xi x,y=0;
XI (;y<6;++y)
XI(x=0;x<6;++x)
Xmvwaddch(r,X(y),Y(x),z[x][y]+'0'); Q(0);
X}
Xvoid main()
X{
Xchar *ST();
Xi a=0,b=0,c,q,t,s,x,sc=0;
Xi(*(*p)())()=(nt(),d);
XI(x=0 ; x++<20; )d(Z(0,5),Z(0,5),Z(1,2));
XI(t=Z(0,2),q=s=0; q<3; s+=f[q][t]*f[q++][t]);
XI(box(r,'|','-'),ci(),wmove(r,X(a),Y(b)),
XW; (ST ("+-Qlkjh",(char)(c=wgetch(r))))&&
X((i)((i)(q^=s%=Y(q),s/=2)!=(i)(s^=q)&&c&64&&(!(c&7|0)&&--b<0&&
X(b=q^s)&0|| c&4&&++b==6&&c&4<(~b&23?q^=s,b^=b
X:b&12?b=3:b|2)||c&2&&~c&1&&++a==++q/2+1&&c&16>(
X!a|12?a=7,a&=~a:a|4?a=2:a&2)||~c&4&&c&
X1&&--a<0&&(a+=6)&0)||~c&64&&(**p(b,a,~c))()||
Xc&16)?K,ext(0):1)||c; sc==36?ci(),W,K,ext(0):wmove(r,X(a),Y(b)),
XW)
XI(t=Z(0,2),q=s=0; q<3; s+=f[q][t]*f[q++][t])
XI(sc=0; sc<36&&*((char *)z+sc++)==5; );
X}
Xi (*d(a,b,c))()i a,b,c;
X{
Xi x,y;
XI(x=a>0?a-1:0; x<=(a<5?a+1:5); ++x)
XI(y=b>0?b-1:0; y<=(b<5?b+1:5); ++y)
Xif(x==a&&y==b&&z[x][y]==(c&2?1:9)||z[x][y]==(c&2?9:1)&&(x!=a||y!=b))Q(ci);
XI(x=a>0?a-1:0; x<=(a<5?a+1:5); x++)
XI(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);
X}
SHAR_EOF
$TOUCH -am 0817110392 1992/marangon.c &&
chmod 0444 1992/marangon.c ||
echo "restore of 1992/marangon.c failed"
set `wc -c 1992/marangon.c`;Wc_c=$1
if test "$Wc_c" != "1766"; then
	echo original size 1766, current size $Wc_c
fi
# ============= 1992/marangon.hint ==============
echo "x - extracting 1992/marangon.hint (Text)"
sed 's/^X//' << 'SHAR_EOF' > 1992/marangon.hint &&
XBest Game: <marangon@ghost.dsi.unimi.it> Marangoni Andrea
X
X	Marangoni Andrea
X	Department of Computer Science at Milano
X	Via Pausula, 72
X	62014 Corridonia (MC)
X	Italy
X
X
XJudges' comments:
X
X    Make and run.
X
X    The object is to refill the table with 5's, by incrementing
X    or decrementing numbers as needed.  It is the side effects
X    that get you into trouble.  If you are not careful, you may
X    find things "at 6's and 7's".  :-)
X
X    NOTE: Some compilers have had trouble optimizing this entry.
X
X    NOTE: Some systems need to compile with -ltermcap as well as -lcurses.
X
X    NOTE: The original winning source marangon.orig.c assumed that
X	  exit returned a value which cause problems for some
X	  systems where exit returned a void.  The file marangon.c
X	  avoids this problem.
X
X
XSelected notes from the author:
X
X    It starts off by creating a table with number 5 in all places.  The
X    CPU melts the numbers and you must return them in original state.
X    When you increase a number, all the other eight numbers next to it
X    decrease and vice-versa.
SHAR_EOF
$TOUCH -am 0908160392 1992/marangon.hint &&
chmod 0444 1992/marangon.hint ||
echo "restore of 1992/marangon.hint failed"
set `wc -c 1992/marangon.hint`;Wc_c=$1
if test "$Wc_c" != "1062"; then
	echo original size 1062, current size $Wc_c
fi
# ============= 1992/marangon.orig.c ==============
echo "x - extracting 1992/marangon.orig.c (Text)"
sed 's/^X//' << 'SHAR_EOF' > 1992/marangon.orig.c &&
X#include <stdio.h>
X#include <curses.h>
X
X#define ST strchr
X#define SRD srand48
X#define RD lrand48
X
X#define Q return
X#define W wrefresh(r)
Xtypedef int i;
X
X#define Z(d,a) (RD()%((a)-(d)+1)+(d))
Xi f[3][3] = {15,52,36,20,-39,48,60,0,-25};
X
Xchar z[6][6];
X#define Y(x) (4*(x)+3)
X#define X(x) (2*(x)+1)
X#define I for
XWINDOW *r=NULL;
X#define K endwin()
X
Xchar *g ="\
XUse l-h-k-j for move.\nUse + for increment. Use - for decrement.\nUse Q to quit.";
X
Xi (*d())();
Xnt()
X{
Xlong time();
XSRD(time((i *)0));
Xmemset(z,5,36);
Xinitscr();
Xcbreak();
Xnoecho();
Xnonl();
Xif (COLS<80||LINES<24)
XK,exit(1);
Xif (!(r=newwin(X(6),Y(6),
X(LINES-X(6))/2,(COLS-Y(6))/2)))
XK,exit(1);
Xmvaddstr(LINES-5,0,g);
Xrefresh();
X}
Xi ci()
X{
Xi x,y=0;
XI (;y<6;++y)
XI(x=0;x<6;++x)
Xmvwaddch(r,X(y),Y(x),z[x][y]+'0'); Q(0);
X}
Xvoid main()
X{
Xchar *ST();
Xi a=0,b=0,c,q,t,s,x,sc=0;
Xi(*(*p)())()=(nt(),d);
XI(x=0 ; x++<20; )d(Z(0,5),Z(0,5),Z(1,2));
XI(t=Z(0,2),q=s=0; q<3; s+=f[q][t]*f[q++][t]);
XI(box(r,'|','-'),ci(),wmove(r,X(a),Y(b)),
XW; (ST ("+-Qlkjh",(char)(c=wgetch(r))))&&
X((i)((i)(q^=s%=Y(q),s/=2)!=(i)(s^=q)&&c&64&&(!(c&7|0)&&--b<0&&
X(b=q^s)&0|| c&4&&++b==6&&c&4<(~b&23?q^=s,b^=b
X:b&12?b=3:b|2)||c&2&&~c&1&&++a==++q/2+1&&c&16>(
X!a|12?a=7,a&=~a:a|4?a=2:a&2)||~c&4&&c&
X1&&--a<0&&(a+=6)&0)||~c&64&&(**p(b,a,~c))()||
Xc&16)?K,exit(0):1)||c; sc==36?ci(),W,K,exit(0):wmove(r,X(a),Y(b)),
XW)
XI(t=Z(0,2),q=s=0; q<3; s+=f[q][t]*f[q++][t])
XI(sc=0; sc<36&&*((char *)z+sc++)==5; );
X}
Xi (*d(a,b,c))()i a,b,c;
X{
Xi x,y;
XI(x=a>0?a-1:0; x<=(a<5?a+1:5); ++x)
XI(y=b>0?b-1:0; y<=(b<5?b+1:5); ++y)
Xif(x==a&&y==b&&z[x][y]==(c&2?1:9)||z[x][y]==(c&2?9:1)&&(x!=a||y!=b))Q(ci);
XI(x=a>0?a-1:0; x<=(a<5?a+1:5); x++)
XI(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);
X}
SHAR_EOF
$TOUCH -am 0817110092 1992/marangon.orig.c &&
chmod 0444 1992/marangon.orig.c ||
echo "restore of 1992/marangon.orig.c failed"
set `wc -c 1992/marangon.orig.c`;Wc_c=$1
if test "$Wc_c" != "1743"; then
	echo original size 1743, current size $Wc_c
fi
# ============= 1992/nathan.c ==============
echo "x - extracting 1992/nathan.c (Text)"
sed 's/^X//' << 'SHAR_EOF' > 1992/nathan.c &&
X#include <stdio.h>
Xstatic char *text[] =
X{
X  "Export of this program from the USA is governed by the US",
X  "Munitions List from the ITAR (International Traffic in Arms",
X  "Regulations). This list gives the specific categories of",
X  "restricted exports and includes cryptographic exports. Traffic",
X  "entirely external to, entirely internal to, or into the USA is",
X  "not restricted.",
X  "To obtain a copy of the program, email to nathan@inmos.co.uk",
X  "with a subject \"IOCCC request\". If you know that your 'From'",
X  "line is incorrect, add a single line",
X  "\"replyto you@your.correct.address\" to the body of the message.",
X  "A deamon will autoreply.",
X  "WARNING: You must not re-export this out of the USA, or else",
X  "the men in black might get you.",
X  NULL
X};
Xint main()
X{
X  char **ptr;
X
X  for(ptr = text; *ptr; ptr++)
X    printf("%s\n", *ptr);
X  return 0;
X}
SHAR_EOF
$TOUCH -am 0908154192 1992/nathan.c &&
chmod 0444 1992/nathan.c ||
echo "restore of 1992/nathan.c failed"
set `wc -c 1992/nathan.c`;Wc_c=$1
if test "$Wc_c" != "878"; then
	echo original size 878, current size $Wc_c
fi
# ============= 1992/nathan.hint ==============
echo "x - extracting 1992/nathan.hint (Text)"
sed 's/^X//' << 'SHAR_EOF' > 1992/nathan.hint &&
XWorst Abuse of the Rules: <nathan@inmos.co.uk> Nathan Sidwell
X
X	Nathan Sidwell
X	Inmos UK
X	1000 Aztec West
X	Almondsbury
X	Bristol
X	UK BS12 4SQ
X
X
XJudges' comments:
X
X    The US International Traffic in Arms Regulations controls certain
X    exportations going out of the United States.  The U.S.  Munitions
X    List gives the specific categories of restricted exports.  Because
X    this entry appears to fall under this restricted catagory, the
X    judges may not be able to distribute winners outside of the USA.
X
X    Nathan Sidwell has stated that he is willing to distribute the
X    winning source.  To read HIS instructions of how to obtain his
X    winning program:
X
X	make nathan
X	nathan
X
X    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
X    =-=-= The text below assumes that you have the winning source =-=-=
X    =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
X
X    To use:
X	make nathan
X
X    Try:
X	nathan obfuscate < nathan.c > foobarf.c
X	nathan - obfuscate < foobarf.c > barfoof.c
X	diff nathan.c barfoof.c
X
X    WARNING:
X	The judges' make no claim as to the strength or security
X	of this program.  It is likely to be nil, or the next
X	best thing to it.  Still, you might consider installing
X	it in /usr/games/nathan.  :-)
X
X    NOTE: 
X	The 'winning' catagory is also open to question.  One could say
X	that it is a 'file obfuscator'.  One could also say that it
X	unintentionally adbused the intent of rule #7 (that programs
X	should be freely redistributable).  We suspect that the author
X	may not have intended to do this, but that is the way things go
X	sometimes.
X
X	BTW, 'abuse of the rules' entries do not violate the rules.
X	Entries that violate the rules are disqualified.  Abuse of the
X	rules entries are ones that tend to 'streach' the limits and
X	take the contest into unexpected territory.
X
X
XPersonal note from chongo:
X
X    I think this situation shows just how ridiculous US crypto
X    regulations really are.  Certain US federal officials can get away
X    with shipping arms to certain nations in apparent violation of US
X    laws, but I personally can't re-distribute a program contest winner
X    to the network!
X
X
XSelected notes from the author:
X
X    PROGRAM USE
X
X    This program is a hello world text encrypter/decrypter. It uses an
X    enigma (I think) style encryption algorithm, where the encryption
X    key character is modified by a value, determined from the previous
X    character.  Non-printable characters (those with ASCII values < ' '
X    or > 0x7e) are passed unaltered, thus any kind of file may be
X    successfully procesed, but if the original is printable, the
X    processed file will be too. The input is read from stdin, and the
X    output presented to stdout. The key, a text string, is presented as
X    a command argument. This is optional, and if ommitted, the file is
X    self-{de,en}crypted. To specify decryption, a "-" should be given
X    before the key. (Actually encryption and dycryption proper inverse
X    operations, so you can use decrypt to scramble and encrypt to
X    descramble, if you're perverse.)
X
X    PORTABILITY (A little knowledge is a dangerous thing)
X
X    Its written in ANSI C, and doesn't even assume an ASCII character
X    set, (it has an array of the characters to convert), so should be
X    portable across many platforms. It passes gcc -ansi -pedantic -O
X    -Wall with no warnings (You may get assignment in conditional
X    warnings on other platforms though).  Because I've heard that
X    conditional jumps slow down fast processors, I've eliminated all
X    the ifs from the code, indeed, as its only one statement, it should
X    compile to one instruction an a suitably designed CISC machine. To
X    speed compilation, there is only one statement in the loop, so that
X    another scoping level does not need to be opened.
X
X    Being an encrypter/decrypter, you probably want the source code to
X    be obfuscated, to hide the algorithm.
X
X    OBFUSCATION
X
X    Inspite of the fact that it looks like a nice friendly hello world
X    program, it isn't (as documented above). (Short lines have been padded,
X    as you'll find if you look at an encrypted copy of the source.)
X
X    I've also named some of the macros from commonly used functions,
X    just to keep things muddy. Of course, all the variables are
X    misnamed. The program is kept simply (one for statement), by
X    serious overuse of , and ? :. These are really confusing when used
X    together, nested or put in argument lists (is that a comma
X    operator, or argument separator?)
SHAR_EOF
$TOUCH -am 0908160392 1992/nathan.hint &&
chmod 0444 1992/nathan.hint ||
echo "restore of 1992/nathan.hint failed"
set `wc -c 1992/nathan.hint`;Wc_c=$1
if test "$Wc_c" != "4546"; then
	echo original size 4546, current size $Wc_c
fi
# ============= 1992/third ==============
echo "x - extracting 1992/third (Text)"
sed 's/^X//' << 'SHAR_EOF' > 1992/third &&
X: immediate _read @ ! - * / <0 exit echo key _pick
X
X: debug immediate 1 5 ! exit
X
X: r 1 exit
X
X: ] r @ 1 - r ! _read ]
X
X: _main immediate r @ 7 ! ]
X_main
X
X
X: _x 3 @ exit
X: _y 4 @ exit
X: _x! 3 ! exit
X: _y! 4 ! exit
X
X
X: swap _x! _y! _x _y exit
X
X: + 0 swap - - exit
X
X: dup _x! _x _x exit
X
X: inc dup @ 1 + swap ! exit
X
X: h 0 exit
X
X: , h @ ! h inc exit
X
X
X: ' r @ @ dup 1 + r @ ! @ exit
X
X: ; immediate ' exit , exit
X
X
X: drop 0 * + ;
X
X: dec dup @ 1 - swap ! ;
X
X: tor r @ @ swap r @ ! r @ 1 + r ! r @ ! ;
X
X: fromr r @ @ r @ 1 - r ! r @ @ swap r @ ! ;
X
X: tail fromr fromr drop tor ;
X
X: minus 0 swap - ;
X
X: bnot 1 swap - ;
X
X: < - <0 ;
X
X: logical dup 0 < swap minus 0 < + ;
X
X: not logical bnot ;
X
X: = - not ;
X
X: branch r @ @ @ r @ @ + r @ ! ;
X
X: computebranch 1 - * 1 + ;
X
X: notbranch
X  not
X  r @ @ @
X  computebranch
X  r @ @ +
X  r @ !
X;
X
X: here h @ ;
X
X: if immediate ' notbranch , here 0 , ;
X
X: then immediate dup here swap - swap ! ;
X
X: ')' 0 ;
X
X: _fix key drop key swap 2 + ! ;
X
X: fix-')' immediate ' ')' _fix ;
X
Xfix-')' )
X
X: find-) key ')' = not if tail find-) then ;
X
X: ( immediate find-) ;
X
X( we should be able to do FORTH-style comments now )
X
X( this works as follows: ( is an immediate word, so it gets
X  control during compilation.  Then it simply reads in characters
X  until it sees a close parenthesis.  once it does, it exits.
X  if not, it pops off the return stack--manual tail recursion. )
X
X( now that we've got comments, we can comment the rest of the code! )
X
X: else immediate
X  ' branch ,		( compile a definite branch )
X  here			( push the backpatching address )
X  0 ,			( compile a dummy offset for branch )
X  swap			( bring old backpatch address to top )
X  dup here swap -	( calculate the offset from old address )
X  swap !		( put the address on top and store it )
X;
X
X: over _x! _y! _y _x _y ;
X
X: add
X  _x!			( save the pointer in a temp variable )
X  _x @			( get the value pointed to )
X  +			( add the incremement from on top of the stack )
X  _x !			( and save it )
X;
X
X: allot	h add ;
X
X: maybebranch
X  logical		( force the TOS to be 0 or 1 )
X  r @ @ @		( load the branch offset )
X  computebranch	( calculate the condition offset [either TOS or 1])
X  r @ @ +		( add it to the return address )
X  r @ !		( store it to our return address and return )
X;
X
X: mod _x! _y!		( get x then y off of stack )
X  _y
X  _y _x / _x *		( y - y / x * x )
X  -
X;
X
X: '\n' 0 ;
X: '"' 0 ;
X: '0' 0 ;
X: 'space' 0 ;
X
X: fix-'\n' immediate ' '\n' _fix ;
X: fix-'"' immediate ' '"' _fix ;
X: fix-'0' immediate ' '0' _fix ;
X: fix-'space' immediate ' 'space' _fix ;
X
Xfix-'0' 0 fix-'space'  fix-'"' "
Xfix-'\n'
X
X
X: cr '\n' echo exit
X
X: printnum
X  dup
X  10 mod '0' +
X  swap 10 / dup
X  if
X    printnum 0
X  then
X  drop echo
X;
X
X: .
X  dup 0 <
X  if
X    45 echo minus
X  then
X  printnum
X  'space' echo
X;
X
X
X: debugprint dup . cr ;
X
X( the following routine takes a pointer to a string, and prints it,
X  except for the trailing quote.  returns a pointer to the next word
X  after the trailing quote )
X
X: _print
X  dup 1 +
X  swap @
X  dup '"' =
X  if
X    drop exit
X  then
X  echo
X  tail _print
X;
X
X: print _print ;
X
X  ( print the next thing from the instruction stream )
X: immprint
X  r @ @
X  print
X  r @ !
X;
X
X: find-"
X  key dup ,
X  '"' =
X  if
X    exit
X  then
X  tail find-"
X;
X
X: " immediate
X  key drop
X  ' immprint ,
X  find-"
X;
X
X: do immediate
X  ' swap ,		( compile 'swap' to swap the limit and start )
X  ' tor ,		( compile to push the limit onto the return stack )
X  ' tor ,		( compile to push the start on the return stack )
X  here			( save this address so we can branch back to it )
X;
X
X: i r @ 1 - @ ;
X: j r @ 3 - @ ;
X
X: > swap < ;
X: <= 1 + < ;
X: >= swap <= ;
X
X: inci 
X  r @ 1 - 	( get the pointer to i )
X  inc		( add one to it )
X  r @ 1 - @ 	( find the value again )
X  r @ 2 - @	( find the limit value )
X  <
X  if
X    r @ @ @ r @ @ + r @ ! exit		( branch )
X  then
X  fromr 1 +
X  fromr drop
X  fromr drop
X  tor
X;
X  	
X: loop immediate ' inci , here - , ;
X
X: loopexit
X
X  fromr drop		( pop off our return address )
X  fromr drop		( pop off i )
X  fromr drop		( pop off the limit of i )
X;			( and return to the caller's caller routine )
X
X: isprime
X  dup 2 = if
X    exit
X  then
X  dup 2 / 2		( loop from 2 to n/2 )
X  do
X    dup			( value we're checking if it's prime )
X    i mod		( mod it by divisor )
X    not if
X      drop 0 loopexit	( exit from routine from inside loop )
X    then
X  loop 
X;
X
X: primes
X  " The primes from "
X  dup .
X  "  to "
X  over .
X  "  are:"
X  cr
X
X  do
X    i isprime 
X    if
X      i . 'space' echo
X    then
X  loop
X  cr
X;
X
X: execute
X  8 !
X  ' exit 9 !
X  8 tor
X;
X
X: :: ;		( :: is going to be a word that does ':' at runtime )
X
X: fix-:: immediate 3 ' :: ! ;
Xfix-::
X
X	( Override old definition of ':' with a new one that invokes ] )
X: : immediate :: ] ;
X
X: command
X  here 5 !		( store dict pointer in temp variable )
X  _read			( compile a word )
X			( if we get control back: )
X  here 5 @
X  = if
X    tail command	( we didn't compile anything )
X  then
X  here 1 - h !		( decrement the dictionary pointer )
X  here 5 @		( get the original value )
X  = if
X    here @		( get the word that was compiled )
X    execute		( and run it )
X  else
X    here @		( else it was an integer constant, so push it )
X    here 1 - h !	( and decrement the dictionary pointer again )
X  then
X  tail command
X;
X
X: make-immediate	( make a word just compiled immediate )
X  here 1 -		( back up a word in the dictionary )
X  dup dup		( save the pointer to here )
X  h !			( store as the current dictionary pointer )
X  @			( get the run-time code pointer )
X  swap			( get the dict pointer again )
X  1 -			( point to the compile-time code pointer )
X  !			( write run-time code pointer on compile-time pointer )
X;
X
X: <build immediate
X  make-immediate	( make the word compiled so far immediate )
X  ' :: ,		( compile '::', so we read next word )
X  2 ,			( compile 'pushint' )
X  here 0 ,		( write out a 0 but save address for does> )
X  ' , ,			( compile a push that address onto dictionary )
X;
X
X: does> immediate
X  ' command ,		( jump back into command mode at runtime )
X  here swap !		( backpatch the build> to point to here )
X  2 ,			( compile run-code primitive so we look like a word )
X  ' fromr ,		( compile fromr, which leaves var address on stack )
X;
X
X
X: _dump			( dump out the definition of a word, sort of )
X  dup " (" . " , "
X  dup @			( save the pointer and get the contents )
X  dup ' exit
X  = if
X	" ;)" cr exit
X  then
X  . " ), "
X  1 +
X  tail _dump
X;
X
X: dump _dump ;
X
X: # . cr ;
X  
X: var <build , does> ;
X: constant <build , does> @ ;
X: array <build allot does> + ;
X
X: [ immediate command ;
X: _welcome " Welcome to THIRD.
XOk.
X" ;
X
X: ; immediate ' exit , command exit
X
X[
X
X_welcome
SHAR_EOF
$TOUCH -am 0817110092 1992/third &&
chmod 0444 1992/third ||
echo "restore of 1992/third failed"
set `wc -c 1992/third`;Wc_c=$1
if test "$Wc_c" != "6605"; then
	echo original size 6605, current size $Wc_c
fi
# ============= 1992/vern.c ==============
echo "x - extracting 1992/vern.c (Text)"
sed 's/^X//' << 'SHAR_EOF' > 1992/vern.c &&
X#include <stdio.h>
X;	m(x)(x<0?-1:!!x)
X;	g tj()-J
X;	a(x)(x<0?-x:x)
X;	h(x)((x)<=K?x:N-(x))
X;	f 9999
X;	A return
X;	H printf{ 
X;	R double
X;	U int
X;	V for
X;	b else
X;	u while
X;	B if
XU v,w,Y}	 -1,W,J,p,F,o}	f,M,N,K,X,YY,_,P[f],s{ } ;
Xtypedef U{ *L} { } ;
XL q[f];
Xtj{ } {
XU S}	m{ v} +{ m{ w} <<K} ; 
XB{ !S} A J; 
XV{ v}	W+S; v!}	J&&!q[v]; v+}	S} ;
XA v; 
X}
Xk{ } {
X_}	K; 
XA v?a{ v} >1||w-Y||!q[J]:{ w-Y&&{ w-Y*2||q[W+Y*{ N+1} ]||
X    { J>>K} -K+{ Y-1} / 2} } ||q[J]; 
X}
Xz{ } {
X_}	5; 
XA v*w||g; 
X}
Xe{ } {
X_}	 -2; 
XA{ v*v*v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XE}	t; 
XB{ E>}	S} 
XA++F,E; 
X}
X}
XB{ !XP} E}	s{ } ?-f+1:0; 
Xp}	Q; 
XA++F,E; 
X}
XRZ{ } {
XU {	,j,T}	0; 
XV{ ; ; } {
Xy{ } ; 
Xo}	f; 
Xdo{
XH"\n%d %d %d %s ",X,T,C{ } ,s{ } ?"!":">"} ;
Xfflush{ stdout} ; 
X}
Xu{ scanf{ "%o%o",&{	,&j} !}	2||I{ {	,j,1} } ;
XO{ {	,j} ; 
Xy{ } ; 
XX}	0; 
X++YY;
XY}	 -Y; 
XT}	PX{ } ; 
X{	}	p>>{ K<<1} ; 
Xj}	p&{ M-1} ; 
XB{ I{ {	,j,1} } {
XH"Rats!\n"} ; 
XA; 
X}
XO{ {	,j} ; 
XY}	 -Y; 
XB{ T>M*M} H"\nHar har.\n"} ; 
X}
X}
Xmain{ ac,av} char**av; 
X{
Xlong time{ } ,j}	time{ &j} ; 
XR {	}	0; 
Xsrand{ { U} j} ;
XV{ M}	0; M<}	f; ++M} {	+}	UC{ } ; 
XM}	{	/100;
XB{ M&3} ++M; 
XB{ M&1} --M; 
XV{ N}	1; N*N<M; ++N} ;
XK}	 --N/2; 
XF}	ac>1?atoi{ av[1]} :2; 
Xuv{ } ;
XRZ{ } ; 
X}
SHAR_EOF
$TOUCH -am 0817112392 1992/vern.c &&
chmod 0444 1992/vern.c ||
echo "restore of 1992/vern.c failed"
set `wc -c 1992/vern.c`;Wc_c=$1
if test "$Wc_c" != "3203"; then
	echo original size 3203, current size $Wc_c
fi
# ============= 1992/vern.hint ==============
echo "x - extracting 1992/vern.hint (Text)"
sed 's/^X//' << 'SHAR_EOF' > 1992/vern.hint &&
XBest of Show: <vern@ee.lbl.gov> Vern Paxson
X
X	Vern Paxson
X	Lawrence Berkeley Laboratory
X	Computer Systems Engineering
X	Bldg. 46A, Room 1123
X	Lawrence Berkeley Laboratory
X	1 Cyclotron Rd.
X	Berkeley, CA 94720  USA
X
X
XJudges' comments:
X
X     Try: 
X	make vern
X	vern 3		<-- default is 2
X
X     You might start off by giving the following input:
X	63 43
X	76 55
X	71 52
X	67 57		(this may take a while)
X    
X    The judges assume no responsibility for the obfuscated opening
X    suggested above.  :-)
X
X    For a real quick game try:
X	vern
X
X	65 55
X	66 46
X
X    NOTE: Move values must be restricted to the range 00 to 77.
X
X    NOTE: Because some mailers have problems with the original winning source,
X	  a slightly modified version with shorter lines has been provided.
X
X
XSelected notes from the author:
X
X    This program plays chess.  You play the white pieces and the program
X    the black pieces.  Moves are entered as a two-digit number specifying
X    the coordinates of the piece to be moved followed by another two-digit
X    number specifying the coordinates of where to move it.  Rows and
X    columns are numbered starting with (0,0) for the upper-lefthand corner
X    (black's queen's rook) and going to (7,7) for the lower-righthand
X    corner (white's king's rook).  For example, the PK4 opening for white
X    is indicated as "64 44".  Moves are read using scanf() so care should
X    be taken to not enter the wrong number of fields.
X
X    If the move you enter is illegal then you are just prompted again to
X    move.  If the move is legal then the new position is displayed and the
X    program starts computing its response.  For every 64 board positions it
X    examines a "." is printed.  Once it has chosen its move it simply
X    displays the board updated to reflect the move.
X
X    Your move is prompted for using a string like "1351 9 2 >".  The first
X    number is how many board positions the program examined when computing
X    its previous response.  The second number is its anticipated value for
X    the move it just made (with larger numbers meaning an ultimately better
X    board position for it), and the third number is the evaluation it
X    assigns to the your current position (larger numbers meaning better
X    positions for you).  A ">" indicates that you are not in check; for
X    check it is changed to "!".
X
X    There are a few limitations on play:
X
X    o	    castling can only be done on the king's side;
X    o	    prohibitions against castling out of or through check are
X     		not enforced;
X    o	    prohibitions against castling if the king or rook have moved
X     		are not enforced;
X    o	    pawns are always promoted to queens;
X    o	    en passant is not allowed;
X    o	    the board-position-repeated-three-times and fifty-moves
X     		stalemates are not recognized;
X
X    If you checkmate the computer it prints "Rats!" and exits.  If your own
X    checkmate is imminent it prints "Har har." but doesn't exit so it can
X    rub your nose in defeat (which may be a move or two away if you're
X    playing at a high "ply" - see the next paragraph).  Stalemates are not
X    recognized per se, but when selecting its move the program assigns a
X    stalemate position a value of 0 so it will try for a stalemate if its
X    other options are worse.
X
X    The program takes one optional argument indicating the ply (lookahead)
X    it should use.  The default is 2, which is enough to keep it from
X    making flaming blunders.  The higher the ply, the better the play, and
X    the longer you have to wait.  For example, at a ply of 2, a response to
X    the PK4 opening takes about 1.8 CPU seconds on a SPARC ELC when
X    compiled -O with Sun cc.  A ply of 3 takes 13 CPU seconds (and results
X    in a different response to PK4) and a ply of 4 takes a little under 4
X    CPU minutes (and for PK4 comes up with the same response as a ply of
X    3).  A ply of 3 is in general good enough to avoid not only flaming
X    blunders but also immediately stupid moves altogether.  A ply of 4
X    will find all mate-in-two's.
X
X
X
X    This program is obfuscated in a number of ways.  First, it abuses the
X    contest rule regarding ';', '{', and '}' in the source not counting
X    against the non-whitespace character limit if followed by whitespace.
X    As can be seen from the build file, certain combinations of these
X    characters followed by a particular whitespace character are expanded
X    at build time into much-needed text.  Without this hack the program
X    wouldn't pass the character limit.  A nice side effect is that the
X    initial source is gloriously difficult to peruse.
X
X    Second, the rather ho-hum step has been taking of naming each variable
X    with a one or two letter identifier to render it meaningless (and save
X    space).  This tactic is rather effective in a complex program.
X
X    Third, the board is represented not as an array of pieces but rather as
X    an array of function pointers (with a separate array representing
X    whether a piece is white or black).  This obfuscates the program's
X    central data structure.  There is one function per type of piece; when
X    called they return 1 if the current move is illegal for that piece and
X    0 if it is legal.  The functions also as a side effect set a global
X    indicating the type of the piece (though the type can also be determined
X    by comparing the function pointer with the function itself).
X
X    Fourth, there are no independent routines for generating potential
X    moves.  Instead, the program generates its moves by brute force: for
X    every piece it controls on the board, it attempts to move it to every
X    square on the board.  Those moves that are legal it then explores to
X    see their effects (using alpha-beta search).  This tactic somewhat
X    obfuscates the algorithm used by the program.
X
X    Finally, there are three key constants that occur throughout the
X    program:  64, 8, and 3 (lg 8).  Rather than making these available at
X    compile-time, which provides a hint as to what the program is up to,
X    they are computed probabilistically at run-time.  An instance of the
X    "Inspection Paradox" is used which happens to produce a value that on
X    average is close to .64.  10000 instances of this value are computed,
X    added up, and then divided by 100.  Sometimes the value produced will
X    be 63 or 65 instead of 64 (but I've never observed any other values),
X    so the result is then rounded to the nearest multiple of 4, and then
X    the other constants are derived from it.
SHAR_EOF
$TOUCH -am 0908160392 1992/vern.hint &&
chmod 0444 1992/vern.hint ||
echo "restore of 1992/vern.hint failed"
set `wc -c 1992/vern.hint`;Wc_c=$1
if test "$Wc_c" != "6513"; then
	echo original size 6513, current size $Wc_c
fi
# ============= 1992/westley.c ==============
echo "x - extracting 1992/westley.c (Text)"
sed 's/^X//' << 'SHAR_EOF' > 1992/westley.c &&
X           main(l
X      ,a,n,d)char**a;{
X  for(d=atoi(a[1])/10*80-
X atoi(a[2])/5-596;n="@NKA\
XCLCCGZAAQBEAADAFaISADJABBA^\
XSNLGAQABDAXIMBAACTBATAHDBAN\
XZcEMMCCCCAAhEIJFAEAAABAfHJE\
XTBdFLDAANEfDNBPHdBcBBBEA_AL\
X H E L L O,    W O R L D! "
X   [l++-3];)for(;n-->64;)
X      putchar(!d+++33^
X           l&1);}
SHAR_EOF
$TOUCH -am 0817110092 1992/westley.c &&
chmod 0444 1992/westley.c ||
echo "restore of 1992/westley.c failed"
set `wc -c 1992/westley.c`;Wc_c=$1
if test "$Wc_c" != "305"; then
	echo original size 305, current size $Wc_c
fi
# ============= 1992/westley.hint ==============
echo "x - extracting 1992/westley.hint (Text)"
sed 's/^X//' << 'SHAR_EOF' > 1992/westley.hint &&
XBest Small Program: <merlyn@digibd.com> Brian Westley (aka Merlyn LeRoy)
X
X	Brian Westley (aka Merlyn LeRoy)
X	Digi International
X	1026 Blair Ave.
X	St. Paul, MN  55104
X	USA
X
X
XJudges' comments:
X
X    If lost:
X	make whereami
X    
X    Then run:
X	whereami lat long
X    
X    Where lat and long correspond to your latitude and longitude.
X
X    To find the approximate place where this entry was judged, type:
X
X	whereami 37 -122	(- means west of meridian)
X    
X
XSelected notes from the author:
X
X    Run the program with your latitude & longitude as integer
X    arguments; it will produce a map made up of '!' with the given
X    position marked with either a '"' (if the position is over a '!')
X    or a '#' (if the position is over a space).  Southern latitudes
X    and western longitudes are entered as negative numbers.  For
X    example, to find San Francisco, run with "prog 38 -122".  The
X    resolution of the map is five degrees horizontally, ten degrees
X    vertically.  The map is a Mercator projection with equal spacing
X    of the latitudes, so the areas near the poles are very distorted.
X    Latitudes near the poles and Antarctica are not shown.
X
X    The program requires the ASCII character set, putchar(), atoi(),
X    and a display that auto-wraps at 80 characters(!).  If your display
X    does not work this way, you will have to massage the output;
X    for example, you can pipe it to a file and edit it with vi,
X    which will do autowrap for you.
X
X    Lint complains that main() returns a random value and I'm not
X    checking the value that putchar() returns.  Scandalous!
X
X    If you run it with fewer than 2 arguments, it will likely
X    give you an exception, as it will access arguments that
X    don't exist and characters before a string constant.
X
X    How it works:
X
X    The map is printed as one long string of ' ' and '!' characters,
X    with the autowrap used to stack up slices of 80.  The map data is
X    a string; the first character is how many '!'s are printed
X    ('A'=1, 'B'=2, etc), the second character is how many ' 's, the
X    third is how many '!'s, etc.  ASCII characters less than 'A'
X    print no characters but still change the polarity, so any map
X    of ' 's and '!'s is possible.  This is done in the putchar()
X    argument as "33^l&1", where l is the character position+4; if
X    l is odd, ' ' is printed, if l is even, '!' is printed.
X
X    The position of latitude & longitude is changed into a single
X    character position within the one long string via the first
X    expression "d = latitude/10*80 - longitude/5 - offset"  The
X    latitude is divided by ten because the vertical resolution is
X    ten degrees, then multiplied by 80 because of the 80 character
X    wrap (i.e. each ten degrees moves the position up or down one
X    entire row).  The longitude is divided by five and added, because
X    five degrees of change moves the location one character.  The signs
X    are opposite because latitude is decreasing and longitude is
X    increasing as you go from upper left to lower right.  The offset
X    is where the origin (latitude=0, longitude=0) is found.
X
X    The position counting down to zero changes the putchar() from
X    printing ('!' or ' ') to printing ('"' or '#').
X
X    The "H E L L O,   W O R L D!" string inside the data string
X    prints the line of blanks past Tierra del Fuego and the last
X    blank line.  It's just for show, really.
X
X    Since the resolution is coarse, a few costal cities are shown to
X    be just off the map; this is an unavoidable artifact.  The map
X    is reasonably accurate.
X
X    Here are some cities you might like to try:
X
X         New York  41  -74       Los Angeles  34 -118
X           London  52    0             Paris  45    2
X           Moscow  56   38           Beijing  40  116
X        New Delhi  29   77    Rio de Janeiro -23  -43
X           Sydney -34  151             Tokyo  36  140
X
XFor a domestic (USA) version with higher resolution, try:
X---cut---
Xmain(l,a,n,d)char**a;{for(d=atoi(a[1])/2*80-atoi(a[2])-2043;
Xn="bnaBCOCXdBBHGYdAP[A M E R I C A].AqandkmavX|ELC}BOCd"
X[l++-3];)for(;n-->64;)putchar(!d+++33^l&1);}
X---cut---
XThe code will test the 80-column wrap and document itself if it is
Xjoined together as one 160-character line and listed.  You should see:
X
Xmain(l,a,n,d)...
X[A M E R I C A]...
X
X...going down the left edge if your terminal autowraps at 80 characters.
SHAR_EOF
$TOUCH -am 0908160392 1992/westley.hint &&
chmod 0444 1992/westley.hint ||
echo "restore of 1992/westley.hint failed"
set `wc -c 1992/westley.hint`;Wc_c=$1
if test "$Wc_c" != "4374"; then
	echo original size 4374, current size $Wc_c
fi
# ============= 1992/vern.orig.c ==============
echo "x - extracting 1992/vern.orig.c (Text)"
sed 's/^X//' << 'SHAR_EOF' > 1992/vern.orig.c &&
X#include <stdio.h>
X;	m(x)(x<0?-1:!!x)
X;	g tj()-J
X;	a(x)(x<0?-x:x)
X;	h(x)((x)<=K?x:N-(x))
X;	f 9999
X;	A return
X;	H printf{ 
X;	R double
X;	U int
X;	V for
X;	b else
X;	u while
X;	B if
XU v,w,Y}	 -1,W,J,p,F,o}	f,M,N,K,X,YY,_,P[f],s{ } ;
Xtypedef U{ *L} { } ;
XL q[f];
Xtj{ } {
XU S}	m{ v} +{ m{ w} <<K} ; 
XB{ !S} A J; 
XV{ v}	W+S; v!}	J&&!q[v]; v+}	S} ;
XA v; 
X}
Xk{ } {
X_}	K; 
XA v?a{ v} >1||w-Y||!q[J]:{ w-Y&&{ w-Y*2||q[W+Y*{ N+1} ]||
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-Y; 
Xo}	 -E;
Xt}	 -QL{ {	>>K+K,{	&M-1,PX} ; 
XY}	 -Y; 
XB{ t>E} {
X++XP; 
XQ}	{	; 
XE}	t; 
XB{ E>}	S} 
XA++F,E; 
X}
X}
XB{ !XP} E}	s{ } ?-f+1:0; 
Xp}	Q; 
XA++F,E; 
X}
XRZ{ } {
XU {	,j,T}	0; 
XV{ ; ; } {
Xy{ } ; 
Xo}	f; 
Xdo{
XH"\n%d %d %d %s ",X,T,C{ } ,s{ } ?"!":">"} ;
Xfflush{ stdout} ; 
X}
Xu{ scanf{ "%o%o",&{	,&j} !}	2||I{ {	,j,1} } ;
XO{ {	,j} ; 
Xy{ } ; 
XX}	0; 
X++YY;
XY}	 -Y; 
XT}	PX{ } ; 
X{	}	p>>{ K<<1} ; 
Xj}	p&{ M-1} ; 
XB{ I{ {	,j,1} } {
XH"Rats!\n"} ; 
XA; 
X}
XO{ {	,j} ; 
XY}	 -Y; 
XB{ T>M*M} H"\nHar har.\n"} ; 
X}
X}
Xmain{ ac,av} char**av; 
X{
Xlong time{ } ,j}	time{ &j} ; 
XR {	}	0; 
Xsrand{ { U} j} ;
XV{ M}	0; M<}	f; ++M} {	+}	UC{ } ; 
XM}	{	/100;
XB{ M&3} ++M; 
XB{ M&1} --M; 
XV{ N}	1; N*N<M; ++N} ;
XK}	 --N/2; 
XF}	ac>1?atoi{ av[1]} :2; 
Xuv{ } ;
XRZ{ } ; 
X}
SHAR_EOF
$TOUCH -am 0817110092 1992/vern.orig.c &&
chmod 0444 1992/vern.orig.c ||
echo "restore of 1992/vern.orig.c failed"
set `wc -c 1992/vern.orig.c`;Wc_c=$1
if test "$Wc_c" != "3201"; then
	echo original size 3201, current size $Wc_c
fi
exit 0
-- 
For a good prime, call:  391581 * 2^216193 - 1