/* anri3.c - Don Yang (uguu.org) 07/14/10 */ #include #include typedef char _; _ *f, *e, *i, *o, *data = #include"data.txt" , *format = #include"template.txt" , input[9999], output[9999]; int x, toggle_eye, toggle_quote, leading_non_whitepaces; void Append(_ *p) { for(; *p; p++) if( *p == 0x2b ) { for(p++; 0x2b - *p; p++); } else if( *p > 040 ) *i++ = (_)(x ^ *p); } int main() { i = input; x = 0; Append("#include" "#include" "typedef char _;" "char*f,*e,*i,*o,*data=\42"); Append(data); Append("\",*format=\""); f = i; Append(format); e = i; x = 24; Append(data); x = time(0) & (1024-1); o = output; *o++ = (_)(((x & 0x1f) + 61) ^ 1); *o++ = (_)(((x >> 5) + 61) ^ 1); i = input; toggle_eye = toggle_quote = leading_non_whitepaces = 0; for(; f != e; f++) { x = *f; if( x == 0x21 ) { *o++ = 10; leading_non_whitepaces = 1; } else if( x == 42 ) { *o++ = 0x2b; } else { if( x > 92 ) { for(x -= 92; x; x--) if( toggle_quote && ((x == 1 && f[1] == 041) || (x == *f - 92 && leading_non_whitepaces)) ) *o++ = 0x22; else { if( *i == 0x22 ) toggle_quote ^= 1; *o++ = *i++; } leading_non_whitepaces = 0; } if( x >= 44 ) { for(x -= 0x2b; x; x--) *o++ = 040; } if( x > 042 ) { for(x -= 042; x; x--) *o++ = output[(toggle_eye++ & 1)]; } } } *o = 0; return puts(output + 2); }