marcomoser.it
programmatore java & php > consulente informatico
home / fun / [ obfuscatedc ] [ Login ]
T
O
C

my preferred obfuscated.c

Don Dodson

Most Humorous: <dodsond@agcs.com> Don Dodson

      Don Dodson
    AG Communication Systems
    4101 W Union Hills Dr #1104
    Glendale, AZ 85308
    USA


  Judges' comments:

      To use:
       make dodsond1

      Try:
       dodsond1

      Give the following input:

          ... a male (who) gets very, very frustrated sitting in a chair all
        the time because males are biologically driven to go out and hunt
        giraffes.
               -- Adjunct Professor Newt Gingrich, Reinhardt College, 1/7/95


  Selected notes from the author:

      Istha ogrampra akesta Englishwa extta aswa inputwa andwa
    anslatestra itwa intowa Igpa Atinla.

      The obfuscation is on several levels.

      Most obviously, the shape of the program.

      Underneath that, the variable names are in pig latin, as are the
    names of the standard C functions, such as putchar.  Even main is
    written as ainma.

      The program construction is also very obfuscated, with all of the
    code being inside the ()'s of one of the 6 "orfa" loops.

dodsond1.c

#define X
#define XX
#define XXX
#define XXXX
#define XXXXX
#define XXXXXX
#define XXXXXXX
#define orfa for
#define XXXXXXXXX
#define archa char
#define ainma main
#define etcharga getchar
#define utcharpa putchar

       X                                       X
    X X                                     X X
   X   X                                   X   X
   X    X                                 X    X
  X      X                               X      X
  X       X                             X       X
 X         X                           X         X
 X   X     X                           X     X   X
 X   XX     X                         X     XX   X
X    XXX    X        XXXXXXXXX        X    XXX    X
X     XXX    X   XXXX         XXXX   X    XXX     X
X     XXXX   X XX ainma(){ archa  XX X   XXXX     X
X     XXXX    X   oink[9],*igpa,    X    XXXX     X
X     XXXXXX atinla=etcharga(),iocccwa XXXXXX     X
X      XXXX ,apca='A',owla='a',umna=26  XXXX      X
X      XXX  ; orfa(; (atinla+1)&&(!(((   XXX      X
X      XX atinla-apca)*(apca+umna-atinla) XX      X
 X     X  >=0)+((atinla-owla)*(owla+umna-  X     X
 X       atinla)>=0))); utcharpa(atinla),        X
 X   X atinla=etcharga()); orfa(; atinla+1;  X   X
  X X  ){ orfa(      igpa=oink     ,iocccwa=( X X
  X X  (atinla-  XXX  apca)*(  XXX apca+umna- X X
   X atinla)>=0) XXX           XXX   ; ((((    X
  X atinla-apca XXXXX XXXXXXX XXXXX  )*(apca+   X
  X umna-atinla XXXXXX )>=0) XXXXXX +((atinla-  X
 X owla)*(owla+ XXXX   umna-   XXXX atinla)>=0)) X
 X   &&"-Pig-"   XX  "Lat-in"   XX   "COb-fus"   X
 X "ca-tion!!"[  X  (((atinla-   X  apca)*(apca+ X
 X umna-atinla) X  >=0)?atinla-   X  apca+owla:  X
X atinla)-owla X ]-'-')||((igpa==  X oink)&&!(*(  X
X igpa++)='w') X )||! X (*( X igpa X ++)=owla); * X
X (igpa++)=(( X  (   XXX   XXX      X atinla-apca X
X  )*(apca+   X umna XXX - XXX      X atinla)>=0) X
X  ?atinla-   X apca XXX + XXX owla X  :atinla),  X
 X   atinla=   X      X     X      X etcharga()) X
 X   ; orfa(   X atinla=iocccwa?(( X  (atinla-   X
 X owla)*(owla+ X umna-atinla)>=0 X  )?atinla-   X
 X  owla+apca:   X   atinla):    X  atinla; (((  X
  X atinla-apca)* X (apca+umna- X atinla)>=0)+( X
  X (atinla-owla)* X  (owla+   X umna-atinla)>= X
   X 0)); utcharpa( XX       XX atinla),atinla X
   X  =etcharga());   XXXXXXX  orfa(*igpa=0,   X
    X  igpa=oink; *           igpa; utcharpa( X
     X *(igpa++))); orfa(; (atinla+1)&&(!((( X
      X atinla-apca              )*(apca+   X
       X   umna-    XXXXX XXXXX atinla)>=0 X
        X   )+((       XXXXX     atinla-  X
         XX  owla)*(         owla+umna- XX
           XX atinla)>=0))); utcharpa XX
             XX  (atinla),atinla=   XX
               XX etcharga()); }  XX
                 XXXX   }     XXXX
                     XXXXXXXXX

