add: main
This commit is contained in:
parent
5ab4ab5c2d
commit
33653cb824
23
src/main.c
Normal file
23
src/main.c
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user