diff options
Diffstat (limited to '')
-rw-r--r-- | src/u_alias.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/u_alias.c b/src/u_alias.c new file mode 100644 index 0000000..6253d60 --- /dev/null +++ b/src/u_alias.c @@ -0,0 +1,43 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* u_alias.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/14 17:19:27 by rbousset #+# #+# */ +/* Updated: 2020/02/14 17:19:29 by rbousset ### ########lyon.fr */ +/* */ +/* ************************************************************************** */ + +#include <libft.h> +#include <stddef.h> + +#include "d_define.h" +#include "s_struct.h" + +void + u_get_alias_value(char str[], const char name[], size_t dstsize, t_msh *msh) +{ + t_lalias *ptr; + + str[0] = C_NUL; + ptr = msh->alias; + while (ptr != NULL && ft_strncmp(tmp->name, name, ft_strlen(name)) != 0) + { + ptr = ptr->next; + } + if (ptr != NULL) + { + ft_strlcpy(str, tmp->value, dstsize); + } +} + +void + u_set_alias_value(const char name[], const char value[], t_msh *msh) +{ + t_lalias *tmp; + + tmp = msh->alias; + while (tmp) +} |