28 if (*s ==
'=')
return s;
36static void env_del(
int i) {
42static void env_unsetlen(
char *s,
int len)
46 for (i = en - 1; i >= 0; --i)
65 if (t) env_unsetlen(s,t - s);
68 if (!
alloc_re((
void **)&
environ,(en + 1) *
sizeof(
char *),(ea + 1) *
sizeof(
char *)))
69 { ea = en;
return 0; }
109 for (en = 0;
environ[en]; ++en)
112 newenviron = (
char **)
alloc((ea + 1) *
sizeof(
char *));
113 if (!newenviron)
return 0;
115 for (en = 0;
environ[en]; ++en) {
117 if (!newenviron[en]) {
118 for (i = 0; i < en; ++i)
alloc_free(newenviron[i]);
131static char *null = 0;
135 while (en) env_del(0);
char * env_findeq(char *s)
int env_put(char *name, char *value)
void * alloc(unsigned int)
int alloc_re(void **, unsigned int, unsigned int)
int str_start(const char *, const char *)
int str_diffn(const char *, const char *, unsigned int)
unsigned int str_len(const char *)
unsigned int str_copy(char *, const char *)