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