Heather Downs

Best Layout: <{heather,selene}@bungalow.com> Heather Downs, Selene Makarios

      Heather Downs, Selene Makarios
    The Software Bungalow
    900 High School Way, #2202
    Mountain View, CA 94041
    USA


  Judges' comments:

      To use:
       make heathbar

      To run:
       heathbar 4253 2281

      The main reason we liked this entry was mainly because the main
    effect of the source was self documenting!  <img src="/skins/commons/emo/smile.gif" alt=":-)" title=":-)"/>


  Selected Author's comments:

      Run this program with two non-negative integer arguments
    (e.g. "prog 1234 999").

      My goal was to create the fastest possible C program. To that
    end, I made three critical observations:

          1. If there's one thing computers are good at, it's math.
        2. Simple operations take less time than complicated ones.
        3. Every C program seems to contain the word "main".

      Based on #1, I knew that the Fastest Program had to be one that
    performed addition. From #2, I reasoned that it ought to directly
    manipulate the bits, rather than wasting time dealing with bloated,
    high-level, fuzzy-logic, artificial-intelligence, neural-net,
    client-server, object-oriented abstractions like the C language "+"
    operator. And it was obvious from #3 that the program should
    resemble, as closely as possible, a long sequence of the familiar
    word "main" repeated over and over, so the computer would be
    comfortable running the program and wouldn't get distracted dealing
    with unfamiliar variable names.

      Also, I've looked at some past winning entries of your contest, and
    if you don't mind a little constructive criticsm, some of them are
    kind-of hard to figure out. I didn't want my program to fall into
    the same trap, so I went out of my way to write self-documenting
    code.  Anyone who so much as glances at my program will immediately
    see that it adds two 16-bit unsigned integers by streaming their
    bits through a simulated cascade of hardware adders. I hope my
    diligent effort to write especially clear code gets me extra points!

      P.S. What does "obfuscated" mean?

heathbar.c

