blob: 2dbfefe9091683af04a54307aa6d5a71ca9d4332 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cacharle <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/07/16 14:51:03 by cacharle #+# #+# */
/* Updated: 2019/07/17 15:43:59 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <stdio.h> // remove this
#include "include.h"
int main(int argc, char **argv)
{
size_t last_size;
int i;
int status;
status = 0;
last_size = ft_atoi(argv[2]);
i = 3;
while (i < argc)
{
if (print_tail(argv[i], last_size) == -1)
{
handle_error(argv[0], argv[i]);
return (1);
}
i++;
}
return (status);
}
|