|
Last change
on this file since 146 was 146, checked in by zap, 23 years ago |
|
Changed to _STD most standard functions.
Added the rules to build c_alias.a from all declared _STD functions
removed a lot of obsolete stuff.
changed crt0.s and dll0.s since we don't EMX anymore.
|
-
Property cvs2svn:cvs-rev
set to
1.2
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
|
|
File size:
419 bytes
|
| Line | |
|---|
| 1 | /* getenv.c (emx+gcc) -- Copyright (c) 1990-1995 by Eberhard Mattes */
|
|---|
| 2 |
|
|---|
| 3 | #include "libc-alias.h"
|
|---|
| 4 | #include <stdlib.h>
|
|---|
| 5 | #include <string.h>
|
|---|
| 6 |
|
|---|
| 7 | char *_STD(getenv) (const char *name)
|
|---|
| 8 | {
|
|---|
| 9 | int len;
|
|---|
| 10 | char **p;
|
|---|
| 11 |
|
|---|
| 12 | if (name == NULL || environ == NULL)
|
|---|
| 13 | return NULL;
|
|---|
| 14 | len = strlen (name);
|
|---|
| 15 | for (p = environ; *p != NULL; ++p)
|
|---|
| 16 | if (strncmp (*p, name, len) == 0 && (*p)[len] == '=')
|
|---|
| 17 | return *p + len + 1;
|
|---|
| 18 | return NULL;
|
|---|
| 19 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.