merge
This commit is contained in:
commit
edbd267c0d
2
Makefile
2
Makefile
@ -7,7 +7,7 @@ NAME = minishell
|
|||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
|
|
||||||
CFLAGS = -Wall -Werror -Wextra -g
|
CFLAGS = -Werror -Wextra -g
|
||||||
|
|
||||||
LIBS = libftx/libftx.a
|
LIBS = libftx/libftx.a
|
||||||
|
|
||||||
|
7
env.c
7
env.c
@ -6,7 +6,11 @@
|
|||||||
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/02/02 14:39:56 by erey-bet #+# #+# */
|
/* Created: 2023/02/02 14:39:56 by erey-bet #+# #+# */
|
||||||
|
<<<<<<< HEAD
|
||||||
/* Updated: 2023/02/16 15:13:35 by cchauvet ### ########.fr */
|
/* Updated: 2023/02/16 15:13:35 by cchauvet ### ########.fr */
|
||||||
|
=======
|
||||||
|
/* Updated: 2023/02/16 14:30:12 by erey-bet ### ########.fr */
|
||||||
|
>>>>>>> origin/master
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -106,6 +110,7 @@ char *get_value(char *str)
|
|||||||
return (s);
|
return (s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
void env_del(void *ptr)
|
void env_del(void *ptr)
|
||||||
{
|
{
|
||||||
t_env *content;
|
t_env *content;
|
||||||
@ -115,6 +120,8 @@ void env_del(void *ptr)
|
|||||||
free(content->value);
|
free(content->value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
=======
|
||||||
|
>>>>>>> origin/master
|
||||||
char *get_key(char *str)
|
char *get_key(char *str)
|
||||||
{
|
{
|
||||||
char *s;
|
char *s;
|
||||||
|
33
main.c
33
main.c
@ -1,25 +1,16 @@
|
|||||||
#include "libftx/libftx.h"
|
/* ************************************************************************** */
|
||||||
#include "minishell.h"
|
|
||||||
#include <fcntl.h>
|
|
||||||
|
|
||||||
/* int main(int ac, char **av) */
|
|
||||||
/* { */
|
|
||||||
/* char *line; */
|
|
||||||
/* int fd; */
|
|
||||||
/* */
|
/* */
|
||||||
/* if (ac != 2) */
|
/* ::: :::::::: */
|
||||||
/* return (1); */
|
/* main.c :+: :+: :+: */
|
||||||
/* fd = open(av[1], O_RDONLY); */
|
/* +:+ +:+ +:+ */
|
||||||
/* line = get_next_line(fd); */
|
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
||||||
/* while (line != NULL) */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* { */
|
/* Created: 2023/02/16 15:16:14 by cchauvet #+# #+# */
|
||||||
/* ft_printf(line); */
|
/* Updated: 2023/02/16 15:16:45 by cchauvet ### ########.fr */
|
||||||
/* line = get_next_line(fd); */
|
/* */
|
||||||
/* free(line); */
|
/* ************************************************************************** */
|
||||||
/* } */
|
|
||||||
/* free(line); */
|
#include "minishell.h"
|
||||||
/* return (0); */
|
|
||||||
/* } */
|
|
||||||
|
|
||||||
int main(int ac, char **av, char **env)
|
int main(int ac, char **av, char **env)
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/02/14 13:45:30 by cchauvet #+# #+# */
|
/* Created: 2023/02/14 13:45:30 by cchauvet #+# #+# */
|
||||||
/* Updated: 2023/02/16 15:11:53 by cchauvet ### ########.fr */
|
/* Updated: 2023/02/16 15:17:07 by cchauvet ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
@ -5,8 +5,7 @@ char *ft_strreplace(const char *str, const char *fill, size_t start, size_t stop
|
|||||||
char *out;
|
char *out;
|
||||||
size_t sum;
|
size_t sum;
|
||||||
|
|
||||||
out = malloc((ft_strlen(str) + ft_strlen(fill) - (stop - start) + 1
|
out = malloc((ft_strlen(str) + ft_strlen(fill) - (stop - start) + 1 * sizeof(char)));
|
||||||
* sizeof(char)));
|
|
||||||
if (out == NULL)
|
if (out == NULL)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
ft_strncpy(out, str, start);
|
ft_strncpy(out, str, start);
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/02/14 14:46:40 by cchauvet #+# #+# */
|
/* Created: 2023/02/14 14:46:40 by cchauvet #+# #+# */
|
||||||
/* Updated: 2023/02/15 18:00:27 by cchauvet ### ########.fr */
|
/* Updated: 2023/02/16 15:15:05 by cchauvet ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user