/* anri2.c - Don Yang (uguu.org) 07/14/10 */ #include #include typedef char _; _ *f, *e, *i, *o, data[0x10000] = #include"data.txt" , format[0x10000] = #include"template.txt" , input[0x10000], output[0x10000]; int x, toggle_eye, toggle_quote, leading_non_whitepaces; void Append(_ *p) { for(; *p != 0; p++) { if( *p == 43 ) { for(p++; *p != 43; p++); } else { if( *p > 32 ) { *i++ = (_)((int)(*p) ^ x); } } } } int main() { i = input; x = 0; Append("#include" "#include" "typedef char _;" "char*f,*e,*i,*o,data[0x10000]=\""); Append(data); Append("\",format[0x10000]=\""); f = i; Append(format); e = i; x = 24; Append(data); x = time(0) & 0x3ff; 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 = (int)*f; if( x >= 93 ) { for(x -= 93; x >= 0; x--) { if( toggle_quote != 0 && ((x == 0 && f[1] == 33) || (x == ((int)*f) - 93 && leading_non_whitepaces)) ) { *o++ = 34; } else { if( *i == 34 ) toggle_quote ^= 1; *o++ = *i++; } } leading_non_whitepaces = 0; } else if( x >= 44 ) { for(x -= 43; x >= 0; x--) *o++ = 32; } else if( x == 42 ) { *o++ = 43; } else if( x >= 35 ) { for(x -= 35; x >= 0; x--) *o++ = output[(toggle_eye++ & 1)]; } else { *o++ = 10; leading_non_whitepaces = 1; } } *o = 0; return puts(output + 2); }