Last change
on this file since 387 was 337, checked in by coas-nagasima, 6 years ago |
ASP3版ECNLを追加
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-csrc;charset=UTF-8
|
File size:
325 bytes
|
Rev | Line | |
---|
[337] | 1 | #include <stdlib.h>
|
---|
| 2 | #include <string.h>
|
---|
| 3 | #include "libc.h"
|
---|
| 4 |
|
---|
| 5 | char *__strchrnul(const char *, int);
|
---|
| 6 |
|
---|
| 7 | char *getenv(const char *name)
|
---|
| 8 | {
|
---|
| 9 | size_t l = __strchrnul(name, '=') - name;
|
---|
| 10 | if (l && !name[l] && __environ)
|
---|
| 11 | for (char **e = __environ; *e; e++)
|
---|
| 12 | if (!strncmp(name, *e, l) && l[*e] == '=')
|
---|
| 13 | return *e + l+1;
|
---|
| 14 | return 0;
|
---|
| 15 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.