#							       include <stdio.h>
#						 define	    MAin   printf("%dn"
#						 define	    mAIN	return 0
#						 define	    MaiN	 {static
#						 define	    mAlN	  ) {if(
#						 define	    MA1N	   char*
#						 define	    MAiN	    (!!(
#						 define	    mAiN	    atoi
#						 define	    mAln	    &1<<
#						 define	    MAlN	    !=3)
#						 define	    MAln	     )&&
#						 define	    MAIN	     int
#						 define	    maln	     --,
#						 define	    Maln	      <<
#						 define	    MaIn	      ++
#						 define	    MalN	      |=
#						 define	    MA1n	      ||
#						 define	    malN	      -1
#						 define	    maIN	       *
#						 define	    MaIN	       =
#						 define	    ma1N	       )
#						 define	    Ma1N	       (
#						 define	    Main	       ;
#						 define	    mA1n	       !
#						 define	    MAIn	       }
#						 define	    mA1N	       ,
                                                 MAIN	    mAIn
                                                 Ma1N	    MAIN
                                                 ma1N	    mA1N
                                                 mAiN	    Ma1N
                   MA1N ma1N mA1N maIn MaIN malN mA1N	    ma1n
                   mA1N			  maiN	    Main
                   MAIN      main Ma1N MAIN Ma1n mA1N MA1N maIN
                   mAin      mAlN		  Ma1n	    MAlN
                   mAIN      Main		  maIn	    MaIn
              mA1N Ma1n maln mAin MaIn		  Main	    maIn
              MaIN		   mAiN		  Ma1N	    Ma1N
              Ma1n		   maln		  maIN	    mAin
              MaIn		   ma1N		  ma1N	    Main
              ma1n		   MaIN		  mAiN	    Ma1N
              Ma1N		   Ma1n		  maln	    maIN
              mAin		   MaIn		  ma1N	    ma1N
              Main		   mAIn		  Ma1N	    mAIn
              Ma1N		   mAIn		  Ma1N	    mAIn
              Ma1N		   mAIn	     Ma1N mAIn	    Ma1N mAIn
               Ma1N		  mAIn	     Ma1N mAIn	    Ma1N mAIn
                 Ma1N		mAIn	     Ma1N   mAIn  Ma1N	 mAIn
                   Ma1N mAIn Ma1N	     mAIn      Ma1N	 mAIn
                        Ma1N		     Ma1n		 ma1N
                        ma1N		     ma1N		 ma1N
         ma1N ma1N ma1N ma1N		     ma1N		 ma1N
         ma1N		 ma1N		     ma1N		 ma1N
         ma1N		 ma1N		     Main		 MAin
         mA1N maiN ma1N Main mAIN Main	     MAIn		 MAIN
         mAIn	Ma1N		  MAIN	     mAin		 ma1N
         MaiN	 MAIN		 main	       MaIN	       malN
         Main	  main		MaIn		 Main	     mAIN
         mA1N	   maiN	       MalN		   Ma1N	   MAiN
         maIn	    mAln      main		       ma1N
         MA1n	     Ma1N    MAiN		       ma1n
         mAln	      main  ma1N		       MA1n
         mAin		 MAln			       Ma1N
         mA1n	      MAiN  ma1n		       mAln
         main	      MAln  mAin		       ma1N
         ma1N		 ma1N	   MAln Ma1N mA1n MAiN maIn
         mAln		 main	   MAln
         Ma1N		 MAiN	   ma1n
         mAln	    main ma1N MA1n mAin MAln
         Ma1N	    mA1n		MAiN
         ma1n	    mAln		main
         MAln	    mAin		ma1N
         ma1N	    ma1N		ma1N
         ma1N	    ma1N		Maln
         main	    mA1N		MAiN
         ma1n	    mAln		main
         MAln	    mAin		ma1N
         MA1n	    MAiN		maIn
         mAln	     main	       MAln
         Ma1N	       MAiN	     ma1n
         mAln		 main ma1N MA1n
         mAin		      MAln
         Ma1N		      mA1n
         MAiN		      ma1n
         mAln		      main
         MAln		      mAin
         ma1N		      ma1N
         ma1N		      ma1N
         Main		      MAIn       Heather Downs, Selene Makarios USA 1995

Eric Marshall

Best layout: <burdvax!eric> Eric Marshall

         Eric Marshall
       System Development Corporation, a Burroughs Company
       P.O. Box 517
       Paoli, PA.
       19301

  This program prints the name of the picture.  The layout is somewhat
pretty through it is not the usual sort of output one would expect
from printing a program!

  This program was slected for the 1987 t-shirt collection.

  This program is known to give some C compilers a problems.

  Copyright (c) 1986, 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.

