-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfileinfo_format_name.c
23 lines (21 loc) · 1.12 KB
/
fileinfo_format_name.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* fileinfo_format_name.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: alischyn <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/03/24 19:43:21 by alischyn #+# #+# */
/* Updated: 2017/03/25 15:24:16 by alischyn ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_ls.h"
void fileinfo_format_name(t_fileinfo *fi)
{
__builtin_strcpy(fi->fmt_name, fi->name);
if (g_params['l'] && S_ISLNK(fi->stat.st_mode))
{
__builtin_strcat(fi->fmt_name, " -> ");
__builtin_strcat(fi->fmt_name, fi->lnk_dest);
}
}