delorie.com/djgpp/doc/libc/libc_698.html | search |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
#include <stdlib.h> int setenv(const char *name, const char *value, int rewrite); |
This function sets the environment variable name to value. If rewrite is set, then this function will replace any existing value. If it is not set, it will only put the variable into the environment if that variable isn't already defined.
Zero on success, -1 on failure; errno
is set to the reason for
failure: EINVAL
if the name parameter is NULL
or points
to an empty string, or ENOMEM
if there was insufficient memory to
add the variable to the environment.
ANSI/ISO C | No |
POSIX | 1003.2-1992; 1003.1-2001 (see note 1) |
Notes:
webmaster | delorie software privacy |
Copyright © 2004 | Updated Apr 2004 |