home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_08_05 / 8n05129a < prev    next >
Text File  |  1990-04-18  |  1KB  |  42 lines

  1.  
  2. -----------listing 5------------------
  3. #include <stdio.h>
  4. #define f int
  5. #define v (void)printf(
  6. #define x ),exit(1);
  7. #define y ){if(n)c=z(n,u),u=n,n=c;o[i]=n?'0'+(1&*n):'0';}
  8. #define z(a,b) (f*)(~1&*a^(f)b)
  9. #define k(l) if(!(l=(f*)malloc(sizeof(l))))v 23+m x if(1&(f)l)v 39+m x*l=
  10. r(p,q,d)f*p,*q;{char o[81];f*n=p,i=39,*c,*u=d?q:z(p,q);o[40]='0'+(1&*p);
  11. for(;i>=0;i--y u=d?z(p,q):q;n=p;for(i=41;i<79;i++y o[i++]='\r';o[i++]=0;
  12. v o);(void)fflush(stdout);sleep(1);}
  13. main(a,c)char**c;{char*u,*malloc(),*m=
  14. "Usage: black [string]\n\0No more memory\n\0Unusable memory alignment\n\0\
  15.   jt,s@m@ (beleY%XX&Yz {z&z}i|R(|)*((.)i)hiniFiGJ%FG.JJgJ: ;;&;z {z&z}-RS\
  16.   /ROiOV OP+PsaPh+ijainnjmamfmfAlnnnnphppopv%vvgv.aABiB1/BVP11/1.%..&.Ohr\
  17.   R-WV V1#1VP1CcC0R\n\n'CVP0\n!\n\n'\nEaEEnEamat!akckk'kwaww'wz,zzozEit +",
  18. *n=m;f*q,*p=0,*g,b=3,d;
  19. if(a>2)v m x n=a>1?c[1]:n;
  20. /*v"\t\t\t\t\tV\n");*/
  21. k(q)0;u=n;a=~1&'j';
  22. while(a!='x'){
  23.         /*r(q,p,b);*/
  24.         for(;;u+=3){
  25.                 u= *u?u:n;
  26.                 if((~1&*u)==a&&(1&*q)<<1==(2&u[2]))break;
  27.         }
  28.         a=~1&u[1];
  29.         d=(8&u[2])>>3;
  30.         if(16&u[2])putchar(u[3]);
  31.         if(4&u[2])*q|=1;else*q&=~1;
  32.         if(b==d)g=p;else{
  33.                 g=z(q,p);
  34.                 if(!g){k(g)(f)q;*q^=(f)g;}
  35.         }
  36.         p=q;q=g;b=1-d;
  37. }
  38. /*r(q,p,b);v"\n");*/exit(0);
  39. }
  40. -------------------end of listing 5-----------------
  41.  
  42.