diff --git a/C/Makefile b/C/Makefile index e69de29..52e40dc 100644 --- a/C/Makefile +++ b/C/Makefile @@ -0,0 +1,7 @@ +COLLEEN = colleen + +COLLEEN: colleen.o + cc -o colleen colleen.o + +colleen.o: colleen.c + cc -c colleen.c diff --git a/C/colleen b/C/colleen new file mode 100755 index 0000000..ba00379 Binary files /dev/null and b/C/colleen differ diff --git a/C/colleen.c b/C/colleen.c new file mode 100644 index 0000000..9de23a8 --- /dev/null +++ b/C/colleen.c @@ -0,0 +1,13 @@ +#include +/* Le commentaire en dehores du programme */ + +void the_fonction_needed(void){ + printf("YO\n"); + return; +} + +int main(void){ +/* LA FONCTION PRINCIPALE */ + the_fonction_needed(); + return 0; +} diff --git a/REPLICA/Makefile b/REPLICA/Makefile new file mode 100644 index 0000000..488ffbf --- /dev/null +++ b/REPLICA/Makefile @@ -0,0 +1,7 @@ +REPLICA = replica + +REPLICA: replica.o + cc -o replica replica.o + +replica.o: replica.c + cc -c replica.c diff --git a/REPLICA/replica b/REPLICA/replica new file mode 100755 index 0000000..1e66733 Binary files /dev/null and b/REPLICA/replica differ diff --git a/REPLICA/replica.c b/REPLICA/replica.c new file mode 100644 index 0000000..47ede0c --- /dev/null +++ b/REPLICA/replica.c @@ -0,0 +1,12 @@ +#include +int main(int argc, char** argv){ + if (argc != 2) + return 0; + int fd = open(argv[1], O_RDONLY); + if (fd == -1) + { + printf("fail opening file\n"); + return 1; + } + return 0; +}