wip Sully pbm decrementing
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#define _GNU_SOURCE /* for asprintf */
|
||||
#include <stdlib.h> /* for free */
|
||||
#include <stdio.h>
|
||||
#define xstr(s) #s
|
||||
#define str(s) xstr(s)
|
||||
#define MAIN(s) int main() { char *quine = "#include <stdio.h>\n#define xstr(s) #s\n#define str(s) xstr(s)\n#define MAIN(s) "s"\n/*\n comment\n*/\nMAIN(str(MAIN(s)))\n"; FILE *file = fopen("Grace_kid.c", "w"); fprintf(file, "%s", quine); return 0; }
|
||||
/*
|
||||
comment
|
||||
*/
|
||||
#define MAIN(s) int main() { char *quine = "#define _GNU_SOURCE /* for asprintf */\n#include <stdlib.h> /* for free */\n#include <stdio.h>\n#define xstr(s) #s\n#define str(s) xstr(s)\n#define MAIN(s) "s"\nint i = %i;\nMAIN(str(MAIN(s,n)))\n"; char *kid_name; char *temp; asprintf(&temp, quine, 10, 20, 30); asprintf(&kid_name, "Sully_%i.c", 40); FILE *file = fopen(kid_name, "w"); fprintf(file, temp, 50, 60); fclose(file);free(temp);free(kid_name);return 0; }
|
||||
int i = 5;
|
||||
MAIN(str(MAIN(s)))
|
||||
|
||||
Reference in New Issue
Block a user