marshall.c

                                                   extern int
                                                       errno
                                                         ;char
                                                            grrr
                             ;main(                           r,
  argv, argc )            int    argc                           ,
   r        ;           char *argv[];{int                     P( );
#define x  int i,       j,cc[4];printf("      choo choon"     ) ;
x  ;if    (P(  !        i              )        |  cc[  !      j ]
&  P(j    )>2  ?        j              :        i  ){*  argv[i++ +!-i]
;              for    (i=              0;;    i++                   );
_exit(argv[argc- 2    / cc[1*argc]|-1<<4 ]    ) ;printf("%d",P(""));}}
  P  (    a  )   char a   ;  {    a  ;   while(    a  >      "  B   "
  /* -    by E            ricM    arsh             all-      */);    }

Savastio

Most Obfuscated Syntax: <m.savastio@telesciences.com> Michael Savastio

      Michael Savastio
    Securicor Telesciences
    925 1/2 Anchor St, Apt 2
    Philadelphia, PA  19124
    USA


  Judges' comments:

      To use:
       make savastio

      To run:
       savastio

         enter a number (such as 100).

      As one judge said:

         I know an l when I see a 1.


  Selected Author's comments:

      This program is an infinite-precision factorial calculator.  It will
    compute the factorial of any number entered to an infinite degree of
    precision (or the limits of your machine's memory, whichever comes
    first).  I'd suggest you start with small numbers the first few times
    you run it and gradually work your way up in order to get a feel for
    the computation time your machine will require.

      Aside from having an artistic code layout and confusing variable names,
    the algorithm itself takes advantage of some cute C-isms.  Try to
    figure out how it prints the prompt "Enter number:".

      Numbers are represented internally by a linked list of blocks each
    containing 1000 buckets of 4-digit integers.  To further confuse
    matters, the buckets are arranged backwards in the block.  For example,
    the number 8347108947139478934713847134 is represented as:

         7134 1384 9347 3947 9471 7108 834

      Platform limitations:

      Long integers must be at least 4 bytes.

      Features:

      In order to prevent the user from wasting too much time computing
    useless factorials, the maximum factorial that can be computed is
    429539!  This limit was selected through extensive research in
    time management studies and the factorial arts.

savastio.c

#include <stdio.h>

  #define l11l 0xFFFF
#define ll1 for
#define ll111 if
#define l1l1 unsigned
#define l111 struct
#define lll11 short
#define ll11l long
#define ll1ll putchar
#define l1l1l(l) l=malloc(sizeof(l111 llll1));l->lll1l=1-1;l->ll1l1=1-1;
#define l1ll1 *lllll++=l1ll%10000;l1ll/=10000;
#define l1lll ll111(!l1->lll1l){l1l1l(l1->lll1l);l1->lll1l->ll1l1=l1;}
lllll=(l1=l1->lll1l)->lll;ll=1-1;
#define llll 1000




                                                       l111 llll1 {
                                                     l111 llll1 *
      lll1l,*ll1l1        ;l1l1                      lll11 lll [
      llll];};main      (){l111 llll1                *ll11,*l1l,*
      l1, *ll1l, *    malloc ( ) ; l1l1              ll11l l1ll ;
      ll11l l11,ll  ,l;l1l1 lll11 *lll1,*            lllll; ll1(l
      =1-1 ;l< 14; ll1ll("t"8)>l"9!.)>vl"         [l]^'L'),++l
      );scanf("%d",&l);l1l1l(l1l) l1l1l(ll11         ) (l1=l1l)->
      lll[l1l->lll[1-1]     =1]=l11l;ll1(l11         =1+1;l11<=l;
      ++l11){l1=ll11;         lll1 = (ll1l=(         ll11=l1l))->
      lll; lllll =(            l1l=l1)->lll;         ll=(l1ll=1-1
      );ll1(;ll1l->             lll1l||l11l!=        *lll1;){l1ll
      +=l11**lll1++             ;l1ll1 ll111         (++ll>llll){
      l1lll lll1=(              ll1l =ll1l->         lll1l)->lll;
      }}ll1(;l1ll;              ){l1ll1 ll111        (++ll>=llll)
      { l1lll} } *              lllll=l11l;}
      ll1(l=(ll=1-              1);(l<llll)&&
      (l1->lll[ l]              !=l11l);++l);        ll1 (;l1;l1=
      l1->ll1l1,l=              llll){ll1(--l        ;l>=1-1;--l,
      ++ll)printf(              (ll)?((ll%19)        ?"%04d":(ll=
      19,"n%04d")              ):"%4d",l1->         lll[l] ) ; }
                                                     ll1ll(10); }

