restore *.orig.c to each entry

Under each yyyy/dir there is a file of the form '*.orig.c'
containing the original source code, or as close as we can
get to the original source code.
This commit is contained in:
Landon Curt Noll committed 2023-07-06 21:49:38 -07:00
1 parent cfd253683f
commit 2ba12ecc3c
320 files changed
+21365

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
/*
+
+
+
+
[ >i>n[t
*/ #include<stdio.h>
/*2w0,1m2,]_<n+a m+o>r>i>=>(['0n1'0)1;
*/int/**/main(int/**/n,char**m){FILE*p,*q;int A,k,a,r,i/*
#uinndcelfu_dset<rsitcdti_oa.nhs>i/_*/;char*d="P%" "d\n%d\40%d"/**/
"\n%d\n\00wb+",b[1024],y[]="yuriyurarararayuruyuri*daijiken**akkari~n**"
"/y*u*k/riin<ty(uyr)g,aur,arr[a1r2a82*y2*/u*r{uyu}riOcyurhiyua**rrar+*arayra*="
"yuruyurwiyuriyurara'rariayuruyuriyuriyu>rarararayuruy9uriyu3riyurar_aBrMaPrOaWy^?"
"*]/f]`;hvroai<dp/f*i*s/<ii(f)a{tpguat<cahfaurh(+uf)a;f}vivn+tf/g*`*w/jmaa+i`ni("/**
*/"i+k[>+b+i>++b++>l[rb";int/**/u;for(i=0;i<101;i++)y[i*2]^="~hktrvg~dmG*eoa+%squ#l2"
":(wn\"1l))v?wM353{/Y;lgcGp`vedllwudvOK`cct~[|ju {stkjalor(stwvne\"gt\"yogYURUYURI"[
i]^y[i*2+1]^4;/*!*/p=(n>1&&(m[1][0]-'-'||m[1][1] !='\0'))?fopen(m[1],y+298):stdin;
/*y/riynrt~(^w^)],]c+h+a+r+*+*[n>)+{>f+o<r<(-m] =<2<5<64;}-]-(m+;yry[rm*])/[*
*/q=(n<3||!(m[2][0]-'-'||m[2][1]))?stdout /*]{ }[*/:fopen(m[2],d+14);if(!p||/*
"]<<*-]>y++>u>>+r >+u+++y>--u---r>++i+++" <)< ;[>-m-.>a-.-i.++n.>[(w)*/!q/**/)
return+printf("Can " "not\x20open\40%s\40" "" "for\40%sing\n",m[!p?1:2],!p?/*
o=82]5<<+(+3+1+&.(+ m +-+1.)<)<|<|.6>4>-+(> m- &-1.9-2-)-|-|.28>-w-?-m.:>([28+
*/"read":"writ");for ( a=k=u= 0;y[u]; u=2 +u){y[k++ ]=y[u];}if((a=fread(b,1,1024/*
,mY/R*Y"R*/,p/*U*/)/* R*/ )>/*U{ */ 2&& b/*Y*/[0]/*U*/=='P' &&4==/*"y*r/y)r\}
*/sscanf(b,d,&k,& A,& i, &r)&& ! (k-6&&k -5)&&r==255){u=A;if(n>3){/*
]&<1<6<?<m.-+1>3> +:+ .1>3+++ . -m-) -;.u+=++.1<0< <; f<o<r<(.;<([m(=)/8*/
u++;i++;}fprintf (q, d,k, u >>1,i>>1,r);u = k-5?8:4;k=3;}else
/*]>*/{(u)=/*{ p> >u >t>-]s >++(.yryr*/+( n+14>17)?8/4:8*5/
4;}for(r=i=0 ; ;){u*=6;u+= (n>3?1:0);if (y[u]&01)fputc(/*
<g-e<t.c>h.a r -(-).)8+<1. >;+i.(<)< <)+{+i.f>([180*/1*
(r),q);if(y[u ]&16)k=A;if (y[u]&2)k--;if(i/*
("^w^NAMORI; { I*/==a/*" )*/){/**/i=a=(u)*11
&255;if(1&&0>= (a= fread(b,1,1024,p))&&
")]i>(w)-;} { /i-f-(-m--M1-0.)<{"
[ 8]==59/* */ )break;i=0;}r=b[i++]
;u+=(/**>> *..</<<<)<[[;]**/+8&*
(y+u))?(10- r?4:2):(y[u] &4)?(k?2:4):2;u=y[u/*
49;7i\(w)/;} y}ru\=*ri[ ,mc]o;n}trientuu ren (
*/]-(int)'`';} fclose( p);k= +fclose( q);
/*] <*.na/m*o{ri{ d;^w^;} }^_^}}
" */ return k- -1+ /*\' '-`*/
( -/*}/ */0x01 ); {;{ }}
; /*^w^*/ ;}
+60
View File
@@ -0,0 +1,60 @@
d b,x,h;o q[9802],f[9802];void w(d i){fflush(stdout);printf(
"%c" , ( i>b)?(i%b>0?q[i-b-1]:10):5*(b==i?2:9));if(i<x+b
- 1 )w(i+1) ; } d p(o*e,d i ) { e +=i;n h = ( - b-1
) [ e ] % 2 + ( - b
) [ e ] % 2 +
(-b+1)[ e ] % 2 +( - 1 ) [ e
] % 2+ e [1 ]% 2 +b [ e - 1]% 2 + b[ e ]% 2 +
b [ e+1 ] %2 ;}d m ( d i ){ n
( i == x - 1 ) ?0 :( f [ i +
1 ]=m (i + 1) ) ,32 +3 / (
( p( q , i )> 3 || h < 2 )? 7 :
( ( h == 2 &&q[ i ] == 32
)? 8 : 1 ) );}d y
( d i ){ d j , s , t ,a ,u
;if ( x - 1== i ) n 1 ;if ( f [i]==2) {
f [i ] <<=4;if(y( i))n 1;f[i ]-=- 3 ; if (
y(i ) )n 1;n 0 ; };if((i % b ) ==
0 ||( i % b ) == b-
1 ) n y (i+1 ) ;j
= -1 ; l : ; j =j + 1 ;
if ( j >= ( i - i / b + 2
== b ? 1 : i > 2 * b ?i% b!=
1 ?2 : 2 * 1<< 1 :8 )) goto
c; u = p( f, i ) ; if ( i <
x - 2*b - 1 ) { a =( s =(( t=i % b==
1) ? 1 : i % b != b
- 2 ) ) && i < 2 * b;u+= (
a ? ( j& 4 )
>> 2 : 0 ) + (t ? ( j & 2 ) / 2 : 0) + (
s? ( j&1):0);}else a =t=s=0;if((u&2)+(u&4)!= 2 &&
(q[ i]& 2 ) ==2||u==2&& (f[i]+q[i]) % 2 ==1 ||u
== 3 && ( q [ i]&2)== 0 )
goto l ; b
[i + f ] ^= ! t ? 0
: b[ i + f ] ^ ( 10 + ( j & 2 )
/ 2 ) * 3+2;b[ i + f + 1 - b ] ^= !
a ?0 : b [i + f +1 - b]^ (10+ (
j & 4) / 4 )* 3 +2 ; b [ i
+f + 1 ] ^= ! s ?0 : b [i+ f + 1
] ^ (10 + ( j &1) ) *3+ 2 ; if ( y ( i
+ 1) ){ n 1 ; }; ( a ?
i + 1 : 0 ) [ f ] =( t
? i+ b :0
) [ f ] = ( s ? i
+ b +1:0) [ f ] = 2 ;goto l ; c:n 0 ; } d
main(d c,o**v){d i; x=b=0;while((q[x++]=getchar() ) !=
EOF ){x-=(q[x-1]==10)? b+=1,1:0;q[x-1]^= (q[x-1] ==
32)? 0 : q [ x - 1 ] ^ 35 ; } ; w ( 0 );
for ( ; ;
) { z ( f , 2 , x *
k ( o ) ) ; for ( i = 0;i<=x - 1;
i = i + b )q [ i / b] = q [ x - b+ i /b
] = q [ i ]= q [ i - (
(i == 0) ? 0: 1) ] =f [ i /
b ] = f[ x -b -1+ i/ b] = f [i ] =f[
i - ( ( i == 0 ) ?
0 :1 ) ] = 32; if ( c ==
1 ) m ( 0 ); else
if (y ( b + 1)
==0)n 1;f[0]<<=1<<2;memcpy(q,f,x*k(o));w(0);sleep(1);};n 0;}
+12
View File
@@ -0,0 +1,12 @@
# include <math.h>
# include <stdio.h>
# define d double
d a,s;int n;p(d t ,d M,d x)
{ return x>0?x>1 &&!fork( )?p(t,s+=
a ,x-1):0 :scanf( "%lf",&x )-1?a=(M-
t )/22,s= pow(10, (int)( log10(a)) /*It is
a simple tool to quickly analyze data. */
- 2),s=t- (a =s*( int)(a/s ))/2,p(t, s,(int)(
( a+M-t)/ a)):p(t >M|x<t?x :t,t>M|x >M?x:M ,--n)+(x
> s&&x <= s+a); } main(j){ j==1?j=p (1,0,0) ,printf(
"%+12g %4d",s+a/2,j,wait(NULL)),main(j*400/n):putchar(35-25*!j)&' '&&main(j+1);}
+43
View File
@@ -0,0 +1,43 @@
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#define _ float
_ CRUSH(_*LEG,int ARM,_*FINGER) {
_ GORE; for(GORE=0,--ARM; ARM>=0; --ARM)GORE+=FINGER[ARM]*ARM
[LEG]; return GORE; } _*BITE(){ _*BRAIN=calloc(sizeof(_),1<<17);int TOE
=getc(stdin),EYE,SKULL=0; while((EYE=getc(stdin))!=EOF){ ++BRAIN[(TOE<<8) +
EYE]; ++SKULL; TOE=EYE; } if(SKULL)for(TOE=0; TOE<8<<13; ++ TOE)BRAIN [TOE]/=
SKULL; return BRAIN; } _ CHEW(_*GUT,_ BONE[][1<<16]){ int GRR; for(GRR=0; GRR<
6; ++GRR){ GUT[GRR+256*256]=powf(1+expf(-CRUSH(BONE[GRR],1<<16,GUT)),-1); BONE
[6][50+GRR]=GUT[256*256+GRR]*(1.-GUT[(8<<13)+GRR]); } BONE[6][81]=1/(1 +expf(-
CRUSH(GUT+(1<<16),6,BONE[6]))); return BONE[6][82]=BONE[6][81]*(1.-BONE[6][81]
),BONE[6][81]; } _ GNAW(_ FLESH,_ LEG[][2<<15],_*EYE){ int UG,MMM; LEG[6][13]=
FLESH-CHEW(EYE,LEG); LEG[6][14]=LEG[6][ 82]*LEG[6][13]; for(UG=0; UG<6; ++UG){
LEG[6][34]=LEG[6][UG+(1<<7)-14]*LEG[6][7<<1]*LEG[6][UG]; for(MMM=0; MMM<4<<14;
++MMM)LEG [UG][MMM]+=LEG[6][34]*.3*EYE[MMM]; LEG[6][UG]+=.3*LEG[6][14
]*EYE[ 256*256+UG]; } return powf(LEG[6] [13],2); } _
**EAT( char*TOMB){ DIR*BONE = opendir( TOMB); int
BRAIN= 0; struct dirent*TOOTH; _**BODY =0; while
(BONE?(TOOTH= readdir(BONE)):0){ if( TOOTH-> d_name[0]
!=46){ char*MOAN=malloc(strlen(TOMB)+strlen(TOOTH->d_name )+1); sprintf(
MOAN, "%s%s",TOMB,TOOTH ->d_name); if(freopen(MOAN, "r",stdin)){ BODY=realloc(
BODY,sizeof(_*)*(BRAIN+1)); BRAIN ++ [BODY]=BITE(); } } } return BODY=realloc(
BODY,(1+BRAIN)*sizeof(_*)),BODY[BRAIN]=0,BODY; } int main(int GRR,char **UGH){
_ BRAINS[7][1<<16],***CORPSES; int PUS,OOZE,UG; for(srand(time(0)),PUS=0; PUS<
7; ++PUS)for(OOZE=0; OOZE<4<<14; ++OOZE)BRAINS[PUS][OOZE]=rand()/(_)RAND_MAX
-.5;fread(BRAINS,sizeof(BRAINS),1,stdin); if(*UGH[1]==45){ GRR-=2; CORPSES
=malloc( sizeof(_
**)*GRR ); for(
PUS=0; PUS<
GRR; ++ PUS)CORPSES[PUS]=EAT(UGH[2+PUS]); for(UG=
0; UG<atoi (&(UGH[1][1])); ++UG){ BRAINS[6][97]= 0; for(PUS
=0; PUS<GRR; ++PUS)for(OOZE=0; CORPSES[PUS][OOZE]; ++OOZE)BRAINS [6][
97]+=GNAW(1.-(_) PUS/(GRR-1),BRAINS,CORPSES[PUS][OOZE]); fprintf(
stderr,"%d: %f\n",UG,BRAINS[6][97]); } fwrite( BRAINS, sizeof(
BRAINS),1,stdout); } else for(UG=1; UG<GRR; ++UG)if(freopen(
UGH[UG],"r",stdin))fprintf(stderr,"%s %f\n",UGH[UG],
CHEW(BITE(),BRAINS)); return 0; }
+23
View File
@@ -0,0 +1,23 @@
#include <stdio.h>
#include <math.h>
#include <unistd.h>
#include <sys/ioctl.h>
main() {
short a[4];ioctl
(0,TIOCGWINSZ,&a);int
b,c,d=*a,e=a[1];float f,g,
h,i=d/2+d%2+1,j=d/5-1,k=0,l=e/
2,m=d/4,n=.01*e,o=0,p=.1;while (
printf("\x1b[H\x1B[?25l"),!usleep(
79383)){for (b=c=0;h=2*(m-c)/i,f=-
.3*(g=(l-b)/i)+.954*h,c<d;c+=(b=++
b%e)==0)printf("\x1B[%dm ",g*g>1-h
*h?c>d-j?b<d-c||d-c>e-b?40:100:b<j
||b>e-j?40:g*(g+.6)+.09+h*h<1?100:
47:((int)(9-k+(.954*g+.3*h)/sqrt
(1-f*f))+(int)(2+f*2))%2==0?107
:101);k+=p,m+=o,o=m>d-2*j?
-.04*d:o+.002*d;n=(l+=
n)<i||l>e-i?p=-p
,-n:n;}}
+21
View File
@@ -0,0 +1,21 @@
#include<stdio.h>
void exit(int);
int(*Q)(int,char**),b['['+']']={'-'-'-'},i,j,s,t,D['C'*' '-'-'],z,system(char*);
char O['C'*' '-'-'],p[]="@cs \"$ | ,& |& (&)x ) &,( ,(| ,( ,{ |,},; ,( ;,> ,( ,( ,;, );g cgt3odt - <~+<+- + ~ <&~<~+ <&+~+ ~ <=- = ( - !() c !(&( ! \n$P & m& )P )o )e')\")\"' ) w_ 'w)e ')x') ')q 'a_ )x'\"up)q &]v\") &t &t-k[]t\\.nivc -:l O CI:OnO lCl ={ -: =(- +[=+ =C =]\\.[- & - ~ -(|,g& -&- <- ( ~ -g()= Q| b) *,t, Q- ( - (\n& ~ & Q \n &\n,&g r& \n& \n ,&~\nt &=\n &n) rt)+=\n& (~ &k= &g(-&= (Q -( P ) \n )\n ) \"+\"' )z\"ujlpx)\"*bgQ Px )(\")x)\" P \"P\"'i x )\")m') axP \")\" Pv pP)e )O\"_\"apvP(t(c )d) \")\"pqpmpleP \"*te\" t\n \"] \"O_\" g c *P )\" =+ * r\n&r\nr \n! * (* (* + *. )x ')+) +)* ,\n )&* + ma +) 'j )d)' m)O )e)nc )m )n ) ')\"'jl _) _)_ )nps' )cix'iml )tit_eqp)m )rcnMm+wnhdl)esakn )\")ryPiam)O)v} no)zdOui =( \" '+'= ~(=(= (\n= ()=(@_& ~@' ( = '%; go. PO 'x )p)g <h )kh ) \"k\" M ai) <eu + =z q =x =eowe =v+kO= c= ! =dMe ij lmp c p _) c_O |tp=^ c sz^o ^sibnj^jis <^q^e aQ ^ thug^eiawyq=!=a<]= vhyh > '@ =\n '= &=,-\n=,=\n (& [ ()* , * ,*= )& (\n, \n , \n ,& ,*('l'c ) l \\ 's 'l' ci lcad eilm nq_dkv<=-^ (@, \n(& !\n=, ( , (/\n @ m h =*(.c. (&' ( =,(=(| (|(|(|\n&(,& [g(, (,\n tni^-,=(=(u t&(=)(~,=d(,( = ,sep wpg\n@\nan,\n&,* n a,$=,=|\n.( c'=~,~,=(,\n=(,[(o ad#( \n (d x=~,\n,='e, ( = '~),~=(, O=\n ( oc -~= ,\n =<, <=,(@='\\i|~ i~, =\n =i o i=-\n,i(=v t l t l * ,+ *+ *, p u=\n!=,\n(=,( e a*=, \n=\n[f(< n~('n i n,n \n,eu s( ,|&^,(=l op='&|,\n ,+\n^\n !,(= o, =/-=(/=%+ , e, (= ,()= | ] |OtvO)\n ) \n)k ')n\n' - (=( | - ( > - =(";
FILE*f;
int main(int _,char**v){
_>(_^_)&&(t=_,i='C'*' '-'-'+~!!"",Q=main,Q(-!!"",v),i^=i,Q(~!!"",v),i=s^=s,Q(~-~!!"",v),i='C'*' '-'-',j=-~('('*'('),Q((-~!!""*~!!""),v),
f=fopen(O,"w"),fprintf(f,O+~-(~-~!!""*~!!""),'C'*' '-'-'-((~!!""*~!!"")*''+-~-~!!""),O+((~!!""*~!!"")*''+-~-~!!"")),fclose(f),
sprintf(p,O+(~-(~-~!!""*~!!"")<<!!"")),i=!!"",Q(~-(-~!!""*~!!""),v),exit(system(p)),'r')
||
_==~!_&&i>=(i^i)&&
((p[i]==' '&&(p[i]=(-~i)[p])||p[i]=='@'&&(p[i]=' ')||p[i]=='$'&&(p[i]^=p[i])),i=~-i,Q(_,v))
||
_==~!!""&&i<'C'*' '-'-'&&(D[i]=~-(i[p][b]=-~i[p][b]),i=-~i,Q(_,v))
||
_==~-~!!""&&i<(!!""<<-~(~-~!!""*~!!""))&&(z=b[i],i[b]=s,s+=z,i=-~i,Q(_,v))
||
_==(-~!!""*~!!"")&&-~(i=~-i)&&(i[O]=p[j],j=D[j]+j[p][b],Q(_,v))
||
_==~-(-~!!""*~!!"")&&i<t&&(sprintf(p,"%s %s",p,i[v]),i=-~i,Q(_,v));
}
+20
View File
@@ -0,0 +1,20 @@
typedef unsigned char t;t*F="%c",l[]="|\\/=_ \n](.\0(),*(.(=(}*.)[[*.",N='\n',*
r;typedef(*H)();extern H Ar;Q(a){return(a|-a)>>31;}H S(c,a){return(H)(a&~c|(int
)Ar&c);}extern t*ist;V(t*u){*u^=*u&2^(*u>>7)*185;}Z(t*u,t n){*u-=n;}e(t c,H h){
R(h,Q(* r^c));}
I(){r=l +7-4*Q(
getchar ()^*l);
}R(H h, int c){Ar=S
(c,h);- main() ;}P(){r
++;}z() { O(&N);}
O(t*c){ printf( F,+*c);
}T(){r= "This is not a function\n" ;}w(U){
U=Z(r,8 ); r-=~Q(*
r/8-4); return 0; }M(){r=
ist-68; } h(){t G
=r[1]-r [2]^*r;
G^=30;V (&G);e(
0,(O(&G ),P(P(*
r++)),z));}g(){M();R(h,0);}f(){P(O(r));e('f',g);}p(){P();e('a',f);}d(){P(O(r));
e('n',p);}c(u){u=r[-2];T(Ar=d);R(f,Q(u^'"'));}n(){e(w(O(l+*r%8)),c);}a(){I();R(
n,0);}main(){S(Q(Ar),a)();}H Ar;t*ist="Rene Magritte"-(1898-1967);
+47
View File
@@ -0,0 +1,47 @@
#include<stdint.h>// 4
#include<stdio.h>/* 76. 1
..2321 1 57 3
21.... . .. .11 1 2
1 88..1321 2 33 5512 1 277 14 1
099..12.... . .. .... 1 4 11111...111 122 5.1 .
11...221.821112411123455676489 51.176543232666 902 .27 1
10111...1.....................11.417...........1...21..11.
..2239921176566156225563322299887...6533233233182469196894
22...............................111......................
*/// 3269548556987776665556662131223412347543332334543322223456
/*
13.3.37 */char C[120] [60 ];int R[120][60],W,H,J,K,B[61][61],/*
12.2.39 */r,i,j,c,*q =& H,t=7200,x,y,k;int64_t*U,T[28800],*S=/*
11.2.40 */T,O[120], Z[ 120],v,z;void D(){for(k=-1;7200>++k;S[/*
10.39 */k]=v)r=! ~(v=U[k])&&*R[k/60]?2:S[k]-v?1:r;;;;}/*
9.36 */void L( ){for(r=1;r==1;){r=3;;for(i=0;120>/*
9.31 */i;i++){ for(k=z=1,j=0;v=R[i][j];j++)O/*
8.3.32 */[i]|=( 1LL <<v)-1<<k,k+=v,0,Z[i]=z|=1LL<</*
7.3.30 */k++;; v=~ (3LL<<k-2);for(j=-61;++j<60;/*
5.3.29 */v=( v|~ z)&(j<0?v>>1:v<<1|1))v=S[60/*
3.1.3.1.28 */* i +(j < 0?~j:j)]|=j?v:~3;}for(z=0;/*
1.2.4.31 ; */ 7200 >z;z++)i=z/60,j=z%60,(B[i<60?/*
7.5.31 */i:j][ i<60? j:i-60]=~S[z]&O[i]?~S[z]&Z[i]/*
1.6.5.30 ; */?r=0 :(U=O ,1):(U=Z,2))?k=i<60?j+60:j,S/*
5.10.12.16 */[i% 60+60*k]|= ~U[k]:0;U=S; S-=t*=-1;D();z/*
5.11.5.4.12.4 */*9; }}int main( ){for (;K= scanf("%d",R [*/*
15.2.4.4.11.5 */q+c*60]+j)<1? q= &W,j --,2 >++c:'\n';j =-K/*
16.3.4.2.2.5.5 */+getchar()?j+1 :++ *q*0 ); L( );;if (!r/*
14.8.7.3 */)for(K=0;K<W *60;K++) if(K%60 </*
12.1.4.1.6.2 */W&!B[K/60] [ K%60 ] ){for( /*
11.3.4.6.1 */c=64;c--; )if (!(1 &S[K/* ;
10.1.8.8.5.1 */]>>c))U= S ,000,S+= J=14400, D()/* ;
9.8.11.5 */,S[K]=~ (1LL<<c) ,L(),S-=J,S [K]/*
9.5.6.1.2.4.1 */|=r==2? 1LL<< c:0;L( ) ;} q=/* ;
9.3.5.1.5 */&K;;for (J= K=i=0 ; 120/*
3.2.6.5.1 */> i; Z[i]=k --,/* ;
2.6.3.5.1 */ i>59?q =&J :0,/* ;
2.1.2.6.3.6.1 */ * q< k?*q=k :0, 0,C[/* ;
2.1.2.2.1.5.2.5.1 */ i ++ ][ k ]=' ' ){ j=k/* ;
2.1.2.5.5.6.3 */ = 0; for(; x=R[i ][j++] ;/*
4.1.9.7.5.1 */0) k +=sprintf ((00,C[ i]+/* ;
5.19.6.1.2 */k), "%d.",x);}i=~J;;r&1 ||puts ( /*
24.6.3.3 */r?"invalid":"failed"); for(;i <H; i/*
24.1.2.9.7.4 */++,puts(""))for(j=~K;j < W; )putchar( i<0?j<0 ||/*
25.1.2.25 */(k=i+Z[j+60])<0?' ':C[j + 60 ][k]:j<00?(k=j+Z[i])<0?/*
28.1.26 */' ':C[i][k]:"?X "[B[i][j]] ) ,j++;return 0;} /* 2012 */
+34
View File
@@ -0,0 +1,34 @@
#include <stdio.h>
#include <math.h>
#define clear 1;if(c>=11){c=0;sscanf(_,"%lf%c",&r,&c);while(*++_-c);}\
else if(argc>=4&&!main(4-(*_++=='('),argv))_++;g:c+=
#define puts(d,e) return 0;}{double a;int b;char c=(argc<4?d)&15;\
b=(*_%__LINE__+7)%9*(3*e>>c&1);c+=
#define I(d) (r);if(argc<4&&*#d==*_){a=r;r=usage?r*a:r+a;goto g;}c=c
#define return if(argc==2)printf("%f\n",r);return argc>=4+
#define usage main(4-__LINE__/26,argv)
#define calculator *_*(int)
#define l (r);r=--b?r:
#define _ argv[1]
#define x
double r;
int main(int argc,char** argv){
if(argc<2){
puts(
usage: calculator 11/26+222/31
+~~~~~~~~~~~~~~~~~~~~~~~~calculator-\
! 7.584,367 )
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
! clear ! 0 ||l -x l tan I (/) |
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
! 1 | 2 | 3 ||l 1/x l cos I (*) |
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
! 4 | 5 | 6 ||l exp l sqrt I (+) |
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+
! 7 | 8 | 9 ||l sin l log I (-) |
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(0
);
}
return 0;
}
+1
View File
@@ -0,0 +1 @@
main(_,l)char**l;{6*putchar(--_%20?_+_/21&56>_?strchr(1[l],_^"pt`u}rxf~c{wk~zyHHOJ]QULGQ[Z"[_/2])?111:46:32:10)^_&&main(2+_,l);}
+199
View File
@@ -0,0 +1,199 @@
#ifdef AH
#include<alloca.h>
#endif
#include<setjmp.h>
#include<stdio.h>
#if !NM
#include<sys/mman.h>
#endif
#define vo volatile
#define A(x,y,z) O(x,y,z##1)O(x,y,z##2)O(x,y,z##3)
#define B(x,y) A(x,y,1)A(x,y,2)A(x,y,3)
#define C(x,y) B(x,y##1)B(x,y##2)B(x,y##3)
#define D(x) C(x,1)C(x,2)C(x,3)
#define E(x) D(x##1)D(x##2)D(x##3)
#define G E(1)E(2)E(3)
#define S d->
#define M S a
#define R(x) ; S r(#x);
#define L(x,y) S l[x](d)R(y)
#define F(x) void l##x(vo dt d) {
#define Q(x); M--; *M=*M x M[1]; R(x)
#define O(x,y,z) x##y##z,
#define q typedef
#define H 9<<16
#define I case
#define J(i) calloc(i,1)
#define W(c) e=(k*)memcpy(e,x[(u)c],y[(u)c])+y[(u)c];
#define N break; I
q char k;
q void o;
q int u;
q o(*f) (vo o *);
q struct {
u *a, **R, *m, h, c;
k **s;
f *l, *j, r;
} *dt;
u m[] = { G 0 } ;
u n[H];
dt st;
u sk[H];
k *w;
o *x[H];
u y[H];
k *j, *e;
u l=256;
o g(u v)
{
if (v > l) {
g(v / l);
g(l);
W('*') g(v % l);
W('+')} else {
W(m[v])}
}
f K(k * p, dt d)
{
k c, n = 0;
f r = (f) e;
W(1) while ((c = *p)) {
switch (c) {
I '#':
while (*++p != 10);
N '[':c = 1;
S s[S c] = ++p;
for (; c; p++) {
if (*p == '[')
c++;
else if (*p == ']')
c--;
}
p[-1] = 0;
g(S c++);
N '!':n = 1;
c = *++p;
if (!(c & 1))
I '<': I '>':
c ^= 2;
I '=':W(c) if (n) {
W('!') n = 0;
}
g(*++p);
W('|') p++;
N 's': I 'S': I 'l':
I 'L':g(*++p);
W(c) p++;
N '_':p++;
default:
if (isdigit(*p)) {
g(atoi(p));
while (isdigit(*p))
p++;
} else
p++;
W(c)}
}
W(2) return r;
}
o t(vo dt d)
{
S r("\01") Q(+)Q(-)Q(*) * M = -*M;
R(_)Q( ==) Q(<)Q(>) * M = !*M;
R(!)M[-1] ^= *M;
*M ^= M[-1] R(r) M[1] = *M;
M++ R(d) * S R[*M] = M[-1];
M--;
R(s) * ++S R[*M] = M[-1];
M--;
R(S) * M = *S R[*M];
R(l) * M = *S R[*M]--;
R(L) L(1, /)L(2, p) L(3, x) L(4, |)
#undef O
#define O(x,y,z) *++M=S m[(x*S h+y)*S h+z]; S r("");
G S l[0] (d);
}
o T()
{
}
o rd(u v)
{
k *a = 0, **b = &a, **c = b + 32;
x[v] = w;
for (; b < c && (*b < w || *b > (k *) T || *b == (k *) (long) v); b++);
if (b == c) {
jmp_buf *j = alloca(sizeof(*j));
setjmp(*j);
rd(v);
} else {
y[v] = *b - w;
w = *b;
}
}
q o(*rt) (u);
vo rt rs = rd;
o re(vo k * rec)
{
static u i = 0;
*(st->a = sk + 9) = 0;
rs(*rec ? *rec : m[i++]);
} F(d) M--;
*M /= M[1];
} F(p) printf("%d\n", *M);
} F(x) u n = *M--;
if (!S j[n])
S j[n] = K(S s[n], d);
S j[n] (d);
}
F(1) M -= 2;
if (M[1])
{
M++;
*M = *S R[M[1]];
lx(d);
}
}
o *lib1[] = { T, T, T, T, T } ;
o *lib2[] = { T, ld, lp, lx, l1 } ;
u main()
{
u i;
k *b;
dt d = st = J(sizeof(*st));
M = sk + 9;
S R = J(l * sizeof(k *));
for (i = 0; i < l; i++)
S R[i] = J(H);
S m = n;
S s = J(H);
S l = (f *) lib1;
S j = J(H);
S r = (f) re;
for (i = 0; m[i]; i++)
n[m[i]] = i;
w = (k *) t;
t(d);
x[2] = w;
y[2] = (k *) T - w + 8;
S h = 100;
S l = (f *) lib2;
S r = (f) T;
j = e =
#if NM
malloc(H);
#else
mmap(0, H, -1, MAP_PRIVATE | MAP_ANON, -1, 0);
#endif
while (b = fgets(malloc(999), 999, stdin))
((f) K(b, d)) (d);
}
+64
View File
@@ -0,0 +1,64 @@
#include <X11/Xlib.h>
#include <X11/keysym.h>
#define I XDrawLine(W,X,Y,
#define l rand()%
#define R while(
#define n *h++
#define x _ c].
#define S if(
#define _ _[
*h ;
M=512; i; N=
288; e; d; u; p; L[1
<<28]; float w=11.46; m; a ;
P; k[9304]; *j=k; c; f; q; r; t; v ;
* z; K(N,i) { t=u*+cos(N/w)-i*sin(N/w); p=i*
cos(N/w)+u*sin(N/w); u=t; } Display*W; GC Y; Pixmap
X; s(o,t,g,w,v) { h=v+k; q=2*n; R u=n, r=12+n, K(t,n), K(o,+
p+w,u+=g), d=1>p?1:p, u=u*N/d+M/2, d=N/2+r*N/d, u=u>
-M*2 ?u<M*2?u:2*M:-2*M, 1&q?i>0|p>0?I f,e,u,d):0: (i=p
,e=d,f=u ), --q); } struct{ int c,o,m,f,u,s,i ,e,r; }
_ 21 ] ; Window O; b(y) { XGCValues g ; g .
foreground=y; g. line_width = 2 ; XChangeGC(W,Y,20
,&g); } G(o) { z=x f + k; h=(x f= 381+193*c)+k; i=2*(n
=*z++); R--i&1?d=l 9-4,e =l 9 -4*(8>o):0,n=*z+++d,0<(n
=*z+++e)?h[-1]=0:0,n=*z+++d, i); } g(o) { u=0; K(x s,o<<9
); x u-=u; x r-=p; } F(m,c ) { f=5120*c; c=12; R +c--&&m
==+c |abs(x u-_ m].u)>f |x i <1|x c>2 |abs(x r-_ m].r)>f)
; return c+1; } T(o) { c=11; S!P){ a=++a%72; S!a){ P=1; R
c--){ x c=x m=0; x i=c>2?2:1 ; R x u=l 978-499<<8, x s= l
71, x r=l 979-501<<8, F(c,2) ); x f=c>2?l +2*+73:147; x o
=2>c?249<<16-c*8:64987<<8*(c >2); } } } S P){ c=11; R 4&x
i? ++x m-64&&x m-71? o=1,64> x m?(d=F(c,1))?x m=64,d<4?j[
x e]++,++_ --d].c:0:g(7):G(x m -65) :_ x i=0,x e].e-- :0,
20>++c); c=3; R c--) { S 1&x i) { o++; S x c>2) x m>15? x
i=0:G(x m++); else { S x m ) S x m-->6) g(4); S c<2) { x
s=(72+x s+L[c?B]-L[c?C])%72; S d=4*L[c?A]-L[c?D]*4) { g(d
); S F(c,2)) g(-d); } S L[c? E]&!x m&x e<3) { d=10; R _++
d].i) ; g(-4); _ d]=_ c]; _ d].e=c; x e++; x m=7; c=d; x
f = 122 ; x i=4; g(19); x o= 4092<<12; c=x e; } } } } } P
-=o<2; } v=2; R v--){ m=(108 - _ v].s)%72; b(3^_ v].c?0:
128); Q c=0,0,M,N); S!P) s(+ 36,54-a,0,-120,-+-+-+-+147,b
((1<<16)-1)); S P) { b(255); I 0,N/2,M,N/2); t=-.889*m; h
=k+340; R u=(t+=q=n)*M/32,d= n*N/48,q?I f,e,u,d):0,f=u,e=
+d,k+378>h); R x i&&c-v?s(m, x s,x u-_ v].u>>8,x r-_ v].r
>>8,x f,b(x o)):0,20>c++); c =0; R e=16+32*c,Q v^c?16:8,e
,(c^v?68:76)+c[b(x o),j] , 16), b(0,d=20*x c), Q
80-d,4+e,d,8),2>c++) ; } b(255); I M,0,M,
N); XCopyArea(W, X,O,Y,0,0,M,N,v*
M,0); } }
char*o="{ } { } { { } ; { } ; { ; { ; { ; { } ; { } ; { ; { ; } ; { ; { } } ; { ; } { } ; { ; { } ; { ; } { } { { } ; { } ; { ; { ; } { } { } } { } { } { } } { } } { } { } { } } { } { } { ; ; ; ; } { ; } { { } ; } } ; { ; } { ; } { { } ; { } ; { ; { ; } } { ; } { { } } } { ; } { ; { } ; } } } { } { } ; } } } } } { } ; } ; } ; { } { } ; { } ; } ; } } { } { } } { } { } } } } { { } } } } } { { } } { ; { { } ; { ; { { ; { ; { { } ; { ; { { ; ; } ; ; } ; ; } } { { } { { } { { { { } } } } } { { { { } { } { { } { { } { { { { } } ";
main(){
XEvent e; W=
XOpenDisplay(k);
XSelectInput(W,O=
XCreateSimpleWindow(W,DefaultRootWindow(W),64,64,M*2,N,2,P,r),3);
XMapWindow(W,O); srand(time(0)); Y=
XCreateGC(W,X=
XCreatePixmap(W,O,M,N,DefaultDepth(W,r)),P,r); R*o){ S*o^59)d=64&*o?'{'^*o++:3,
32^*o?d+=*o^9?2:1:0,*j+=P?d*9-43:d,j+=P,P=!P; else R*j=j[-3],j++,*++o^9); o++;
} R 7){ T(0);
XFlush(W); usleep(33367); R
XPending(W)) L[
XLookupKeysym(&e,
XNextEvent(W,&e)&0)]^=1==e.type/2; } }
+90
View File
@@ -0,0 +1,90 @@
#include <stdio.h>
char E[1<<25]=" ; } } { { } { { ; ; { } } { { ; { { { { { } ; } { { ; { { { ; { } ; ; ; { ; ; ; } } ; } { { ; } } ; } } ; ; } { ; } } { } } } } } ; { { } } } ; } } } { } ; ; ; { } ; { { { ; { ; } } { { { } { { ; ; { { } } { { ; { { { { { } ; } { { ; { { { ; { } ; ; ; ; ; } } ; } { { ; } } ; } ; ; } { ; } } } } } } } ; { { } ; ; } ; { } ; ; ; { } ; { { ; { ; } } { { { } { ; ; { { } } { { { { { { { { ; { ; { { ; { { ; ; { } ; ",
*a[40],*q=E+20,*T=E+1080;
int i=1,j,k,l,u,w,I,J,K,h,H,G,R=4,U,e[999],*p=e+5,*r,*s,*v,b[999],L[1<<16],
F=882,n[99];
FILE*f;
#define Y(a,b) (a)<(b)?(a):(b)
#define Z(a,b) (a)>(b)?(a):(b)
#define X(x,a,b)Z(a,Y(b,x))
#define O [s]
#define N [v]
#define M [r]
#define C ++
#define m :0
#define g m,
#define d u==
#define z(o) 32 O?n[X(32 O+o+(35 O-24)/256,0,59)]m
#define y(o) 32 O?8 O=z(o)m
#define x (p=e+5*34 O,2 M-3 && 2 M-5?y(0),l=p[4],a[i]=a[8+34 O],3 N=l>1?\
2*(p[3]+l):2*p[0],4 N=l>1?2*l:1,0 N=Y(2 M-9?0:9 O<<8,3 N-1) m)
#define W(t,i) (u=t[i]>>4,w=t[i]&15),
#define Q(e) ((1 N+=13200)>=5 N?1 N-=5 N, C 0 N>=3 N?0 N-=4 N m g e*6 N*q[0\
N]/34)+
#define D(b,i) T[i]==*#b&&T[i+2]==#b[1]
#define A ((unsigned char*)q)
#define V *p C=
#define S(a) V(A[a]<<8)|A[a+1],
#define P 2 M==
#define B ,putchar
#define o for(
int main(int t,char**c)
{
o; w=E[u]; C u)n[u/10]+=(w-59?w-125?w-32?1 m:2:3)<<u%10;
o t=fread(E,i,1<<24,f=fopen(c[i],"rb")),
t=D(FT,0)?R=T[3]-48,32:D(CN,1)?R=*T-48,32:D(MK,0)?32:16;
i C<t;
S(0)V(A[2]&7)-2*(A[2]&8),V A[3],S(4)S(6)q+=8) q+=22;
o H=*A,T=q+=2,q+=t>15?132:128;
k<128;
k C) G=X(G,T[k]+1,128);
o p=L; j C<R*64*G; q+=4)
o W(A,2)V*A&240|u,V i=0,V w,V A[3],k=((*A&15)<<8)|A[1],l=9<<19;
k&&i C<60;
u=k-n[i],u*u<l?p[-3]=i,l=u*u:l);
o i=1; i<t; a[8+i]=q,q+=2*e[5*i C]);
o t=6; !U; ) {
o i=0; i<R;
v=b+7*i,r=L+4*(R*(64*T[K]+J)+i),s=e+200+50*i,j=3 M&15,
I?
W(s,2 M)P 5||P 6||P 10?0 O =u?Y(0 O+u,64):Z(0 O-w,0) g
P 0?W(r,3)(u|w)?y((I%3-1?I%3-2?0:w:u)) m g
8 O=P 1?Z(113,8 O-1 O):P 2?Y(856,8 O+2 O):8 O,
P 5||P 3?l=z(0),8 O>l?8 O=Z(8 O-3 O,l):8 O<l?Y(8 O+3 O,l) m g
U|=P 11&&I==t-1,
P 13&&I==t-1?W(r,3)K C,J=10*u+w-1 g
P 14?
W(r,3)
d 6?j?I==t-1?38 O=38 O<j?J=37 O-1,38 O+1 m m:(37 O=J) g
d 9&&C 39 O==25 O?39 O=0,x g
d 12&&I==28 O?0 O=0 g
d 13&&I==e[29]?x m
m
:(
0 M?34 O=0 M,p=e+5*34 O,35 O=p[1],0 O=p[2] g
3 M?2 M O=3 M g
1 M&&(2 M-14||((3 M>>4)-13))?32 O=1 M,x g
0 O=P 12?X(3 M,0,64) m O ,
P 15?(l=3 M)?l<33?t=l:(F=110250/l) m g
P 14?
W(r,3)
j?(16+u) O=j g
8 O=d 1?Z(113,8 O-17 O):d 2?Y(856,8 O+18 O):8 O,
d 5?35 O=(j&7)-2*(j&8) g
d 9?39 O=25 O&&!1 M?x,0 m g
0 O=d 10?Y(0 O+26 O,64):d 11?Z(0 O-27 O,0):0 O,
d 14?h=30 O m m),
6 N =X(0 O,0,64),
5 N =999*8 O,
i C);
o C I>=t+t*h?I=h=0,C J>=64?J=0,U|=C K>=H m g j=F; j--; 0
B(u)B(u>>8)B(w)B(w>>8))
o i=u=w=0; i<R;
v=b+7*i,q=a[i C],q?l=Q(1)Q(4)Q(12)Q(12)Q(4)Q(1)0,
k=1<<(i&2),u+=l/k,w+=l/(k^5) m);
}
return 0;
}
+33
View File
@@ -0,0 +1,33 @@
#include <stdio.h>
#include <math.h>
#define E return
#define S for
char*J="LJFFF%7544x^H^XXHZZXHZ]]2#( #@@DA#(.@@%(0CAaIqDCI$IDEH%P@T@qL%PEaIpBJCA\
I%KBPBEP%CBPEaIqBAI%CAaIqBqDAI%U@PE%AAaIqBcDAI%ACaIaCqDCI%(aHCcIpBBH%E@aIqBAI%A\
AaIqB%AAaIqBEH%AAPBaIqB%PCDHxL%H@hIcBBI%E@qJBH#C@@D%aIBI@D%E@QB2P#E@'C@qJBHqJBH\
%C@qJBH%AAaIqBAI%C@cJ%" "cJ" "CH%C@qJ%aIqB1I%PCDI`I%BAaICH%KH+@'JH+@KP*@%S@\
3P%H@ABhIaBBI%P@S@PC#", *j ,*e;typedef float x;x U(x a){E a<0?0:a>1?1:a; }
typedef struct{x c,a,t; } y;y W={1,1,1},Z={0,0,0},B[99],P,C,M,N,K,p,s,d,h
;y G(x t,x a,x c){K.c=t ; K.t=c; K.a=a;E K;}int T=-1,b=0,r,F=-111,(*m)(i\
nt)=putchar,X=40,z=5,o, a, c,t=0 ,n,R;y A(y a,y b,x c){E G(a.c+b.c*c,a.a
+c*b.a,b.t*c+a.t);}x H= .5,Y =.66 ,I,l=0,q,w,u,i,g;x O(y a,y b){E q=a.t*
b.t+b.c*a.c+a.a*b.a;}x Q(){E A(P,M,T ),O(K,K)<I?C=M,I=q:0;}y V(y a){E A(Z,
a,pow(O(a,a),-H));}x D(y p){S(I=X,P =p,b=T; M=B[++b],p=B[M.c+=8.8-l*.45,
++b],b<=r;Q())M=p.t?q =M_PI*H,w=atan2( P.a-M.a,P.c-M.c) /q,o=p.c-2,a=p.a+1,t=
o+a,w=q*(w>t+H*a?o: w>t?t:w<o-H*a?t :w<o?o:w),A( M,G(cos(w),sin(w),0),
1):A(M,p,U(O(A(P,M,T) ,p)/O(p,p))); M=P;M.a=- .9;o=P.c/8+8;o^=a=P.t
/8+8; M=Q ()?o&1 ?G(Y,0,0):W :G(Y,Y,1);E sqrt (I)-.45;}
int main( int L,char **k){ S(e =L>1?1[z= 0, k]:J ;*e &&l<24 ;
++e)S(o=a =0,j =J+9;(c= *++j)&& !(o&&c< X&&(q=l+=w) );o ?o=*j++/
32,b++[B] =G(q +=*j/8&3,* j&7,0 ),B[r =b++]=G((c/8& 3)*( o<2?
T:1), (c& 7)+ 1e-4,o>2),1: (o =(a =(c-=X)<0?w=c+6 ,t= a+1:c?(t
?0:m(c),a ):*++j)==((*e|32 ) ^z)&&1[j]-X));S(z =3*( L<3);++
F<110;)S(L=-301;p=Z,++L<300;m( p.c),m(p.a),m(p.t))S(c=T;++c<=z;)S(h
=G(-4,4.6,29),d=V(A(A(A(Z,V(G(5,0 ,2)),L+L+c/2),V(G(2,-73,0)),F+F+c%2),G
(30.75,-6,-75),20)),g=R=255-(n=z)*64; R*n+R;g*=H){S(u=i=R=0;!R&&94>(u+=i=D(h=
A(h,d,i)));R=i<.01);S(N=V(A(P,C, T)),q=d.t*d.t,s=M,u=1;++i<6*R;u-=
U(i/3-D(A(h,N,i/3)))/pow( 2,i));s=R?i=pow(U(O(N,V(A(
M=V(G(T,1,2)),d,T)))) ,X),p=A(p,W,g*i),u*=U(
O(N,M))*H*Y+Y,g*= n--?Y-Y*i:1-i,s:G(
q,q,1); p=A(p,s ,g*u);h=A(h,N,.1
);d=A(d,N,-2*O (d,N));}E 0;}