Table of Contents
QccSetEnv, QccGetEnv - environment-variable operations
#include
"libQccPack.h"
int QccSetEnv(const char *environment_variable, const char
*value);
int QccGetEnv(const char *environment_variable, QccString returned_value);
QccSetEnv() sets the environment variable whose name is in
string environment_variable to the value contained in string value, if
the specified environment variable does not already exist in the environment.
If the environment variable does already exist in the environment, QccSetEnv()
does nothing.
QccGetEnv() returns the value of the specified environment_variable
as the string returned_value. The returned_value is truncated to QCCSTRINGLEN
characters, if necessary. Space for returned_value must be allocated prior
to calling QccGetEnv(). QccGetEnv() will return an error if the specified
environment_variable does not exist in the environment.
These routines return 0 on success, and 1 on failure. In addition, upon
error, QccGetEnv() sets returned_value to be a zero-length string.
QccString(3)
, QccPack(3)
, getenv(3)
, putenv(3)
, environ(5)
Copyright (C) 1997-2021 James E. Fowler
Table of Contents