Now has its own implementation of getenv().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11676 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
9689bb8114
commit
6f0f950768
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2004, Axel Dörfler, axeld@pinc-software.de.
|
||||
* Copyright 2003-2005, Axel Dörfler, axeld@pinc-software.de.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2002, Manuel J. Petit. All rights reserved.
|
||||
@ -198,6 +198,22 @@ rld_lock()
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
getenv(const char *name)
|
||||
{
|
||||
char **environ = gProgramArgs->envp;
|
||||
int32 length = strlen(name);
|
||||
int32 i;
|
||||
|
||||
for (i = 0; environ[i] != NULL; i++) {
|
||||
if (!strncmp(name, environ[i], length) && environ[i][length] == '=')
|
||||
return environ[i] + length + 1;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
enqueue_image(image_queue_t *queue, image_t *image)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user