blob: 18a8cc07a325bf9770e709803d38087292c4b16a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/*
* is_env_on.c
*
* Util functions.
*
* Copyright 1999-2008 Gentoo Foundation
* Licensed under the GPL-2
*/
#include "headers.h"
#include "sbutil.h"
bool is_env_on (const char *env)
{
if ((NULL != env) && (NULL != getenv(env)) &&
((0 == strncasecmp(getenv(env), "1", 1)) ||
(0 == strncasecmp(getenv(env), "true", 4)) ||
(0 == strncasecmp(getenv(env), "yes", 3))))
return true;
return false;
}
|