Browse Source

[enh] document env var f().

Moul 2 years ago
parent
commit
9d7a6604fe
1 changed files with 15 additions and 0 deletions
  1. 15 0
      src/env.c

+ 15 - 0
src/env.c

@@ -1,5 +1,9 @@
 #include "sh.h"
 
+/*
+** Browse env var
+*/
+
 char	*get_tenv(t_e *e, char *var)
 {
 	int		i;
@@ -11,6 +15,12 @@ char	*get_tenv(t_e *e, char *var)
 	return (NULL);
 }
 
+/*
+** Split, check good format
+** remove env var if already exists
+** add env var
+*/
+
 void	ft_setenv(t_e *e, char *namevalue)
 {
 	char	**name;
@@ -28,6 +38,11 @@ void	ft_setenv(t_e *e, char *namevalue)
 	ft_tabdel(name);
 }
 
+/*
+** Check good format
+** remove env var
+*/
+
 void	ft_unsetenv(t_e *e, char *name)
 {
 	if (name == NULL || isenv(name) == 0)