source: asp3_tinet_ecnl_arm/trunk/musl-1.1.18/src/env/getenv.c@ 352

Last change on this file since 352 was 352, checked in by coas-nagasima, 6 years ago

arm向け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
Line 
1#include <stdlib.h>
2#include <string.h>
3#include "libc.h"
4
5char *__strchrnul(const char *, int);
6
7char *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.