/[path-sandbox]/trunk/libsbutil/is_env_on.c
Gentoo

Contents of /trunk/libsbutil/is_env_on.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 370 - (show annotations) (download) (as text)
Sun Nov 9 10:29:58 2008 UTC (5 years, 9 months ago) by vapier
File MIME type: text/x-csrc
File size: 425 byte(s)
consolidate all random system includes into headers.h
1 /*
2 * is_env_on.c
3 *
4 * Util functions.
5 *
6 * Copyright 1999-2008 Gentoo Foundation
7 * Licensed under the GPL-2
8 */
9
10 #include "headers.h"
11 #include "sbutil.h"
12
13 bool is_env_on (const char *env)
14 {
15 if ((NULL != env) && (NULL != getenv(env)) &&
16 ((0 == strncasecmp(getenv(env), "1", 1)) ||
17 (0 == strncasecmp(getenv(env), "true", 4)) ||
18 (0 == strncasecmp(getenv(env), "yes", 3))))
19 return TRUE;
20
21 return FALSE;
22 }

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20