aboutsummaryrefslogtreecommitdiffhomepage
path: root/env.h
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-06-09 09:52:12 +1000
committerGravatar axel <axel@liljencrantz.se>2006-06-09 09:52:12 +1000
commitf7118e769f53678853eb17556097b82f100e9746 (patch)
tree775f5fc8046dc775a05db8fd293a58de5668943e /env.h
parent93ae00e8e50b9c1319ff478cbecbf482bf6d217e (diff)
Add more function input validation checks
darcs-hash:20060608235212-ac50b-25fd55f96356af65d4da1eec100cc954b4a9f81e.gz
Diffstat (limited to 'env.h')
-rw-r--r--env.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/env.h b/env.h
index 27a7bbfb..405b9c1e 100644
--- a/env.h
+++ b/env.h
@@ -44,7 +44,12 @@
/**
Error code for trying to alter read-only variable
*/
-#define ENV_PERM 1
+enum{
+ ENV_PERM = 1,
+ ENV_INVALID
+}
+;
+
/**
Initialize environment variable data
@@ -71,7 +76,7 @@ void env_destroy();
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.
-
+ * ENV_INVALID, the variable name or mode was invalid
*/
int env_set( const wchar_t *key,