From 770be8b5e2a57a94503d302600ae4229568c9f90 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 26 Apr 2013 14:16:50 +0200 Subject: Make gp_boolean_is_true non-static. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Günther Deschner --- proxy/src/gp_common.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'proxy/src/gp_common.c') diff --git a/proxy/src/gp_common.c b/proxy/src/gp_common.c index f4ebc5e..19253dc 100644 --- a/proxy/src/gp_common.c +++ b/proxy/src/gp_common.c @@ -35,3 +35,15 @@ bool gp_same(const char *a, const char *b) return false; } + +bool gp_boolean_is_true(const char *s) +{ + if (strcasecmp(s, "1") == 0 || + strcasecmp(s, "on") == 0 || + strcasecmp(s, "true") == 0 || + strcasecmp(s, "yes") == 0) { + return true; + } + + return false; +} -- cgit