[ create a new paste ] login | about

Link: http://codepad.org/JxVo0ZzP    [ raw code | output | fork ]

C, pasted on Feb 22:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#define p(c) putchar(c)
void pr(char *x, int f)
{
 char *y;
 for(y=x;*y;y++)
 {
  if(!f){p(*y);continue;}
  if(*y==0x58) {p(34);pr(x,0);p(34);}
  else if(*y==0x40)p(10);
  else p(*y);
 }
}
char *this="#define p(c) putchar(c)@void pr(char *x, int f)@{@ char *y;@ for(y=x;*y;y++)@ {@  if(!f){p(*y);continue;}@  if(*y==0x58) {p(34);pr(x,0);p(34);}@  else if(*y==0x40)p(10);@  else p(*y);@ }@}@char *this=X;@@void main(){pr(this,1);}@";

void main(){pr(this,1);}


Output:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#define p(c) putchar(c)
void pr(char *x, int f)
{
 char *y;
 for(y=x;*y;y++)
 {
  if(!f){p(*y);continue;}
  if(*y==0x58) {p(34);pr(x,0);p(34);}
  else if(*y==0x40)p(10);
  else p(*y);
 }
}
char *this="#define p(c) putchar(c)@void pr(char *x, int f)@{@ char *y;@ for(y=x;*y;y++)@ {@  if(!f){p(*y);continue;}@  if(*y==0x58) {p(34);pr(x,0);p(34);}@  else if(*y==0x40)p(10);@  else p(*y);@ }@}@char *this=X;@@void main(){pr(this,1);}@";

void main(){pr(this,1);}


Create a new paste based on this one


Comments: