osdGetEnvironmentVariable

osdGetEnvironmentVariable

osd

1998 12-05


NAME

osdGetEnvironmentVariable - get the value of an environment variable


SYNOPSIS

long osdGetEnvironmentVariable(char *name, char *value, long size)

osdGetEnvironmentVariable() sets buffer to the environment variable named by name. Note that different OS's and shells may have a different set of default defined variables.


The preferred method of accessing environment variables is through the WBA unified environment interface (see WBA_Environment).


.SH RETURN VALUES Returns 1 if the environment variable was present, 0 if it was not.


ARGUMENTS


name The name of the environment variable
value The buffer into which to place the value
size The size of value


EXAMPLES

char buffer[256];

if (osdGetEnvironmentVariable("USER", buffer, 256))
	{ printf("Welcome, %s.\\n", buffer); }
else
	{ fprintf(stderr, "Unknown user!\\n"); }