Grace C EZ

This commit is contained in:
hexplor
2026-05-22 19:53:09 +02:00
parent e10375126d
commit 059d3f0f96
3 changed files with 38 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
//Commentaire
#include <stdio.h>
#define PAYLOAD const char* str = "//Commentaire%c#include <stdio.h>%c%c#define PAYLOAD const char* str = %c%s%c;%c#define PRINT printf(str, 10, 10, 10, 34, str, 34, 10, 10, 10, 10, 10, 10);%c%c#define MAIN int main(void){PAYLOAD PRINT return 0;}%c%cMAIN%c";
#define PRINT printf(str, 10, 10, 10, 34, str, 34, 10, 10, 10, 10, 10, 10);
#define MAIN int main(void){PAYLOAD PRINT return 0;}
MAIN
+20
View File
@@ -0,0 +1,20 @@
.PHONY: all clean fclean re test
all: Grace
Grace: Grace.o
cc -g3 -o Grace Grace.o
Grace.o: Grace.c
cc -c -g3 Grace.c
clean:
rm -f Grace.o
fclean: clean
rm -f Grace
re: fclean all
test:
./Grace > tmp_Grace ; diff tmp_Grace Grace.c
+9
View File
@@ -0,0 +1,9 @@
//Commentaire
#include <stdio.h>
#define PAYLOAD const char* str = "//Commentaire%c#include <stdio.h>%c%c#define PAYLOAD const char* str = %c%s%c;%c#define PRINT printf(str, 10, 10, 10, 34, str, 34, 10, 10, 10, 10, 10, 10);%c%c#define MAIN int main(void){PAYLOAD PRINT return 0;}%c%cMAIN%c";
#define PRINT printf(str, 10, 10, 10, 34, str, 34, 10, 10, 10, 10, 10, 10);
#define MAIN int main(void){PAYLOAD PRINT return 0;}
MAIN