Lines Matching refs:name
22 * 4. Neither the name of the University nor the names of its contributors
53 static char *findenv(const char *name, int *offset);
57 * Set the value of the environmental variable "name" to be
60 setenv(const char *name, const char *value, int rewrite) {
69 if ((c = findenv(name, &offset))) { /*%< find if already exists */
98 for (c = (char *)name; *c && *c != '='; ++c); /*%< no `=' in name */
99 if (!(environ[offset] = /*%< name + `=' + value */
100 malloc((size_t)((int)(c - name) + l_value + 2))))
102 for (c = environ[offset]; (*c = *name++) && *c != '='; ++c);
108 * unsetenv(name) --
109 * Delete environmental variable "name".
112 unsetenv(const char *name) {
116 while (findenv(name, &offset)) /*%< if set multiple times */
124 * Returns pointer to value associated with name, if any, else NULL.
125 * Sets offset to be the offset of the name/value combination in the
127 * Explicitly removes '=' in argument name.
132 findenv(const char *name, int *offset) {
137 if (name == NULL || environ == NULL)
139 for (np = name; *np && *np != '='; ++np)
141 len = np - name;
143 if (strncmp(c, name, len) == 0 && c[len] == '=') {