/[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 397 - (show annotations) (download) (as text)
Mon Nov 10 21:43:08 2008 UTC (9 years, 5 months ago) by vapier
File MIME type: text/x-csrc
File size: 425 byte(s)
convert to stdbool.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