Shapiro

Most Well Rounded Obfuscation: <shapiro@alumni.cs.colorado.edu> Andrew T Shapiro

         Andrew T. Shapiro
       CSES/CIRES University of Colorado
       Campus Box 216
       Boulder, CO 80309-0216
       USA


  Judges' comments:

      To use:
       make shapiro
       ./shapiro &

      This entry has many different levels of obfuscation, and yet the
    source file is self documenting.  <img src="/skins/commons/emo/smile.gif" alt=":-)" title=":-)"/>

      From time to time, run ps and look at the new processes.

      See shapiro.info for more information in the internals of this program.
    The file shapiro.alt contains a non-obfuscated version of this program.


  Selected notes from the author:

       The basic theme (pun) of this program is:

         "This time (everything) is not where it should be."
             ~~~~
     My entry (shapiro.c) is mostly comment, formatted in the shape of a
     clock. If you strip out the comments and look at the code you will
     quickly realize that the comments were the important part and that
     the code does very little (see pun above). It writes (to stdout)
     another C program (shapiro_t2.c). This is the first level of
     obfuscation.

       The second program (shapiro_t2.c if you use the build/make file)
     prints a clock in the upper right hand corner of your VTxxx/ANSI
     display.

       Most of the surface obfuscation in the second program (shapiro_t2.c)
     was an attempt to make it as small as possible. You should be able to
     see around this with cb(1) and some more intelligent variable names.
     Once you get past this you will realize that the third level of
     obfuscation is a six member client/server hierarchy.
     (See the second info file for a detailed description of the algorithm.)

       Lint complains about: precedence confusion, K may be used before set,
       main() returns random value to invocation environment, value type used
       inconsistently, value type declared inconsistently, function argument
       ( number ) used inconsistently, function returns value which is always
       ignored, function returns value which is sometimes ignored
     All of which are harmless (famous last words).

       This may or may not work on non ASCII systems (I could not find one to
     test it on.)

  Copyright (c) 1994, 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.

  HINTS
~~~~~
For the first program (prog.c):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is a very simple program:

   1. #include <stdio.h>
 2. main()
 3. {
 4. int K,L,M=0;
 5. FILE *J;
 6. J=fopen(__FILE__,"r");
 7. for(;
 8.     (L=getc(J))!=-1;
 9.     L>='J'&&L<='J'+15 &&
10.     ((M=!M)?K=L:putchar(K-'J'|(L-'J'<<4)))
11.    );
12. exit(0)}

  Lines 1-5 are basic stuff. Line 6 opens the source code for input. Line 7
is the loop. Line 8 is read in each character in the file (placed in L)
while not EOF(-1). Line 9 is an if expression which filters out all
characters not between J and J + 15. Line 10 uses M to execute two different
paths the first just stores the character in K. The second path combines
the last two characters read in as high and low nibbles of a byte and
outputs them. In effect this is a very poor ASCII to binary decoder.
The last line is necessary so that make will not stop when it executes
this program.

  The second program is encoded into this format and then included (mostly)
as a comment.

  Notice that it is impossible to write this program while leaving 16
