file norming

This commit is contained in:
Tanguy MAZE
2020-02-01 16:02:38 +01:00
parent 2a2f5bd4d3
commit f0837247bd
11 changed files with 153 additions and 138 deletions

View File

@@ -6,18 +6,12 @@
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/25 18:21:47 by tmaze #+# #+# */
/* Updated: 2020/01/30 15:42:17 by tmaze ### ########.fr */
/* Updated: 2020/02/01 15:56:43 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
void *return_null(char *msg)
{
ft_printf("%s\n", msg);
return (NULL);
}
void ft_strreplace(char **dst, char *src, int *index, t_env *elem)
{
if (*dst != NULL)
@@ -57,7 +51,6 @@ char *replace_env(char *src, t_env *elem, int key_size, int i)
int res_len;
res_len = ft_strlen(src) - key_size + ft_strlen(elem->val);
ft_printf("size replace: %d\n", res_len);
if ((ret = ft_strnew(res_len)) != NULL)
{
ft_strncpy(ret, src, i);