This repository has been archived by the owner on Jan 30, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_ls.h
87 lines (79 loc) · 2.88 KB
/
ft_ls.h
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_ls.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: arizzell <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/12/09 13:19:59 by arizzell #+# #+# */
/* Updated: 2017/12/09 13:20:00 by arizzell ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef FT_LS_H
# define FT_LS_H
# define TRUE 1
# define FALSE 0
# define MODE lstats.st_mtimespec
# include <time.h>
# include <unistd.h>
# include <dirent.h>
# include <stdlib.h>
# include <sys/stat.h>
# include <pwd.h>
# include <grp.h>
# include <stdio.h>
# include <errno.h>
# include <ntsid.h>
# include <sys/acl.h>
# include <sys/xattr.h>
# include "libft/libft.h"
int g_erro;
typedef struct s_params
{
int l;
int rec;
int a;
int r;
int t;
} t_params;
typedef struct s_object
{
struct stat lstats;
struct dirent name;
struct s_object *next;
char lkname[255];
} t_object;
t_params *ft_initparams(void);
t_object *lst_sort_ascii(t_object *lst);
t_object *ft_dataorder(t_object *list);
t_object *ft_reverseorder(t_object *list);
t_object *ft_initnode(void);
t_object *ft_getnewnode(t_object *current);
size_t ft_spestrleu(uid_t uid);
size_t ft_spestrleg(gid_t gid);
char *ft_extattr(char *path);
void ft_getdatayear(t_object *list);
void ft_exiterror(char *path);
void ft_sp(char **a, int s, int argnow);
void ft_spr(char **a, int s, int argnow);
void ft_perml(t_object *file, char *path);
void ft_continue(t_object *file);
void ft_getnamelink(t_object *list, t_params *params);
void ft_getmajmin(t_object *list, t_object *root);
void ft_gettype(t_object *list);
void ft_relauch(t_object *root, t_params *params, char *path);
void ft_destroylist(t_object *list);
void ft_destroyparams(t_params *params);
void ft_recursive(char *p, t_params *pa, t_object *n, t_object *l);
void ft_printlist(t_object *list, t_params *params, char *path);
void ft_getdata(t_object *list);
void ft_getsize(t_object *list, t_object *root);
void ft_getgroup(t_object *list, t_object *root);
void ft_getlinks(t_object *list, t_object *root);
void ft_getuser(t_object *list, t_object *root);
void ft_gettotalsize(t_object *list);
void ft_getperm(t_object *list, char *path);
void ft_bspace(char *s, size_t n);
void ft_putnfree(char *s, int mode);
unsigned long ft_numlen(unsigned long i);
#endif