Compare commits
No commits in common. "f20038e37bba79ed7f5c82a72ea8218e35893226" and "de8dfc41d4e790aaf07783ca4b8a888ac0c3a027" have entirely different histories.
f20038e37b
...
de8dfc41d4
2
Makefile
2
Makefile
@ -7,7 +7,7 @@ NAME = minishell
|
||||
|
||||
CC = gcc
|
||||
|
||||
CFLAGS = -Werror -Wextra -g
|
||||
CFLAGS = -Wall -Werror -Wextra -g
|
||||
|
||||
LIBS = libftx/libftx.a
|
||||
|
||||
|
2
env.c
2
env.c
@ -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:18:48 by cchauvet ### ########.fr */
|
||||
/* Updated: 2023/02/16 15:13:35 by cchauvet ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
33
main.c
33
main.c
@ -1,16 +1,25 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* 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 "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); */
|
||||
/* } */
|
||||
|
||||
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:17:07 by cchauvet ### ########.fr */
|
||||
/* Updated: 2023/02/16 15:11:53 by cchauvet ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
@ -5,7 +5,8 @@ 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/16 15:15:05 by cchauvet ### ########.fr */
|
||||
/* Updated: 2023/02/15 18:00:27 by cchauvet ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user