Ioccc 2 Encrypt Code

Xref: athena.cs.uga.edu comp.lang.c:22568 comp.sources.d:2497 misc.misc:5665 alt.sources:3882 comp.unix.wizards:7142
Path: athena.cs.uga.edu!emory!swrinde!sdd.hp.com!nigel.msen.com!yale.edu!spool.mu.edu!uunet!inmos!wraxall.inmos.co.uk!elberton!nathan
From: nathan@elberton (Nathan Sidwell)
Newsgroups: comp.lang.c,comp.sources.d,misc.misc,alt.sources,comp.unix.wizards
Subject: Re: 1992 International Obfuscated C Code Contest winners
Message-ID: [1992Sep10.135002.25527@wraxall.inmos.co.uk]
Date: 10 Sep 92 12:50:01 GMT
References: [34848@hoptoad.uucp]
Lines: 62
X-Newsreader: Tin 1.1 PL5

Landon C. Noll (chongo@hoptoad.uucp) wrote:
: [the shar files]

As chongo stated, my entry can't be posted from the USA. So
I'm posting it from the UK, replace the shar'ed nathan.c with this code.

----8[-- cut here to break your display ---]8----
#include [stdio.h]                     
#include [string.h]                    
#define printf sqrt                     
#define OFST 1                          
#define strnel(sqrt)(sqrt-printf)      
                                       
int main(argv,argc)int argv;char*argc[]
;{char*i,*sqrt,*magic,*define;int ptr,\
                watch,                 
                t,cond                 
                ;for(                  
                argc++                 
                ,sqrt=                 
"1""q""a""z""2""w""s""x""3""e""d""c""4"
"r""f""v""5""t""g""b""6""y""h""n""7""u"
                                       
"j""m""8""i""k"",""9""o""l"".""0""p"";"
"/""[""'""`""]""\"\\"" ""Z""X""C""V""B"
"N""M"          "[""]"           "?""~"
"="":"          "L""K"           "J""H"
"G""F"          "D""S"           "A""!"
"Q""@"          "W""#"           "E""$"
"R""%"          "T""^"           "Y""&"
"U""*"          "I""("           "O"")"
                                        
"P""_""{""+""}""|""-",define=sqrt,cond=
strlen(printf),i=printf+cond,t=(((ptr=\
argv[=                                  
OFST||                                 
strcmp                                 
(*argc                                 
,i-1))                                 
?0:(argc                               
                                        
++,argv--)),OFST-1);(watch=fgetc(((!*i\
&&argv]OFST?i=*argc:0),stdin)))!=EOF;*i?
i++:0)                                 
(magic                                 
=strc\
hr(pr\
intf,(                                 
define                                 
                                        
=(*i?(define=strchr(printf,*i))?define:
printf:sqrt),watch)))?watch=t,watch=((t=
strnel(                         magic))
+(watch                         -strnel
(define                         ))*(ptr
*2-OFST                         )+cond*
(OFST+1                         ))%cond
,ptr?t=watch:0:0,fputc(magic?watch[pri\
ntf]:watch,stdout);return 0;} /*world*/
--

Nathan Sidwell  INMOS UK |                 | nathan@inmos.co.uk       DoD#0390


Back to my Computer Humor Page
Back to my humor page
Back to my home page

nathan@visi.com