Compare commits

..

6 Commits

Author SHA1 Message Date
Camille Chauvet
f20038e37b merge wallah ct chaud 2023-02-16 15:19:28 +01:00
Camille Chauvet
edbd267c0d merge 2023-02-16 15:17:32 +01:00
Etienne Rey-bethbeder
1fb6e0a2c1 Bon j'ai un peu ranger mais bon voila 2023-02-16 14:30:49 +01:00
Etienne Rey-bethbeder
02f5815485 Bon il faut ranger la chambre sinon impec 2023-02-16 14:30:28 +01:00
Etienne Rey-bethbeder
b20d4e0ddc bozo 2023-02-14 13:55:02 +01:00
Etienne Rey-bethbeder
afaf34f869 bozo 2023-02-14 13:54:41 +01:00
6 changed files with 17 additions and 27 deletions

View File

@ -7,7 +7,7 @@ NAME = minishell
CC = gcc
CFLAGS = -Wall -Werror -Wextra -g
CFLAGS = -Werror -Wextra -g
LIBS = libftx/libftx.a

2
env.c
View File

@ -6,7 +6,7 @@
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/02/02 14:39:56 by erey-bet #+# #+# */
/* Updated: 2023/02/16 15:13:35 by cchauvet ### ########.fr */
/* Updated: 2023/02/16 15:18:48 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */

33
main.c
View File

@ -1,25 +1,16 @@
#include "libftx/libftx.h"
#include "minishell.h"
#include <fcntl.h>
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* 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 */
/* */
/* ************************************************************************** */
/* 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); */
/* } */
#include "minishell.h"
int main(int ac, char **av, char **env)
{

View File

@ -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 */
/* */
/* ************************************************************************** */

View File

@ -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);

View File

@ -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 */
/* */
/* ************************************************************************** */