diff options
Diffstat (limited to 'ucspi-tcp-0.88/env.c')
-rw-r--r-- | ucspi-tcp-0.88/env.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ucspi-tcp-0.88/env.c b/ucspi-tcp-0.88/env.c new file mode 100644 index 0000000..430203e --- /dev/null +++ b/ucspi-tcp-0.88/env.c @@ -0,0 +1,15 @@ +#include "str.h" +#include "env.h" + +extern /*@null@*/char *env_get(char *s) +{ + int i; + unsigned int len; + + if (!s) return 0; + len = str_len(s); + for (i = 0;environ[i];++i) + if (str_start(environ[i],s) && (environ[i][len] == '=')) + return environ[i] + len + 1; + return 0; +} |