Table of Contents

NAME

QccSetEnv, QccGetEnv - environment-variable operations

SYNOPSIS

#include "libQccPack.h"

int QccSetEnv(const char *environment_variable, const char *value);
int QccGetEnv(const char *environment_variable, QccString returned_value);

DESCRIPTION

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.

RETURNED VALUES

These routines return 0 on success, and 1 on failure. In addition, upon error, QccGetEnv() sets returned_value to be a zero-length string.

SEE ALSO

QccString(3) , QccPack(3) , getenv(3) , putenv(3) , environ(5)

AUTHOR

Copyright (C) 1997-2021 James E. Fowler


Table of Contents



Get QccPack at SourceForge.net. Fast, secure and Free Open Source software downloads