Compare commits
6 Commits
de8dfc41d4
...
f20038e37b
Author | SHA1 | Date | |
---|---|---|---|
|
f20038e37b | ||
|
edbd267c0d | ||
|
1fb6e0a2c1 | ||
|
02f5815485 | ||
|
b20d4e0ddc | ||
|
afaf34f869 |
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
|
||||||
|
|
||||||
|
2
env.c
2
env.c
@ -6,7 +6,7 @@
|
|||||||
/* 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 #+# #+# */
|
||||||
/* Updated: 2023/02/16 15:13:35 by cchauvet ### ########.fr */
|
/* Updated: 2023/02/16 15:18:48 by cchauvet ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
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