#include #include #include #include #include #include #include #include #include #include #include int a,b,c,d,e,f,h,i,j,k,l,m,n;fd_set p[1],q;struct{int A,B,C,D,E, F ,G,H,I,J,L,K;}w ,x;r(int r){return b=r,FD_ISSET(r,p);}enum{u=V*( 11 *W +5)+16};t( int t){FD_SET(t,&q);}struct sockaddr_un A, B,*D,C={ . sun_family=1}; char v[u];unsigned int E=sizeof(B),F= sizeof( x );char*I="\e" "[0m\e[2J\e[0;0H",*K,*L=&C.sun_path, *M,*J = "\e[0;30;40" "m \0\e[0m\n\0#!/bin/cat\n\e[1A",N; O(){ n= 0;while(++n< 9)*(n+L)=rand()%13+65;t(b=socket(1 ,2 ,0 ));n=bind(b, b==4?&B:&C,E);}struct timeval y,z ;H ( ){recvfrom(b ,&w,F,0,&A,&E),a=w.A;}Q(){close ( 4) ;fopen(K,"r" ) &&(read(4,v,u),close(4),unlink (K ) ),O();b=3;}P ( int P){strcat(v,J+P);}G(int G ){ x. A=G;D=G<5?0: G ^8?&B:&A;return sendto(b,G^3 ? & x:&w,F,0,D,! ! D*E);}struct termios o;main ( int F,char**D){n = 0;for(P(18);n++c &&(c=b),G(1) ; if(r(3) ) if(H(),a^2){ a ||G(6), a^1||(x.B=w.C, x.D||(x. D=x.B%6+1),x. L ||G(5)) ,a^4||(v[x.L++] =w.K, x. L8)// for(d=w.F,e=w.G,f =w.H,h=w.I,a=w.E,i=dl?j:-l)/ 2;M=34+ (v+(e+1)*(5+W * 11 )+d*11) ,47^w.J&&43^w . J|w.A ^ 10||(*M=w.D+ 48 ),*(M-3 )=w.D*(w.D +48!=*M)+48,*(M-6)=w.E*7+48,*(M+2)=a?42:32 , printf("" "\e[%d;%dH%.11s\e[%d;%dH\e[0;4%dm%c%s%s",e+2, d+2,M-8 ,V,8,x.D,x.J+65,I+8,J),f^d|e^h;)(b=n)>-j&&(n-=l ,d+=i) ,b