From 66635d69fa00e335a091d7e6f2b358cbaaf205e4 Mon Sep 17 00:00:00 2001 From: Cabergs Charles Date: Tue, 16 Jul 2019 12:58:13 +0200 Subject: c09 passed, c10 start, exam00 and exam01 --- c10/ex01/main.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 c10/ex01/main.c (limited to 'c10/ex01/main.c') diff --git a/c10/ex01/main.c b/c10/ex01/main.c new file mode 100644 index 0000000..b5fb416 --- /dev/null +++ b/c10/ex01/main.c @@ -0,0 +1,34 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* main.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/07/15 16:45:20 by cacharle #+# #+# */ +/* Updated: 2019/07/16 10:20:39 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include +#include "include.h" + +int main(int argc, char **argv) +{ + int i; + int fildes; + int status; + + status = 0; + i = 1; + while (i < argc) + { + if (print_file(argv[i]) == -1) + { + handle_error(argv[0], argv[i]); + status = 1; + } + i++; + } + return (status); +} -- cgit