5 Author: Pekka Riikonen <priikone@silcnet.org>
7 Copyright (C) 2007 - 2008 Pekka Riikonen
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; version 2 of the License.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
20 /****h* silcutil/Environment Manipulation Interface
24 * This interface provides utility functions for manipulating environment
25 * variables. On platforms that do not support environment variables this
26 * interfaces does nothing.
33 /****f* silcutil/SilcEnvAPI/silc_setenv
37 * SilcBool silc_setenv(const char *variable, const char *value);
41 * Sets the environment variable named `variable' with value `value'
42 * to the environment. If the `variable' already exists in the
43 * environment its value is changed to `value'. Returns FALSE if the
44 * value could not be set or if environment variables are not supported.
47 SilcBool silc_setenv(const char *variable, const char *value);
49 /****f* silcutil/SilcEnvAPI/silc_getenv
53 * const char *silc_getenv(const char *variable);
57 * Returns the value of the environment variable `variable' or NULL if
58 * such variable does not exist in the environment.
61 const char *silc_getenv(const char *variable);
63 /****f* silcutil/SilcEnvAPI/silc_unsetenv
67 * SilcBool silc_unsetenv(const char *variable);
71 * Clears the value of the environment variable `variable'. Returns FALSE
72 * if the value could not be cleared or if environment variables are not
76 SilcBool silc_unsetenv(const char *variable);
78 /****f* silcutil/SilcEnvAPI/silc_clearenv
82 * SilcBool silc_clearenv(void);
86 * Clears the environment of all environment variables. Returns FALSE
87 * if the environment could not be cleared or if environment variables are
91 SilcBool silc_clearenv(void);
93 #endif /* SILCENV_H */