diff options
author | axel <axel@liljencrantz.se> | 2006-04-11 01:36:26 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-04-11 01:36:26 +1000 |
commit | bd9c843fd156ed5b637e2a5d1f11737d021bc380 (patch) | |
tree | d797f956747548a0b6498fdc4c8566499a0de8e9 /env.h | |
parent | f812b9b26cda8e8b386cbf0de08f3700811c7c9a (diff) |
Add warning when trying to change read-only variable
darcs-hash:20060410153626-ac50b-700ff7687647b8aab47ba79d759d1739cbe60425.gz
Diffstat (limited to 'env.h')
-rw-r--r-- | env.h | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -42,6 +42,11 @@ #define ENV_UNIVERSAL 32 /** + Error code for trying to alter read-only variable +*/ +#define ENV_PERM 1 + +/** Initialize environment variable data */ void env_init(); @@ -61,9 +66,15 @@ void env_destroy(); \param val The value \param mode The type of the variable. Can be any combination of ENV_GLOBAL, ENV_LOCAL, ENV_EXPORT and ENV_USER. If mode is zero, the current variable space is searched and the current mode is used. If no current variable with the same name is found, ENV_LOCAL is assumed. + \returns 0 on suicess or an error code on failiure. + + The current error codes are: + + * ENV_PERM, can only be returned when setting as a user, e.g. ENV_USER is set. This means that the user tried to change a read-only variable. + */ -void env_set( const wchar_t *key, +int env_set( const wchar_t *key, const wchar_t *val, int mode ); |