contiguous ASCII characters free for the encoding. Because of this the
second program is mostly included as a comment. However, some of the
characters of the encoded program are also source code for the decoder.

  For the second program (time.c):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1  #include <stdio.h>
     2  #include <time.h>
     3  #define o(j,k,m,n,l) {fprintf(j,a[k],m,n,a[l]);fflush(j);}
     4  char *a[]={"%c+------------+n","%c+%3d %-8s+n","seconds","minutes",
     5             "hours","%sn","33733[%d;65;H%s338"};
     6  int b[]={0,0,17,14,11,0};
     7  main(v,c)
     8  int v;
     9  char ** c;
    10  {
    11    char d[40],*e,f=6;
    12    time_t g;
    13    FILE *h,*i;
    14    while (--f && !pipe(d) && !fork());
    15    h=fdopen(6-f<<1,"a");
    16    i=fdopen((6-f<<1)+1,"r");
    17    for(;;){
    18      if(f){
    19        fgets(d,40,i);
    20        d[strlen(d)-1]='';
    21        if(*d=='0'+f){ sprintf(*c,"%sn",d+1); o(stdout,6,6-f,d+1,0) }
    22        if(*d>'0'+f) o(h,5,d,0,0)
    23      }else{
    24        time(&g);
    25        e=asctime(localtime(&g));
    26        for(v=1;v<6;v++) o(h,v!=1&&v!=6-1,v+'0',atoi(e+b[v]),v)
    27        sleep(1);
    28    }}}

  Lines 1 and 2 have to be. Think of 'o' in line 3 as send message with
j,k and m as where, format and what. Lines 4 and 5 are all the text
strings. Line 6 is the offsets into the time string for the hours,
minutes and seconds. Lines 7-13 are basic stuff. Line 14 is the crux of
the biscuit. 14 forks off 'f'(6) processes each of which is connected to
the ones above and below it with a Unix pipe. It was too difficult to
recover the actual fd numbers for the pipe ends in line 14 so I regenerate
them and fdopen them (for use with the standard C library functions) on lines
15 and 16. Now we have six almost identical processes. Each of which has
two files open h and i (up and down). The only difference in each process
is the value of f (0 <= f < 6). The five processes where f !=0 are the
slave processes and f == 0 is the master. Line 17 says we are going to do
this forever. Lines 18 and 23 differentiate between the master and the
slaves.

  Lines 19 to 22 are the slave code. Here we read in a line of text from
i (down)(line 19) and remove the end of line char (line 20). On line
21 if this message is for us (if the first character is our number, f,
in ASCII) we do two things:
1. We copy the text of the message to *c which is really argv[0].
   If you are on the correct flavor of Unix this will change the output of
   the ps(1) command to the string we just put there.
