Lines Matching refs:envc
22 // Use this instead of envc so we keep track of what needs to be freed.
25 toys.envc = 0;
34 unsigned i, len, envc;
38 if (!toys.envc) {
39 // envc is size +1 so even if env empty it's nonzero after initialization
40 while (environ[toys.envc++]);
41 memcpy(new = xmalloc(((toys.envc|0xff)+1)*sizeof(char *)),
42 environ, toys.envc*sizeof(char *));
56 envc = toys.envc-1; // compensate for size +1 above
60 if (i>=envc) free(environ[i]);
63 toys.envc = envc--;
64 for (; new ? i<envc : !!environ[i]; i++) environ[i] = environ[i+1];
65 i = envc;