2002-10-05 21:13:32 +04:00
|
|
|
/*
|
|
|
|
** Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
|
|
|
** Distributed under the terms of the NewOS License.
|
|
|
|
*/
|
|
|
|
#include <syscalls.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
|
2003-01-13 13:50:14 +03:00
|
|
|
char **environ = NULL;
|
|
|
|
|
|
|
|
|
2002-10-05 21:13:32 +04:00
|
|
|
int setenv(const char *name, const char *value, int overwrite)
|
|
|
|
{
|
|
|
|
return sys_setenv(name, value, overwrite);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
char *getenv(const char *name)
|
|
|
|
{
|
|
|
|
char *value;
|
|
|
|
int rc;
|
|
|
|
|
|
|
|
rc = sys_getenv(name, &value);
|
|
|
|
if (rc < 0)
|
|
|
|
return NULL;
|
|
|
|
return value;
|
|
|
|
}
|