add: main

This commit is contained in:
starnakin 2023-06-28 18:17:30 +02:00
parent 5ab4ab5c2d
commit 33653cb824

23
src/main.c Normal file
View File

@ -0,0 +1,23 @@
#include "./env/env.h"
#include <stdio.h>
int main(int ac, char **av, char **env)
{
lst** lst_env;
lst* current;
struct s_env* content;
(void) av;
(void) ac;
lst_env = env_init((const char **) env);
if (lst_env == NULL)
return (1);
current = *lst_env;
while (current != NULL)
{
content = current->content;
if (content == NULL)
printf("nil\n");
printf("%s=%s\n", content->key, content->value);
current = current->next;
}
}