added first builtin

corrected binary execution + added echo
This commit is contained in:
Tanguy MAZE
2018-11-27 18:38:24 +01:00
parent cf788bc62c
commit 4ce47a9f0b
7 changed files with 149 additions and 19 deletions

BIN
tests/a.out Executable file

Binary file not shown.

36
tests/main.c Normal file
View File

@@ -0,0 +1,36 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/11/23 14:24:53 by tmaze #+# #+# */
/* Updated: 2018/11/26 12:50:19 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
#include <unistd.h>
#include <stdio.h>
#include "../libft/libft.h"
static void ft_cntdelstr(void* content, size_t content_size)
{
ft_strdel((char**)content);
content_size = 0;
}
int main(int argc, char **argv)
{
extern char **environ;
t_list *lst;
int i;
i = -1;
while (environ[++i])
printf("%s\n", environ[i]);
if (argc > 1)
if ((lst = ft_strsplitstr2()))
return (0);
}