2004 by Marc J. Rochkind. All rights reserved. Portions marked "Open Source" may be copied under license.

 

Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

c5/setenv.c File Reference


Detailed Description

setenv, getenv, and unsetenv [Sec. 5.2]

Definition in file setenv.c.

Go to the source code of this file.

Functions

int setnew (int i, const char *var, const char *val)
int setenv (const char *var, const char *val, int overwrite)
int unsetenv (const char *var)

Variables

char ** environ


Function Documentation

int setenv const char *  var,
const char *  val,
int  overwrite
 

Description:
Change or add to environment (Std. UNIX; see AUP2 Sec. 5.2)
Headers:
stdlib.h
Returns:
0 on success or -1 on error (sets errno)
Parameters:
var  variable to be changed or added
val  value
overwrite  overwrite?

Definition at line 43 of file setenv.c.

References environ, errno, setnew(), and val.

int setnew int  i,
const char *  var,
const char *  val
[static]
 

Definition at line 29 of file setenv.c.

References environ, and val.

Referenced by setenv().

int unsetenv const char *  var  ) 
 

Description:
Remove environment variable (Std. UNIX; see AUP2 Sec. 5.2)
Headers:
stdlib.h
Returns:
0 on success or -1 on error (sets errno)
Parameters:
var  variable to be removed

Definition at line 80 of file setenv.c.

References environ, and errno.


Variable Documentation

char** environ
 

Definition at line 26 of file setenv.c.


Generated on Fri Apr 23 10:57:08 2004 for AUP2 Example Source by doxygen 1.3.1