From 963fe86c78c97002b553dceac92c28615d7b5b5c Mon Sep 17 00:00:00 2001 From: JunkJumper Date: Fri, 4 Sep 2020 11:43:31 +0200 Subject: [PATCH] debut TP1 --- 2020-2021/S3T_TP_01_SGF-1/Makefile | 10 ++++++++++ 2020-2021/S3T_TP_01_SGF-1/demo.c | 19 +++++++++++++++++++ 2020-2021/S3T_TP_01_SGF-1/myls.c | 8 ++++++++ 3 files changed, 37 insertions(+) create mode 100755 2020-2021/S3T_TP_01_SGF-1/Makefile create mode 100755 2020-2021/S3T_TP_01_SGF-1/demo.c create mode 100755 2020-2021/S3T_TP_01_SGF-1/myls.c diff --git a/2020-2021/S3T_TP_01_SGF-1/Makefile b/2020-2021/S3T_TP_01_SGF-1/Makefile new file mode 100755 index 0000000..b536515 --- /dev/null +++ b/2020-2021/S3T_TP_01_SGF-1/Makefile @@ -0,0 +1,10 @@ +CFLAGS = -Wall -std=gnu99 -g + +EXECUTABLES = demo \ + myls + +all : ${EXECUTABLES} + +clean : + @rm -f core *.o *.out *~ + @rm -f ${EXECUTABLES} diff --git a/2020-2021/S3T_TP_01_SGF-1/demo.c b/2020-2021/S3T_TP_01_SGF-1/demo.c new file mode 100755 index 0000000..bc48add --- /dev/null +++ b/2020-2021/S3T_TP_01_SGF-1/demo.c @@ -0,0 +1,19 @@ +/// M311 - Demonstration de base + +#include +#include +#include +#include +#include + +int main (int argc, char* argv[]) +{ + int resultat; + if (argc != 2) + { fprintf (stderr, "Syntaxe : %s \n\n", argv[0]); exit (1); } + + if ((resultat = mkdir (argv[1], 0777)) == -1) + { perror ("Echec mkdir"); exit (2); } + + /// ... +} diff --git a/2020-2021/S3T_TP_01_SGF-1/myls.c b/2020-2021/S3T_TP_01_SGF-1/myls.c new file mode 100755 index 0000000..2110ebc --- /dev/null +++ b/2020-2021/S3T_TP_01_SGF-1/myls.c @@ -0,0 +1,8 @@ +/// M311 - myls + +#include + +int main (int argc, char* argv[]) +{ + /// ... +}