MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / SDL_setenv

Function SDL_setenv

deps/SDL2/src/stdlib/SDL_getenv.c:47–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45/* Note: Name may not contain a '=' character. (Reference: http://www.unix.com/man-page/Linux/3/setenv/) */
46#if defined(HAVE_SETENV)
47int
48SDL_setenv(const char *name, const char *value, int overwrite)
49{
50 /* Input validation */
51 if (!name || SDL_strlen(name) == 0 || SDL_strchr(name, '=') != NULL || !value) {
52 return (-1);
53 }
54
55 return setenv(name, value, overwrite);
56}
57#elif defined(__WIN32__)
58int
59SDL_setenv(const char *name, const char *value, int overwrite)

Callers 4

stdlib_getsetenvFunction · 0.85
ESD_InitFunction · 0.85
mainFunction · 0.85

Calls 8

SDL_strlenFunction · 0.85
SDL_strchrFunction · 0.85
SDL_mallocFunction · 0.85
SDL_snprintfFunction · 0.85
SDL_getenvFunction · 0.85
SDL_strncmpFunction · 0.85
SDL_freeFunction · 0.85
SDL_reallocFunction · 0.85

Tested by 1

stdlib_getsetenvFunction · 0.68