aboutsummaryrefslogtreecommitdiff
path: root/lib/env.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/env.c')
-rw-r--r--lib/env.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/env.c b/lib/env.c
index 4ccb918..de63bbb 100644
--- a/lib/env.c
+++ b/lib/env.c
@@ -25,6 +25,15 @@ gray_env_get(struct gray_env *env, const char *name)
return NULL;
}
+int
+gray_env_get_bool(struct gray_env *env, const char *name, int dfl)
+{
+ char *p = gray_env_get(env, name);
+ if (!p)
+ return dfl;
+ return gray_boolean_true_p(p);
+}
+
void
gray_env_free(struct gray_env *env)
{

Return to:

Send suggestions and report system problems to the System administrator.