2. We send the message (not including the number) to stdout with
   format number 6 ("33733[%d;65;H%s338") If you can read VTxxx
   (and I read books printed as ANSI/VTxxx codes for fun <img src="/skins/commons/emo/smile.gif" alt=":-)" title=":-)"/> you know this
   is the sequence for: remember where we are,
                        go somewhere else,
                        print the message,
                        and return to where we started.
Line 22 says if this message is not for us (the number is bigger than ours)
send it to h (up).

  Lines 24 to 27 are the master code. Here we get the time and convert it
to an ASCII format (lines 24 and 25). Then on line 26 we build and send
each of the messages for the slaves. The message uses a different control
string for the different slaves. For the first and last slave the message
text is just "%c+------------+n" (slave number, text, newline.) For the
other slaves it is "%c+%3d %-8s+n" (slave number, number, units, newline).
The slave number is v+'0'. The number (if used) is atoi(e+b[v]) and the
units are just the string in the slave number position.

shapiro.c

#include <stdio.h>
                        /*MLSPXPMPVPOQN
                     POPJLVMMQNQNPSPYPXLRP
                   XMTJMLSPXPMPVPOQNPOPJLVMN
                 QSPWPOPXLRPXMTJMLNPOPPPSPXPOP
                JLYPRLTPVLUPVLWPVLXPVLVPSLJLUQP
              PJQLQSPXPNQPPRLTPVL*/main(){int K/*
             PUOUPWOV*/,L/<b>WPVLXPVLKPUOVPWOSLU</b>/,M
            /<b>PPPPVPOQMQRPR</b>/=0;FILE/<b>TPSLUMWQT</b>/ *
           J/<b>MPRPKPLQ</b>/;     J=      fopen(__FILE__
          /*T*/,"r");for      (;(       L/*KPUOWOWMUQ
         LLOLMPULWLWL         WLW         LWLWLWLWLWLW
         LWLWLULVOXP          LLV          LLLOLMPULOL
        MMNP*/=getc           (J)            )!= -1;L/*
       OLWLRMMQUL             VOX             PLLVLLLMQO
       PMPYPXPNP              MQL              LVLLLWPSP
      XPOQNQOPMQ              LLV              LTj*/>='J'
     &&L/*LRPYP               OQL               QMQLLVLLL
     OLMQVOXPL                LVL                LLVOe*/<=
     'J'+15&&(                (M=                !M/*MMMQMV
     OJMMMMMU                 OOL                 NPU MPMOM
    UMRNOLMQV                 OJM                 MMMMRMLLW
    QUMTJSPX                  PNQ                  JLLPUOWO
    WMUQJMVL                  JMV                  L*/)?K/*
    MQMV*/=L:               putchar                (K/*deMN
    MaVbcLKM                  KMV                  Le*/-'J'
   /<b>MWQUMTJ                  WPK                  PSPXPR</b>/
    |(L/<b>PQV                  LMPSLSPXPNQ</b>/-       'J'<<4))
    ));exit(                  0);}/*LPQUMMPR       PKPLQJLT
    LTLJLMPU                   MTJUQMPRPKPLQ       JLNPUONM
    JMWOVLTL                                       OPVLPPWM
    PMUMTJNQ                                       SPWPOPYO
    NQJLQPUM                                       TJPNSNVN
    ONJLTLRP                                       VLTLSPUM
    TJQQRPSP                                       VPOPJLRL
    WLWLPPJLP                                     LPLJLKLJQ
     SPJQOPRL                                     NPSLJLPL
     PLJLKLPPY                                   PLQUPRLSL
     SLUMTJRPW                                   MPPNPYPJQ
      OPXPRLPMW                                 LPPVMVMKM
      VLLLKPLLSL                               UMSPWMPPNP
       YPJQOPXPR                               LRLPMWLPP
       VMVMKMSLUL                             KMVLLLLQLL
        SLUMTJPPYP                           LQRLUMUMSL
         UQSPPPRLPPS                       LUQPPQPOPNQ
         MQRLNPVLNMJM                     VLSPSLUMNPUO
          MQNQLQVPOPXPR                 LNPSLWLKMWOWM
           QLVOJMQLUMTJSP             PPRLTLNPWMWMQL
            JMQLULPPSLUQMQJQLQSPXPNQPPRLTLMPVLLLOLM
             QVOXPLLVLNPULKMSLUMYPRLMQNQNPYPOQNQVL
              PMVLPMWLPPVLNPULKMVLJMSLWQTJSPPPRLT
                LNPXMQLJMQLULPPSLYPRLRPVLOMVLNP
                 VLJMVLJMSLWQOPVPMQOPUQNQSPWPO
                   PRLPLQPSLUMOPWMKPMQMPNQSP
                     WPOPRLVPYPMPKPVPNQSPW
                        POPRLPLQPSLSLUM

  TJPPYPLQRLPQWMKMUMPQVMPMUMPQULULSLYPRLRPVLPQKLWMKMPLPLPQKLWMPMWLKMVLPQ
ULQLJMQLVLKPNQYPSPRLOPULLPUOPQWOSLVLPQSLMQVPOPOPJQRLKMSLUMWQWQWQTJTJ*/

Brian Westley

Best Layout: <...uunet!rosevax!jhereg!quest!digibd!merlyn> Merlyn LeRoy

         Brian Westley (Merlyn LeRoy on usenet)
       DigiBoard, Inc.
       1026 Blair Ave.
       St. Paul, MN  55104
       USA

  Judges' comments:

      usage: westley <number>

      If you would rather "Daisy" someone other than Westley, rename
    the program as needed.  <img src="/skins/commons/emo/smile.gif" alt=":-)" title=":-)"/>

      Read each block of code as if it were a piece of correspondence.
    For example, the first block of code would read:

         charlie,
               doubletime me, OXFACE!
               not interested, get out
               mainly die, charly, <b>die</b>
                       signed charlotte

      The original source had control-L's after each code block.  To
    make it easier on news readers, we converted each control-L to
    a blank line.

      Some ANSI compilers will not accept '1s' as a short integer - for
    these compilers replace the '1s' with '1'.


  Selected notes from the author:

      This is a "Picking the Daisy" simulation.  Now, instead of mangling a
    daisy, simply run this program with the number of petals desired as
    the argument.

      This is a good counter-example to peoples' complaints that C doesn't
    have an "English-like" syntax.

      Lint complains about everything - null effect, xxx may be used before
    set, statement not reached, return(e) and return.  Lint dumps core
    on some systems.  My personal favorite lint complaint is

         "warning: eroticism unused in function main".

      Also obviously, (char)lotte and (char*)lie are incompatible types...

  Copyright (c) 1990, 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.

westley.c

char*lie;

         double time, me= !0XFACE,

         not; int rested,   get, out;

         main(ly, die) char ly, **die ;{

             signed char lotte,


  dear; (char)lotte--;

         for(get= !me;; not){

         1 -  out & out ;lie;{

         char lotte, my= dear,

         **let= !!me *!not+ ++die;

             (char*)(lie=


  "The gloves are OFF this time, I detest you, snotnsed GEEK!");

         do {not= <b>lie++ & 0xF00L</b> !me;

         #define love (char*)lie -

         love 1s *!(not= atoi(let

         [get -me?

             (char)lotte-


  (char)lotte: my- *love -

         'I'  -  *love -  'U' -

         'I'  -  (long)  - 4 - 'U' ])- !!

         (time  =out=  'a'));} while( my - dear

         && 'I'-1l  -get-  'a'); break;}}

             (char)*lie++;


  (char)*lie++, (char)*lie++; hell:0, (char)*lie;

         get <b>out</b> (short)ly   -0-'R'-  get- 'a'^rested;

         do {auto*eroticism,

         that; puts(*( out

             - 'c'

  -('P'-'S') +die+ -2 ));}while(!"you're at it");


  for (*((char*)&lotte)^=

         (char)lotte; (love ly) [(char)++lotte+

         !!0xBABE];){ if ('I' -lie[ 2 +(char)lotte]){ 'I'-1l ***die; }

         else{ if ('I' * get <b>out</b> ('I'-1l *<b>die[ 2 ])) *((char</b>)&lotte) -=

         '4' - ('I'-1l); not; for(get=!


  get; !out; (char)*lie  &  0xD0- !not) return!!

         (char)lotte;}


  (char)lotte;

         do{ not* putchar(lie [out

         *!not* !!me +(char)lotte]);

         not; for(;!'a';);}while(

             love (char*)lie);{


  register this; switch( (char)lie

         [(char)lotte] -1s *!out) {

         char*les, get= 0xFF, my; case' ':

         *((char*)&lotte) += 15; !not +(char)<b>lie</b>'s';

         this +1s+ not; default: 0xF +(char*)lie;}}}

         get - !out;

         if (not--)

         goto hell;

             exit( (char)lotte);}
TreWiki - Aggiornamento pagina 2006-04-18 17:07:57

Informativa sulla privacy - P.IVA 0199 0700 229