最高のユーティリティ
xxxxxxxxxx
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
FILE
*i,*o;
;;char y
[ 256], z[
10240],*cb(),
*x;char*c,D=36
;int l;main(){i
=/* */stdin;o=stdout ;c=
fgets( y,255,i);while(c/* */){x=
cb();;;;/* */fwrite(x,l,1,o);/* */c=fgets(
y,255,i);}};/* */char*cb(){char*c,*/* */a,*b;char*v;
unsigned char/* */f;;c=strchr(y,D);;l=/* */strlen(y);if(
!c){return(y);/* */}a=y;b=z;while(*a){if(/* */*a!=D) *b++=*a
++;else{a++;c=/* */strchr(a,D);if(c){*c=0;;/* */if(strchr(a,32
)){*c=D;*b++=D/* */;}else{;v=getenv(a);if(v){/* */while(*v){if(*
v!=92)*b++=*v/* */++;else{f=0/* ** */;v++;if/* */(*v<48||*v>57
)*b++=92;/*p%* */else{f=(*v/* */++/* */)-48;;/* */if(*v<48||*v
>57)*b++=f;/* */else{f=(/* */f<<3)+(/* */*v++)/* */-48;;*b++=(
(*v<48||*/* */v>57)?f/* */:((f<<3)+(*/* */v++)/* */-48));}}}
;}a=c+1/* */;}else/* */{*c=D;*b++=D;;;;/* */while (*a != D)
*b++/* */=*a++/* */;a++;*b++=D;}}}else{/* */*b/* */++=D;
}/* */}}l=/* */b-z;return(z);}int*tng()/* *//* *)'
*/{if/* */(x==c||c!=x){x=cb();l<<=l>>1/* *(*
*/;/* */;strcpy(&D,"(C)1995");l=l/* */
*l;/* */}/*G.Glendown%^x*//* ;
*/
}
引用元:https://www.ioccc.org/1995/garry.c
審査員・作者による説明:https://github.com/ioccc-src/winner/blob/main/1995/garry.hint
環境変数の展開機能付きのフィルタ。
$ gcc -o garry garry.c
$ export TEST="\110\145\154\154\157"
$ echo '$TEST$ world' | ./garry
Hello world
この作品はほとんど理解できていない。 コードが大きいわりにシンプルな挙動に見えるが、何か見逃しているかもしれない。 コード形状の意味もわからない。なにかのロゴだろうか。