version 1.25, 2020/05/16 15:40:44 |
version 1.26, 2020/10/07 08:23:55 |
|
|
|
|
#include <sys/types.h> |
#include <sys/types.h> |
|
|
|
#include <fnmatch.h> |
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
#include <unistd.h> |
#include <unistd.h> |
|
|
a = options_array_first(o); |
a = options_array_first(o); |
while (a != NULL) { |
while (a != NULL) { |
ov = options_array_item_value(a); |
ov = options_array_item_value(a); |
if ((envent = environ_find(src, ov->string)) == NULL) |
RB_FOREACH(envent, environ, src) { |
|
if (fnmatch(ov->string, envent->name, 0) == 0) |
|
break; |
|
} |
|
if (envent == NULL) |
environ_clear(dst, ov->string); |
environ_clear(dst, ov->string); |
else |
else |
environ_set(dst, envent->name, 0, "%s", envent->value); |
environ_set(dst, envent->name, 0, "%s", envent->value); |